mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
changing mesh-dimension from 3 to 2 moves names
This commit is contained in:
parent
97447d681f
commit
9d2a436749
@ -4391,7 +4391,29 @@ namespace netgen
|
|||||||
return ndom;
|
return ndom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Mesh :: SetDimension (int dim)
|
||||||
|
{
|
||||||
|
if (dimension == 3 && dim == 2)
|
||||||
|
{
|
||||||
|
// change mesh-dim from 3 to 2 (currently needed for OCC)
|
||||||
|
for (auto str : materials)
|
||||||
|
delete str;
|
||||||
|
materials.SetSize(0);
|
||||||
|
for (auto str : bcnames)
|
||||||
|
materials.Append(str);
|
||||||
|
bcnames.SetSize(0);
|
||||||
|
for (auto str : cd2names)
|
||||||
|
bcnames.Append(str);
|
||||||
|
cd2names.SetSize(0);
|
||||||
|
for (auto str : cd3names)
|
||||||
|
cd2names.Append(str);
|
||||||
|
cd3names.SetSize(0);
|
||||||
|
|
||||||
|
for (auto & seg : LineSegments())
|
||||||
|
seg.si = seg.edgenr;
|
||||||
|
}
|
||||||
|
dimension = dim;
|
||||||
|
}
|
||||||
|
|
||||||
void Mesh :: SurfaceMeshOrientation ()
|
void Mesh :: SurfaceMeshOrientation ()
|
||||||
{
|
{
|
||||||
|
@ -379,7 +379,7 @@ namespace netgen
|
|||||||
DLL_HEADER int GetNDomains() const;
|
DLL_HEADER int GetNDomains() const;
|
||||||
///
|
///
|
||||||
int GetDimension() const { return dimension; }
|
int GetDimension() const { return dimension; }
|
||||||
void SetDimension (int dim) { dimension = dim; }
|
void SetDimension (int dim); // { dimension = dim; }
|
||||||
|
|
||||||
/// sets internal tables
|
/// sets internal tables
|
||||||
DLL_HEADER void CalcSurfacesOfNode ();
|
DLL_HEADER void CalcSurfacesOfNode ();
|
||||||
|
Loading…
Reference in New Issue
Block a user