mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
GetParent*() functions in nginterface_v2
This commit is contained in:
parent
b151c9d7da
commit
df71d00d21
@ -280,6 +280,10 @@ namespace netgen
|
|||||||
void (*taskmanager)(function<void(int,int)>) = &DummyTaskManager2,
|
void (*taskmanager)(function<void(int,int)>) = &DummyTaskManager2,
|
||||||
void (*tracer)(string, bool) = &DummyTracer2);
|
void (*tracer)(string, bool) = &DummyTracer2);
|
||||||
|
|
||||||
|
void GetParentNodes (int ni, int * parents) const;
|
||||||
|
int GetParentElement (int ei) const;
|
||||||
|
int GetParentSElement (int ei) const;
|
||||||
|
|
||||||
|
|
||||||
// Find element of point, returns local coordinates
|
// Find element of point, returns local coordinates
|
||||||
template <int DIM>
|
template <int DIM>
|
||||||
|
@ -667,6 +667,51 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Ngx_Mesh :: GetParentNodes (int ni, int * parents) const
|
||||||
|
{
|
||||||
|
ni++;
|
||||||
|
if (ni <= mesh->mlbetweennodes.Size())
|
||||||
|
{
|
||||||
|
parents[0] = mesh->mlbetweennodes.Get(ni).I1()-1;
|
||||||
|
parents[1] = mesh->mlbetweennodes.Get(ni).I2()-1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
parents[0] = parents[1] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int Ngx_Mesh :: GetParentElement (int ei) const
|
||||||
|
{
|
||||||
|
ei++;
|
||||||
|
if (mesh->GetDimension() == 3)
|
||||||
|
{
|
||||||
|
if (ei <= mesh->mlparentelement.Size())
|
||||||
|
return mesh->mlparentelement.Get(ei)-1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (ei <= mesh->mlparentsurfaceelement.Size())
|
||||||
|
return mesh->mlparentsurfaceelement.Get(ei)-1;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int Ngx_Mesh :: GetParentSElement (int ei) const
|
||||||
|
{
|
||||||
|
ei++;
|
||||||
|
if (mesh->GetDimension() == 3)
|
||||||
|
{
|
||||||
|
if (ei <= mesh->mlparentsurfaceelement.Size())
|
||||||
|
return mesh->mlparentsurfaceelement.Get(ei)-1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user