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 (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 dimensionSet &, const dictionary &)
 Construct from dictionary lookup with a given name and dimensions. More...
 
 dimensioned ()
 Null constructor. 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 &)
 Update the value of dimensioned<Type> More...
 
bool readIfPresent (const dictionary &)
 Update the value of dimensioned<Type> if found in the dictionary. More...
 
Istreamread (Istream &is, const dictionary &)
 Read value from stream and units from dictionary. More...
 
Istreamread (Istream &is, const HashTable< dimensionedScalar > &)
 Read value from stream and units from table. More...
 
Istreamread (Istream &is)
 Read value from stream and units from system table. 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)
 

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

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 64 of file dimensionedType.H.

Member Typedef Documentation

◆ cmptType

typedef pTraits<Type>::cmptType cmptType

Component type.

Definition at line 88 of file dimensionedType.H.

Constructor & Destructor Documentation

◆ dimensioned() [1/9]

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

Construct given name, dimensions and value.

Definition at line 75 of file dimensionedType.C.

◆ dimensioned() [2/9]

dimensioned ( const dimensionSet dimSet,
const Type &  t 
)

Construct given dimensions and value.

with the name obtained from the value

Definition at line 89 of file dimensionedType.C.

◆ dimensioned() [3/9]

dimensioned ( const Type &  t)

Construct dimensionless given value only.

with a name obtained from the value

Definition at line 102 of file dimensionedType.C.

◆ dimensioned() [4/9]

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

Construct from a dimensioned<Type> changing the name.

Definition at line 111 of file dimensionedType.C.

◆ dimensioned() [5/9]

dimensioned ( Istream is)

Construct from Istream.

Definition at line 124 of file dimensionedType.C.

◆ dimensioned() [6/9]

dimensioned ( const word name,
Istream is 
)

Construct from an Istream with a given name.

Definition at line 136 of file dimensionedType.C.

◆ dimensioned() [7/9]

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

Construct from an Istream with a given name and dimensions.

Definition at line 153 of file dimensionedType.C.

◆ dimensioned() [8/9]

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

Construct from dictionary lookup with a given name and dimensions.

Definition at line 169 of file dimensionedType.C.

◆ dimensioned() [9/9]

Null constructor.

Definition at line 185 of file dimensionedType.C.

Member Function Documentation

◆ lookupOrDefault() [1/2]

Foam::dimensioned< Type > lookupOrDefault ( const word name,
const dictionary dict,
const dimensionSet dims = dimless,
const Type &  defaultValue = pTraits<Type>::zero 
)
static

Construct from dictionary, with default dimensions and value.

Definition at line 197 of file dimensionedType.C.

◆ lookupOrDefault() [2/2]

Foam::dimensioned< Type > lookupOrDefault ( const word name,
const dictionary dict,
const Type &  defaultValue = pTraits<Type>::zero 
)
static

Construct from dictionary dimensionless with value.

Definition at line 217 of file dimensionedType.C.

◆ lookupOrAddToDict() [1/2]

Foam::dimensioned< Type > lookupOrAddToDict ( const word name,
dictionary dict,
const dimensionSet dims = dimless,
const Type &  defaultValue = pTraits<Type>::zero 
)
static

Construct from dictionary, with default value.

If the value is not found, it is added into the dictionary.

Definition at line 229 of file dimensionedType.C.

References dict, and Foam::name().

Here is the call graph for this function:

◆ lookupOrAddToDict() [2/2]

Foam::dimensioned< Type > lookupOrAddToDict ( const word name,
dictionary dict,
const Type &  defaultValue = pTraits<Type>::zero 
)
static

Construct from dictionary, dimensionless with default value.

If the value is not found, it is added into the dictionary.

Definition at line 243 of file dimensionedType.C.

References dict, Foam::dimless, and Foam::name().

Here is the call graph for this function:

◆ name() [1/2]

const Foam::word & name

Return const reference to name.

Definition at line 257 of file dimensionedType.C.

Referenced by Foam::atan2(), basicCombustionMixture::basicCombustionMixture(), cellCoBlended< Type >::blendingFactor(), nearWallFields::calcAddressing(), XiEqModel::calculateSchelkinEffect(), Foam::cbrt(), Foam::checkMethod(), Foam::cof(), compressibleMultiphaseVoF::compressibleMultiphaseVoF(), compressibleTwoPhaseVoFMixture::compressibleTwoPhaseVoFMixture(), compressibleVoF::compressibleVoF(), Foam::fv::CorrectPhi(), epsilonWallFunctionFvPatchScalarField::createAveragingWeights(), omegaWallFunctionFvPatchScalarField::createAveragingWeights(), nearWallFields::createFields(), logFiles::createFiles(), dynamicMeshPointInterpolator::curPointField(), Foam::fvc::ddt(), Foam::det(), Foam::dev(), Foam::dev2(), displacementComponentLaplacianFvMotionSolver::displacementComponentLaplacianFvMotionSolver(), displacementLaplacianFvMotionSolver::displacementLaplacianFvMotionSolver(), cellsToCells::distributeMesh(), kineticTheoryModel::divDevTau(), Foam::eigenValues(), Foam::eigenVectors(), phaseScalarTransport::execute(), masterUncollatedFileOperation::findInstance(), backwardDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), CrankNicolsonDdtScheme< Type >::fvcDdt(), EulerDdtScheme< Type >::fvcDdt(), localEulerDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), steadyStateDdtScheme< Type >::fvcDdt(), incompressibleDriftFlux::incompressibleDriftFlux(), incompressibleFluid::incompressibleFluid(), incompressibleMultiphaseVoF::incompressibleMultiphaseVoF(), incompressibleVoF::incompressibleVoF(), Foam::innerSqr(), fvMeshSubset::interpolate(), Foam::inv(), isothermalFluid::isothermalFluid(), 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(), LocalInteraction< CloudType >::massEscape(), LocalInteraction< CloudType >::massStick(), Foam::MeshToMeshMapVolFields(), solidParticle::move(), MovingPhaseModel< BasePhaseModel >::MovingPhaseModel(), Foam::neg(), Foam::neg0(), Foam::negPart(), buoyancy::New(), Foam::operator*(), phaseChange::phaseChange(), 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(), VoidFraction< CloudType >::preEvolve(), PrinceBlanch::PrinceBlanch(), turbulenceFields::processField(), KochFriedlander::R(), noSintering::R(), dummy::R(), radiativeIntensityRay::radiativeIntensityRay(), forcing::readCoeffs(), fieldAverage::readMeanFieldType(), scalarTransport::scalarTransport(), timeSelector::selectIfPresent(), refinementIterator::setRefinement(), masterUncollatedFileOperation::setTime(), shockFluid::shockFluid(), Foam::sign(), Foam::skew(), phaseSystem::solve(), Foam::sqr(), Foam::sqrt(), Foam::stabilise(), MPLIC::surfaceAlpha(), Foam::symm(), dimensioned< Type >::T(), Foam::tr(), Foam::transform(), cellsToCells::trimLocalTgt(), Foam::twoSymm(), MPPICParcel< ParcelType >::trackingData::updateAverages(), VoFSolver::VoFSolver(), FacePostProcessing< CloudType >::write(), ParticleCollector< CloudType >::write(), MeshedSurfaceProxy< Face >::write(), dimensionSet::write(), Foam::writeMeshObject(), and Foam::zeroDimensionalFvMesh().

◆ name() [2/2]

Foam::word & name

Return non-const reference to name.

Definition at line 263 of file dimensionedType.C.

◆ dimensions() [1/2]

◆ dimensions() [2/2]

Foam::dimensionSet & dimensions

Return non-const reference to dimensions.

Definition at line 276 of file dimensionedType.C.

◆ value() [1/2]

const Type & value

Return const reference to value.

Definition at line 283 of file dimensionedType.C.

Referenced by powerLawUniformBinary::addToBinaryBreakupRate(), hydrodynamic::addToCoalescenceRate(), wallBoiling::addToNucleationRate(), porosityModel::adjustNegativeResistance(), Foam::atan2(), NonInertialFrameForce< CloudType >::cacheFields(), SprayParcel< ParcelType >::calcAtomisation(), ThermoParcel< ParcelType >::calcHeatTransfer(), ParamagneticForce< CloudType >::calcNonCoupled(), viewFactor::calculate(), singleStepCombustion::calculateqFuel(), Foam::cbrt(), Foam::cof(), Foam::correctContactAngle(), gravitational::cosTheta(), CrankNicolsonDdtScheme< Type >::ddt0_(), Foam::det(), Foam::dev(), Foam::dev2(), Foam::eigenValues(), Foam::eigenVectors(), engine::engine(), ThermoCloud< CloudType >::Ep(), buoyantKEpsilon< BasicMomentumTransportModel >::epsilonSource(), populationBalanceModel::eta(), comfort::execute(), UniformDimensionedField< Type >::field(), basicCombustionMixture::fres(), EulerD2dt2Scheme< Type >::fvcD2dt2(), backwardDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), EulerDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), CrankNicolsonDdtScheme< Type >::fvcDdt(), GeometricField< symmTensor >::GeometricField(), InjectionModel< CloudType >::inject(), Foam::innerSqr(), Foam::inv(), JohnsonJacksonParticleSlipFvPatchVectorField::JohnsonJacksonParticleSlipFvPatchVectorField(), JohnsonJacksonParticleThetaFvPatchScalarField::JohnsonJacksonParticleThetaFvPatchScalarField(), tabulatedSolidTransport< Thermo >::Kappa(), buoyantKEpsilon< BasicMomentumTransportModel >::kSource(), laminarFlameSpeed::laminarFlameSpeed(), hexRef8::level0EdgeLength(), linearTsub::linearTsub(), ArdenBuck::lnPSat(), MarshakRadiationFixedTemperatureFvPatchScalarField::MarshakRadiationFixedTemperatureFvPatchScalarField(), PatchFlowRateInjection< CloudType >::massToInject(), GeometricField< Type, PatchField, GeoMesh >::max(), GeometricField< Type, PatchField, GeoMesh >::maxMin(), GeometricField< Type, PatchField, GeoMesh >::min(), solidParticleCloud::move(), movingCone::movingCone(), Foam::neg(), Foam::neg0(), Foam::negPart(), PatchFlowRateInjection< CloudType >::nParcelsToInject(), JohnsonJacksonSchaeffer::nu(), Schaeffer::nu(), Foam::operator*(), Time::operator+=(), GeometricField< Type, PatchField, GeoMesh >::operator=(), GeometricField< Type, PatchField, GeoMesh >::operator==(), UniformDimensionedField< Type >::operator[](), Foam::pos(), Foam::pos0(), Foam::posPart(), Foam::pow(), Foam::pow025(), Foam::pow3(), Foam::pow4(), Foam::pow5(), Foam::pow6(), LiaoBase::precompute(), reactionDriven::reactionDriven(), comfort::read(), dimensionSet::read(), GeometricField< Type, PatchField, GeoMesh >::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(), XiFluid::StCorr(), Foam::symm(), dimensioned< Type >::T(), KochFriedlander::tau(), Foam::tr(), Foam::transform(), waveSuperposition::transformation(), Foam::twoSymm(), UniformDimensionedField< Type >::UniformDimensionedField(), smoluchowskiJumpTFvPatchScalarField::updateCoeffs(), hydrostaticDisplacementFvPatchVectorField::updateCoeffs(), fixedPressureCompressibleDensityFvPatchScalarField::updateCoeffs(), PrghPressureFvPatchScalarField< PressureFvPatchScalarField >::updateCoeffs(), uniformDensityHydrostaticPressureFvPatchScalarField::updateCoeffs(), waveSurfacePressureFvPatchScalarField::updateCoeffs(), angularOscillatingDisplacementPointPatchVectorField::updateCoeffs(), angularOscillatingVelocityPointPatchVectorField::updateCoeffs(), oscillatingDisplacementPointPatchVectorField::updateCoeffs(), oscillatingVelocityPointPatchVectorField::updateCoeffs(), waveDisplacementPointPatchVectorField::updateCoeffs(), MarshakRadiationFvPatchScalarField::updateCoeffs(), MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs(), externalTemperatureFvPatchScalarField::updateCoeffs(), alphaFixedPressureFvPatchScalarField::updateCoeffs(), coefficient< Field< Type > >::value(), Sine< Type >::value(), fvMesh::Vsc(), fvMesh::Vsc0(), waveSuperposition::waveSuperposition(), wideBandDiffusiveRadiationMixedFvPatchScalarField::wideBandDiffusiveRadiationMixedFvPatchScalarField(), FacePostProcessing< CloudType >::write(), ParticleCollector< CloudType >::write(), and dimensionSet::write().

◆ value() [2/2]

Type & value

Return non-const reference to value.

Definition at line 289 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 297 of file dimensionedType.C.

References Foam::name().

Referenced by Foam::ComplexField(), cyclicLduInterfaceField::transformCoupleField(), and processorLduInterfaceField::transformCoupleField().

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 312 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().

Referenced by SVD::VSinvUt().

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

◆ read() [1/4]

void read ( const dictionary dict)

Update the value of dimensioned<Type>

Definition at line 324 of file dimensionedType.C.

References dict.

Referenced by interfaceTurbulenceDamping::interfaceTurbulenceDamping(), and VoFTurbulenceDamping::VoFTurbulenceDamping().

Here is the caller graph for this function:

◆ readIfPresent()

bool readIfPresent ( const dictionary dict)

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

Definition at line 331 of file dimensionedType.C.

References dict.

Referenced by makeMomentumTransportModelTypes(), PDRkEpsilon::read(), SpalartAllmarasDES< BasicMomentumTransportModel >::read(), and SpalartAllmaras< BasicMomentumTransportModel >::read().

Here is the caller graph for this function:

◆ read() [2/4]

Foam::Istream & read ( Istream is,
const dictionary readSet 
)

Read value from stream and units from dictionary.

Definition at line 339 of file dimensionedType.C.

References IOstream::check(), and Istream::read().

Here is the call graph for this function:

◆ read() [3/4]

Foam::Istream & read ( Istream is,
const HashTable< dimensionedScalar > &  readSet 
)

Read value from stream and units from table.

Definition at line 363 of file dimensionedType.C.

References IOstream::check(), and Istream::read().

Here is the call graph for this function:

◆ read() [4/4]

Foam::Istream & read ( Istream is)

Read value from stream and units from system table.

Definition at line 392 of file dimensionedType.C.

References IOstream::check(), and Istream::read().

Here is the call 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 419 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 429 of file dimensionedType.C.

◆ operator-=()

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

Definition at line 440 of file dimensionedType.C.

◆ operator*=()

void operator*= ( const scalar  s)

Definition at line 451 of file dimensionedType.C.

References s().

Here is the call graph for this function:

◆ operator/=()

void operator/= ( const scalar  s)

Definition at line 461 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: