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... | |
Private Member Functions | |
void | initialize (Istream &is) |
Initialize from Istream. More... | |
Private Attributes | |
word | name_ |
Variable name. More... | |
dimensionSet | dimensions_ |
The dimension set. More... | |
Type | value_ |
The data value. More... | |
Friends | |
Istream & | operator>> (Istream &, dimensioned< Type > &) |
Ostream & | operator (Ostream &, const dimensioned< Type > &) |
Component type.
Definition at line 88 of file dimensionedType.H.
dimensioned | ( | const word & | , |
const dimensionSet & | , | ||
const | Type | ||
) |
Construct given a name, a value and its dimensionSet.
dimensioned | ( | const word & | , |
const dimensioned< Type > & | |||
) |
Construct from a dimensioned<Type> changing the name.
|
inline |
Construct given a value (creates dimensionless value).
Definition at line 100 of file dimensionedType.H.
dimensioned | ( | Istream & | ) |
Construct from Istream.
dimensioned | ( | const word & | , |
Istream & | |||
) |
Construct from an Istream with a given name.
dimensioned | ( | const word & | , |
const dimensionSet & | , | ||
Istream & | |||
) |
Construct from an Istream with a given name and dimensions.
dimensioned | ( | const word & | , |
const dimensionSet & | , | ||
const dictionary & | |||
) |
Construct from dictionary lookup with a given name and dimensions.
dimensioned | ( | ) |
Null constructor.
Definition at line 164 of file dimensionedType.C.
|
private |
Initialize from Istream.
Helper-function for constructors
Definition at line 33 of file dimensionedType.C.
|
static |
Construct from dictionary, with default dimensions and value.
|
static |
Construct from dictionary dimensionless with value.
|
static |
Construct from dictionary, with default value.
If the value is not found, it is added into the dictionary.
|
static |
Construct from dictionary, dimensionless with default value.
If the value is not found, it is added into the dictionary.
const Foam::word & name | ( | ) | const |
Return const reference to name.
Definition at line 235 of file dimensionedType.C.
Referenced by Foam::atan2(), Foam::cbrt(), Foam::checkMethod(), Foam::cof(), Foam::fvc::ddt(), Foam::fvm::ddt(), Foam::det(), Foam::dev(), Foam::dev2(), Foam::eigenValues(), Foam::eigenVectors(), forAll(), 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::innerSqr(), Foam::inv(), Foam::fvc::laplacian(), Foam::fvm::laplacian(), Foam::neg(), Foam::negPart(), Foam::operator*(), Time::operator++(), Foam::pos(), Foam::posPart(), Foam::pow(), Foam::pow025(), Foam::pow3(), Foam::pow4(), Foam::pow5(), Foam::pow6(), CodedSource< Type >::read(), Time::readDict(), Time::setTime(), Foam::sign(), Foam::skew(), Foam::sqr(), Foam::sqrt(), Foam::stabilise(), Foam::symm(), Time::timeName(), Foam::tr(), Foam::transform(), Foam::twoSymm(), dimensionSet::write(), and regionSizeDistribution::write().
Foam::word & name | ( | ) |
Return non-const reference to name.
Definition at line 241 of file dimensionedType.C.
const Foam::dimensionSet & dimensions | ( | ) | const |
Return const reference to dimensions.
Definition at line 248 of file dimensionedType.C.
Referenced by Foam::cbrt(), Foam::checkMethod(), Foam::cof(), relaxation::correct(), Foam::det(), Foam::dev(), Foam::dev2(), 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(), steadyStateDdtScheme< Type >::fvmDdt(), EulerDdtScheme< Type >::fvmDdt(), backwardDdtScheme< Type >::fvmDdt(), CoEulerDdtScheme< Type >::fvmDdt(), SLTSDdtScheme< Type >::fvmDdt(), ddtScheme< Type >::fvmDdt(), localEulerDdtScheme< Type >::fvmDdt(), CrankNicolsonDdtScheme< Type >::fvmDdt(), Foam::innerSqr(), Foam::inv(), Foam::neg(), Foam::negPart(), optionList::operator()(), Foam::operator*(), dimensionSet::parse(), 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(), Foam::tr(), and Foam::twoSymm().
Foam::dimensionSet & dimensions | ( | ) |
Return non-const reference to dimensions.
Definition at line 254 of file dimensionedType.C.
const Type & value | ( | ) | const |
Return const reference to value.
Definition at line 261 of file dimensionedType.C.
Referenced by fieldAverage::addMeanFieldType(), interRegionHeatTransferModel::addSup(), Time::adjustDeltaT(), porosityModel::adjustNegativeResistance(), Foam::adjustPhi(), Foam::atan2(), Foam::bound(), NonInertialFrameForce< CloudType >::cacheFields(), blendingFactor::calc(), BrownianMotionForce< CloudType >::calcCoupled(), ThermoParcel::calcHeatTransfer(), SRFForce< CloudType >::calcNonCoupled(), ParamagneticForce< CloudType >::calcNonCoupled(), powerLaw::calcNu(), wallShearStress::calcShearStress(), skewCorrectionVectors::calcSkewCorrectionVectors(), viewFactor::calculate(), solarCalculator::calculateBetaTetha(), Foam::cbrt(), Foam::cof(), fixedTemperatureConstraint::constrain(), interfaceProperties::correctContactAngle(), curvatureSeparation::curvatureSeparation(), CrankNicolsonDdtScheme< Type >::ddt0_(), DEShybrid< Type >::DEShybrid(), Foam::det(), Foam::dev(), Foam::dev2(), blackBodyEmission::EbDeltaLambdaT(), Foam::eigenValues(), Foam::eigenVectors(), engineMesh::engineMesh(), ThermoCloud< CloudType >::Ep(), DSMCCloud< DSMCParcel< ParcelType > >::equipartitionInternalEnergy(), forAll(), basicCombustionMixture::fres(), EulerD2dt2Scheme< Type >::fvcD2dt2(), EulerDdtScheme< Type >::fvcDdt(), backwardDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), localEulerDdtScheme< Type >::fvcDdt(), CrankNicolsonDdtScheme< Type >::fvcDdt(), solidificationMeltingSource::g(), sampledIsoSurface::getIsoFields(), if(), reactingOneDim::info(), thermalBaffleModel::init(), InjectionModel< CloudType >::injectSteadyState(), Foam::innerSqr(), Foam::inv(), laminarFlameSpeed::laminarFlameSpeed(), hexRef8::level0EdgeLength(), main(), MarshakRadiationFixedTemperatureFvPatchScalarField::MarshakRadiationFixedTemperatureFvPatchScalarField(), inhomogeneousMixture< ThermoType >::mixture(), egrMixture< ThermoType >::mixture(), solidParticleCloud::move(), movingImmersedBoundary::movePoints(), movingConeTopoFvMesh::movingConeTopoFvMesh(), Foam::neg(), Foam::negPart(), instant::less::operator()(), Foam::operator*(), Time::operator+=(), Foam::operator<(), Foam::operator<<(), Foam::operator>(), Foam::operator>>(), PatchFlowRateInjection< CloudType >::parcelsToInject(), dimensionSet::parse(), Foam::pos(), Foam::posPart(), Foam::pow(), Foam::pow025(), Foam::pow3(), Foam::pow4(), Foam::pow5(), Foam::pow6(), pressureTools::pRef(), dimensionSet::read(), Time::readDict(), incompressibleTwoPhaseInteractingMixture::rho(), timeSelector::selectIfPresent(), scene::setCamera(), Time::setDeltaT(), Time::setEndTime(), Time::setTime(), ThermoCloud< CloudType >::Sh(), constantRadiation::Shs(), Foam::sign(), simpleControl::simpleControl(), Foam::skew(), SLTSDdtScheme< Type >::SLrDeltaT(), Foam::solidRegionDiffNo(), sixDoFRigidBodyMotionSolver::solve(), thermalBaffle::solveEnergy(), Foam::sqr(), Foam::sqrt(), Foam::stabilise(), KinematicCloud< CloudType >::SU(), Foam::symm(), Foam::tr(), Foam::transform(), Foam::twoSymm(), oscillatingDisplacementPointPatchVectorField::updateCoeffs(), waveDisplacementPointPatchVectorField::updateCoeffs(), oscillatingVelocityPointPatchVectorField::updateCoeffs(), angularOscillatingDisplacementPointPatchVectorField::updateCoeffs(), angularOscillatingVelocityPointPatchVectorField::updateCoeffs(), MarshakRadiationFvPatchScalarField::updateCoeffs(), fixedPressureCompressibleDensityFvPatchScalarField::updateCoeffs(), MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs(), wallHeatTransferFvPatchScalarField::updateCoeffs(), alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs(), SRFFreestreamVelocityFvPatchVectorField::updateCoeffs(), turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs(), timeActivatedFileUpdate::updateFile(), solarLoad::updateHitFaces(), solarHeatLoad::updateHitFaces(), PatchFlowRateInjection< CloudType >::volumeToInject(), fvMesh::Vsc(), fvMesh::Vsc0(), while(), FacePostProcessing< CloudType >::write(), dsmcFields::write(), ParticleCollector< CloudType >::write(), dimensionSet::write(), regionSizeDistribution::write(), regionSizeDistribution::writeAlphaFields(), writeCellDistance(), and GeometricField< vector, pointPatchField, pointMesh >::writeMinMax().
Type & value | ( | ) |
Return non-const reference to value.
Definition at line 267 of file dimensionedType.C.
Foam::dimensioned< typename Foam::dimensioned< Type >::cmptType > component | ( | const direction | d | ) | const |
Return a component as a dimensioned<cmptType>
Definition at line 276 of file dimensionedType.C.
Referenced by Foam::ComplexField(), and main().
void replace | ( | const | direction, |
const dimensioned< cmptType > & | |||
) |
Return a component with a dimensioned<cmptType>
Definition at line 291 of file dimensionedType.C.
dimensioned<Type> T | ( | ) | const |
void read | ( | const dictionary & | ) |
Update the value of dimensioned<Type>
Referenced by Foam::unitSet().
bool readIfPresent | ( | const dictionary & | dict | ) |
Update the value of dimensioned<Type> if found in the dictionary.
Definition at line 309 of file dimensionedType.C.
Referenced by engineTime::engineTime(), LamBremhorstKE::read(), ShihQuadraticKE::read(), qZeta::read(), LienLeschziner::read(), LienCubicKE::read(), SpalartAllmaras< BasicTurbulenceModel >::read(), SpalartAllmarasDES< BasicTurbulenceModel >::read(), and kkLOmega::read().
Istream& read | ( | Istream & | is, |
const dictionary & | |||
) |
Read value from stream and units from dictionary.
Istream& read | ( | Istream & | is, |
const HashTable< dimensionedScalar > & | |||
) |
Read value from stream and units from table.
Foam::Istream & read | ( | Istream & | is | ) |
Read value from stream and units from system table.
Definition at line 370 of file dimensionedType.C.
Foam::dimensioned< typename Foam::dimensioned< Type >::cmptType > operator[] | ( | const direction | d | ) | const |
Return a component as a dimensioned<cmptType>
Definition at line 398 of file dimensionedType.C.
void operator+= | ( | const dimensioned< Type > & | dt | ) |
Definition at line 408 of file dimensionedType.C.
void operator-= | ( | const dimensioned< Type > & | dt | ) |
Definition at line 419 of file dimensionedType.C.
void operator*= | ( | const scalar | s | ) |
Definition at line 430 of file dimensionedType.C.
void operator/= | ( | const scalar | s | ) |
Definition at line 440 of file dimensionedType.C.
|
friend |
|
friend |
|
private |
|
private |
The dimension set.
Definition at line 72 of file dimensionedType.H.
Referenced by dimensioned< Type >::operator+=(), and dimensioned< Type >::operator-=().
|
private |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.