mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 13:30:34 +05:00
inline GetCD2NamePtr
This commit is contained in:
parent
e1917c8d8a
commit
701d6a2369
@ -74,9 +74,8 @@ NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<1> (size_t nr) const
|
||||
ret.mat = mesh->GetBCNamePtr(el.si-1);
|
||||
else
|
||||
{
|
||||
if (mesh->GetDimension() == 3){
|
||||
ret.mat = &mesh->GetCD2Name(el.edgenr-1);
|
||||
}
|
||||
if (mesh->GetDimension() == 3)
|
||||
ret.mat = mesh->GetCD2NamePtr(el.edgenr-1);
|
||||
else
|
||||
ret.mat = nullptr;
|
||||
}
|
||||
|
@ -5832,6 +5832,7 @@ namespace netgen
|
||||
cd2names[cd2nr] = nullptr;
|
||||
}
|
||||
|
||||
string Mesh :: cd2_default_name = "default";
|
||||
const string & Mesh :: GetCD2Name (int cd2nr) const
|
||||
{
|
||||
static string defaultstring = "default";
|
||||
|
@ -606,6 +606,12 @@ namespace netgen
|
||||
DLL_HEADER void SetCD2Name (int cd2nr, const string & abcname);
|
||||
|
||||
const string & GetCD2Name (int cd2nr ) const;
|
||||
static string cd2_default_name;
|
||||
string * GetCD2NamePtr (int cd2nr ) const
|
||||
{
|
||||
if (cd2nr < cd2names.Size() && cd2names[cd2nr]) return cd2names[cd2nr];
|
||||
return &cd2_default_name;
|
||||
}
|
||||
size_t GetNCD2Names() const { return cd2names.Size(); }
|
||||
|
||||
string * GetBCNamePtr (int bcnr) const
|
||||
|
Loading…
Reference in New Issue
Block a user