mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
curved elements work, too
This commit is contained in:
parent
bffdf689ae
commit
fe782670f8
@ -127,7 +127,7 @@ namespace netgen
|
||||
cout << "read " << mesh.GetNP() << " points" << endl;
|
||||
Point3d pmin, pmax;
|
||||
mesh.GetBox (pmin, pmax);
|
||||
if(fabs(pmin.Z() - pmax.Z()) < 1e-10) //hard-coded for now
|
||||
if(fabs(pmin.Z() - pmax.Z()) < 1e-10 * Dist(pmin, pmax))
|
||||
{
|
||||
cout << "Set Dimension to 2." << endl;
|
||||
mesh.SetDimension(2);
|
||||
@ -186,9 +186,17 @@ namespace netgen
|
||||
el[1] = nodes[2];
|
||||
el[2] = nodes[1];
|
||||
|
||||
if(dim == 3){
|
||||
auto nr = tmp_segments.Size();
|
||||
tmp_segments.Append(el);
|
||||
element_map[label] = std::make_tuple(nr+1, 2);
|
||||
}
|
||||
else if(dim == 2){
|
||||
el.si = -1; // add label to segment, will be changed later when BC's are assigned
|
||||
auto nr = mesh.AddSegment(el);
|
||||
element_map[label] = std::make_tuple(nr+1, 2);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case 41: // TRIG
|
||||
|
Loading…
Reference in New Issue
Block a user