35 #ifndef NEKTAR_MESHUTILS_OCTREE_OCTREE 36 #define NEKTAR_MESHUTILS_OCTREE_OCTREE 46 namespace NekMeshUtils
58 : x1(p1), x2(p2), R(r), delta(d)
65 for (
int i = 0; i < 3; i++)
72 dev[0] = Le[1] * Re[2] - Re[1] * Le[2];
73 dev[1] = Le[2] * Re[0] - Re[2] * Le[0];
74 dev[2] = Le[0] * Re[1] - Re[0] * Le[1];
77 sqrt(dev[0] * dev[0] + dev[1] * dev[1] + dev[2] * dev[2]) /
Length();
79 NekDouble t = -1.0 * ((x1[0] - p[0]) * s[0] + (x1[1] - p[1]) * s[1] +
82 if (dist < R && !(t > 1) && !(t < 0))
94 return sqrt((x1[0] - x2[0]) * (x1[0] - x2[0]) +
95 (x1[1] - x2[1]) * (x1[1] - x2[1]) +
96 (x1[2] - x2[2]) * (x1[2] - x2[2]));
155 void WriteOctree(std::string nm);
172 void SmoothAllOctants();
178 void CompileSourcePointList();
189 void SmoothSurfaceOctants();
197 void PropagateDomain();
214 bool VerifyNeigbours();
std::vector< SPBaseSharedPtr > m_SPList
list of source points
std::vector< OctantSharedPtr > m_octants
list of leaf octants
void SetParameters(NekDouble &min, NekDouble &max, NekDouble &ep)
sets the parameters used for curvature sampling
Array< OneD, NekDouble > x1
Array< OneD, NekDouble > x2
std::shared_ptr< Octree > OctreeSharedPtr
NekDouble m_minDelta
minimum delta in the octree
std::shared_ptr< Mesh > MeshSharedPtr
Shared pointer to a mesh.
OctantSharedPtr m_masteroct
master octant for searching
int m_numoct
number of octants made, used for id index
linesource(Array< OneD, NekDouble > p1, Array< OneD, NekDouble > p2, NekDouble r, NekDouble d)
std::vector< linesource > m_lsources
NekDouble m_eps
curavture sensivity paramter
std::shared_ptr< Octant > OctantSharedPtr
NekDouble m_dim
physical size of the octree
Array< OneD, NekDouble > m_centroid
x,y,z location of the center of the octree
MeshSharedPtr m_mesh
Mesh object.
bool withinRange(Array< OneD, NekDouble > p)
void Refinement(std::string nm)
informs the octree there is a user defined spacing file
NekDouble m_maxDelta
maximum delta in the octree