Go to the documentation of this file.
41 indexList_.assign(newIndices,
false);
52 indexList_.append(newIndices);
64 internal_.time().currentIter(),
65 internal_.time().currentTime(),
66 internal_.time().dt(),
84 if(removeMask.
size() != size()+1 )
102 if(!setRemoveKeepIndices(removeIndices, keepIndices))
111 std::move(keepIndices));
115 uint32 iter = time().currentIter();
116 real t = time().currentTime();
117 real dt = time().dt();
119 if( !this->notify(iter, t, dt, msgBndry, aList) )
136 if(!internal_.deletePoints(removeIndices))
139 "error in deleting points from boundary "<< name()<<
endl;
143 setNewIndices(keepIndices);
152 uint32 transferBoundaryIndex,
156 if(transferMask.
size() != size()+1 )
175 if( !internal_.changePointsFlagPosition(
179 transferBoundaryIndex) )
186 setNewIndices(keepIndices);
189 return mirrorBoundary().appendNewIndices(transferIndices);
199 markedIndices.
fill(0u);
207 Kokkos::parallel_reduce
209 "boundaryProcessor::afterIteration",
232 boundaryPlane_(bplane),
233 indexList_(
groupNames(
"indexList", dict.name())),
234 indexListHost_(
groupNames(
"hostIndexList", dict.name())),
235 neighborLength_(dict.getVal<
real>(
"neighborLength")),
237 boundaryExtntionLengthRatio_(dict.getVal<
real>(
"boundaryExtntionLengthRatio")),
240 thisBoundaryIndex_(thisIndex),
241 neighborProcessorNo_(dict.getVal<
int32>(
"neighborProcessorNo")),
242 isBoundaryMaster_(thisProcessorNo() >= neighborProcessorNo()),
244 type_(dict.getVal<
word>(
"type"))
251 return boundaries_.pStruct();
256 return boundaries_.pStruct().time();
261 return boundaries_[mirrorBoundaryIndex()];
266 return boundaries_[mirrorBoundaryIndex()];
276 indexList_.deviceViewAll(),
277 internal_.pointPosition().deviceViewAll()
301 const plane& thisP = boundaryPlane();
302 const plane& mirrorP = mirrorBoundary().boundaryPlane();
303 return thisP.
normal()*(thisP.
d() + mirrorP.
d());
319 if( dictionaryvCtorSelector_.search(bType) )
321 return dictionaryvCtorSelector_[bType] (dict, bplane,
internal, bndrs, thisIndex);
327 fatalError <<
"Ctor Selector "<< bType <<
" does not exist. \n"
328 <<
"Avaiable ones are: \n\n"
330 dictionaryvCtorSelector_
#define notImplementedFunction
Report that a function is yet not implemented.
const pointStructure & pStruct() const
INLINE_FUNCTION_H void fill(const T &val)
Fill the range [0,size) with val.
INLINE_FUNCTION_H void resize(uint32 n)
Resize the vector and preserve the content.
virtual realx3 displacementVectroToMirror() const
displacement vector that transfers points to a distance that is equal to the distance between this ...
const INLINE_FUNCTION_HD auto & normal() const
INLINE_FUNCTION_HD bool pointInNegativeSide(const realx3 &p) const
#define fatalExit
Fatal exit.
bool transferPointsToMirror(uint32 numTransfer, const uint32Vector_D &transferMask, uint32 transferBoundaryIndex, realx3 transferVector)
virtual realx3Vector_D & neighborProcPoints()
Return a reference to point positions in the neighbor processor boundary.
uint32 markInNegativeSide(const word &name, uint32Vector_D &markedIndices) const
INLINE_FUNCTION_H void reallocate(uint32 cap)
Reallocate memory to new cap and set size to 0.
iOstream & printKeys(iOstream &os, const wordHashMap< T > &m)
boundaryBase & mirrorBoundary()
iOstream & endl(iOstream &os)
Add newline and flush stream.
const Time & time() const
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
word angleBracketsNames(const word &w1, const word &w2)
Output <w1,w2>
virtual void setSize(uint32 newSize)
Set the size of indexList.
void createRemoveKeepIndices(const uint32Vector_D &indices, uint32 numRemove, const uint32Vector_D &removeMask, uint32Vector_D &removeIndices, uint32Vector_D &keepIndices, bool exactCap=true)
#define fatalError
Report a fatal error and exit the applicaiton.
INLINE_FUNCTION_H auto & deviceViewAll()
Device view range [0,capcity)
T getVal(const word &keyword) const
get the value of data entry
const INLINE_FUNCTION_HD auto & d() const
uint32Vector_D indexList_
list of particles indices on device
Kokkos::RangePolicy< Kokkos::DefaultExecutionSpace, Kokkos::Schedule< Kokkos::Static >, Kokkos::IndexType< pFlow::uint32 > > deviceRPolicyStatic
word groupNames(const word &bw, const word &tw, char sep='.')
Group words and output bw.tw.
void setNewIndices(const uint32Vector_D &newIndices)
boundaryBase(const dictionary &dict, const plane &bplane, internalPoints &internal, boundaryList &bndrs, uint32 thisIndex)
bool setRemoveKeepIndices(const uint32Vector_D &removeIndices, const uint32Vector_D &keepIndices)
bool appendNewIndices(const uint32Vector_D &newIndices)
reference emplaceBack(const word &name, Args &&... args)
Create variable using constructor in-place.
pointFieldAccessType thisPoints() const
static uniquePtr< boundaryBase > create(const dictionary &dict, const plane &bplane, internalPoints &internal, boundaryList &bndrs, uint32 thisIndex)
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...
INLINE_FUNCTION_H uint32 size() const
Size of the vector.
message & add(EVENT evnt)
static const word & eventName(size_t event)
bool removeIndices(uint32 numRemove, const uint32Vector_D &removeMask)