Nektar++
|
Public Member Functions | |
Octant () | |
Construct a new Octree::Octant object. More... | |
Octant (int loc, int depth, int id, const Array< OneD, NekDouble > &bounds) | |
Construct a new Octree::Octant object. More... | |
Octant (int loc, Octant &parent) | |
Construct a new Octree::Octant object. More... | |
int | GetNpoints () const |
int | GetLoc () const |
int | GetDepth () const |
double | GetDelta () const |
int | GetID () const |
bool | IsLeaf () const |
Array< OneD, NekDouble > & | GetCentre () |
Array< OneD, NekDouble > & | GetBounds () |
std::vector< int > & | GetIndices () |
Array< OneD, OctantSharedPtr > & | GetChildren () |
std::vector< OctantWeakPtr > & | GetNeighbours () |
void | SetID (int id) |
void | GetLeaves (std::vector< OctantSharedPtr > &leaves) |
Updates 'leaves' so that it contains all the leaf nodes belonging to the octant. More... | |
void | SetIndices (const std::vector< int > &indices) |
Sets the values of 'm_pointInd' to those in 'indices'. More... | |
void | AddNeighbours (const std::vector< OctantSharedPtr > &neighbours) |
Adds to 'm_neighbours' the octants that are not already in the list. More... | |
void | AddPoints (const Array< OneD, Array< OneD, NekDouble > > &pts, const std::vector< int > &indices) |
Adds to 'm_pointInd' the IDs of the points in 'pts' that fall inside the octant. More... | |
void | Subdivide (int maxPts, const Array< OneD, Array< OneD, NekDouble > > &pts, std::vector< OctantSharedPtr > &nodes) |
Recursively divides the octant into 8 children and fills the leaf nodes with their corresponding points. Does NOT add neighbours. More... | |
int | GetLocInNode (const Array< OneD, NekDouble > &coords) |
Returns the position inside an octant in the range (1-8). The name convention is as follows: let \(\Delta\) be a value between 0 and the length of the side of the father octant, and \(x_c,y_c,z_c\) be the coordinates of the centre of the father node. Then, position 1 corresponds to \(x=x_c-\Delta\), \(y=y_c-\Delta\) and \(y=y_c-\Delta\). The next positions are obtained by rotating counter-clockwise around the Z axis and then, making the same rotation for \(z=z_c+\Delta\). More... | |
Private Attributes | |
int | m_nPts |
Number of points in the octant. More... | |
int | m_loc |
Position in the father octant (1-8) More... | |
int | m_depth |
Depth in octree (root is 1) More... | |
int | m_id |
ID of the octant (index in 'm_nodes' vector) More... | |
double | m_delta |
Length of the octant side. More... | |
Array< OneD, NekDouble > | m_centre |
Coordinates of the centre of the octant. More... | |
Array< OneD, NekDouble > | m_bounds |
Min/max coordinates of the octant (x, y, z) More... | |
std::vector< int > | m_pointInd |
Indices of the points comprised by the octant. More... | |
bool | m_isLeaf |
True for a leaf octant, false otherwise. More... | |
Array< OneD, OctantSharedPtr > | m_children |
Vector of pointers to the children octants. More... | |
std::vector< OctantWeakPtr > | m_neighbours |
Vector of pointers to the neighbouring octants. More... | |
Nektar::FieldUtils::Octree::Octant::Octant | ( | ) |
Construct a new Octree::Octant object.
Definition at line 358 of file Octree.cpp.
Nektar::FieldUtils::Octree::Octant::Octant | ( | int | loc, |
int | depth, | ||
int | id, | ||
const Array< OneD, NekDouble > & | bounds | ||
) |
Construct a new Octree::Octant object.
loc | |
depth | |
id | |
bounds |
Definition at line 372 of file Octree.cpp.
Nektar::FieldUtils::Octree::Octant::Octant | ( | int | loc, |
Octant & | parent | ||
) |
Construct a new Octree::Octant object.
loc | |
parent |
Definition at line 413 of file Octree.cpp.
References GetCentre(), GetDelta(), GetDepth(), CG_Iterations::loc, m_bounds, m_centre, m_delta, and m_depth.
void Nektar::FieldUtils::Octree::Octant::AddNeighbours | ( | const std::vector< OctantSharedPtr > & | neighbours | ) |
Adds to 'm_neighbours' the octants that are not already in the list.
neighbours |
Definition at line 526 of file Octree.cpp.
void Nektar::FieldUtils::Octree::Octant::AddPoints | ( | const Array< OneD, Array< OneD, NekDouble > > & | pts, |
const std::vector< int > & | indices | ||
) |
Adds to 'm_pointInd' the IDs of the points in 'pts' that fall inside the octant.
pts | |
indices |
Definition at line 554 of file Octree.cpp.
|
inline |
Definition at line 140 of file Octree.h.
References m_children.
|
inline |
|
inline |
|
inline |
|
inline |
void Nektar::FieldUtils::Octree::Octant::GetLeaves | ( | std::vector< OctantSharedPtr > & | leaves | ) |
Updates 'leaves' so that it contains all the leaf nodes belonging to the octant.
leaves |
Definition at line 492 of file Octree.cpp.
|
inline |
Returns the position inside an octant in the range (1-8). The name convention is as follows: let \(\Delta\) be a value between 0 and the length of the side of the father octant, and \(x_c,y_c,z_c\) be the coordinates of the centre of the father node. Then, position 1 corresponds to \(x=x_c-\Delta\), \(y=y_c-\Delta\) and \(y=y_c-\Delta\). The next positions are obtained by rotating counter-clockwise around the Z axis and then, making the same rotation for \(z=z_c+\Delta\).
coords |
Definition at line 634 of file Octree.cpp.
|
inline |
Definition at line 144 of file Octree.h.
References m_neighbours.
|
inline |
|
inline |
|
inline |
void Nektar::FieldUtils::Octree::Octant::SetIndices | ( | const std::vector< int > & | indices | ) |
Sets the values of 'm_pointInd' to those in 'indices'.
indices |
Definition at line 512 of file Octree.cpp.
void Nektar::FieldUtils::Octree::Octant::Subdivide | ( | int | maxPts, |
const Array< OneD, Array< OneD, NekDouble > > & | pts, | ||
std::vector< OctantSharedPtr > & | nodes | ||
) |
Recursively divides the octant into 8 children and fills the leaf nodes with their corresponding points. Does NOT add neighbours.
maxPts | |
pts | |
nodes |
Definition at line 591 of file Octree.cpp.
Min/max coordinates of the octant (x, y, z)
Definition at line 178 of file Octree.h.
Referenced by GetBounds(), and Octant().
Coordinates of the centre of the octant.
Definition at line 176 of file Octree.h.
Referenced by GetCentre(), and Octant().
|
private |
Vector of pointers to the children octants.
Definition at line 185 of file Octree.h.
Referenced by GetChildren().
|
private |
Length of the octant side.
Definition at line 174 of file Octree.h.
Referenced by GetDelta(), and Octant().
|
private |
Depth in octree (root is 1)
Definition at line 170 of file Octree.h.
Referenced by GetDepth(), and Octant().
|
private |
|
private |
|
private |
|
private |
Vector of pointers to the neighbouring octants.
Definition at line 187 of file Octree.h.
Referenced by GetNeighbours().
|
private |
Number of points in the octant.
Definition at line 166 of file Octree.h.
Referenced by GetNpoints().
|
private |
Indices of the points comprised by the octant.
Definition at line 180 of file Octree.h.
Referenced by GetIndices().