Go to the documentation of this file.
32 " number of elements in diameters in "<<
globalName()<<
" is not consistent"<<
endl;
44 if( !dict.
add(
"diameters", diameters_) )
47 " Error in writing diameters to dictionary "<< dict.
globalName()<<
endl;
61 shape(fileName, owner, prop)
64 if(!readFromDictionary3())
73 return max(diameters_);
78 return min(diameters_);
83 if( indexValid(index))
85 bDiam = diameters_[index];
95 return diameters_[index];
110 if( indexValid(index) )
112 real d = diameters_[index];
113 real rho = indexToDensity(index);
122 if(
real m; mass(index,
m))
138 auto pids = shapePropertyIds();
142 rho[i] = properties().density(pids[i]);
149 if( indexValid(index) )
151 I = 0.4 * mass(index) *
pow(diameters_[index]/2.0,2.0);
159 if(
real I; Inertia(index, I))
174 return Inertia(index,Ixx);
179 return Inertia(index);
184 return Inertia(index,Iyy);
189 return Inertia(index);
194 return Inertia(index,Izz);
199 return Inertia(index);
Vector< real > realVector
bool writeToDict(dictionary &dict) const override
bool Inertia_xx(uint32 index, real &Ixx) const override
#define fatalExit
Fatal exit.
realVector mass() const override
real maxBoundingSphere() const override
Vector< T, Allocator > pow(const Vector< T, Allocator > &v1, const Vector< T, Allocator > &v2)
real Inertial_yy(uint32 index) const override
T max(const internalField< T, MemorySpace > &iField)
virtual word globalName() const
global name of entry, separated with dots
auto size() const
Size of the vector.
bool add(const word &keyword, const float &v)
add a float dataEntry
iOstream & endl(iOstream &os)
Add newline and flush stream.
real Inertial_zz(uint32 index) const override
bool Inertia_yy(uint32 index, real &Iyy) const override
bool readFromDictionary3()
bool writeToDict(dictionary &dict) const override
realVector boundingDiameter() const override
real minBoundingSphere() const override
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
bool Inertia_zz(uint32 index, real &Izz) const override
realVector Inertia() const override
#define ForAll(i, container)
T min(const internalField< T, MemorySpace > &iField)
sphereShape(const word &fileName, repository *owner, const property &prop)
property holds the pure properties of materials.
realVector density() const override
real Inertial_xx(uint32 index) const override
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...