Go to the documentation of this file.
31 "number of subSurface and material names do not match"<<
endl;
54 propId.
fill(triRange.start(), triRange.end(), pIdx);
66 contactForceWall_.fill(
zero3);
142 readWholeObject_ =
false;
149 readWholeObject_ =
true;
151 if( this->numSurfaces() != motionComponentName_.size() )
154 "Number of surfaces is not equal to number of motion component names"<<
endl;
158 if(!createPropertyId())
245 motionComponentName_.assign(motionCompName);
246 materialName_.assign(materialName);
249 if( this->numSurfaces() != motionComponentName_.size() )
252 "Number of surfaces ("<< this->numSurfaces() <<
253 ") is not equal to number of motion component names("<<
254 motionComponentName_.size()<<
")"<<
endl;
258 if(!createPropertyId())
277 auto numTris = size();
278 auto& normalsD = normals().deviceViewAll();
279 auto& areaD = area().deviceViewAll();
280 auto& cForceD = contactForceWall_.deviceViewAll();
281 auto& sStressD = shearStressWall_.deviceViewAll();
282 auto& nStressD = normalStressWall_.deviceViewAll();
284 Kokkos::parallel_for(
285 "pFlow::geometry::afterIteration",
292 realx3 sF = cForceD[i] - nF;
303 motionComponentName_.read(is, iop);
305 materialName_.read(is, iop);
307 if( readWholeObject_ )
318 if( !motionComponentName_.write(os, iop) )
324 if( !materialName_.write(os,iop))
350 if( systemControlvCtorSelector_.search(geomModel) )
352 auto objPtr = systemControlvCtorSelector_[geomModel] (control, prop);
361 <<
"Avaiable ones are: \n\n"
363 systemControlvCtorSelector_
389 if( dictionaryvCtorSelector_.search(geomModel) )
391 auto objPtr = dictionaryvCtorSelector_[geomModel]
408 <<
"Avaiable ones are: \n\n"
410 dictionaryvCtorSelector_
wordField_H materialName_
Material name of each wall surface
#define fatalExit
Fatal exit.
static uniquePtr< geometry > create(systemControl &control, const property &prop)
iOstream & printKeys(iOstream &os, const wordHashMap< T > &m)
T max(const internalField< T, MemorySpace > &iField)
INLINE_FUNCTION_H uint32 size() const
Size of the vector.
bool createPropertyId()
Find property id of each triangle based on the supplied material name and the surface wall that the t...
bool write(iOstream &os, const IOPattern &iop) const override
const char *const motionModelFile__
const property & wallProperty_
Const reference to physical property of materials.
const repository & geometry() const
iOstream & endl(iOstream &os)
Add newline and flush stream.
#define Yellow_Text(text)
bool afterIteration() override
This is called in time loop, after iterate.
INLINE_FUNCTION_HD T dot(const quadruple< T > &oprnd1, const quadruple< T > &oprnd2)
Interface class for any input stream
bool readObject(bool rdHdr=true)
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
const auto & materials() const
Return list of material names.
word angleBracketsNames(const word &w1, const word &w2)
Output <w1,w2>
A base class for every main component of DEM system.
uint32TriSurfaceField_D propertyId_
Property id of each triangle in the set of wall surfaces.
const Time & time() const
#define ForAll(i, container)
bool read(iIstream &is, const IOPattern &iop) override
bool beforeIteration() override
This is called in time loop, before iterate.
bool read(iIstream &is, const IOPattern &iop) override
bool nameToIndex(const word &name, uint32 &idx) const
Get the name of material in index idx Return true, if the name found, otherwise false.
bool iterate() override
This is called in time loop.
void zeroForce()
Initialize contact force to zero.
#define fatalError
Report a fatal error and exit the applicaiton.
const char *const triSurfaceFile__
virtual fileSystem path() const
T getVal(const word &keyword) const
get the value of data entry
property holds the pure properties of materials.
const repository & geometry() const
Kokkos::RangePolicy< Kokkos::DefaultExecutionSpace, Kokkos::Schedule< Kokkos::Static >, Kokkos::IndexType< pFlow::uint32 > > deviceRPolicyStatic
void assign(const std::vector< T > &vals)
Interface class for any output stream.
uint32 numSurfaces() const
bool write(iOstream &os, const IOPattern &iop) const override
write
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...
geometry(systemControl &control, const property &prop)
Construct from controlSystem and property, for reading from file.
rangeU32 subSurfaceRange(uint32 nSub) const