mirror of
https://github.com/NGSolve/netgen.git
synced 2025-04-12 16:17:29 +05:00
add boundarylayer closure on pyramids outside
This commit is contained in:
parent
77a7cb66d8
commit
9e080ee9e0
@ -513,8 +513,8 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
if(do_insert)
|
if(do_insert)
|
||||||
{
|
{
|
||||||
if(el.GetType() != TET)
|
if(el.GetType() == TET)
|
||||||
throw Exception("Boundarylayer only implemented for tets outside yet!");
|
{
|
||||||
if(moved.Size() == 2)
|
if(moved.Size() == 2)
|
||||||
{
|
{
|
||||||
if(fixed.Size() == 2)
|
if(fixed.Size() == 2)
|
||||||
@ -558,6 +558,38 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(el.GetType() == PYRAMID)
|
||||||
|
{
|
||||||
|
if(moved.Size() == 2)
|
||||||
|
{
|
||||||
|
if(fixed.Size() != 2)
|
||||||
|
throw Exception("This case is not implemented yet! Fixed size = " + ToString(fixed.Size()));
|
||||||
|
PointIndex p1 = moved[0];
|
||||||
|
PointIndex p2 = moved[1];
|
||||||
|
for(auto i : Range(blp.heights))
|
||||||
|
{
|
||||||
|
PointIndex p3 = mapto[moved[1]][i];
|
||||||
|
PointIndex p4 = mapto[moved[0]][i];
|
||||||
|
Element nel(PYRAMID);
|
||||||
|
nel[0] = p1;
|
||||||
|
nel[1] = p2;
|
||||||
|
nel[2] = p3;
|
||||||
|
nel[3] = p4;
|
||||||
|
nel[4] = el[0] + el[1] + el[2] + el[3] + el[4] - fixed[0] - fixed[1] - moved[0] - moved[1];
|
||||||
|
if(Cross(mesh[p2] - mesh[p1], mesh[p4]-mesh[p1]) * (mesh[nel[4]]-mesh[nel[1]]) > 0)
|
||||||
|
Swap(nel[1], nel[3]);
|
||||||
|
nel.SetIndex(el.GetIndex());
|
||||||
|
mesh.AddVolumeElement(nel);
|
||||||
|
p1 = p4;
|
||||||
|
p2 = p3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(moved.Size() == 1)
|
||||||
|
throw Exception("This case is not implemented yet!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
throw Exception("Boundarylayer only implemented for tets and pyramids outside yet!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(auto i : Range(1, fd_old+1))
|
for(auto i : Range(1, fd_old+1))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user