Generic dimensioned Type class. More...
Public Types | |
typedef pTraits< Type >::cmptType | cmptType |
Component type. More... | |
Public Member Functions | |
dimensioned (const word &, const dimensionSet &, const Type) | |
Construct given a name, a value and its dimensionSet. More... | |
dimensioned (const word &, const dimensioned< Type > &) | |
Construct from a dimensioned<Type> changing the name. More... | |
dimensioned (const Type &t) | |
Construct given a value (creates dimensionless value). More... | |
dimensioned (Istream &) | |
Construct from Istream. More... | |
dimensioned (const word &, Istream &) | |
Construct from an Istream with a given name. More... | |
dimensioned (const word &, const dimensionSet &, Istream &) | |
Construct from an Istream with a given name and dimensions. More... | |
dimensioned (const word &, const dimensionSet &, const dictionary &) | |
Construct from dictionary lookup with a given name and dimensions. More... | |
dimensioned () | |
Null constructor. More... | |
const word & | name () const |
Return const reference to name. More... | |
word & | name () |
Return non-const reference to name. More... | |
const dimensionSet & | dimensions () const |
Return const reference to dimensions. More... | |
dimensionSet & | dimensions () |
Return non-const reference to dimensions. More... | |
const Type & | value () const |
Return const reference to value. More... | |
Type & | value () |
Return non-const reference to value. More... | |
dimensioned< cmptType > | component (const direction) const |
Return a component as a dimensioned<cmptType> More... | |
void | replace (const direction, const dimensioned< cmptType > &) |
Return a component with a dimensioned<cmptType> More... | |
dimensioned< Type > | T () const |
Return transpose. More... | |
void | read (const dictionary &) |
Update the value of dimensioned<Type> More... | |
bool | readIfPresent (const dictionary &) |
Update the value of dimensioned<Type> if found in the dictionary. More... | |
Istream & | read (Istream &is, const dictionary &) |
Read value from stream and units from dictionary. More... | |
Istream & | read (Istream &is, const HashTable< dimensionedScalar > &) |
Read value from stream and units from table. More... | |
Istream & | read (Istream &is) |
Read value from stream and units from system table. More... | |
dimensioned< cmptType > | operator[] (const direction) const |
Return a component as a dimensioned<cmptType> More... | |
void | operator+= (const dimensioned< Type > &) |
void | operator-= (const dimensioned< Type > &) |
void | operator*= (const scalar) |
void | operator/= (const scalar) |
Static Public Member Functions | |
static dimensioned< Type > | lookupOrDefault (const word &, const dictionary &, const dimensionSet &dims=dimless, const Type &defaultValue=pTraits< Type >::zero) |
Construct from dictionary, with default dimensions and value. More... | |
static dimensioned< Type > | lookupOrDefault (const word &, const dictionary &, const Type &defaultValue=pTraits< Type >::zero) |
Construct from dictionary dimensionless with value. More... | |
static dimensioned< Type > | lookupOrAddToDict (const word &, dictionary &, const dimensionSet &dims=dimless, const Type &defaultValue=pTraits< Type >::zero) |
Construct from dictionary, with default value. More... | |
static dimensioned< Type > | lookupOrAddToDict (const word &, dictionary &, const Type &defaultValue=pTraits< Type >::zero) |
Construct from dictionary, dimensionless with default value. More... | |
Friends | |
Istream & | operator>> (Istream &, dimensioned< Type > &) |
Ostream & | operator (Ostream &, const dimensioned< Type > &) |
Generic dimensioned Type class.
Definition at line 41 of file dimensionedScalarFwd.H.
Component type.
Definition at line 88 of file dimensionedType.H.
dimensioned | ( | const word & | name, |
const dimensionSet & | dimSet, | ||
const Type | t | ||
) |
Construct given a name, a value and its dimensionSet.
Definition at line 78 of file dimensionedType.C.
References dimensioned< Type >::dimensioned().
dimensioned | ( | const word & | name, |
const dimensioned< Type > & | dt | ||
) |
Construct from a dimensioned<Type> changing the name.
Definition at line 92 of file dimensionedType.C.
References dimensioned< Type >::dimensioned().
|
inline |
Construct given a value (creates dimensionless value).
Definition at line 100 of file dimensionedType.H.
dimensioned | ( | Istream & | is | ) |
Construct from Istream.
Definition at line 105 of file dimensionedType.C.
References dimensioned< Type >::dimensioned(), and Foam::read().
dimensioned | ( | const word & | name, |
Istream & | is | ||
) |
Construct from an Istream with a given name.
Definition at line 117 of file dimensionedType.C.
References dimensioned< Type >::dimensioned().
dimensioned | ( | const word & | name, |
const dimensionSet & | dimSet, | ||
Istream & | is | ||
) |
Construct from an Istream with a given name and dimensions.
Definition at line 134 of file dimensionedType.C.
References dimensioned< Type >::dimensioned().
dimensioned | ( | const word & | name, |
const dimensionSet & | dimSet, | ||
const dictionary & | dict | ||
) |
Construct from dictionary lookup with a given name and dimensions.
Definition at line 150 of file dimensionedType.C.
References dimensioned< Type >::dimensioned(), and dictionary::lookup().
dimensioned | ( | ) |
Null constructor.
Definition at line 166 of file dimensionedType.C.
References dimensioned< Type >::lookupOrDefault().
Referenced by dimensioned< Type >::dimensioned(), and dimensioned< vector >::dimensioned().
|
static |
Construct from dictionary, with default dimensions and value.
Definition at line 178 of file dimensionedType.C.
References dictionary::found(), dictionary::lookup(), and Foam::name().
Referenced by dimensioned< vector >::dimensioned(), and dimensioned< Type >::dimensioned().
|
static |
Construct from dictionary dimensionless with value.
Definition at line 198 of file dimensionedType.C.
References Foam::dimless, and dimensioned< Type >::lookupOrAddToDict().
|
static |
Construct from dictionary, with default value.
If the value is not found, it is added into the dictionary.
Definition at line 210 of file dimensionedType.C.
References dictionary::lookupOrAddDefault(), and Foam::name().
Referenced by dimensioned< vector >::dimensioned(), and dimensioned< Type >::lookupOrDefault().
|
static |
Construct from dictionary, dimensionless with default value.
If the value is not found, it is added into the dictionary.
Definition at line 224 of file dimensionedType.C.
References Foam::dimless.
const Foam::word & name | ( | ) | const |
Return const reference to name.
Definition at line 237 of file dimensionedType.C.
Referenced by Foam::atan2(), Foam::cbrt(), Foam::checkMethod(), Foam::cof(), Foam::fvm::d2dt2(), Foam::fvc::ddt(), Foam::fvm::ddt(), Foam::det(), Foam::dev(), Foam::dev2(), dimensioned< vector >::dimensioned(), Foam::eigenValues(), Foam::eigenVectors(), steadyStateDdtScheme< Type >::fvcDdt(), EulerDdtScheme< Type >::fvcDdt(), backwardDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), localEulerDdtScheme< Type >::fvcDdt(), CrankNicolsonDdtScheme< Type >::fvcDdt(), CrankNicolsonDdtScheme< Type >::fvmDdt(), Foam::hypot(), Foam::innerSqr(), Foam::inv(), Foam::fvc::laplacian(), Foam::fvm::laplacian(), Foam::fvc::meshPhi(), Foam::neg(), Foam::negPart(), Foam::operator*(), dimensioned< Type >::operator/=(), Foam::operator<(), Foam::pos(), Foam::posPart(), Foam::pow(), Foam::pow025(), Foam::pow3(), Foam::pow4(), Foam::pow5(), Foam::pow6(), Foam::sign(), Foam::skew(), Foam::sqr(), Foam::sqrt(), Foam::stabilise(), Foam::symm(), dimensioned< Type >::T(), Foam::tr(), Foam::transform(), Foam::twoSymm(), and dimensionSet::write().
Foam::word & name | ( | ) |
Return non-const reference to name.
Definition at line 243 of file dimensionedType.C.
const Foam::dimensionSet & dimensions | ( | ) | const |
Return const reference to dimensions.
Definition at line 250 of file dimensionedType.C.
Referenced by Foam::atan2(), Foam::cbrt(), Foam::checkMethod(), Foam::cof(), Foam::det(), Foam::dev(), Foam::dev2(), dimensioned< vector >::dimensioned(), dimensionSet::dimensionSet(), dimensionSets::dimensionSets(), Foam::eigenValues(), EulerD2dt2Scheme< Type >::fvcD2dt2(), steadyStateDdtScheme< Type >::fvcDdt(), EulerDdtScheme< Type >::fvcDdt(), backwardDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), localEulerDdtScheme< Type >::fvcDdt(), CrankNicolsonDdtScheme< Type >::fvcDdt(), steadyStateD2dt2Scheme< Type >::fvmD2dt2(), EulerD2dt2Scheme< Type >::fvmD2dt2(), steadyStateDdtScheme< Type >::fvmDdt(), EulerDdtScheme< Type >::fvmDdt(), backwardDdtScheme< Type >::fvmDdt(), CoEulerDdtScheme< Type >::fvmDdt(), SLTSDdtScheme< Type >::fvmDdt(), localEulerDdtScheme< Type >::fvmDdt(), CrankNicolsonDdtScheme< Type >::fvmDdt(), Foam::hypot(), Foam::innerSqr(), Foam::inv(), Foam::neg(), Foam::negPart(), Foam::operator*(), dimensioned< Type >::operator/=(), Foam::operator<(), DimensionedField< Type, GeoMesh >::operator=(), Foam::pos(), Foam::posPart(), Foam::pow(), Foam::pow025(), Foam::pow3(), Foam::pow4(), Foam::pow5(), Foam::pow6(), dimensionSet::read(), Foam::sign(), Foam::skew(), Foam::sqr(), Foam::sqrt(), Foam::stabilise(), Foam::symm(), dimensioned< Type >::T(), Foam::tr(), and Foam::twoSymm().
Foam::dimensionSet & dimensions | ( | ) |
Return non-const reference to dimensions.
Definition at line 256 of file dimensionedType.C.
const Type & value | ( | ) | const |
Return const reference to value.
Definition at line 263 of file dimensionedType.C.
Referenced by fieldAverage::addMeanFieldType(), fieldAverage::addPrime2MeanFieldType(), interRegionHeatTransferModel::addSup(), porosityModel::adjustNegativeResistance(), Foam::atan2(), Foam::bound(), NonInertialFrameForce< CloudType >::cacheFields(), BrownianMotionForce< CloudType >::calcCoupled(), ThermoParcel< ParcelType >::calcHeatTransfer(), SRFForce< CloudType >::calcNonCoupled(), ParamagneticForce< CloudType >::calcNonCoupled(), wallShearStress::calcShearStress(), viewFactor::calculate(), Foam::cbrt(), Foam::cof(), fixedTemperatureConstraint::constrain(), infinitelyFastChemistry< CombThermoType, ThermoType >::correct(), functionObjectFile::createFiles(), particle< Type >::currentTime(), curvatureSeparation::curvatureSeparation(), engineTime::degToTime(), Foam::det(), Foam::dev(), Foam::dev2(), dimensioned< vector >::dimensioned(), dimensionSet::dimensionSet(), blackBodyEmission::EbDeltaLambdaT(), Foam::eigenValues(), Foam::eigenVectors(), engineMesh::engineMesh(), ThermoCloud< CloudType >::Ep(), buoyantKEpsilon< BasicTurbulenceModel >::epsilonSource(), DSMCCloud< ParcelType >::equipartitionInternalEnergy(), basicCombustionMixture::fres(), EulerD2dt2Scheme< Type >::fvcD2dt2(), EulerDdtScheme< Type >::fvcDdt(), backwardDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), localEulerDdtScheme< Type >::fvcDdt(), CrankNicolsonDdtScheme< Type >::fvcDdt(), EulerD2dt2Scheme< Type >::fvmD2dt2(), EulerDdtScheme< Type >::fvmDdt(), backwardDdtScheme< Type >::fvmDdt(), CoEulerDdtScheme< Type >::fvmDdt(), SLTSDdtScheme< Type >::fvmDdt(), localEulerDdtScheme< Type >::fvmDdt(), CrankNicolsonDdtScheme< Type >::fvmDdt(), Foam::hypot(), if(), ignitionSite::ignited(), ignitionSite::igniting(), reactingOneDim::info(), InjectionModel< CloudType >::inject(), InjectionModel< CloudType >::injectSteadyState(), Foam::innerSqr(), cellSetOption::inTimeLimits(), Foam::inv(), buoyantKEpsilon< BasicTurbulenceModel >::kSource(), hexRef8::level0EdgeLength(), MarshakRadiationFixedTemperatureFvPatchScalarField::MarshakRadiationFixedTemperatureFvPatchScalarField(), GeometricField< Type, PatchField, GeoMesh >::max(), GeometricField< Type, PatchField, GeoMesh >::min(), layeredEngineMesh::move(), fvMotionSolverEngineMesh::move(), solidParticleCloud::move(), polyMesh::movePoints(), movingConeTopoFvMesh::movingConeTopoFvMesh(), NamedEnum< Enum, nEnum >::names(), Foam::neg(), Foam::negPart(), Foam::operator*(), Time::operator+=(), dimensioned< Type >::operator/=(), Foam::operator<(), Foam::operator<<(), DimensionedField< Type, GeoMesh >::operator=(), GeometricField< Type, PatchField, GeoMesh >::operator=(), GeometricField< Type, PatchField, GeoMesh >::operator==(), Foam::operator>(), Foam::operator>>(), UniformDimensionedField< scalar >::operator[](), PatchFlowRateInjection< CloudType >::parcelsToInject(), engineTime::pistonPosition(), Foam::pos(), Foam::posPart(), Foam::pow(), Foam::pow025(), Foam::pow3(), Foam::pow4(), Foam::pow5(), Foam::pow6(), thermalBaffleModel::read(), dimensionSet::read(), GeometricField< Type, PatchField, GeoMesh >::replace(), incompressibleTwoPhaseInteractingMixture::rho(), timeSelector::selectIfPresent(), Time::setDeltaT(), Time::setEndTime(), Time::setTime(), constantRadiation::Shs(), Foam::sign(), simpleControl::simpleControl(), Foam::skew(), sixDoFRigidBodyMotionSolver::solve(), thermalBaffle::solveEnergy(), Foam::sqr(), Foam::sqrt(), Foam::stabilise(), Foam::symm(), dimensioned< Type >::T(), engineTime::timeToDeg(), Foam::tr(), Foam::transform(), Foam::twoSymm(), dynamicInkJetFvMesh::update(), movingConeTopoFvMesh::update(), oscillatingDisplacementPointPatchVectorField::updateCoeffs(), waveDisplacementPointPatchVectorField::updateCoeffs(), oscillatingVelocityPointPatchVectorField::updateCoeffs(), angularOscillatingVelocityPointPatchVectorField::updateCoeffs(), angularOscillatingDisplacementPointPatchVectorField::updateCoeffs(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), alphaFixedPressureFvPatchScalarField::updateCoeffs(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), MarshakRadiationFvPatchScalarField::updateCoeffs(), MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs(), SRFFreestreamVelocityFvPatchVectorField::updateCoeffs(), waveSurfacePressureFvPatchScalarField::updateCoeffs(), uniformDensityHydrostaticPressureFvPatchScalarField::updateCoeffs(), PatchFlowRateInjection< CloudType >::volumeToInject(), fvMesh::Vsc(), fvMesh::Vsc0(), wideBandDiffusiveRadiationMixedFvPatchScalarField::wideBandDiffusiveRadiationMixedFvPatchScalarField(), FacePostProcessing< CloudType >::write(), ParticleCollector< CloudType >::write(), dimensionSet::write(), and FSD< CombThermoType, ThermoType >::~FSD().
Type & value | ( | ) |
Return non-const reference to value.
Definition at line 269 of file dimensionedType.C.
References dimensioned< Type >::component().
Foam::dimensioned< typename Foam::dimensioned< Type >::cmptType > component | ( | const direction | d | ) | const |
Return a component as a dimensioned<cmptType>
Definition at line 278 of file dimensionedType.C.
References Foam::name(), and dimensioned< Type >::replace().
Referenced by dimensioned< vector >::dimensioned(), and dimensioned< Type >::value().
void replace | ( | const direction | , |
const dimensioned< cmptType > & | |||
) |
Return a component with a dimensioned<cmptType>
Definition at line 293 of file dimensionedType.C.
Referenced by dimensioned< Type >::component(), and dimensioned< vector >::dimensioned().
dimensionedTensor T | ( | ) | const |
Return transpose.
Definition at line 36 of file dimensionedSphericalTensor.C.
References dimensioned< Type >::dimensions(), dimensioned< Type >::name(), and dimensioned< Type >::value().
Referenced by dimensioned< vector >::dimensioned().
void read | ( | const dictionary & | dict | ) |
Update the value of dimensioned<Type>
Definition at line 304 of file dimensionedType.C.
References dictionary::lookup().
Referenced by dimensioned< vector >::dimensioned(), dimensioned< Type >::read(), dimensionSet::read(), and Foam::unitSet().
bool readIfPresent | ( | const dictionary & | dict | ) |
Update the value of dimensioned<Type> if found in the dictionary.
Definition at line 311 of file dimensionedType.C.
References dictionary::readIfPresent().
Referenced by dimensioned< vector >::dimensioned(), LamBremhorstKE::read(), ShihQuadraticKE::read(), qZeta::read(), LienLeschziner::read(), LienCubicKE::read(), SpalartAllmaras< BasicTurbulenceModel >::read(), SpalartAllmarasDES< BasicTurbulenceModel >::read(), and kkLOmega::read().
Foam::Istream & read | ( | Istream & | is, |
const dictionary & | readSet | ||
) |
Read value from stream and units from dictionary.
Definition at line 319 of file dimensionedType.C.
References IOstream::check(), Istream::read(), and dimensioned< Type >::read().
Foam::Istream & read | ( | Istream & | is, |
const HashTable< dimensionedScalar > & | readSet | ||
) |
Read value from stream and units from table.
Definition at line 344 of file dimensionedType.C.
References IOstream::check(), and Istream::read().
Foam::Istream & read | ( | Istream & | is | ) |
Read value from stream and units from system table.
Definition at line 372 of file dimensionedType.C.
References IOstream::check(), and Istream::read().
Foam::dimensioned< typename Foam::dimensioned< Type >::cmptType > operator[] | ( | const direction | d | ) | const |
Return a component as a dimensioned<cmptType>
Definition at line 400 of file dimensionedType.C.
References Foam::component().
Referenced by dimensioned< vector >::dimensioned().
void operator+= | ( | const dimensioned< Type > & | dt | ) |
Definition at line 410 of file dimensionedType.C.
Referenced by dimensioned< vector >::dimensioned().
void operator-= | ( | const dimensioned< Type > & | dt | ) |
Definition at line 421 of file dimensionedType.C.
Referenced by dimensioned< vector >::dimensioned().
void operator*= | ( | const scalar | s | ) |
Definition at line 432 of file dimensionedType.C.
References s().
Referenced by dimensioned< vector >::dimensioned().
void operator/= | ( | const scalar | s | ) |
Definition at line 442 of file dimensionedType.C.
References Foam::abort(), IOstream::check(), Foam::cmptDivide(), Foam::cmptMultiply(), dimensioned< Type >::dimensions(), Foam::FatalError, FatalErrorIn, token::isWord(), Foam::mag(), Foam::magSqr(), Foam::max(), Foam::min(), dimensioned< Type >::name(), Foam::name(), Foam::operator>>(), Foam::pow(), Istream::putBack(), s(), Foam::sqr(), and dimensioned< Type >::value().
Referenced by dimensioned< vector >::dimensioned().
|
friend |
|
friend |