www.cemf.ir
geometry Class Referenceabstract

Base class for geometry for managing tri-surfaces, geometry motion, and surface physical properties. More...

+ Inheritance diagram for geometry:
+ Collaboration diagram for geometry:

Public Member Functions

 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...
 
virtual word motionModelTypeName () const =0
 The name of motion model. More...
 
virtual const uint32Field_DtriMotionIndex () const =0
 Motion model index of triangles. More...
 
virtual const uint32Field_DpointMotionIndex () const =0
 Motion model index of points. More...
 
bool beforeIteration () override
 This is called in 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...
 
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...
 

Static Public Member Functions

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)
 

Private Member Functions

bool createPropertyId ()
 Find property id of each triangle based on the supplied material name and the surface wall that the triangle belongs to. More...
 
void zeroForce ()
 Initialize contact force to zero. More...
 

Private Attributes

const propertywallProperty_
 Const reference to physical property of materials. More...
 
wordField_H motionComponentName_
 The name of motion component of each wall surface. More...
 
wordField_H materialName_
 Material name of each wall surface
More...
 
uint32TriSurfaceField_D propertyId_
 Property id of each triangle in the set of wall surfaces. More...
 
realx3TriSurfaceField_D contactForceWall_
 Contact force on each triangle in the set of wall surfaces. More...
 
realx3TriSurfaceField_D normalStressWall_
 Stress on each triangle in the set of wall surfaces. More...
 
realx3TriSurfaceField_D shearStressWall_
 Stress on each triangle in the set of wall surfaces. More...
 
bool readWholeObject_ = true
 

Additional Inherited Members

- Public Types inherited from objectFile
enum  readFlag { READ_ALWAYS, READ_NEVER, READ_IF_PRESENT }
 
enum  writeFlag { WRITE_ALWAYS, WRITE_NEVER }
 
- 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

Base class for geometry for managing tri-surfaces, geometry motion, and surface physical properties.

Definition at line 44 of file geometry.hpp.

Constructor & Destructor Documentation

◆ geometry() [1/2]

geometry ( systemControl control,
const property prop 
)

Construct from controlSystem and property, for reading from file.

Definition at line 70 of file geometry.cpp.

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

+ Here is the call graph for this function:

◆ geometry() [2/2]

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

Definition at line 165 of file geometry.cpp.

References pFlow::endl(), fatalErrorInFunction, and fatalExit.

+ Here is the call graph for this function:

◆ ~geometry()

~geometry ( )
overridedefault

Construct from components.

Destructor

Member Function Documentation

◆ createPropertyId()

bool createPropertyId ( )
private

◆ zeroForce()

void zeroForce ( )
private

Initialize contact force to zero.

Definition at line 64 of file geometry.cpp.

References pFlow::zero3.

◆ TypeInfo()

TypeInfo ( "geometry"  )

Type info.

◆ create_vCtor() [1/2]

create_vCtor ( geometry  ,
systemControl  ,
(systemControl &control, const property &prop)  ,
(control, prop)   
)

Virtual constructor.

◆ create_vCtor() [2/2]

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.

◆ motionComponentName()

const auto& motionComponentName ( ) const
inline

Definition at line 156 of file geometry.hpp.

References geometry::motionComponentName_.

◆ contactForceWall() [1/2]

auto& contactForceWall ( )
inline

Access to contact force.

Definition at line 163 of file geometry.hpp.

References geometry::contactForceWall_.

◆ contactForceWall() [2/2]

const auto& contactForceWall ( ) const
inline

Access to contact force.

Definition at line 170 of file geometry.hpp.

References geometry::contactForceWall_.

◆ propertyId()

const auto& propertyId ( ) const
inline

Property ide of triangles.

Definition at line 177 of file geometry.hpp.

References geometry::propertyId_.

◆ wallProperty()

const auto& wallProperty ( ) const
inline

Access to property.

Definition at line 183 of file geometry.hpp.

References geometry::wallProperty_.

◆ motionModelTypeName()

virtual word motionModelTypeName ( ) const
pure virtual

The name of motion model.

Implemented in geometryMotion< MotionModelType >.

Referenced by interaction::create().

+ Here is the caller graph for this function:

◆ triMotionIndex()

virtual const uint32Field_D& triMotionIndex ( ) const
pure virtual

Motion model index of triangles.

Implemented in geometryMotion< MotionModelType >.

◆ pointMotionIndex()

virtual const uint32Field_D& pointMotionIndex ( ) const
pure virtual

Motion model index of points.

Implemented in geometryMotion< MotionModelType >.

◆ beforeIteration()

bool beforeIteration ( )
overridevirtual

This is called in time loop, before iterate.

Implements demComponent.

Definition at line 264 of file geometry.cpp.

◆ iterate()

bool iterate ( )
overridevirtual

This is called in time loop.

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

Implements demComponent.

Reimplemented in geometryMotion< MotionModelType >.

Definition at line 270 of file geometry.cpp.

◆ afterIteration()

bool afterIteration ( )
overridevirtual

This is called in time loop, after iterate.

Implements demComponent.

Definition at line 275 of file geometry.cpp.

References dot(), LAMBDA_HD, pFlow::max(), n, and pFlow::smallValue.

+ Here is the call graph for this function:

◆ read()

bool read ( iIstream is,
const IOPattern iop 
)
overridevirtual

Implements IOobject.

Definition at line 301 of file geometry.cpp.

References multiTriSurface::read().

+ Here is the call graph for this function:

◆ write()

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

write

Implements IOobject.

Definition at line 315 of file geometry.cpp.

References fatalErrorInFunction, and multiTriSurface::write().

+ Here is the call graph for this function:

◆ create() [1/2]

pFlow::uniquePtr< pFlow::geometry > create ( systemControl control,
const property prop 
)
static

Definition at line 336 of file geometry.cpp.

References pFlow::angleBracketsNames(), END_REPORT, fatalError, fatalExit, Time::geometry(), dictionary::getVal(), Green_Text, pFlow::motionModelFile__, repository::path(), pFlow::printKeys(), REPORT, systemControl::time(), and Yellow_Text.

Referenced by main().

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

◆ create() [2/2]

pFlow::uniquePtr< pFlow::geometry > create ( systemControl control,
const property prop,
multiTriSurface surf,
const wordVector motionCompName,
const wordVector materialName,
const dictionary motionDic 
)
static

Definition at line 373 of file geometry.cpp.

References pFlow::angleBracketsNames(), END_REPORT, fatalError, fatalExit, dictionary::getVal(), Green_Text, pFlow::printKeys(), REPORT, and Yellow_Text.

+ Here is the call graph for this function:

Member Data Documentation

◆ wallProperty_

const property& wallProperty_
private

Const reference to physical property of materials.

Definition at line 54 of file geometry.hpp.

Referenced by geometry::createPropertyId(), and geometry::wallProperty().

◆ motionComponentName_

wordField_H motionComponentName_
private
Initial value:
{
"motionComponentName",
"motionComponentName"}

The name of motion component of each wall surface.

Definition at line 57 of file geometry.hpp.

Referenced by geometry::motionComponentName().

◆ materialName_

wordField_H materialName_
private
Initial value:
{
"materialName",
"materialName"}

Material name of each wall surface

Definition at line 62 of file geometry.hpp.

Referenced by geometry::createPropertyId().

◆ propertyId_

uint32TriSurfaceField_D propertyId_
private

Property id of each triangle in the set of wall surfaces.

Definition at line 67 of file geometry.hpp.

Referenced by geometry::createPropertyId(), and geometry::propertyId().

◆ contactForceWall_

realx3TriSurfaceField_D contactForceWall_
private

Contact force on each triangle in the set of wall surfaces.

Definition at line 70 of file geometry.hpp.

Referenced by geometry::contactForceWall().

◆ normalStressWall_

realx3TriSurfaceField_D normalStressWall_
private

Stress on each triangle in the set of wall surfaces.

Definition at line 73 of file geometry.hpp.

◆ shearStressWall_

realx3TriSurfaceField_D shearStressWall_
private

Stress on each triangle in the set of wall surfaces.

Definition at line 76 of file geometry.hpp.

◆ readWholeObject_

bool readWholeObject_ = true
private

Definition at line 79 of file geometry.hpp.


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