mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-27 13:20:34 +05:00
there will not be 2 default groups in the 3D case
This commit is contained in:
parent
57215cc707
commit
490b6800d5
@ -97,7 +97,7 @@ namespace netgen
|
|||||||
// map from unv element nr to our element number + an index if it is vol (0), bnd(1), ...
|
// map from unv element nr to our element number + an index if it is vol (0), bnd(1), ...
|
||||||
std::map<size_t, std::tuple<size_t, int>> element_map;
|
std::map<size_t, std::tuple<size_t, int>> element_map;
|
||||||
int dim = 3;
|
int dim = 3;
|
||||||
int bccounter = 0; // for 2D case
|
int bccounter = 0;
|
||||||
|
|
||||||
NgArray<Segment> tmp_segments;
|
NgArray<Segment> tmp_segments;
|
||||||
while (in.good())
|
while (in.good())
|
||||||
@ -284,11 +284,12 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
if(dim == 3)
|
if(dim == 3)
|
||||||
{
|
{
|
||||||
int bcpr = mesh.GetNFD()+1;
|
int bcpr = mesh.GetNFD();
|
||||||
fdnr = mesh.AddFaceDescriptor(FaceDescriptor(bcpr, 0,0,0));
|
fdnr = mesh.AddFaceDescriptor(FaceDescriptor(bcpr, 0,0,0));
|
||||||
mesh.GetFaceDescriptor(fdnr).SetBCProperty(bcpr+1);
|
mesh.GetFaceDescriptor(fdnr).SetBCProperty(bcpr+1);
|
||||||
mesh.SetBCName(bcpr, name);
|
mesh.SetBCName(bcpr, name);
|
||||||
mesh.SurfaceElement(get<0>(element_map[index])).SetIndex(fdnr);
|
mesh.SurfaceElement(get<0>(element_map[index])).SetIndex(fdnr);
|
||||||
|
bccounter++;
|
||||||
}
|
}
|
||||||
else if(dim == 2)
|
else if(dim == 2)
|
||||||
{
|
{
|
||||||
@ -399,6 +400,7 @@ namespace netgen
|
|||||||
mesh.RebuildSurfaceElementLists();
|
mesh.RebuildSurfaceElementLists();
|
||||||
mesh.GetBox (pmin, pmax);
|
mesh.GetBox (pmin, pmax);
|
||||||
mesh.UpdateTopology();
|
mesh.UpdateTopology();
|
||||||
|
if(dim == 3) bccounter++;
|
||||||
cout << "bounding-box = " << pmin << "-" << pmax << endl;
|
cout << "bounding-box = " << pmin << "-" << pmax << endl;
|
||||||
cout << "Created " << bccounter << " boundaries." << endl;
|
cout << "Created " << bccounter << " boundaries." << endl;
|
||||||
for(int i=0; i<bccounter; i++){
|
for(int i=0; i<bccounter; i++){
|
||||||
|
Loading…
Reference in New Issue
Block a user