www.cemf.ir
dynamicPointStructure Class Reference
+ Inheritance diagram for dynamicPointStructure:
+ Collaboration diagram for dynamicPointStructure:

Public Member Functions

 TypeInfo ("dynamicPointStructure")
 
 dynamicPointStructure (systemControl &control)
 
 dynamicPointStructure (const dynamicPointStructure &ps)=delete
 
 dynamicPointStructure (dynamicPointStructure &&)=delete
 
dynamicPointStructureoperator= (const dynamicPointStructure &)=delete
 
dynamicPointStructureoperator= (dynamicPointStructure &&)=delete
 
 ~dynamicPointStructure () override=default
 
const realx3PointField_Dvelocity () const
 
realx3PointField_Dvelocity ()
 
bool beforeIteration () override
 In the time loop before iterate. More...
 
bool iterate () override
 This is called in time loop. More...
 
bool predict (real dt, realx3PointField_D &acceleration)
 prediction step (if any), is called in beforeIteration
More...
 
bool correct (real dt, realx3PointField_D &acceleration)
 correction step, is called in iterate More...
 
- Public Member Functions inherited from pointStructure
 TypeInfo ("pointStructure")
 
 pointStructure (systemControl &control)
 an empty pointStructure, good for reading from file More...
 
 pointStructure (systemControl &control, const realx3Vector &posVec)
 construct from point positions, assume all points are active More...
 
 pointStructure (const pointStructure &)=delete
 
 pointStructure (pointStructure &&)=delete
 
pointStructureoperator= (const pointStructure &)=delete
 
pointStructureoperator= (pointStructure &&)=delete
 
 ~pointStructure () override=default
 
bool beforeIteration () override
 In the time loop before iterate. More...
 
bool iterate () override
 This is called in time loop. More...
 
bool afterIteration () override
 This is called in time loop, after iterate. More...
 
auto & boundaries ()
 
const auto & boundaries () const
 
Timetime () override
 
const Timetime () const override
 
boundaryBaseboundary (size_t i) override
 
const boundaryBaseboundary (size_t i) const override
 
const auto & simDomain () const
 
const auto & thisDomain () const
 
const auto & extendedDomain () const
 
auto internalDomainBox () const
 
bool read (iIstream &is, const IOPattern &iop) override
 read the point structure from the input stream. More...
 
bool write (iOstream &os, const IOPattern &iop) const override
 Write. More...
 
- Public Member Functions inherited from IOobject
virtual word typeName () const =0
 
 IOobject (const objectFile &objf, const IOPattern &iop, repository *owner)
 
 ~IOobject () override
 
 IOobject (const IOobject &src)=delete
 
 IOobject (IOobject &&src)=delete
 
const IOPatternioPattern () const
 
const repositoryowner () const override
 
repositoryowner ()
 
repositoryreleaseOwner (bool fromOwner=false)
 
bool isIncluded (const word &objName) const override
 
bool isExcluded (const word &objName) const override
 
bool readObject (bool rdHdr=true)
 
bool writeObject () const
 
bool readObject (iIstream &is, bool rdHdr=true)
 
bool writeObject (iOstream &os) const
 
- Public Member Functions inherited from IOfileHeader
 IOfileHeader (const objectFile &objf)
 
const wordobjectName () const
 
const wordobjectType () const
 
fileSystem path () const
 
bool outFileBinary () const
 
bool inFileBinary () const
 
bool headerOk (bool silent=false)
 
bool implyRead () const
 Imply read. More...
 
bool implyWrite () const
 Imply write. More...
 
bool fileExist () const
 Check if file exists. More...
 
bool readIfPresent () const
 Check read if present. More...
 
bool writeHeader () const
 Check if the header should be written to file True: on master + implyWrite + readWriteHeader = true False: otherwise. More...
 
bool writeHeader (iOstream &os, const word &typeName, bool forceWrite=false) const
 Write the header to the file , typeName comes from caller. More...
 
bool writeHeader (iOstream &os, bool forceWrite=false) const
 Write the header to the file, typeName comes from the one read from file. More...
 
bool readHeader () const
 Check if header should be read from file. More...
 
bool readHeader (iIstream &is, bool silent=false)
 Read the header in the file. More...
 
bool writeBanner (iOstream &os) const
 write the banner More...
 
bool writeSeparator (iOstream &os) const
 wirte a separator line More...
 
- Public Member Functions inherited from objectFile
 objectFile (const word &name)
 
 objectFile (const word &name, const fileSystem &localPath, const readFlag &rf=readFlag::READ_NEVER, const writeFlag &wf=writeFlag::WRITE_NEVER, bool rwHeader=true)
 
 objectFile (const objectFile &src)=default
 
 objectFile (objectFile &&src)=default
 
objectFileoperator= (const objectFile &rhs)=default
 
objectFileoperator= (objectFile &&rhs)=default
 
virtual ~objectFile ()=default
 
virtual const wordname () const
 
virtual const fileSystemlocalPath () const
 
readFlag rFlag () const
 
writeFlag wFlag () const
 
bool isReadAlways () const
 
bool isReadNever () const
 
bool isReadIfPresent () const
 
bool isWriteAlways () const
 
bool isWriteNever () const
 
bool readWriteHeader () const
 
- Public Member Functions inherited from demComponent
 TypeInfo ("demComponent")
 Type info. More...
 
 demComponent (const word &name, systemControl &control)
 construct from components More...
 
 demComponent (const demComponent &)=delete
 No copy constructor. More...
 
 demComponent (demComponent &&)=delete
 No move constructor. More...
 
demComponentoperator= (const demComponent &)=delete
 No copy assignment. More...
 
demComponentoperator= (demComponent &&)=delete
 No move assignment. More...
 
virtual ~demComponent ()=default
 destructor More...
 
const auto & control () const
 Const ref to systemControl. More...
 
auto & control ()
 Ref to systemControl. More...
 
real dt () const
 Time step of integration. More...
 
real currentTime () const
 Current simulation time. More...
 
uint32 currentIter () const
 return current iteration number More...
 
timeInfo TimeInfo () const
 return time info of the simulaiton More...
 
const auto & time () const
 
auto & time ()
 
const auto & timers () const
 Const ref to timers. More...
 
auto & timers ()
 Ref to timers. More...
 
virtual bool beforeTimeLoop ()
 This is called before the start of time loop. More...
 
virtual bool afterTimeLoop ()
 This is called after the time loop. More...
 
- Public Member Functions inherited from internalPoints
 TypeInfo ("internalPoints")
 
 internalPoints ()
 
 internalPoints (const realx3Vector &posVec)
 Construct from point positions, assume all points are active. More...
 
 internalPoints (const internalPoints &)=delete
 No Copy construct. More...
 
 internalPoints (internalPoints &&)=default
 Move construct. More...
 
internalPointsoperator= (const internalPoints &)=delete
 No Copy assignment. More...
 
internalPointsoperator= (internalPoints &&)=default
 Move assignment. More...
 
 ~internalPoints () override=default
 Destructor. More...
 
const pFlagTypeDeviceactivePointsMaskDevice () const
 
const pFlagTypeHostactivePointsMaskHost () const
 
const PointsTypepointPosition () const
 
PointsTypepointPosition ()
 
auto pointPositionHost () const
 
auto pointPositionDevice () const
 
PointsTypeHost activePointsHost () const
 
uint32 size () const
 
uint32 capacity () const
 
bool empty () const
 
uint32 numActive () const
 
bool isAllActive () const
 
auto activeRange () const
 
bool deletePoints (scatteredFieldAccess< uint32, memory_space > delPoints)
 delete points at indices given in delPoints. More...
 
uint32 updateFlag (const domain &dm, const std::array< real, 6 > &dist)
 
void fillNeighborsLists (ViewType1D< uint32, memory_space > leftList, ViewType1D< uint32, memory_space > rightList, ViewType1D< uint32, memory_space > bottomList, ViewType1D< uint32, memory_space > topList, ViewType1D< uint32, memory_space > rearList, ViewType1D< uint32, memory_space > frontList)
 
bool insertPoints (const realx3Vector &points, anyList &varList)
 
bool insertPointsOnly (const realx3Vector_D &points, message &msg, anyList &varList)
 
bool read (iIstream &is)
 Read. More...
 
bool write (iOstream &os) const
 Write. More...
 
bool read (iIstream &is, const IOPattern &iop)
 Read. More...
 
bool write (iOstream &os, const IOPattern &iop) const
 Write. More...
 
- 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
 

Private Attributes

realx3PointField_D velocity_
 
uniquePtr< integrationintegrationPos_ = nullptr
 
uniquePtr< integrationintegrationVel_ = nullptr
 
Timer velocityUpdateTimer_
 
word integrationMethod_
 integration method for velocity and position More...
 

Additional Inherited Members

- Public Types inherited from pointStructure
using PointsType = typename internalPoints::PointsType
 
using PointsTypeHost = typename PointsType::FieldTypeHost
 
using device_type = typename PointsType::device_type
 
using memory_space = typename PointsType::memory_space
 
using execution_space = typename PointsType::execution_space
 
- Public Types inherited from objectFile
enum  readFlag { READ_ALWAYS, READ_NEVER, READ_IF_PRESENT }
 
enum  writeFlag { WRITE_ALWAYS, WRITE_NEVER }
 
- Public Types inherited from internalPoints
using PointsType = realx3Field_D
 
using PointsTypeHost = typename PointsType::FieldTypeHost
 
using device_type = typename PointsType::device_type
 
using memory_space = typename PointsType::memory_space
 
using execution_space = typename PointsType::execution_space
 
- Static Public Attributes inherited from internalPoints
static const uint32 initialCapacity_ = 10000
 
- Protected Member Functions inherited from IOfileHeader
uniquePtr< iFstreaminStream () const
 
uniquePtr< oFstreamoutStream () const
 
uniquePtr< oFstreamdummyOutStream () const
 
- Protected Member Functions inherited from internalPoints
void syncPFlag () const
 
void unSyncFlag ()
 
void createDeviceFlag (uint32 cap, uint32 start, uint32 end)
 
bool sortPoints (const uint32IndexContainer &sortedIndices)
 
- Protected Attributes inherited from IOfileHeader
word objectName_
 
word objectType_
 
word fileFormat_ = "ASCII"
 file format read from file More...
 

Detailed Description

Definition at line 35 of file dynamicPointStructure.hpp.

Constructor & Destructor Documentation

◆ dynamicPointStructure() [1/3]

dynamicPointStructure ( systemControl control)
explicit

Definition at line 25 of file dynamicPointStructure.cpp.

References END_REPORT, fatalErrorInFunction, fatalExit, Green_Text, and REPORT.

◆ dynamicPointStructure() [2/3]

◆ dynamicPointStructure() [3/3]

◆ ~dynamicPointStructure()

~dynamicPointStructure ( )
overridedefault

Member Function Documentation

◆ TypeInfo()

TypeInfo ( "dynamicPointStructure"  )

◆ operator=() [1/2]

dynamicPointStructure& operator= ( const dynamicPointStructure )
delete

◆ operator=() [2/2]

dynamicPointStructure& operator= ( dynamicPointStructure &&  )
delete

◆ velocity() [1/2]

const realx3PointField_D& velocity ( ) const
inline

Definition at line 74 of file dynamicPointStructure.hpp.

References dynamicPointStructure::velocity_.

Referenced by particles::velocity().

+ Here is the caller graph for this function:

◆ velocity() [2/2]

realx3PointField_D& velocity ( )
inline

Definition at line 80 of file dynamicPointStructure.hpp.

References dynamicPointStructure::velocity_.

◆ beforeIteration()

◆ iterate()

bool iterate ( )
overridevirtual

This is called in time loop.

Perform the main calculations when the component should evolve along time.

Implements demComponent.

Definition at line 94 of file dynamicPointStructure.cpp.

References pointStructure::iterate().

+ Here is the call graph for this function:

◆ predict()

bool predict ( real  dt,
realx3PointField_D acceleration 
)

prediction step (if any), is called in beforeIteration

Definition at line 104 of file dynamicPointStructure.cpp.

References pFlow::grainParticlesKernels::acceleration().

+ Here is the call graph for this function:

◆ correct()

bool correct ( real  dt,
realx3PointField_D acceleration 
)

correction step, is called in iterate

Definition at line 116 of file dynamicPointStructure.cpp.

References pFlow::grainParticlesKernels::acceleration().

+ Here is the call graph for this function:

Member Data Documentation

◆ velocity_

◆ integrationPos_

uniquePtr<integration> integrationPos_ = nullptr
private

Definition at line 43 of file dynamicPointStructure.hpp.

Referenced by dynamicPointStructure::beforeIteration().

◆ integrationVel_

uniquePtr<integration> integrationVel_ = nullptr
private

Definition at line 45 of file dynamicPointStructure.hpp.

Referenced by dynamicPointStructure::beforeIteration().

◆ velocityUpdateTimer_

Timer velocityUpdateTimer_
private

Definition at line 47 of file dynamicPointStructure.hpp.

Referenced by dynamicPointStructure::beforeIteration().

◆ integrationMethod_

word integrationMethod_
private

integration method for velocity and position

Definition at line 50 of file dynamicPointStructure.hpp.


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