mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
anisotrop level possible
This commit is contained in:
parent
355eed4818
commit
d17e6c42bc
@ -296,7 +296,7 @@ namespace netgen
|
||||
void (*taskmanager)(function<void(int,int)>) = &DummyTaskManager2,
|
||||
void (*tracer)(string, bool) = &DummyTracer2);
|
||||
|
||||
int GetElementLevel (int ei) const;
|
||||
int GetHPElementLevel (int ei, int dir) const;
|
||||
|
||||
void GetParentNodes (int ni, int * parents) const;
|
||||
int GetParentElement (int ei) const;
|
||||
|
@ -675,9 +675,10 @@ namespace netgen
|
||||
}
|
||||
|
||||
|
||||
int Ngx_Mesh :: GetElementLevel (int ei) const
|
||||
int Ngx_Mesh :: GetHPElementLevel (int ei, int dir) const
|
||||
{
|
||||
ei++;
|
||||
int level = -1;
|
||||
|
||||
if (mesh->hpelements)
|
||||
{
|
||||
@ -687,12 +688,22 @@ namespace netgen
|
||||
else
|
||||
hpelnr = mesh->VolumeElement(ei).hp_elnr;
|
||||
|
||||
return (*mesh->hpelements)[hpelnr].levelx;
|
||||
if (hpelnr < 0)
|
||||
throw NgException("Ngx_Mesh::GetHPElementLevel: Wrong hp-element number!");
|
||||
|
||||
if (dir == 1)
|
||||
level = (*mesh->hpelements)[hpelnr].levelx;
|
||||
else if (dir == 2)
|
||||
level = (*mesh->hpelements)[hpelnr].levely;
|
||||
else if (dir == 3)
|
||||
level = (*mesh->hpelements)[hpelnr].levelz;
|
||||
else
|
||||
throw NgException("Ngx_Mesh::GetHPElementLevel: dir has to be 1, 2 or 3!");
|
||||
}
|
||||
//else
|
||||
// throw NgException("Ngx_Mesh::GetElementLevel only for HPRefinement implemented!");
|
||||
// throw NgException("Ngx_Mesh::GetHPElementLevel only for HPRefinement implemented!");
|
||||
|
||||
return -1;
|
||||
return level;
|
||||
}
|
||||
|
||||
int Ngx_Mesh :: GetParentElement (int ei) const
|
||||
|
Loading…
Reference in New Issue
Block a user