www.cemf.ir
geometryMotion< MotionModelType > Class Template Reference
+ Inheritance diagram for geometryMotion< MotionModelType >:
+ Collaboration diagram for geometryMotion< MotionModelType >:

Public Types

using MotionModel = MotionModelType
 
using ModelComponent = typename MotionModelType::ModelComponent
 
- Public Types inherited from objectFile
enum  readFlag { READ_ALWAYS, READ_NEVER, READ_IF_PRESENT }
 
enum  writeFlag { WRITE_ALWAYS, WRITE_NEVER }
 

Public Member Functions

 TypeInfoTemplate11 ("geometry", ModelComponent)
 Type info. More...
 
 geometryMotion (systemControl &control, const property &prop)
 
 geometryMotion (systemControl &control, const property &prop, multiTriSurface &surf, const wordVector &motionCompName, const wordVector &materialName, const dictionary &motionDict)
 
 add_vCtor (geometry, geometryMotion, systemControl)
 Add virtual constructor. More...
 
 add_vCtor (geometry, geometryMotion, dictionary)
 Add virtual constructor. More...
 
auto getModel (uint32 iter, real t, real dt) const
 Obtain motion model at time t. More...
 
word motionModelTypeName () const override
 TypeName / TypeInfo of motion model. More...
 
const uint32Field_DtriMotionIndex () const override
 Access to motion model index of triangles. More...
 
const uint32Field_DpointMotionIndex () const override
 Access to motion model index of points. More...
 
bool iterate () override
 Iterate geometry one time step
More...
 
- Public Member Functions inherited from geometry
 TypeInfo ("geometry")
 Type info. More...
 
 geometry (systemControl &control, const property &prop)
 Construct from controlSystem and property, for reading from file. More...
 
 geometry (systemControl &control, const property &prop, multiTriSurface &surf, const wordVector &motionCompName, const wordVector &materialName, const dictionary &motionDict)
 
 ~geometry () override=default
 Construct from components. More...
 
 create_vCtor (geometry, systemControl,(systemControl &control, const property &prop),(control, prop))
 Virtual constructor. More...
 
 create_vCtor (geometry, dictionary,(systemControl &control, const property &prop, multiTriSurface &surf, const wordVector &motionCompName, const wordVector &materialName, const dictionary &motionDic),(control, prop, surf, motionCompName, materialName, motionDic))
 Virtual constructor. More...
 
const auto & motionComponentName () const
 
auto & contactForceWall ()
 Access to contact force. More...
 
const auto & contactForceWall () const
 Access to contact force. More...
 
const auto & propertyId () const
 Property ide of triangles. More...
 
const auto & wallProperty () const
 Access to property. More...
 
bool beforeIteration () override
 This is called in time loop, before iterate. More...
 
bool afterIteration () override
 This is called in time loop, after iterate. More...
 
bool read (iIstream &is, const IOPattern &iop) override
 
bool write (iOstream &os, const IOPattern &iop) const override
 write More...
 
- Public Member Functions inherited from multiTriSurface
 TypeInfo ("multiTriSurface")
 
 multiTriSurface (const objectFile &obj, repository *owner)
 Construct from objectFile and owner repository. More...
 
 multiTriSurface (const objectFile &objf, repository *owner, const multiTriSurface &surf)
 Construct from another multiTriSurface. More...
 
 multiTriSurface (const multiTriSurface &)=default
 Copy construct (default) More...
 
multiTriSurfaceoperator= (const multiTriSurface &)=default
 Copy assignment (default) More...
 
 multiTriSurface (multiTriSurface &&)=delete
 No move construct. More...
 
multiTriSurfaceoperator= (multiTriSurface &&)=delete
 No move assignment. More...
 
 ~multiTriSurface () override=default
 default destructor More...
 
bool appendSurface (const word &name, const realx3x3Vector &vertices)
 
uint32 numSurfaces () const
 
const subSurfaceListsubSurfaces () const
 
rangeU32 subSurfaceRange (uint32 nSub) const
 
rangeU32 subSurfacePointRange (uint32 nSub) const
 
void clear ()
 Clear the content of object. More...
 
uint32 subSurfaceSize (uint32 nSub) const
 
uint32 subSurfaceNumPoints (uint32 nSub) const
 
word subSurfaceName (uint32 nSub) const
 
bool read (iIstream &is, const IOPattern &iop) override
 
bool write (iOstream &os, const IOPattern &iop) const override
 
- Public Member Functions inherited from triSurface
 TypeInfo ("triSurface")
 
 triSurface (const objectFile &objf, repository *owner, const triSurface &surf)
 
 triSurface (const realx3x3Field_H &triangles, repository *owner=nullptr)
 
 ~triSurface () override=default
 
uint32 numPoints () const
 
uint32 size () const
 
uint32 capacity () const
 
const realx3Field_Dpoints () const
 
realx3Field_Dpoints ()
 
const auto & area () const
 
auto & area ()
 
const uint32x3Field_Dvertices () const
 
uint32x3Field_Dvertices ()
 
auto & normals ()
 
const auto & normals () const
 
void clear ()
 
auto getTriangleAccessor () const
 Obtain an object for accessing triangles. More...
 
bool read (iIstream &is, const IOPattern &iop) override
 
bool write (iOstream &os, const IOPattern &iop) const override
 
- 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 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
 
- 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...
 

Private Member Functions

bool findMotionIndex ()
 determine the motion index of each triangle More...
 
bool moveGeometry ()
 Move geometry. More...
 

Private Attributes

MotionModelType motionModel_
 Ref to motion model. More...
 
uint32Field_D surfMotionIndex_ {"triMotionIndex"}
 motion indext mapped on each surface More...
 
uint32Field_D triMotionIndex_ {"surfMotionIndex"}
 motion index mapped on each triangle More...
 
uint32Field_D pointMotionIndex_ {"pointMotionIndex"}
 motion index mapped on each point More...
 
Timer moveGeomTimer_
 timer for moveGeometry More...
 

Additional Inherited Members

- Static Public Member Functions inherited from geometry
static uniquePtr< geometrycreate (systemControl &control, const property &prop)
 
static uniquePtr< geometrycreate (systemControl &control, const property &prop, multiTriSurface &surf, const wordVector &motionCompName, const wordVector &materialName, const dictionary &motionDic)
 
- Protected Member Functions inherited from triSurface
bool calculateNormals ()
 
bool calculateArea ()
 
bool append (const realx3x3Field_H &triangles)
 
bool append (const realx3x3Vector &triangles)
 
 triSurface (const objectFile &obj, repository *owner)
 
- Protected Member Functions inherited from IOfileHeader
uniquePtr< iFstreaminStream () const
 
uniquePtr< oFstreamoutStream () const
 
uniquePtr< oFstreamdummyOutStream () const
 
- Protected Attributes inherited from IOfileHeader
word objectName_
 
word objectType_
 
word fileFormat_ = "ASCII"
 file format read from file More...
 

Detailed Description

template<typename MotionModelType>
class pFlow::geometryMotion< MotionModelType >

A class that represent surfaces in the simulation and moves surfaces 

based on the MotionModelType. MotionModelType can be any motion model.

Definition at line 35 of file geometryMotion.hpp.

Member Typedef Documentation

◆ MotionModel

using MotionModel = MotionModelType

Definition at line 41 of file geometryMotion.hpp.

◆ ModelComponent

using ModelComponent = typename MotionModelType::ModelComponent

Definition at line 43 of file geometryMotion.hpp.

Constructor & Destructor Documentation

◆ geometryMotion() [1/2]

geometryMotion ( systemControl control,
const property prop 
)

Definition at line 137 of file geometryMotion.cpp.

References fatalExit.

◆ geometryMotion() [2/2]

geometryMotion ( systemControl control,
const property prop,
multiTriSurface surf,
const wordVector motionCompName,
const wordVector materialName,
const dictionary motionDict 
)

Definition at line 164 of file geometryMotion.cpp.

References fatalExit.

Member Function Documentation

◆ findMotionIndex()

bool findMotionIndex
private

determine the motion index of each triangle

Definition at line 22 of file geometryMotion.cpp.

References pFlow::endl(), fatalErrorInFunction, ForAll, and n.

+ Here is the call graph for this function:

◆ moveGeometry()

bool moveGeometry
private

Move geometry.

Definition at line 96 of file geometryMotion.cpp.

References pFlow::GMotion::moveGeometry().

+ Here is the call graph for this function:

◆ TypeInfoTemplate11()

TypeInfoTemplate11 ( "geometry"  ,
ModelComponent   
)

Type info.

◆ add_vCtor() [1/2]

add_vCtor ( geometry  ,
geometryMotion< MotionModelType >  ,
systemControl   
)

Add virtual constructor.

◆ add_vCtor() [2/2]

add_vCtor ( geometry  ,
geometryMotion< MotionModelType >  ,
dictionary   
)

Add virtual constructor.

◆ getModel()

auto getModel ( uint32  iter,
real  t,
real  dt 
) const
inline

Obtain motion model at time t.

Definition at line 104 of file geometryMotion.hpp.

References demComponent::dt(), and geometryMotion< MotionModelType >::motionModel_.

+ Here is the call graph for this function:

◆ motionModelTypeName()

word motionModelTypeName ( ) const
inlineoverridevirtual

TypeName / TypeInfo of motion model.

Implements geometry.

Definition at line 110 of file geometryMotion.hpp.

References geometryMotion< MotionModelType >::motionModel_.

◆ triMotionIndex()

const uint32Field_D& triMotionIndex ( ) const
inlineoverridevirtual

Access to motion model index of triangles.

Implements geometry.

Definition at line 116 of file geometryMotion.hpp.

References geometryMotion< MotionModelType >::triMotionIndex_.

◆ pointMotionIndex()

const uint32Field_D& pointMotionIndex ( ) const
inlineoverridevirtual

Access to motion model index of points.

Implements geometry.

Definition at line 122 of file geometryMotion.hpp.

References geometryMotion< MotionModelType >::pointMotionIndex_.

◆ iterate()

bool iterate
overridevirtual

Iterate geometry one time step

Reimplemented from geometry.

Definition at line 204 of file geometryMotion.cpp.

References pFlow::triSurfaceKernels::calculateNormals(), and pFlow::GMotion::moveGeometry().

+ Here is the call graph for this function:

Member Data Documentation

◆ motionModel_

MotionModelType motionModel_
private

◆ surfMotionIndex_

uint32Field_D surfMotionIndex_ {"triMotionIndex"}
private

motion indext mapped on each surface

Definition at line 51 of file geometryMotion.hpp.

◆ triMotionIndex_

uint32Field_D triMotionIndex_ {"surfMotionIndex"}
private

motion index mapped on each triangle

Definition at line 54 of file geometryMotion.hpp.

Referenced by geometryMotion< MotionModelType >::triMotionIndex().

◆ pointMotionIndex_

uint32Field_D pointMotionIndex_ {"pointMotionIndex"}
private

motion index mapped on each point

Definition at line 57 of file geometryMotion.hpp.

Referenced by geometryMotion< MotionModelType >::pointMotionIndex().

◆ moveGeomTimer_

Timer moveGeomTimer_
private

timer for moveGeometry

Definition at line 60 of file geometryMotion.hpp.


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