mirror of
https://github.com/NGSolve/netgen.git
synced 2025-02-02 16:20:33 +05:00
Powell Sabin splits
This commit is contained in:
parent
890f59b8b4
commit
00747fb947
@ -775,18 +775,7 @@ HPRef_Struct reftrig_3singedges =
|
|||||||
reftrig_3singedges_newels
|
reftrig_3singedges_newels
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// HP_TRIG_ALFELD
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// HP_TRIG_3SINGEDGES
|
|
||||||
int reftrig_Alfeld_splitedges[][3] =
|
int reftrig_Alfeld_splitedges[][3] =
|
||||||
{
|
{
|
||||||
{ 0, 0, 0 }
|
{ 0, 0, 0 }
|
||||||
@ -818,3 +807,42 @@ HPRef_Struct reftrig_Alfeld =
|
|||||||
reftrig_Alfeld_newels
|
reftrig_Alfeld_newels
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// HP_TRIG_POWELL
|
||||||
|
int reftrig_Powell_splitedges[][3] =
|
||||||
|
{
|
||||||
|
{ 1, 2, 4 },
|
||||||
|
{ 2, 3, 5 },
|
||||||
|
{ 3, 1, 6 },
|
||||||
|
{ 0, 0, 0 },
|
||||||
|
};
|
||||||
|
int reftrig_Powell_splitfaces[][4] =
|
||||||
|
{
|
||||||
|
{ 1, 2, 3, 7 },
|
||||||
|
{ 0, 0, 0, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
HPREF_ELEMENT_TYPE reftrig_Powell_newelstypes[] =
|
||||||
|
{
|
||||||
|
HP_TRIG, HP_TRIG, HP_TRIG, HP_TRIG, HP_TRIG, HP_TRIG,
|
||||||
|
HP_NONE,
|
||||||
|
};
|
||||||
|
int reftrig_Powell_newels[][8] =
|
||||||
|
{
|
||||||
|
{ 1, 4, 7 },
|
||||||
|
{ 4, 2, 7 },
|
||||||
|
{ 2, 5, 7 },
|
||||||
|
{ 5, 3, 7 },
|
||||||
|
{ 3, 6, 7 },
|
||||||
|
{ 6, 1, 7 },
|
||||||
|
};
|
||||||
|
HPRef_Struct reftrig_Powell =
|
||||||
|
{
|
||||||
|
HP_TRIG,
|
||||||
|
reftrig_Powell_splitedges,
|
||||||
|
reftrig_Powell_splitfaces,
|
||||||
|
0,
|
||||||
|
reftrig_Powell_newelstypes,
|
||||||
|
reftrig_Powell_newels
|
||||||
|
};
|
||||||
|
|
||||||
|
@ -185,6 +185,8 @@ namespace netgen
|
|||||||
|
|
||||||
case HP_TRIG_ALFELD:
|
case HP_TRIG_ALFELD:
|
||||||
hps = &reftrig_Alfeld; break;
|
hps = &reftrig_Alfeld; break;
|
||||||
|
case HP_TRIG_POWELL:
|
||||||
|
hps = &reftrig_Powell; break;
|
||||||
|
|
||||||
|
|
||||||
case HP_QUAD:
|
case HP_QUAD:
|
||||||
@ -1906,6 +1908,8 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
|
|||||||
|
|
||||||
if (act_ref == 1 && split == SPLIT_ALFELD)
|
if (act_ref == 1 && split == SPLIT_ALFELD)
|
||||||
sing = true;
|
sing = true;
|
||||||
|
if (act_ref == 1 && split == SPLIT_POWELL)
|
||||||
|
sing = true;
|
||||||
if(sing==0) return(sing);
|
if(sing==0) return(sing);
|
||||||
|
|
||||||
int cnt_undef = 0, cnt_nonimplement = 0;
|
int cnt_undef = 0, cnt_nonimplement = 0;
|
||||||
@ -1969,8 +1973,10 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
|
|||||||
if (split == SPLIT_HP)
|
if (split == SPLIT_HP)
|
||||||
hpel.type = ClassifyTrig(hpel, edges, edgepoint_dom, cornerpoint, edgepoint,
|
hpel.type = ClassifyTrig(hpel, edges, edgepoint_dom, cornerpoint, edgepoint,
|
||||||
faces, face_edges, surf_edges, facepoint, dim, fd);
|
faces, face_edges, surf_edges, facepoint, dim, fd);
|
||||||
else
|
else if (split == SPLIT_ALFELD)
|
||||||
hpel.type = HP_TRIG_ALFELD;
|
hpel.type = HP_TRIG_ALFELD;
|
||||||
|
else if (split == SPLIT_POWELL)
|
||||||
|
hpel.type = HP_TRIG_POWELL;
|
||||||
|
|
||||||
dd = 2;
|
dd = 2;
|
||||||
break;
|
break;
|
||||||
|
@ -46,6 +46,7 @@ enum HPREF_ELEMENT_TYPE {
|
|||||||
HP_TRIG_3SINGEDGES = 40,
|
HP_TRIG_3SINGEDGES = 40,
|
||||||
|
|
||||||
HP_TRIG_ALFELD,
|
HP_TRIG_ALFELD,
|
||||||
|
HP_TRIG_POWELL,
|
||||||
|
|
||||||
HP_QUAD = 50,
|
HP_QUAD = 50,
|
||||||
HP_QUAD_SINGCORNER,
|
HP_QUAD_SINGCORNER,
|
||||||
@ -347,7 +348,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
enum SplittingType { SPLIT_HP, SPLIT_ALFELD };
|
enum SplittingType { SPLIT_HP, SPLIT_ALFELD, SPLIT_POWELL};
|
||||||
|
|
||||||
DLL_HEADER extern void HPRefinement (Mesh & mesh, Refinement * ref, SplittingType split, int levels,
|
DLL_HEADER extern void HPRefinement (Mesh & mesh, Refinement * ref, SplittingType split, int levels,
|
||||||
double fac1=0.125, bool setorders=true, bool ref_level = false);
|
double fac1=0.125, bool setorders=true, bool ref_level = false);
|
||||||
|
@ -1359,6 +1359,14 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
|||||||
::netgen::HPRefinement (self, &ref, SPLIT_ALFELD, 1, 0.5, true, true);
|
::netgen::HPRefinement (self, &ref, SPLIT_ALFELD, 1, 0.5, true, true);
|
||||||
}
|
}
|
||||||
), py::call_guard<py::gil_scoped_release>())
|
), py::call_guard<py::gil_scoped_release>())
|
||||||
|
.def ("SplitPowellSabin", FunctionPointer
|
||||||
|
([](Mesh & self)
|
||||||
|
{
|
||||||
|
NgLock meshlock (self.MajorMutex(), true);
|
||||||
|
Refinement & ref = const_cast<Refinement&> (self.GetGeometry()->GetRefinement());
|
||||||
|
::netgen::HPRefinement (self, &ref, SPLIT_POWELL, 1, 0.5, true, true);
|
||||||
|
}
|
||||||
|
), py::call_guard<py::gil_scoped_release>())
|
||||||
.def ("SecondOrder", [](Mesh & self)
|
.def ("SecondOrder", [](Mesh & self)
|
||||||
{
|
{
|
||||||
self.GetGeometry()->GetRefinement().MakeSecondOrder(self);
|
self.GetGeometry()->GetRefinement().MakeSecondOrder(self);
|
||||||
|
Loading…
Reference in New Issue
Block a user