Public Types | |
using | pointFieldAccessType = deviceScatteredFieldAccess< realx3 > |
Public Member Functions | |
uint32 | markInNegativeSide (const word &name, uint32Vector_D &markedIndices) const |
TypeInfo ("boundaryBase") | |
boundaryBase (const dictionary &dict, const plane &bplane, internalPoints &internal, boundaryList &bndrs, uint32 thisIndex) | |
boundaryBase (const boundaryBase &)=delete | |
boundaryBase & | operator= (const boundaryBase &)=delete |
boundaryBase (boundaryBase &&)=default | |
boundaryBase & | operator= (boundaryBase &&)=default |
~boundaryBase () override=default | |
create_vCtor (boundaryBase, dictionary,(const dictionary &dict, const plane &bplane, internalPoints &internal, boundaryList &bndrs, uint32 thisIndex),(dict, bplane, internal, bndrs, thisIndex)) | |
real | neighborLengthIntoInternal () const |
The length from boundary plane into the domain where beyond that distance internal points exist. More... | |
virtual real | neighborLength () const |
The distance length from boundary plane where neighbor particles still exist in that distance. More... | |
virtual realx3 | boundaryExtensionLength () const |
The extention length (in vector form) for the boundary as required by each boundary type. More... | |
bool | performBoundarytUpdate () const |
Is this iter the right time for updating bounday list. More... | |
bool | iterBeforeBoundaryUpdate () const |
const word & | type () const |
const word & | name () const |
bool | empty () const |
auto | size () const |
auto | capacity () const |
int | neighborProcessorNo () const |
int | thisProcessorNo () const |
bool | isBoundaryMaster () const |
uint32 | thisBoundaryIndex () const |
uint32 | mirrorBoundaryIndex () const |
const internalPoints & | internal () const |
internalPoints & | internal () |
const pointStructure & | pStruct () const |
const Time & | time () const |
const auto & | indexList () const |
const auto & | indexListHost () const |
boundaryBase & | mirrorBoundary () |
const boundaryBase & | mirrorBoundary () const |
const plane & | boundaryPlane () const |
the actual boundary plane of this boundary More... | |
virtual realx3 | displacementVectroToMirror () const |
displacement vector that transfers points to a distance that is equal to the distance between this plane and the mirror plane, the vector points from this plane to mirror plane More... | |
virtual bool | beforeIteration (uint32 step, const timeInfo &ti, bool updateIter, bool iterBeforeUpdate, bool &callAgain) |
virtual bool | iterate (const timeInfo &ti)=0 |
virtual bool | afterIteration (const timeInfo &ti)=0 |
pointFieldAccessType | thisPoints () const |
virtual uint32 | neighborProcSize () const |
Return number of points in the neighbor processor boundary. More... | |
virtual realx3Vector_D & | neighborProcPoints () |
Return a reference to point positions in the neighbor processor boundary. More... | |
virtual const realx3Vector_D & | neighborProcPoints () const |
Return a const reference to point positions in the neighbor processor boundary. More... | |
virtual uint32 | numToTransfer () const |
virtual uint32 | numToRecieve () const |
![]() | |
subscriber (const word &name) | |
subscriber (const subscriber &) | |
Copy constructor, only copies the name, not the list. More... | |
subscriber (subscriber &&) | |
Move constructor, moves the name and the list, also change the subriber of the object in the list More... | |
subscriber & | operator= (const subscriber &) |
Copy assignemnt, only assign the name, do not assign the list. More... | |
subscriber & | operator= (subscriber &&) |
Move assignment, move assign name and list, also change the subcriber of the object in the list More... | |
virtual | ~subscriber () |
virtual bool | subscribe (message msg, observer *obsevr) const |
virtual bool | unsubscribe (observer *obsevr) const |
bool | notify (uint32 iter, real t, real dt, const message msg, const anyList &varList) |
bool | notify (const timeInfo &ti, const message msg, const anyList &varList) |
const word & | subscriberName () const |
Static Public Member Functions | |
static uniquePtr< boundaryBase > | create (const dictionary &dict, const plane &bplane, internalPoints &internal, boundaryList &bndrs, uint32 thisIndex) |
Protected Member Functions | |
virtual void | setSize (uint32 newSize) |
Set the size of indexList. More... | |
void | setUpdateTime (bool val) |
void | setNewIndices (const uint32Vector_D &newIndices) |
bool | appendNewIndices (const uint32Vector_D &newIndices) |
bool | removeIndices (uint32 numRemove, const uint32Vector_D &removeMask) |
bool | setRemoveKeepIndices (const uint32Vector_D &removeIndices, const uint32Vector_D &keepIndices) |
bool | transferPointsToMirror (uint32 numTransfer, const uint32Vector_D &transferMask, uint32 transferBoundaryIndex, realx3 transferVector) |
void | unSyncLists () |
void | syncLists () const |
virtual bool | updataBoundaryData (int step) |
Update this boundary data in two steps (1 and 2). More... | |
virtual bool | transferData (uint32 iter, int step, bool &callAgain) |
This method is called when a transfer of data is to be performed between processors (in afterIteration). More... | |
Private Attributes | |
friend | boundaryList |
const plane & | boundaryPlane_ |
uint32Vector_D | indexList_ |
list of particles indices on device More... | |
uint32Vector_H | indexListHost_ |
list of particles indieces on host More... | |
bool | listsSync_ = false |
device and host list are sync More... | |
real | neighborLength_ |
The length defined for creating neighbor list. More... | |
bool | updateTime_ = false |
bool | iterBeforeUpdate_ = false |
real | boundaryExtntionLengthRatio_ |
the extra boundary extension beyound actual limits of boundary More... | |
internalPoints & | internal_ |
a reference to internal points More... | |
boundaryList & | boundaries_ |
a reference to the list of boundaries (never use this in the constructor). More... | |
uint32 | thisBoundaryIndex_ |
int | neighborProcessorNo_ |
bool | isBoundaryMaster_ |
word | name_ |
word | type_ |
Definition at line 42 of file boundaryBase.hpp.
Definition at line 49 of file boundaryBase.hpp.
boundaryBase | ( | const dictionary & | dict, |
const plane & | bplane, | ||
internalPoints & | internal, | ||
boundaryList & | bndrs, | ||
uint32 | thisIndex | ||
) |
Definition at line 225 of file boundaryBase.cpp.
References boundaryBase::unSyncLists().
|
delete |
|
default |
|
overridedefault |
|
protectedvirtual |
Set the size of indexList.
It is virtual to let derived classed to be aware of the fact that the size of boundary points has been changed. So, any drived class that override this method should call boundaryBase::setSize(newSize) too.
Definition at line 30 of file boundaryBase.cpp.
References boundaryBase::indexList_, VectorSingle< T, MemorySpace >::resize(), and boundaryBase::unSyncLists().
|
inlineprotected |
Definition at line 104 of file boundaryBase.hpp.
References boundaryBase::updateTime_.
|
protected |
Definition at line 37 of file boundaryBase.cpp.
|
protected |
Definition at line 47 of file boundaryBase.cpp.
References message::add(), message::BNDR_APPEND, anyList::emplaceBack(), message::eventName(), and fatalErrorInFunction.
|
protected |
Definition at line 79 of file boundaryBase.cpp.
References message::BNDR_RESET, pFlow::boundaryBaseKernels::createRemoveKeepIndices(), anyList::emplaceBack(), pFlow::endl(), message::eventName(), fatalErrorInFunction, and VectorSingle< T, MemorySpace >::size().
|
protected |
Definition at line 130 of file boundaryBase.cpp.
References pFlow::endl(), and fatalErrorInFunction.
|
protected |
Definition at line 149 of file boundaryBase.cpp.
References pFlow::boundaryBaseKernels::createRemoveKeepIndices(), pFlow::endl(), fatalErrorInFunction, and VectorSingle< T, MemorySpace >::size().
|
inlineprotected |
Definition at line 127 of file boundaryBase.hpp.
References boundaryBase::listsSync_.
Referenced by boundaryBase::boundaryBase(), and boundaryBase::setSize().
|
inlineprotected |
Definition at line 132 of file boundaryBase.hpp.
References VectorSingle< T, MemorySpace >::assignFromDevice(), boundaryBase::indexList_, boundaryBase::indexListHost_, and boundaryBase::listsSync_.
Referenced by boundaryBase::indexListHost().
|
inlineprotectedvirtual |
Update this boundary data in two steps (1 and 2).
This is called after calling beforeIteration for all boundaries, so any particle addition, deletion, and transfer has been finished up to this point. This two-step update help to have a flexible mechanism for data transfer, mostly for MPI related jobs.
Definition at line 148 of file boundaryBase.hpp.
|
inlineprotectedvirtual |
This method is called when a transfer of data is to be performed between processors (in afterIteration).
step | is the step in the transfer of data. |
callAgain | if operation requires at least one additional step to complete it should be set to true and if the operation is complete and no need for additional step, it should be set to false; |
Definition at line 161 of file boundaryBase.hpp.
pFlow::uint32 markInNegativeSide | ( | const word & | name, |
uint32Vector_D & | markedIndices | ||
) | const |
Definition at line 193 of file boundaryBase.cpp.
References VectorSingle< T, MemorySpace >::deviceViewAll(), VectorSingle< T, MemorySpace >::fill(), LAMBDA_HD, infinitePlane::pointInNegativeSide(), and VectorSingle< T, MemorySpace >::reallocate().
TypeInfo | ( | "boundaryBase" | ) |
|
delete |
|
default |
create_vCtor | ( | boundaryBase | , |
dictionary | , | ||
(const dictionary &dict, const plane &bplane, internalPoints &internal, boundaryList &bndrs, uint32 thisIndex) | , | ||
(dict, bplane, internal, bndrs, thisIndex) | |||
) |
|
inline |
The length from boundary plane into the domain where beyond that distance internal points exist.
By conventions is it always equal to neighborLength_
Definition at line 211 of file boundaryBase.hpp.
References boundaryBase::neighborLength_.
Referenced by boundaryPeriodic::neighborLength().
|
inlinevirtual |
The distance length from boundary plane where neighbor particles still exist in that distance.
This length may be modified in each boundary type as required. In this case the boundaryExtensionLength method should also be modified accordingly.
Reimplemented in boundaryPeriodic.
Definition at line 222 of file boundaryBase.hpp.
References boundaryBase::boundaryExtntionLengthRatio_, and boundaryBase::neighborLength_.
Referenced by periodicBoundaryContactSearch::setSearchBox().
|
inlinevirtual |
The extention length (in vector form) for the boundary as required by each boundary type.
It is allowed for each boundary type to be extended outward to allow particles to stay more in its list before being removed from its list.
Reimplemented in boundaryPeriodic.
Definition at line 233 of file boundaryBase.hpp.
References boundaryBase::boundaryExtntionLengthRatio_, boundaryBase::boundaryPlane_, boundaryBase::neighborLength_, and infinitePlane::normal().
|
inline |
Is this iter the right time for updating bounday list.
Definition at line 240 of file boundaryBase.hpp.
References boundaryBase::updateTime_.
|
inline |
Definition at line 246 of file boundaryBase.hpp.
References boundaryBase::iterBeforeUpdate_.
|
inline |
Definition at line 252 of file boundaryBase.hpp.
References boundaryBase::type_.
Referenced by boundaryGrainParticles::create(), boundarySphereParticles::create(), boundaryIntegration::create(), boundaryContactSearch::create(), boundarySphereInteraction< contactForceModel, geometryMotionModel >::create(), boundaryGrainInteraction< contactForceModel, geometryMotionModel >::create(), boundaryField< T, void >::create(), and generalBoundary::type().
|
inline |
Definition at line 258 of file boundaryBase.hpp.
References boundaryBase::name_.
Referenced by generalBoundary::boundaryName(), boundarySphereParticles::create(), boundaryGrainParticles::create(), boundaryIntegration::create(), boundaryContactSearch::create(), boundaryGrainInteraction< contactForceModel, geometryMotionModel >::create(), and boundarySphereInteraction< contactForceModel, geometryMotionModel >::create().
|
inline |
Definition at line 264 of file boundaryBase.hpp.
References boundaryBase::indexList_, and VectorSingle< T, MemorySpace >::size().
|
inline |
Definition at line 270 of file boundaryBase.hpp.
References boundaryBase::indexList_, and VectorSingle< T, MemorySpace >::size().
Referenced by generalBoundary::size().
|
inline |
Definition at line 276 of file boundaryBase.hpp.
References VectorSingle< T, MemorySpace >::capacity(), and boundaryBase::indexList_.
Referenced by generalBoundary::capacity().
|
inline |
Definition at line 282 of file boundaryBase.hpp.
References boundaryBase::neighborProcessorNo_.
Referenced by generalBoundary::neighborProcessorNo().
|
inline |
Definition at line 288 of file boundaryBase.hpp.
References localProcessors::localRank(), and pFlow::pFlowProcessors().
Referenced by generalBoundary::thisProcessorNo().
|
inline |
Definition at line 294 of file boundaryBase.hpp.
References boundaryBase::isBoundaryMaster_.
|
inline |
Definition at line 300 of file boundaryBase.hpp.
References boundaryBase::thisBoundaryIndex_.
Referenced by generalBoundary::thisBoundaryIndex().
|
inline |
Definition at line 306 of file boundaryBase.hpp.
References boundaryBase::thisBoundaryIndex_.
Referenced by generalBoundary::mirrorBoundaryindex().
|
inline |
Definition at line 312 of file boundaryBase.hpp.
References boundaryBase::internal_.
|
inline |
Definition at line 318 of file boundaryBase.hpp.
References boundaryBase::internal_.
const pFlow::pointStructure & pStruct | ( | ) | const |
Definition at line 249 of file boundaryBase.cpp.
const pFlow::Time & time | ( | ) | const |
Definition at line 254 of file boundaryBase.cpp.
|
inline |
Definition at line 328 of file boundaryBase.hpp.
References boundaryBase::indexList_.
Referenced by generalBoundary::indexList().
|
inline |
Definition at line 334 of file boundaryBase.hpp.
References boundaryBase::indexListHost_, and boundaryBase::syncLists().
const pFlow::boundaryBase & mirrorBoundary | ( | ) |
Definition at line 259 of file boundaryBase.cpp.
Referenced by generalBoundary::mirrorBoundary(), and periodicBoundaryContactSearch::setSearchBox().
const boundaryBase& mirrorBoundary | ( | ) | const |
|
inline |
the actual boundary plane of this boundary
Definition at line 345 of file boundaryBase.hpp.
References boundaryBase::boundaryPlane_.
Referenced by boundaryPeriodic::boundaryExtensionLength(), and periodicBoundaryContactSearch::setSearchBox().
|
virtual |
displacement vector that transfers points
to a distance that is equal to the distance between this plane and the mirror plane, the vector points from this plane to mirror plane
Definition at line 299 of file boundaryBase.cpp.
References infinitePlane::d(), and infinitePlane::normal().
|
inlinevirtual |
Reimplemented in boundaryExit, boundaryPeriodic, boundaryReflective, and boundaryNone.
Definition at line 359 of file boundaryBase.hpp.
References boundaryBase::iterBeforeUpdate_, and boundaryBase::updateTime_.
Referenced by boundaryNone::beforeIteration(), and boundaryReflective::beforeIteration().
|
pure virtual |
Implemented in boundaryExit, boundaryPeriodic, boundaryReflective, and boundaryNone.
|
pure virtual |
Implemented in boundaryExit, boundaryPeriodic, boundaryReflective, and boundaryNone.
pFlow::boundaryBase::pointFieldAccessType thisPoints | ( | ) | const |
Definition at line 270 of file boundaryBase.cpp.
Referenced by periodicBoundaryContactSearch::broadSearch().
|
inlinevirtual |
Return number of points in the neighbor processor boundary.
Definition at line 382 of file boundaryBase.hpp.
Referenced by generalBoundary::neighborProcSize().
|
virtual |
Return a reference to point positions in the neighbor processor boundary.
Definition at line 282 of file boundaryBase.cpp.
References fatalExit, and notImplementedFunction.
|
virtual |
Return a const reference to point positions in the neighbor processor boundary.
|
inlinevirtual |
Definition at line 398 of file boundaryBase.hpp.
|
inlinevirtual |
Definition at line 404 of file boundaryBase.hpp.
|
static |
Definition at line 308 of file boundaryBase.cpp.
References pFlow::angleBracketsNames(), fatalError, fatalExit, dictionary::getVal(), and pFlow::printKeys().
Referenced by boundaryList::createBoundaries().
|
private |
Definition at line 54 of file boundaryBase.hpp.
|
private |
Definition at line 56 of file boundaryBase.hpp.
Referenced by boundaryBase::boundaryExtensionLength(), and boundaryBase::boundaryPlane().
|
private |
list of particles indices on device
Definition at line 59 of file boundaryBase.hpp.
Referenced by boundaryBase::capacity(), boundaryBase::empty(), boundaryBase::indexList(), boundaryBase::setSize(), boundaryBase::size(), and boundaryBase::syncLists().
|
mutableprivate |
list of particles indieces on host
Definition at line 62 of file boundaryBase.hpp.
Referenced by boundaryBase::indexListHost(), and boundaryBase::syncLists().
|
mutableprivate |
device and host list are sync
Definition at line 65 of file boundaryBase.hpp.
Referenced by boundaryBase::syncLists(), and boundaryBase::unSyncLists().
|
private |
The length defined for creating neighbor list.
Definition at line 68 of file boundaryBase.hpp.
Referenced by boundaryBase::boundaryExtensionLength(), boundaryBase::neighborLength(), and boundaryBase::neighborLengthIntoInternal().
|
private |
Definition at line 70 of file boundaryBase.hpp.
Referenced by boundaryBase::beforeIteration(), boundaryBase::performBoundarytUpdate(), and boundaryBase::setUpdateTime().
|
private |
Definition at line 72 of file boundaryBase.hpp.
Referenced by boundaryBase::beforeIteration(), and boundaryBase::iterBeforeBoundaryUpdate().
|
private |
the extra boundary extension beyound actual limits of boundary
Definition at line 75 of file boundaryBase.hpp.
Referenced by boundaryBase::boundaryExtensionLength(), and boundaryBase::neighborLength().
|
private |
a reference to internal points
Definition at line 78 of file boundaryBase.hpp.
Referenced by boundaryBase::internal().
|
private |
a reference to the list of boundaries (never use this in the constructor).
Definition at line 82 of file boundaryBase.hpp.
|
private |
Definition at line 84 of file boundaryBase.hpp.
Referenced by boundaryBase::mirrorBoundaryIndex(), and boundaryBase::thisBoundaryIndex().
|
private |
Definition at line 86 of file boundaryBase.hpp.
Referenced by boundaryBase::neighborProcessorNo().
|
private |
Definition at line 88 of file boundaryBase.hpp.
Referenced by boundaryBase::isBoundaryMaster().
|
private |
Definition at line 90 of file boundaryBase.hpp.
Referenced by boundaryBase::name().
|
private |
Definition at line 92 of file boundaryBase.hpp.
Referenced by boundaryBase::type().