Go to the documentation of this file.
54 if( refineBox[leafI] )
64 transferCoordinates.
clear();
68 # pragma omp parallel private(neighbours)
74 # pragma omp for schedule(dynamic, 50)
78 const label leafI = front[i];
86 const label nei = neighbours[neiI];
94 if( !transferCoordinates.
found(leafI) )
97 transferCoordinates.
insert(leafI);
112 if( !refineBox[nei] )
129 # pragma omp critical
135 front[start++] = tFront[i];
142 nMarked = front.
size();
155 # pragma omp parallel for if( receivedCoords.size() > 100 ) \
156 schedule(dynamic, 40) private(neighbours)
158 forAll(receivedCoords, ccI)
166 const label nei = neighbours[neiI];
176 if( !refineBox[nei] )
181 # pragma omp critical
188 nMarked = front.
size();
194 while( nMarked != 0 );
206 # pragma omp parallel for schedule(dynamic, 100) reduction(+ : nMarked)
210 if( !refineBox[leafI] )
215 for(
label scI=0;scI<8;++scI)
217 const label neiLeaf =
220 if( neiLeaf >= 0 && !refineBox[neiLeaf] )
224 refineBox[neiLeaf] = 1;
230 # pragma omp critical
232 transferCoordinates.
append(cc);
247 # pragma omp parallel for if( receivedCoords.size() > 100 ) \
248 reduction(+ : nMarked)
250 forAll(receivedCoords, ccI)
254 for(
label scI=0;scI<8;++scI)
256 const label neiLeaf =
259 if( neiLeaf >= 0 && !refineBox[neiLeaf] )
263 refineBox[neiLeaf] = 1;
void append(const T &e)
Append an element at the end of the list.
void findAllLeafNeighbours(const meshOctreeCubeCoordinates &, DynList< label > &neighbourLeaves) const
find neighbour leaves over nodes, edges and faces
#define forAll(list, i)
Loop across all elements in list.
void clear()
Clear the list, i.e. set next free to zero.
const labelList & neiProcs() const
neighbour processors of the current one
label size() const
Size of the active part of the list.
const meshOctreeCubeCoordinates & coordinates() const
return coordinates in the octree
void setSize(const label)
Reset size of List.
label findLeafLabelForPosition(const meshOctreeCubeCoordinates &) const
return leaf cube for the given position
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void exchangeRequestsWithNeighbourProcessors(const LongList< meshOctreeCubeCoordinates > &dataToSend, LongList< meshOctreeCubeCoordinates > &dataToReceive) const
exchange requests with other processors generating the octree
void transfer(LongList< T, Offset > &)
transfer the list from another one without allocating it
meshOctreeCubeCoordinates refineForPosition(const label) const
return the coordinates of child cube at the given position
LongList< meshOctreeCube * > leaves_
list of cubes which are leaves of the octree
bool found(const Key &) const
Return true if hashedEntry is found in table.
void ensureCorrectRegularity(labelList &refineBox)
correct refinement such that it produces 1-irregular octree
direction level() const
return level
void clear()
Clear all entries from table.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool ensureCorrectRegularitySons(labelList &refineBox)
bool insert(const Key &key)
Insert a new entry.
void size(const label)
Override size to be inconsistent with allocated storage.
void clear()
Clear the list, i.e. set next free to zero.
meshOctree & octree_
Reference to the octree.