dimensioned< Type > Class Template Reference

Generic dimensioned Type class. More...

Inheritance diagram for dimensioned< Type >:

Public Types

typedef pTraits< Type >::cmptType cmptType
 Component type. More...
 

Public Member Functions

 dimensioned ()
 Null constructor. More...
 
 dimensioned (const word &, const dimensionSet &, const Type &)
 Construct given name, dimensions and value. More...
 
 dimensioned (const dimensionSet &, const Type &)
 Construct given dimensions and value. More...
 
 dimensioned (const Type &)
 Construct dimensionless given value only. More...
 
 dimensioned (const word &, const dimensioned< Type > &)
 Construct from a dimensioned<Type> changing the name. 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 unitConversion &, Istream &)
 Construct from an Istream with a given name and units. More...
 
 dimensioned (const word &, const dimensionSet &, const dictionary &)
 Construct from dictionary lookup with a given name and dimensions. More...
 
 dimensioned (const word &, const unitConversion &, const dictionary &)
 Construct from dictionary lookup with a given name and units. More...
 
 dimensioned (const word &name, const dimensionSet &dimensions, const dictionary &dict, const Type &defaultValue, const bool writeDefault=dictionary::writeOptionalEntries > 0)
 Construct from dictionary lookup with a given name and dimensions. More...
 
 dimensioned (const word &name, const dictionary &dict, const Type &defaultValue, const bool writeDefault=dictionary::writeOptionalEntries > 0)
 Construct from dictionary lookup with the given name, dimensionless,. More...
 
 dimensioned (const word &name, const unitConversion &, const dictionary &, const Type &defaultValue, const bool writeDefault=dictionary::writeOptionalEntries > 0)
 Construct from dictionary lookup with the given name and units. More...
 
const wordname () const
 Return const reference to name. More...
 
wordname ()
 Return non-const reference to name. More...
 
const dimensionSetdimensions () const
 Return const reference to dimensions. More...
 
dimensionSetdimensions ()
 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< cmptTypecomponent (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 &, const unitConversion &defaultUnits=NullObjectRef< unitConversion >())
 Update the value of dimensioned<Type> More...
 
bool readIfPresent (const dictionary &, const unitConversion &defaultUnits=NullObjectRef< unitConversion >())
 Update the value of dimensioned<Type> if found in the dictionary. More...
 
dimensioned< cmptTypeoperator[] (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)
 

Friends

Istreamoperator>> (Istream &, dimensioned< Type > &)
 
Ostreamoperator (Ostream &, const dimensioned< Type > &)
 

Detailed Description

template<class Type>
class Foam::dimensioned< Type >

Generic dimensioned Type class.

Source files

Definition at line 62 of file dimensionedType.H.

Member Typedef Documentation

◆ cmptType

typedef pTraits<Type>::cmptType cmptType

Component type.

Definition at line 101 of file dimensionedType.H.

Constructor & Destructor Documentation

◆ dimensioned() [1/14]

Null constructor.

Definition at line 94 of file dimensionedType.C.

References Foam::nan.

◆ dimensioned() [2/14]

dimensioned ( const word name,
const dimensionSet dims,
const Type &  t 
)

Construct given name, dimensions and value.

Definition at line 103 of file dimensionedType.C.

◆ dimensioned() [3/14]

dimensioned ( const dimensionSet dims,
const Type &  t 
)

Construct given dimensions and value.

with the name obtained from the value

Definition at line 117 of file dimensionedType.C.

◆ dimensioned() [4/14]

dimensioned ( const Type &  t)

Construct dimensionless given value only.

with a name obtained from the value

Definition at line 126 of file dimensionedType.C.

◆ dimensioned() [5/14]

dimensioned ( const word name,
const dimensioned< Type > &  dt 
)

Construct from a dimensioned<Type> changing the name.

Definition at line 135 of file dimensionedType.C.

◆ dimensioned() [6/14]

dimensioned ( Istream is)

Construct from Istream.

Definition at line 148 of file dimensionedType.C.

References word::null, and Foam::unitAny.

◆ dimensioned() [7/14]

dimensioned ( const word name,
Istream is 
)

Construct from an Istream with a given name.

Definition at line 157 of file dimensionedType.C.

References dimensioned< Type >::name(), and Foam::unitAny.

Here is the call graph for this function:

◆ dimensioned() [8/14]

dimensioned ( const word name,
const dimensionSet dims,
Istream is 
)

Construct from an Istream with a given name and dimensions.

Definition at line 167 of file dimensionedType.C.

◆ dimensioned() [9/14]

dimensioned ( const word name,
const unitConversion units,
Istream is 
)

Construct from an Istream with a given name and units.

Definition at line 183 of file dimensionedType.C.

◆ dimensioned() [10/14]

dimensioned ( const word name,
const dimensionSet dims,
const dictionary dict 
)

Construct from dictionary lookup with a given name and dimensions.

Definition at line 199 of file dimensionedType.C.

◆ dimensioned() [11/14]

dimensioned ( const word name,
const unitConversion units,
const dictionary dict 
)

Construct from dictionary lookup with a given name and units.

Definition at line 215 of file dimensionedType.C.

◆ dimensioned() [12/14]

dimensioned ( const word name,
const dimensionSet dimensions,
const dictionary dict,
const Type &  defaultValue,
const bool  writeDefault = dictionary::writeOptionalEntries,
 
)

Construct from dictionary lookup with a given name and dimensions.

and if not found set to the given default value

◆ dimensioned() [13/14]

dimensioned ( const word name,
const dictionary dict,
const Type &  defaultValue,
const bool  writeDefault = dictionary::writeOptionalEntries,
 
)

Construct from dictionary lookup with the given name, dimensionless,.

and if not found set to the given default value

◆ dimensioned() [14/14]

dimensioned ( const word name,
const unitConversion ,
const dictionary ,
const Type &  defaultValue,
const bool  writeDefault = dictionary::writeOptionalEntries,
 
)

Construct from dictionary lookup with the given name and units.

and if not found set to the given default value

Member Function Documentation

◆ name() [1/2]

const Foam::word & name

Return const reference to name.

Definition at line 322 of file dimensionedType.C.

Referenced by KochFriedlanderSintering::addSup(), fieldToCell::applyToSet(), patchFluxToFace::applyToSet(), Foam::atan2(), cellCoBlended< Type >::blendingFactor(), nearWallFields::calcAddressing(), XiEqModel::calculateSchelkinEffect(), Foam::cbrt(), Foam::meshCheck::checkGeometry(), Foam::checkMethod(), Foam::meshCheck::checkTopology(), Foam::cof(), compressibleMultiphaseVoF::compressibleMultiphaseVoF(), compressibleTwoPhaseVoFMixture::compressibleTwoPhaseVoFMixture(), compressibleVoF::compressibleVoF(), Foam::fv::CorrectPhi(), nearWallFields::createFields(), logFiles::createFiles(), dynamicMeshPointInterpolator::curPointField(), Foam::fvc::ddt(), pointFieldDecomposer::decomposeField(), Foam::det(), Foam::dev(), Foam::dev2(), dimensioned< Type >::dimensioned(), displacementComponentLaplacianFvMotionSolver::displacementComponentLaplacianFvMotionSolver(), displacementLaplacianFvMotionSolver::displacementLaplacianFvMotionSolver(), cellsToCells::distributeMesh(), Foam::eigenValues(), Foam::eigenVectors(), phaseScalarTransport::execute(), masterUncollatedFileOperation::findInstance(), polyMesh::found(), backwardDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), CrankNicolsonDdtScheme< Type >::fvcDdt(), EulerDdtScheme< Type >::fvcDdt(), localEulerDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), steadyStateDdtScheme< Type >::fvcDdt(), psiuMulticomponentThermo::implementation::implementation(), incompressibleDriftFlux::incompressibleDriftFlux(), incompressibleFluid::incompressibleFluid(), incompressibleMultiphaseVoF::incompressibleMultiphaseVoF(), incompressibleVoF::incompressibleVoF(), Foam::innerSqr(), fvMeshSubset::interpolate(), Foam::inv(), isothermalFluid::isothermalFluid(), CrankNicolson< Type >::LagrangianmInitDdt(), Foam::fvc::laplacian(), Foam::fvm::laplacian(), Foam::MULES::limit(), Foam::MULES::limitCorr(), LimitedScheme< Type, Limiter, LimitFunc >::limiter(), readFields::loadField(), basicThermo::lookupOrConstruct(), Foam::MapConsistentVolFields(), Foam::MapGeometricFields(), Foam::MapLagrangianFields(), Foam::MapVolFields(), massDiffusionLimitedPhaseChange::massDiffusionLimitedPhaseChange(), LocalInteraction< CloudType >::massEscape(), LocalInteraction< CloudType >::massStick(), Foam::MeshToMeshMapVolFields(), populationBalanceModel::modelSourceSu(), solidParticle::move(), MovingPhaseModel< BasePhaseModel >::MovingPhaseModel(), Foam::neg(), Foam::neg0(), Foam::negPart(), buoyancy::New(), GeometricField< Type, GeoMesh, PrimitiveField >::New(), Foam::operator*(), phaseForces::phaseForces(), Foam::polyMeshZipUpCells(), populationBalanceModel::populationBalanceModel(), Foam::pos(), Foam::pos0(), Foam::posPart(), Foam::pow(), Foam::pow025(), Foam::pow3(), Foam::pow4(), Foam::pow5(), Foam::pow6(), ParticleErosion< CloudType >::preEvolve(), PrinceBlanch::PrinceBlanch(), turbulenceFields::processField(), radiativeIntensityRay::radiativeIntensityRay(), forcing::readLambda(), fieldAverage::readMeanFieldType(), DimensionedField< scalar, Foam::volMesh >::reset(), timeSelector::selectIfPresent(), setCellFieldType(), setFaceFieldType(), refinementIterator::setRefinement(), masterUncollatedFileOperation::setTime(), shockFluid::shockFluid(), Foam::sign(), Foam::skew(), Foam::sqr(), Foam::sqrt(), Foam::stabilise(), MPLIC::surfaceAlpha(), Foam::symm(), dimensioned< Type >::T(), KochFriedlanderSintering::tau(), solidBodyMotionSolver::topoChange(), rigidBodyMeshMotion::topoChange(), Foam::tr(), Foam::transform(), cellsToCells::trimLocalTgt(), Foam::twoSymm(), MPPICParcel< ParcelType >::trackingData::updateAverages(), VoFSolver::VoFSolver(), FacePostProcessing< CloudType >::write(), ParticleCollector< CloudType >::write(), refiner::write(), MeshedSurfaceProxy< Face >::write(), Foam::writeMeshObject(), and Foam::zeroDimensionalFvMesh().

Here is the caller graph for this function:

◆ name() [2/2]

Foam::word & name

Return non-const reference to name.

Definition at line 328 of file dimensionedType.C.

◆ dimensions() [1/2]

◆ dimensions() [2/2]

Foam::dimensionSet & dimensions

Return non-const reference to dimensions.

Definition at line 341 of file dimensionedType.C.

◆ value() [1/2]

const Type & value

Return const reference to value.

Definition at line 348 of file dimensionedType.C.

Referenced by timeControl::active(), powerLawUniformBinary::addToBinaryBreakupRate(), hydrodynamic::addToCoalescenceRate(), porosityModel::adjustNegativeResistance(), Foam::atan2(), NonInertialFrameForce< CloudType >::cacheFields(), SprayParcel< ParcelType >::calcAtomisation(), ThermoParcel< ParcelType >::calcHeatTransfer(), ParamagneticForce< CloudType >::calcNonCoupled(), adsorptionMassFractionFvPatchScalarField::calcPhiYp(), semiPermeableBaffleMassFractionFvPatchScalarField::calcPhiYp(), viewFactor::calculate(), singleStepCombustion::calculateqFuel(), Foam::cbrt(), Foam::cof(), movingForces::CofR(), fixedTemperature::constrain(), pointInjection::correct(), volumeInjection::correct(), waveForcing::correct(), Foam::correctContactAngle(), CrankNicolsonDdtScheme< Type >::ddt0_(), Foam::det(), Foam::dev(), Foam::dev2(), Foam::eigenValues(), Foam::eigenVectors(), ThermoCloud< CloudType >::Ep(), Foam::saturationModels::evaluate(), comfort::execute(), polyMesh::found(), EulerD2dt2Scheme< Type >::fvcD2dt2(), backwardDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), EulerDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), CrankNicolsonDdtScheme< Type >::fvcDdt(), GeometricField< symmTensor >::GeometricField(), if(), multiCycleConstantbXiIgnition::ignited(), multiCycleConstantbXiIgnition::igniting(), InjectionModel< CloudType >::inject(), Foam::innerSqr(), Foam::inv(), rotating::jcalc(), tabulatedSolidTransport< Thermo >::Kappa(), laminarFlameSpeed::laminarFlameSpeed(), linearTsub::linearTsub(), ArdenBuck::lnPSat(), MarshakRadiationFixedTemperatureFvPatchScalarField::MarshakRadiationFixedTemperatureFvPatchScalarField(), GeometricField< Type, GeoMesh, PrimitiveField >::max(), GeometricField< Type, GeoMesh, PrimitiveField >::maxMin(), GeometricField< Type, GeoMesh, PrimitiveField >::min(), diskInjection::modify(), manualInjection::modify(), patchInjection::modify(), pointInjection::modify(), volumeInjection::modify(), solidParticleCloud::move(), Foam::neg(), Foam::neg0(), Foam::negPart(), JohnsonJacksonSchaeffer::nu(), Schaeffer::nu(), Foam::operator*(), Time::operator+=(), Foam::operator+=(), Foam::operator-=(), DimensionedField< Type, GeoMesh, PrimitiveField >::operator=(), GeometricField< Type, GeoMesh, PrimitiveField >::operator=(), GeometricField< Type, GeoMesh, PrimitiveField >::operator==(), populationBalanceModel::populationBalanceModel(), Foam::pos(), Foam::pos0(), Foam::posPart(), Foam::pow(), Foam::pow025(), Foam::pow3(), Foam::pow4(), Foam::pow5(), Foam::pow6(), LiaoBase::precompute(), comfort::read(), GeometricField< Type, GeoMesh, PrimitiveField >::replace(), exponential::setBreakupRate(), powerLaw::setBreakupRate(), Time::setDeltaT(), Time::setEndTime(), ConeInjection< CloudType >::setPositionAndCell(), Time::setTime(), masterUncollatedFileOperation::setTime(), temperatureDependent::sigma(), Foam::sign(), Foam::skew(), rigidBodyMeshMotion::solve(), rigidBodyMeshMotionSolver::solve(), sixDoFRigidBodyMotionSolver::solve(), Foam::sqr(), Foam::sqrt(), Foam::stabilise(), Foam::symm(), dimensioned< Type >::T(), Foam::tr(), Foam::transform(), Foam::twoSymm(), uniformFixedValuePointPatchField< Type >::uniformFixedValuePointPatchField(), inkJet::update(), fixedPressureCompressibleDensityFvPatchScalarField::updateCoeffs(), PrghPressureFvPatchScalarField< PressureFvPatchScalarField >::updateCoeffs(), rotatingTotalPressureFvPatchScalarField::updateCoeffs(), rotatingWallVelocityFvPatchVectorField::updateCoeffs(), angularOscillatingDisplacementPointPatchVectorField::updateCoeffs(), angularOscillatingVelocityPointPatchVectorField::updateCoeffs(), oscillatingDisplacementPointPatchVectorField::updateCoeffs(), oscillatingVelocityPointPatchVectorField::updateCoeffs(), waveDisplacementPointPatchVectorField::updateCoeffs(), MarshakRadiationFvPatchScalarField::updateCoeffs(), MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs(), UniformDimensionedField< Type >::value(), coefficient< Field< Type > >::value(), Function1LagrangianFieldSource< Type >::value(), Sine< Type >::value(), fvMesh::Vsc(), fvMesh::Vsc0(), Foam::W(), wideBandDiffusiveRadiationMixedFvPatchScalarField::wideBandDiffusiveRadiationMixedFvPatchScalarField(), FacePostProcessing< CloudType >::write(), ParticleCollector< CloudType >::write(), Foam::writeEntry(), and XiCorrModel::XiCorr().

Here is the caller graph for this function:

◆ value() [2/2]

Type & value

Return non-const reference to value.

Definition at line 354 of file dimensionedType.C.

◆ component()

Foam::dimensioned< typename Foam::dimensioned< Type >::cmptType > component ( const direction  d) const

Return a component as a dimensioned<cmptType>

Definition at line 362 of file dimensionedType.C.

References Foam::name().

Referenced by Foam::ComplexField().

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

◆ replace()

void replace ( const  direction,
const dimensioned< cmptType > &   
)

Return a component with a dimensioned<cmptType>

Definition at line 377 of file dimensionedType.C.

◆ T()

Return transpose.

Definition at line 36 of file dimensionedSphericalTensor.C.

References dimensioned< Type >::dimensions(), dimensioned< Type >::name(), and dimensioned< Type >::value().

Here is the call graph for this function:

◆ read()

void read ( const dictionary dict,
const unitConversion defaultUnits = NullObjectRef<unitConversion>() 
)

Update the value of dimensioned<Type>

Definition at line 389 of file dimensionedType.C.

References dict, and Foam::isNull().

Referenced by cylindrical::readCoeffs(), linearEquilibrium::readCoeffs(), transport::readCoeffs(), uniformConstant::readCoeffs(), constant::readCoeffs(), and instability::readCoeffs().

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

◆ readIfPresent()

bool readIfPresent ( const dictionary dict,
const unitConversion defaultUnits = NullObjectRef<unitConversion>() 
)

Update the value of dimensioned<Type> if found in the dictionary.

Definition at line 405 of file dimensionedType.C.

References dict, Foam::endl(), IOInfoInFunction, Foam::isNull(), and entry::stream().

Referenced by makeMomentumTransportModelTypes(), PDRkEpsilon::read(), cylindrical::readCoeffs(), spherical::readCoeffs(), XiCorrModel::readCoeffs(), Gulder::readCoeffs(), KTS::readCoeffs(), cubic::readCoeffs(), and linear::readCoeffs().

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

◆ operator[]()

Foam::dimensioned< typename Foam::dimensioned< Type >::cmptType > operator[] ( const direction  d) const

Return a component as a dimensioned<cmptType>

Definition at line 442 of file dimensionedType.C.

References Foam::component().

Here is the call graph for this function:

◆ operator+=()

void operator+= ( const dimensioned< Type > &  dt)

Definition at line 449 of file dimensionedType.C.

◆ operator-=()

void operator-= ( const dimensioned< Type > &  dt)

Definition at line 457 of file dimensionedType.C.

◆ operator*=()

void operator*= ( const scalar  s)

Definition at line 465 of file dimensionedType.C.

References s().

Here is the call graph for this function:

◆ operator/=()

void operator/= ( const scalar  s)

Definition at line 472 of file dimensionedType.C.

References s().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream ,
dimensioned< Type > &   
)
friend

◆ operator

Ostream& operator ( Ostream ,
const dimensioned< Type > &   
)
friend

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