mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-11 21:50:34 +05:00
hp level (should) work now for all singularities in 2D. Maybe also 3D?
This commit is contained in:
parent
2a39b426aa
commit
355eed4818
@ -684,7 +684,7 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
HPRefElement el = elements[i];
|
HPRefElement el = elements[i];
|
||||||
HPRef_Struct * hprs = Get_HPRef_Struct (el.type);
|
HPRef_Struct * hprs = Get_HPRef_Struct (el.type);
|
||||||
int newlevel = el.levelx + 1;
|
int newlevel = el.levelx;
|
||||||
int oldnp = 0;
|
int oldnp = 0;
|
||||||
switch (hprs->geom)
|
switch (hprs->geom)
|
||||||
{
|
{
|
||||||
@ -800,36 +800,33 @@ namespace netgen
|
|||||||
*testout << endl;
|
*testout << endl;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool last = false;
|
|
||||||
while (hprs->neweltypes[j])
|
while (hprs->neweltypes[j])
|
||||||
{
|
{
|
||||||
if (!hprs->neweltypes[j+1] || !hprs->neweltypes[j+2])
|
|
||||||
last = true;
|
|
||||||
|
|
||||||
HPRef_Struct * hprsnew = Get_HPRef_Struct (hprs->neweltypes[j]);
|
HPRef_Struct * hprsnew = Get_HPRef_Struct (hprs->neweltypes[j]);
|
||||||
HPRefElement newel(el);
|
HPRefElement newel(el);
|
||||||
|
|
||||||
newel.type = hprs->neweltypes[j];
|
newel.type = hprs->neweltypes[j];
|
||||||
// newel.index = elements[i].index;
|
// newel.index = elements[i].index;
|
||||||
// newel.coarse_elnr = elements[i].coarse_elnr;
|
// newel.coarse_elnr = elements[i].coarse_elnr;
|
||||||
newel.levelx = newel.levely = newel.levelz = newlevel;
|
if (newel.type == HP_SEGM ||
|
||||||
|
newel.type == HP_TRIG ||
|
||||||
|
newel.type == HP_QUAD ||
|
||||||
|
newel.type == HP_TET ||
|
||||||
|
newel.type == HP_PRISM ||
|
||||||
|
newel.type == HP_HEX ||
|
||||||
|
newel.type == HP_PYRAMID)
|
||||||
|
newel.levelx = newel.levely = newel.levelz = newlevel;
|
||||||
|
else
|
||||||
|
newel.levelx = newel.levely = newel.levelz = newlevel+1;
|
||||||
|
|
||||||
switch(hprsnew->geom)
|
switch(hprsnew->geom)
|
||||||
{
|
{
|
||||||
case HP_SEGM: newel.np=2; break;
|
case HP_SEGM: newel.np=2; break;
|
||||||
case HP_QUAD:
|
case HP_QUAD: newel.np=4; break;
|
||||||
newel.np=4;
|
case HP_TRIG: newel.np=3; break;
|
||||||
if (last)
|
case HP_HEX: newel.np=8; break;
|
||||||
newlevel--;
|
case HP_PRISM: newel.np=6; break;
|
||||||
break;
|
case HP_TET: newel.np=4; break;
|
||||||
case HP_TRIG:
|
|
||||||
newel.np=3;
|
|
||||||
if (last)
|
|
||||||
newlevel--;
|
|
||||||
break;
|
|
||||||
case HP_HEX: newel.np=8; break;
|
|
||||||
case HP_PRISM: newel.np=6; break;
|
|
||||||
case HP_TET: newel.np=4; break;
|
|
||||||
case HP_PYRAMID: newel.np=5; break;
|
case HP_PYRAMID: newel.np=5; break;
|
||||||
default:
|
default:
|
||||||
throw NgException (string("hprefinement.cpp: illegal type"));
|
throw NgException (string("hprefinement.cpp: illegal type"));
|
||||||
|
Loading…
Reference in New Issue
Block a user