mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 22:00:33 +05:00
add unified GetMaterial for co-dimension
This commit is contained in:
parent
ea00690a2a
commit
a698b57596
@ -234,6 +234,9 @@ namespace netgen
|
|||||||
template <int DIM>
|
template <int DIM>
|
||||||
int GetElementIndex (int nr) const;
|
int GetElementIndex (int nr) const;
|
||||||
|
|
||||||
|
/// material/boundary label of region, template argument is co-dimension
|
||||||
|
template <int DIM>
|
||||||
|
const string & GetMaterialCD (int region_nr) const;
|
||||||
|
|
||||||
/// Curved Elements:
|
/// Curved Elements:
|
||||||
/// elnr .. element nr
|
/// elnr .. element nr
|
||||||
|
@ -175,8 +175,23 @@ NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<3> (int nr) const
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
template <> NGX_INLINE DLL_HEADER
|
||||||
|
const string & Ngx_Mesh :: GetMaterialCD<0> (int region_nr) const
|
||||||
|
{
|
||||||
|
return mesh->GetMaterial(region_nr+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <> NGX_INLINE DLL_HEADER
|
||||||
|
const string & Ngx_Mesh :: GetMaterialCD<1> (int region_nr) const
|
||||||
|
{
|
||||||
|
return mesh->GetBCName(region_nr);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <> NGX_INLINE DLL_HEADER
|
||||||
|
const string & Ngx_Mesh :: GetMaterialCD<2> (int region_nr) const
|
||||||
|
{
|
||||||
|
return mesh->GetCD2Name(region_nr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user