HPRefinement: curve new elements only if coarse el was curved

This commit is contained in:
Matthias Hochsteger 2020-02-11 16:04:13 +01:00
parent dff550a48c
commit 34ac3b200d

View File

@ -1407,7 +1407,8 @@ namespace netgen
el.SetIndex(hpel.index); el.SetIndex(hpel.index);
if(setorders) if(setorders)
el.SetOrder(act_ref+1,act_ref+1,0); el.SetOrder(act_ref+1,act_ref+1,0);
el.SetCurved(true); if((*mesh.coarsemesh)[SurfaceElementIndex{hpel.coarse_elnr}].IsCurved())
el.SetCurved(true);
mesh.AddSurfaceElement(el); mesh.AddSurfaceElement(el);
break; break;
} }
@ -1423,7 +1424,8 @@ namespace netgen
el.hp_elnr = i; el.hp_elnr = i;
if(setorders) if(setorders)
el.SetOrder(act_ref+1,act_ref+1,act_ref+1); el.SetOrder(act_ref+1,act_ref+1,act_ref+1);
el.SetCurved(true); if((*mesh.coarsemesh)[ElementIndex{hpel.coarse_elnr}].IsCurved())
el.SetCurved(true);
mesh.AddVolumeElement(el); mesh.AddVolumeElement(el);
break; break;
} }