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

Public Types

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
 

Public Member Functions

 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 Member Functions

bool setupPointStructure (const realx3Vector &points)
 
bool setupPointStructure (const PointsTypeHost &points)
 
bool initializePoints (const PointsTypeHost &points)
 

Private Attributes

uniquePtr< simulationDomainsimulationDomain_ = nullptr
 
uniquePtr< pointSortingpointSorting_ = nullptr
 
boundaryList boundaries_
 
Timer boundaryUpdateTimer_
 
Timer boundaryDataTransferTimer_
 

Additional Inherited Members

- 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 34 of file pointStructure.hpp.

Member Typedef Documentation

◆ PointsType

Definition at line 42 of file pointStructure.hpp.

◆ PointsTypeHost

Definition at line 44 of file pointStructure.hpp.

◆ device_type

Definition at line 46 of file pointStructure.hpp.

◆ memory_space

Definition at line 48 of file pointStructure.hpp.

◆ execution_space

Definition at line 50 of file pointStructure.hpp.

Constructor & Destructor Documentation

◆ pointStructure() [1/4]

pointStructure ( systemControl control)
explicit

an empty pointStructure, good for reading from file

Definition at line 94 of file pointStructure.cpp.

References END_REPORT, pFlow::endl(), fatalErrorInFunction, fatalExit, Green_Text, IOfileHeader::path(), IOobject::readObject(), and REPORT.

+ Here is the call graph for this function:

◆ pointStructure() [2/4]

pointStructure ( systemControl control,
const realx3Vector posVec 
)

construct from point positions, assume all points are active

Definition at line 138 of file pointStructure.cpp.

References pFlow::endl(), fatalErrorInFunction, fatalExit, pointStructure::pointSorting_, pointStructure::setupPointStructure(), and pointStructure::simulationDomain_.

+ Here is the call graph for this function:

◆ pointStructure() [3/4]

pointStructure ( const pointStructure )
delete

◆ pointStructure() [4/4]

pointStructure ( pointStructure &&  )
delete

◆ ~pointStructure()

~pointStructure ( )
overridedefault

Member Function Documentation

◆ setupPointStructure() [1/2]

bool setupPointStructure ( const realx3Vector points)
private

Definition at line 27 of file pointStructure.cpp.

References objectFile::name(), and internalPoints::pointPosition().

Referenced by pointStructure::pointStructure().

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

◆ setupPointStructure() [2/2]

bool setupPointStructure ( const PointsTypeHost points)
private

Definition at line 40 of file pointStructure.cpp.

References pFlow::endl(), and fatalErrorInFunction.

+ Here is the call graph for this function:

◆ initializePoints()

bool initializePoints ( const PointsTypeHost points)
private

Definition at line 83 of file pointStructure.cpp.

◆ TypeInfo()

TypeInfo ( "pointStructure"  )

◆ operator=() [1/2]

pointStructure& operator= ( const pointStructure )
delete

◆ operator=() [2/2]

pointStructure& operator= ( pointStructure &&  )
delete

◆ beforeIteration()

bool beforeIteration ( )
overridevirtual

In the time loop before iterate.

Implements demComponent.

Definition at line 175 of file pointStructure.cpp.

References message::addAndName(), timeInfo::dt(), anyList::emplaceBack(), END_INFO, pFlow::endl(), fatalErrorInFunction, INFORMATION, message::ITEM_REARRANGE, timeInfo::iter(), and timeInfo::t().

Referenced by dynamicPointStructure::beforeIteration().

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

◆ 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 232 of file pointStructure.cpp.

References pFlow::endl(), and fatalErrorInFunction.

Referenced by dynamicPointStructure::iterate().

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

◆ afterIteration()

bool afterIteration ( )
overridevirtual

This is called in time loop, after iterate.

Implements demComponent.

Definition at line 244 of file pointStructure.cpp.

References pFlow::endl(), and fatalErrorInFunction.

+ Here is the call graph for this function:

◆ boundaries() [1/2]

auto& boundaries ( )
inline

Definition at line 118 of file pointStructure.hpp.

References pointStructure::boundaries_.

◆ boundaries() [2/2]

const auto& boundaries ( ) const
inline

Definition at line 123 of file pointStructure.hpp.

References pointStructure::boundaries_.

◆ time() [1/2]

Time& time ( )
inlineoverridevirtual

Implements internalPoints.

Definition at line 128 of file pointStructure.hpp.

References demComponent::time().

Referenced by pFlow::selectedFieldVals(), and generalBoundary::time().

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

◆ time() [2/2]

const Time& time ( ) const
inlineoverridevirtual

Implements internalPoints.

Definition at line 133 of file pointStructure.hpp.

References demComponent::time().

+ Here is the call graph for this function:

◆ boundary() [1/2]

boundaryBase& boundary ( size_t  i)
inlineoverridevirtual

Implements internalPoints.

Definition at line 138 of file pointStructure.hpp.

References pointStructure::boundaries_.

◆ boundary() [2/2]

const boundaryBase& boundary ( size_t  i) const
inlineoverridevirtual

Implements internalPoints.

Definition at line 143 of file pointStructure.hpp.

References pointStructure::boundaries_.

◆ simDomain()

const auto& simDomain ( ) const
inline

Definition at line 149 of file pointStructure.hpp.

References pointStructure::simulationDomain_.

Referenced by boundaryList::boundaryList(), boundaryList::setExtendedDomain(), and particles::simDomain().

+ Here is the caller graph for this function:

◆ thisDomain()

const auto& thisDomain ( ) const
inline

Definition at line 155 of file pointStructure.hpp.

References pointStructure::simulationDomain_.

Referenced by particles::thisDomain().

+ Here is the caller graph for this function:

◆ extendedDomain()

const auto& extendedDomain ( ) const
inline

Definition at line 161 of file pointStructure.hpp.

References pointStructure::boundaries_, and boundaryList::extendedDomain().

Referenced by particles::extendedDomain().

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

◆ internalDomainBox()

auto internalDomainBox ( ) const
inline

Definition at line 167 of file pointStructure.hpp.

References pointStructure::boundaries_, and boundaryList::internalDomainBox().

+ Here is the call graph for this function:

◆ read()

bool read ( iIstream is,
const IOPattern iop 
)
overridevirtual

read the point structure from the input stream.

Parameters
isinput stream
ioptype of input pattern
Returns
true on success

Implements IOobject.

Definition at line 257 of file pointStructure.cpp.

References pFlow::endl(), fatalErrorInFunction, and IOstream::name().

+ Here is the call graph for this function:

◆ write()

bool write ( iOstream os,
const IOPattern iop 
) const
overridevirtual

Write.

Implements IOobject.

Definition at line 279 of file pointStructure.cpp.

References internalPoints::write().

+ Here is the call graph for this function:

Member Data Documentation

◆ simulationDomain_

uniquePtr<simulationDomain> simulationDomain_ = nullptr
private

◆ pointSorting_

uniquePtr<pointSorting> pointSorting_ = nullptr
private

Definition at line 57 of file pointStructure.hpp.

Referenced by pointStructure::pointStructure().

◆ boundaries_

◆ boundaryUpdateTimer_

Timer boundaryUpdateTimer_
private

Definition at line 61 of file pointStructure.hpp.

◆ boundaryDataTransferTimer_

Timer boundaryDataTransferTimer_
private

Definition at line 63 of file pointStructure.hpp.


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