www.cemf.ir
boundaryBase Class Referenceabstract
+ Inheritance diagram for boundaryBase:
+ Collaboration diagram for boundaryBase:

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
 
boundaryBaseoperator= (const boundaryBase &)=delete
 
 boundaryBase (boundaryBase &&)=default
 
boundaryBaseoperator= (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 wordtype () const
 
const wordname () 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 internalPointsinternal () const
 
internalPointsinternal ()
 
const pointStructurepStruct () const
 
const Timetime () const
 
const auto & indexList () const
 
const auto & indexListHost () const
 
boundaryBasemirrorBoundary ()
 
const boundaryBasemirrorBoundary () const
 
const planeboundaryPlane () 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_DneighborProcPoints ()
 Return a reference to point positions in the neighbor processor boundary. More...
 
virtual const realx3Vector_DneighborProcPoints () const
 Return a const reference to point positions in the neighbor processor boundary. More...
 
virtual uint32 numToTransfer () const
 
virtual uint32 numToRecieve () const
 
- Public Member Functions inherited from subscriber
 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...
 
subscriberoperator= (const subscriber &)
 Copy assignemnt, only assign the name, do not assign the list. More...
 
subscriberoperator= (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 wordsubscriberName () const
 

Static Public Member Functions

static uniquePtr< boundaryBasecreate (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 planeboundaryPlane_
 
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...
 
internalPointsinternal_
 a reference to internal points More...
 
boundaryListboundaries_
 a reference to the list of boundaries (never use this in the constructor). More...
 
uint32 thisBoundaryIndex_
 
int neighborProcessorNo_
 
bool isBoundaryMaster_
 
word name_
 
word type_
 

Detailed Description

Definition at line 42 of file boundaryBase.hpp.

Member Typedef Documentation

◆ pointFieldAccessType

Constructor & Destructor Documentation

◆ boundaryBase() [1/3]

boundaryBase ( const dictionary dict,
const plane bplane,
internalPoints internal,
boundaryList bndrs,
uint32  thisIndex 
)

Definition at line 225 of file boundaryBase.cpp.

References boundaryBase::unSyncLists().

+ Here is the call graph for this function:

◆ boundaryBase() [2/3]

boundaryBase ( const boundaryBase )
delete

◆ boundaryBase() [3/3]

boundaryBase ( boundaryBase &&  )
default

◆ ~boundaryBase()

~boundaryBase ( )
overridedefault

Member Function Documentation

◆ setSize()

void setSize ( uint32  newSize)
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().

+ Here is the call graph for this function:

◆ setUpdateTime()

void setUpdateTime ( bool  val)
inlineprotected

Definition at line 104 of file boundaryBase.hpp.

References boundaryBase::updateTime_.

◆ setNewIndices()

void setNewIndices ( const uint32Vector_D newIndices)
protected

Definition at line 37 of file boundaryBase.cpp.

◆ appendNewIndices()

bool appendNewIndices ( const uint32Vector_D newIndices)
protected

Definition at line 47 of file boundaryBase.cpp.

References message::add(), message::BNDR_APPEND, anyList::emplaceBack(), message::eventName(), and fatalErrorInFunction.

+ Here is the call graph for this function:

◆ removeIndices()

bool removeIndices ( uint32  numRemove,
const uint32Vector_D removeMask 
)
protected

◆ setRemoveKeepIndices()

bool setRemoveKeepIndices ( const uint32Vector_D removeIndices,
const uint32Vector_D keepIndices 
)
protected

Definition at line 130 of file boundaryBase.cpp.

References pFlow::endl(), and fatalErrorInFunction.

+ Here is the call graph for this function:

◆ transferPointsToMirror()

bool transferPointsToMirror ( uint32  numTransfer,
const uint32Vector_D transferMask,
uint32  transferBoundaryIndex,
realx3  transferVector 
)
protected

Definition at line 149 of file boundaryBase.cpp.

References pFlow::boundaryBaseKernels::createRemoveKeepIndices(), pFlow::endl(), fatalErrorInFunction, and VectorSingle< T, MemorySpace >::size().

+ Here is the call graph for this function:

◆ unSyncLists()

void unSyncLists ( )
inlineprotected

Definition at line 127 of file boundaryBase.hpp.

References boundaryBase::listsSync_.

Referenced by boundaryBase::boundaryBase(), and boundaryBase::setSize().

+ Here is the caller graph for this function:

◆ syncLists()

void syncLists ( ) const
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updataBoundaryData()

virtual bool updataBoundaryData ( int  step)
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.

◆ transferData()

virtual bool transferData ( uint32  iter,
int  step,
bool &  callAgain 
)
inlineprotectedvirtual

This method is called when a transfer of data is to be performed between processors (in afterIteration).

Parameters
stepis the step in the transfer of data.
callAgainif 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;
Returns
true: succesful, false: fail

Definition at line 161 of file boundaryBase.hpp.

◆ markInNegativeSide()

pFlow::uint32 markInNegativeSide ( const word name,
uint32Vector_D markedIndices 
) const

◆ TypeInfo()

TypeInfo ( "boundaryBase"  )

◆ operator=() [1/2]

boundaryBase& operator= ( const boundaryBase )
delete

◆ operator=() [2/2]

boundaryBase& operator= ( boundaryBase &&  )
default

◆ create_vCtor()

create_vCtor ( boundaryBase  ,
dictionary  ,
(const dictionary &dict, const plane &bplane, internalPoints &internal, boundaryList &bndrs, uint32 thisIndex)  ,
(dict, bplane, internal, bndrs, thisIndex)   
)

◆ neighborLengthIntoInternal()

real neighborLengthIntoInternal ( ) const
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().

+ Here is the caller graph for this function:

◆ neighborLength()

virtual real neighborLength ( ) const
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().

+ Here is the caller graph for this function:

◆ boundaryExtensionLength()

virtual realx3 boundaryExtensionLength ( ) const
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().

+ Here is the call graph for this function:

◆ performBoundarytUpdate()

bool performBoundarytUpdate ( ) const
inline

Is this iter the right time for updating bounday list.

Definition at line 240 of file boundaryBase.hpp.

References boundaryBase::updateTime_.

◆ iterBeforeBoundaryUpdate()

bool iterBeforeBoundaryUpdate ( ) const
inline

Definition at line 246 of file boundaryBase.hpp.

References boundaryBase::iterBeforeUpdate_.

◆ type()

◆ name()

◆ empty()

bool empty ( ) const
inline

Definition at line 264 of file boundaryBase.hpp.

References boundaryBase::indexList_, and VectorSingle< T, MemorySpace >::size().

+ Here is the call graph for this function:

◆ size()

auto size ( ) const
inline

Definition at line 270 of file boundaryBase.hpp.

References boundaryBase::indexList_, and VectorSingle< T, MemorySpace >::size().

Referenced by generalBoundary::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ capacity()

auto capacity ( ) const
inline

Definition at line 276 of file boundaryBase.hpp.

References VectorSingle< T, MemorySpace >::capacity(), and boundaryBase::indexList_.

Referenced by generalBoundary::capacity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ neighborProcessorNo()

int neighborProcessorNo ( ) const
inline

Definition at line 282 of file boundaryBase.hpp.

References boundaryBase::neighborProcessorNo_.

Referenced by generalBoundary::neighborProcessorNo().

+ Here is the caller graph for this function:

◆ thisProcessorNo()

int thisProcessorNo ( ) const
inline

Definition at line 288 of file boundaryBase.hpp.

References localProcessors::localRank(), and pFlow::pFlowProcessors().

Referenced by generalBoundary::thisProcessorNo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isBoundaryMaster()

bool isBoundaryMaster ( ) const
inline

Definition at line 294 of file boundaryBase.hpp.

References boundaryBase::isBoundaryMaster_.

◆ thisBoundaryIndex()

uint32 thisBoundaryIndex ( ) const
inline

Definition at line 300 of file boundaryBase.hpp.

References boundaryBase::thisBoundaryIndex_.

Referenced by generalBoundary::thisBoundaryIndex().

+ Here is the caller graph for this function:

◆ mirrorBoundaryIndex()

uint32 mirrorBoundaryIndex ( ) const
inline

Definition at line 306 of file boundaryBase.hpp.

References boundaryBase::thisBoundaryIndex_.

Referenced by generalBoundary::mirrorBoundaryindex().

+ Here is the caller graph for this function:

◆ internal() [1/2]

const internalPoints& internal ( ) const
inline

Definition at line 312 of file boundaryBase.hpp.

References boundaryBase::internal_.

◆ internal() [2/2]

internalPoints& internal ( )
inline

Definition at line 318 of file boundaryBase.hpp.

References boundaryBase::internal_.

◆ pStruct()

const pFlow::pointStructure & pStruct ( ) const

Definition at line 249 of file boundaryBase.cpp.

◆ time()

const pFlow::Time & time ( ) const

Definition at line 254 of file boundaryBase.cpp.

◆ indexList()

const auto& indexList ( ) const
inline

Definition at line 328 of file boundaryBase.hpp.

References boundaryBase::indexList_.

Referenced by generalBoundary::indexList().

+ Here is the caller graph for this function:

◆ indexListHost()

const auto& indexListHost ( ) const
inline

Definition at line 334 of file boundaryBase.hpp.

References boundaryBase::indexListHost_, and boundaryBase::syncLists().

+ Here is the call graph for this function:

◆ mirrorBoundary() [1/2]

const pFlow::boundaryBase & mirrorBoundary ( )

Definition at line 259 of file boundaryBase.cpp.

Referenced by generalBoundary::mirrorBoundary(), and periodicBoundaryContactSearch::setSearchBox().

+ Here is the caller graph for this function:

◆ mirrorBoundary() [2/2]

const boundaryBase& mirrorBoundary ( ) const

◆ boundaryPlane()

const plane& boundaryPlane ( ) 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().

+ Here is the caller graph for this function:

◆ displacementVectroToMirror()

pFlow::realx3 displacementVectroToMirror ( ) const
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().

+ Here is the call graph for this function:

◆ beforeIteration()

virtual bool beforeIteration ( uint32  step,
const timeInfo ti,
bool  updateIter,
bool  iterBeforeUpdate,
bool &  callAgain 
)
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().

+ Here is the caller graph for this function:

◆ iterate()

virtual bool iterate ( const timeInfo ti)
pure virtual

◆ afterIteration()

virtual bool afterIteration ( const timeInfo ti)
pure virtual

◆ thisPoints()

Definition at line 270 of file boundaryBase.cpp.

Referenced by periodicBoundaryContactSearch::broadSearch().

+ Here is the caller graph for this function:

◆ neighborProcSize()

virtual uint32 neighborProcSize ( ) const
inlinevirtual

Return number of points in the neighbor processor boundary.

Definition at line 382 of file boundaryBase.hpp.

Referenced by generalBoundary::neighborProcSize().

+ Here is the caller graph for this function:

◆ neighborProcPoints() [1/2]

const pFlow::realx3Vector_D & neighborProcPoints ( )
virtual

Return a reference to point positions in the neighbor processor boundary.

Definition at line 282 of file boundaryBase.cpp.

References fatalExit, and notImplementedFunction.

◆ neighborProcPoints() [2/2]

virtual const realx3Vector_D& neighborProcPoints ( ) const
virtual

Return a const reference to point positions in the neighbor processor boundary.

◆ numToTransfer()

virtual uint32 numToTransfer ( ) const
inlinevirtual

Definition at line 398 of file boundaryBase.hpp.

◆ numToRecieve()

virtual uint32 numToRecieve ( ) const
inlinevirtual

Definition at line 404 of file boundaryBase.hpp.

◆ create()

pFlow::uniquePtr< pFlow::boundaryBase > create ( const dictionary dict,
const plane bplane,
internalPoints internal,
boundaryList bndrs,
uint32  thisIndex 
)
static
  • static create

Definition at line 308 of file boundaryBase.cpp.

References pFlow::angleBracketsNames(), fatalError, fatalExit, dictionary::getVal(), and pFlow::printKeys().

Referenced by boundaryList::createBoundaries().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ boundaryList

friend boundaryList
private

Definition at line 54 of file boundaryBase.hpp.

◆ boundaryPlane_

const plane& boundaryPlane_
private

◆ indexList_

uint32Vector_D indexList_
private

◆ indexListHost_

uint32Vector_H indexListHost_
mutableprivate

list of particles indieces on host

Definition at line 62 of file boundaryBase.hpp.

Referenced by boundaryBase::indexListHost(), and boundaryBase::syncLists().

◆ listsSync_

bool listsSync_ = false
mutableprivate

device and host list are sync

Definition at line 65 of file boundaryBase.hpp.

Referenced by boundaryBase::syncLists(), and boundaryBase::unSyncLists().

◆ neighborLength_

real neighborLength_
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().

◆ updateTime_

bool updateTime_ = false
private

◆ iterBeforeUpdate_

bool iterBeforeUpdate_ = false
private

◆ boundaryExtntionLengthRatio_

real boundaryExtntionLengthRatio_
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().

◆ internal_

internalPoints& internal_
private

a reference to internal points

Definition at line 78 of file boundaryBase.hpp.

Referenced by boundaryBase::internal().

◆ boundaries_

boundaryList& boundaries_
private

a reference to the list of boundaries (never use this in the constructor).

Definition at line 82 of file boundaryBase.hpp.

◆ thisBoundaryIndex_

uint32 thisBoundaryIndex_
private

◆ neighborProcessorNo_

int neighborProcessorNo_
private

Definition at line 86 of file boundaryBase.hpp.

Referenced by boundaryBase::neighborProcessorNo().

◆ isBoundaryMaster_

bool isBoundaryMaster_
private

Definition at line 88 of file boundaryBase.hpp.

Referenced by boundaryBase::isBoundaryMaster().

◆ name_

word name_
private

Definition at line 90 of file boundaryBase.hpp.

Referenced by boundaryBase::name().

◆ type_

word type_
private

Definition at line 92 of file boundaryBase.hpp.

Referenced by boundaryBase::type().


The documentation for this class was generated from the following files: