36 #ifndef NEKTAR_MESHUTILS_OCTREE_OCTANT_H
37 #define NEKTAR_MESHUTILS_OCTREE_OCTANT_H
46 namespace NekMeshUtils
99 const std::vector<CurvaturePointSharedPtr> &cplist);
104 void Subdivide(OctantSharedPtr p,
int &numoct);
112 for (
int i = 0; i < 8; i++)
186 "Tried to acsess delta of octant"
187 "which has not been set");
269 return sqrt((loc[0] -
m_loc[0]) * (loc[0] -
m_loc[0]) +
296 "tried to get cp point where there is none");
349 bool operator==(OctantSharedPtr
const &p1, OctantSharedPtr
const &p2);
std::map< OctantFace, std::vector< OctantSharedPtr > > GetNeigbours()
Get the map of neigbours.
NekDouble GetDelta()
Get value of delta.
#define ASSERTL0(condition, msg)
bool NeedDivide()
Get whether this octants needs to divide based on the curvature sampling.
void SetNeigbour(OctantSharedPtr o, OctantFace f)
std::vector< CurvaturePointSharedPtr > GetCPList()
Get the list of curvature points that are within this octant.
OctantLocation m_location
idenify if delta has ben set
bool IsDeltaKnown()
Get whether a value of delta has been set or not.
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
void RemoveNeigbour(int id, OctantFace f)
Remove a neigbour from this octants list.
OctantSharedPtr GetChild(int q)
Get a specific child of this octant.
bool m_leaf
leaf identifer
OctantLocation
enumeration of the possible locations of the octree with respect to the CAD
OctantSharedPtr m_parent
parent id
void SetDelta(NekDouble d)
Set the value for delta for this octant.
NekDouble m_hd
half dimension of the octant
NekDouble DX()
Get the octants half dimension.
Octant(int i, OctantSharedPtr p, Array< OneD, OctantFace > dir)
Defualt constructor.
NekDouble Distance(OctantSharedPtr o)
Get the distance from this octant to another.
std::vector< CurvaturePointSharedPtr > m_localCPList
curvature sampling point list
bool operator==(ElmtConfig const &c1, ElmtConfig const &c2)
boost::shared_ptr< CurvaturePoint > CurvaturePointSharedPtr
OctantLocation GetLocation()
Get the location of the octant with respect to the geometry.
void Subdivide(OctantSharedPtr p, int &numoct)
Subdivide the octant.
Array< OneD, OctantSharedPtr > m_children
list of child ids
int m_numValidPoints
number of valid cp points
Array< OneD, NekDouble > GetLoc()
Get the location of the center of the octant.
bool IsLeaf()
Get whether the octant is a leaf or not.
int GetId()
Get the Id of the octant.
int NumValidCurvePoint()
Get the number of valid cp points in the octants list.
NekDouble FX(OctantFace f)
Get the far dimension in a given direction f.
Array< OneD, NekDouble > m_loc
x,y,z location of the octant
boost::shared_ptr< Octant > OctantSharedPtr
this class contains the infomration and methods for individal octants in the Octree ...
int NumCurvePoint()
Get the number of points in the octants cp list.
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...
void SetLocation(OctantLocation l)
set the location of the octant with respect to the CAD
CurvaturePointSharedPtr GetCPPoint()
Get the first cp point in the list.
OctantFace
enumeration of the 6 faces of a cube/octant
bool m_needToDivide
idenify if division is needed
void SetChildren(Array< OneD, OctantSharedPtr > c)
Set the children of this octant.
std::map< OctantFace, std::vector< OctantSharedPtr > > m_neigbours
list of neighbours
std::pair< bool, NekDouble > m_delta
mesh sizing parameter