35 #ifndef NEKTAR_MESHUTILS_OCTREE_OCTANT_H
36 #define NEKTAR_MESHUTILS_OCTREE_OCTANT_H
45 namespace NekMeshUtils
98 const std::vector<SPBaseSharedPtr> &splist);
111 for (
int i = 0; i < 8; i++)
168 ASSERTL0(found,
"failed to find point");
203 "Tried to acsess delta of octant"
204 "which has not been set");
#define ASSERTL0(condition, msg)
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
this class contains the infomration and methods for individal octants in the Octree
NekDouble FX(OctantFace f)
Get the far dimension in a given direction f.
void SetLocation(OctantLocation l)
set the location of the octant with respect to the CAD
bool IsDeltaKnown()
Get whether a value of delta has been set or not.
int GetId()
Get the Id of the octant.
Array< OneD, NekDouble > GetLoc()
Get the location of the center of the octant.
Octant(int i, OctantSharedPtr p, Array< OneD, OctantFace > dir)
Defualt constructor.
void CompileLeaves(std::vector< OctantSharedPtr > &Octants)
Recursive method which gets a list of the leaf octants Moves down levels if octant is not a leaf.
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
bool NeedDivide()
Get whether this octants needs to divide based on the curvature sampling.
std::map< OctantFace, std::vector< OctantSharedPtr > > m_neigbours
list of neighbours
OctantSharedPtr m_parent
parent id
int m_numValidPoints
number of valid cp points
SPBaseSharedPtr GetABoundPoint()
std::vector< SPBaseSharedPtr > GetSPList()
Get the list of curvature points that are within this octant.
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
std::map< OctantFace, std::vector< OctantSharedPtr > > GetNeigbours()
Get the map of neigbours.
NekDouble DX()
Get the octants half dimension.
int NumCurvePoint()
Get the number of points in the octants cp list.
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
Array< OneD, OctantSharedPtr > m_children
list of child ids
void SetNeigbour(OctantSharedPtr o, OctantFace f)
bool IsLeaf()
Get whether the octant is a leaf or not.
std::vector< SPBaseSharedPtr > m_localSPList
curvature sampling point list
OctantSharedPtr GetChild(int q)
Get a specific child of this octant.
NekDouble Distance(OctantSharedPtr o)
Get the distance from this octant to another.
OctantLocation GetLocation()
Get the location of the octant with respect to the geometry.
OctantFace
enumeration of the 6 faces of a cube/octant
OctantLocation
enumeration of the possible locations of the octree with respect to the CAD
bool operator==(ElmtConfig const &c1, ElmtConfig const &c2)
Compares two element config structs.
std::shared_ptr< Octant > OctantSharedPtr
std::shared_ptr< SPBase > SPBaseSharedPtr