36 #ifndef NEKTAR_MESHUTILS_OCTREE_OCTANT_H
37 #define NEKTAR_MESHUTILS_OCTREE_OCTANT_H
46 namespace NekMeshUtils
99 const std::vector<SPBaseSharedPtr> &splist);
104 void Subdivide(OctantSharedPtr
p,
int &numoct);
112 for (
int i = 0; i < 8; i++)
169 ASSERTL0(found,
"failed to find point");
204 "Tried to acsess delta of octant"
205 "which has not been set");
288 return sqrt((loc[0] -
m_loc[0]) * (loc[0] -
m_loc[0]) +
358 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.
std::vector< SPBaseSharedPtr > GetSPList()
Get the list of curvature points that are within this octant.
#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< SPBaseSharedPtr > m_localSPList
curvature sampling point list
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.
bool operator==(ElmtConfig const &c1, ElmtConfig const &c2)
Compares two element config structs.
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.
boost::shared_ptr< SPBase > SPBaseSharedPtr
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 ...
SPBaseSharedPtr GetABoundPoint()
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
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