mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
throw if surface is extruded that is not named (if map surface-> new
mat is given)
This commit is contained in:
parent
6533663b7f
commit
e155700bc3
@ -1222,6 +1222,9 @@ namespace netgen
|
|||||||
if(surfacefacs[sel.GetIndex()] > 0) Swap(points[0], points[2]);
|
if(surfacefacs[sel.GetIndex()] > 0) Swap(points[0], points[2]);
|
||||||
for(auto i : Range(points))
|
for(auto i : Range(points))
|
||||||
el[sel.PNums().Size() + i] = points[i];
|
el[sel.PNums().Size() + i] = points[i];
|
||||||
|
auto new_index = new_mat_nrs[sel.GetIndex()];
|
||||||
|
if(new_index == -1)
|
||||||
|
throw Exception("Boundary " + ToString(sel.GetIndex()) + " with name " + mesh.GetBCName(sel.GetIndex()-1) + " extruded, but no new material specified for it!");
|
||||||
el.SetIndex(new_mat_nrs[sel.GetIndex()]);
|
el.SetIndex(new_mat_nrs[sel.GetIndex()]);
|
||||||
mesh.AddVolumeElement(el);
|
mesh.AddVolumeElement(el);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user