40 namespace NekMeshUtils
65 : m_id(i), m_parent(
p)
72 m_delta = pair<bool, NekDouble>(
false, 0.0);
74 NekDouble minDif = numeric_limits<double>::max();
114 vector<SPBaseSharedPtr> SourcePointList =
m_parent->GetSPList();
121 for (
int i = 0; i < SourcePointList.size(); i++)
130 if (SourcePointList[i]->HasDelta())
132 if (SourcePointList[i]->
GetDelta() > maxDif)
134 maxDif = SourcePointList[i]->GetDelta();
137 if (SourcePointList[i]->
GetDelta() < minDif)
139 minDif = SourcePointList[i]->GetDelta();
143 if (SourcePointList[i]->Isboundary())
154 if (maxDif / minDif > 1.5)
180 const vector<SPBaseSharedPtr> &splist)
194 m_delta = pair<bool, NekDouble>(
false, 0.0);
221 for (
int i = 0; i < 6; i++)
225 for (
int j = 0; j < os.size(); j++)
233 for (
int i = 0; i < 8; i++)
248 if (i == 0 || i == 2)
268 if (i == 4 || i == 6)
278 children[i] = std::shared_ptr<Octant>(
new Octant(numoct++,
p, dir));
285 children[0]->SetNeigbour(children[1],
eRight);
286 children[0]->SetNeigbour(children[4],
eBack);
287 children[0]->SetNeigbour(children[2],
eDown);
289 children[1]->SetNeigbour(children[0],
eLeft);
290 children[1]->SetNeigbour(children[5],
eBack);
291 children[1]->SetNeigbour(children[3],
eDown);
293 children[2]->SetNeigbour(children[3],
eRight);
294 children[2]->SetNeigbour(children[6],
eBack);
295 children[2]->SetNeigbour(children[0],
eUp);
297 children[3]->SetNeigbour(children[2],
eLeft);
298 children[3]->SetNeigbour(children[7],
eBack);
299 children[3]->SetNeigbour(children[1],
eUp);
301 children[4]->SetNeigbour(children[5],
eRight);
302 children[4]->SetNeigbour(children[0],
eForward);
303 children[4]->SetNeigbour(children[6],
eDown);
305 children[5]->SetNeigbour(children[4],
eLeft);
306 children[5]->SetNeigbour(children[1],
eForward);
307 children[5]->SetNeigbour(children[7],
eDown);
309 children[6]->SetNeigbour(children[7],
eRight);
310 children[6]->SetNeigbour(children[2],
eForward);
311 children[6]->SetNeigbour(children[4],
eUp);
313 children[7]->SetNeigbour(children[6],
eLeft);
314 children[7]->SetNeigbour(children[3],
eForward);
315 children[7]->SetNeigbour(children[5],
eUp);
500 for (
int i = 0; i < tmp.size(); i++)
502 if (tmp[i]->
GetId() !=
id)
511 if (p1->GetId() == p2->GetId())
#define ASSERTL0(condition, msg)
int GetId()
Get the Id of the octant.
Octant(int i, OctantSharedPtr p, Array< OneD, OctantFace > dir)
Defualt constructor.
bool m_needToDivide
idenify if division is needed
int NumValidCurvePoint()
Get the number of valid cp points in the octants list.
void Subdivide(OctantSharedPtr p, int &numoct)
Subdivide the octant.
bool m_leaf
leaf identifer
NekDouble m_hd
half dimension of the octant
std::map< OctantFace, std::vector< OctantSharedPtr > > m_neigbours
list of neighbours
OctantSharedPtr m_parent
parent id
int m_numValidPoints
number of valid cp points
void RemoveNeigbour(int id, OctantFace f)
Remove a neigbour from this octants list.
OctantLocation m_location
idenify if delta has ben set
std::pair< bool, NekDouble > m_delta
mesh sizing parameter
NekDouble DX()
Get the octants half dimension.
void SetChildren(Array< OneD, OctantSharedPtr > c)
Set the children of this octant.
void SetDelta(NekDouble d)
Set the value for delta for this octant.
NekDouble GetDelta()
Get value of delta.
Array< OneD, NekDouble > m_loc
x,y,z location of the octant
std::vector< SPBaseSharedPtr > m_localSPList
curvature sampling point list
OctantFace
enumeration of the 6 faces of a cube/octant
bool operator==(ElmtConfig const &c1, ElmtConfig const &c2)
Compares two element config structs.
std::shared_ptr< Octant > OctantSharedPtr
OctantFace GetReverseFace(OctantFace f)