mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40:33 +05:00
Merge branch 'fix_zrefine' into 'master'
combine singular prisms after zrefine again Closes #13 See merge request jschoeberl/netgen!132
This commit is contained in:
commit
d5b276426e
@ -714,7 +714,29 @@ namespace netgen
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CombineSingularPrisms(Mesh& mesh)
|
||||
{
|
||||
for(int i = 1; i<=mesh.GetNE(); i++)
|
||||
{
|
||||
Element& el = mesh.VolumeElement(i);
|
||||
if(el.GetType() != PRISM)
|
||||
continue;
|
||||
if(el.PNum(3) == el.PNum(6))
|
||||
{
|
||||
if(el.PNum(2) == el.PNum(5))
|
||||
{
|
||||
el.SetType(TET);
|
||||
}
|
||||
else
|
||||
{
|
||||
el.SetType(PYRAMID);
|
||||
int pnr5 = el.PNum(3);
|
||||
el.PNum(3) = el.PNum(5);
|
||||
el.PNum(5) = pnr5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ZRefinement (Mesh & mesh, const NetgenGeometry * hgeom,
|
||||
ZRefinementOptions & opt)
|
||||
@ -729,6 +751,8 @@ namespace netgen
|
||||
MakePrismsClosePoints (mesh);
|
||||
|
||||
RefinePrisms (mesh, geom, opt);
|
||||
|
||||
CombineSingularPrisms(mesh);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user