mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 22:20:35 +05:00
default material name
This commit is contained in:
parent
ca8df788c8
commit
b4f3107fef
@ -5758,8 +5758,8 @@ namespace netgen
|
||||
{
|
||||
int olds = materials.Size();
|
||||
materials.SetSize (domnr);
|
||||
for (int i = olds; i < domnr; i++)
|
||||
materials[i] = 0;
|
||||
for (int i = olds; i < domnr-1; i++)
|
||||
materials[i] = new string("default");
|
||||
}
|
||||
/*
|
||||
materials.Elem(domnr) = new char[strlen(mat)+1];
|
||||
@ -5772,7 +5772,7 @@ namespace netgen
|
||||
{
|
||||
if (domnr <= materials.Size())
|
||||
return *materials.Get(domnr);
|
||||
static string emptystring;
|
||||
static string emptystring("default");
|
||||
return emptystring;
|
||||
}
|
||||
|
||||
|
@ -594,7 +594,10 @@ namespace netgen
|
||||
///
|
||||
const string & GetMaterial (int domnr) const;
|
||||
const string * GetMaterialPtr (int domnr) const // 1-based
|
||||
{ return domnr <= materials.Size() ? materials.Get(domnr) : nullptr; }
|
||||
{
|
||||
static string defaultmat = "default";
|
||||
return domnr <= materials.Size() ? materials.Get(domnr) : &defaultmat;
|
||||
}
|
||||
|
||||
DLL_HEADER void SetNBCNames ( int nbcn );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user