Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
dimensioned< Type > Class Template Reference

Generic dimensioned Type class. More...

Inheritance diagram for dimensioned< Type >:
Inheritance graph
[legend]

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 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 41 of file dimensionedScalarFwd.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/8]

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

Construct given a name, a value and its dimensionSet.

Definition at line 76 of file dimensionedType.C.

◆ dimensioned() [2/8]

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

Construct from a dimensioned<Type> changing the name.

Definition at line 90 of file dimensionedType.C.

◆ dimensioned() [3/8]

dimensioned ( const Type &  t)
inline

Construct given a value (creates dimensionless value).

Definition at line 100 of file dimensionedType.H.

◆ dimensioned() [4/8]

dimensioned ( Istream is)

Construct from Istream.

Definition at line 103 of file dimensionedType.C.

◆ dimensioned() [5/8]

dimensioned ( const word name,
Istream is 
)

Construct from an Istream with a given name.

Definition at line 115 of file dimensionedType.C.

◆ dimensioned() [6/8]

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

Construct from an Istream with a given name and dimensions.

Definition at line 132 of file dimensionedType.C.

◆ dimensioned() [7/8]

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

Construct from dictionary lookup with a given name and dimensions.

Definition at line 148 of file dimensionedType.C.

◆ dimensioned() [8/8]

Null constructor.

Definition at line 164 of file dimensionedType.C.

Referenced by dimensioned< vector >::dimensioned().

Here is the caller graph for this function:

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 176 of file dimensionedType.C.

Referenced by dimensioned< vector >::dimensioned(), and dimensioned< vector >::lookupOrDefault().

Here is the caller graph for this function:

◆ 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 196 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 208 of file dimensionedType.C.

Referenced by dimensioned< vector >::dimensioned(), dimensioned< vector >::lookupOrAddToDict(), and dimensioned< vector >::lookupOrDefault().

Here is the caller 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 222 of file dimensionedType.C.

◆ name() [1/2]

const Foam::word & name ( ) const

◆ name() [2/2]

Foam::word & name ( )

Return non-const reference to name.

Definition at line 241 of file dimensionedType.C.

◆ dimensions() [1/2]

const Foam::dimensionSet & dimensions ( ) const

◆ dimensions() [2/2]

Foam::dimensionSet & dimensions ( )

Return non-const reference to dimensions.

Definition at line 254 of file dimensionedType.C.

◆ value() [1/2]

const Type & value ( ) const

Return const reference to value.

Definition at line 261 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(), viewFactor::calculate(), Foam::cbrt(), Foam::cof(), fixedTemperatureConstraint::constrain(), infinitelyFastChemistry< ReactionThermo, ThermoType >::correct(), BrunDrippingInjection::correct(), waxSolventEvaporation::correctModel(), logFiles::createFiles(), curvatureSeparation::curvatureSeparation(), CrankNicolsonDdtScheme< Type >::ddt0_(), Foam::det(), Foam::dev(), Foam::dev2(), dimensioned< vector >::dimensioned(), dimensionSet::dimensionSet(), Foam::eigenValues(), Foam::eigenVectors(), engineMesh::engineMesh(), ThermoCloud< Foam::DSMCCloud >::Ep(), buoyantKEpsilon< BasicTurbulenceModel >::epsilonSource(), DSMCCloud< ParcelType >::equipartitionInternalEnergy(), basicCombustionMixture::fres(), EulerD2dt2Scheme< Type >::fvcD2dt2(), EulerDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), backwardDdtScheme< Type >::fvcDdt(), CrankNicolsonDdtScheme< Type >::fvcDdt(), EulerD2dt2Scheme< Type >::fvmD2dt2(), EulerDdtScheme< Type >::fvmDdt(), CoEulerDdtScheme< Type >::fvmDdt(), SLTSDdtScheme< Type >::fvmDdt(), backwardDdtScheme< Type >::fvmDdt(), localEulerDdtScheme< Type >::fvmDdt(), CrankNicolsonDdtScheme< Type >::fvmDdt(), waveModel::g(), GeometricField< vector, pointPatchField, pointMesh >::GeometricField(), thermoSingleLayer::hs(), 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(), pressureControl::limit(), MarshakRadiationFixedTemperatureFvPatchScalarField::MarshakRadiationFixedTemperatureFvPatchScalarField(), GeometricField< vector, pointPatchField, pointMesh >::max(), GeometricField< vector, pointPatchField, pointMesh >::maxMin(), GeometricField< vector, pointPatchField, pointMesh >::min(), layeredEngineMesh::move(), fvMotionSolverEngineMesh::move(), solidParticleCloud::move(), polyMesh::movePoints(), movingConeTopoFvMesh::movingConeTopoFvMesh(), NamedEnum< directionType, 3 >::names(), Foam::neg(), Foam::neg0(), Foam::negPart(), Foam::operator*(), Time::operator+=(), dimensioned< vector >::operator/=(), Foam::operator<(), Foam::operator<<(), DimensionedField< Type, Foam::pointMesh >::operator=(), GeometricField< vector, pointPatchField, pointMesh >::operator=(), GeometricField< vector, pointPatchField, pointMesh >::operator==(), Foam::operator>(), Foam::operator>>(), UniformDimensionedField< vector >::operator[](), PatchFlowRateInjection< CloudType >::parcelsToInject(), freePiston::pistonPosition(), Foam::pos(), Foam::pos0(), Foam::posPart(), Foam::pow(), Foam::pow025(), Foam::pow3(), Foam::pow4(), Foam::pow5(), Foam::pow6(), pressureControl::pressureControl(), thermalBaffleModel::read(), dimensionSet::read(), GeometricField< vector, pointPatchField, pointMesh >::replace(), incompressibleTwoPhaseInteractingMixture::rho(), timeSelector::selectIfPresent(), Time::setDeltaT(), Time::setEndTime(), Time::setTime(), masterUncollatedFileOperation::setTime(), constantRadiation::Shs(), Foam::sign(), Foam::skew(), sixDoFRigidBodyMotionSolver::solve(), rigidBodyMeshMotionSolver::solve(), rigidBodyMeshMotion::solve(), thermalBaffle::solveEnergy(), Foam::sqr(), Foam::sqrt(), Foam::stabilise(), particle< Type >::stepFractionSpan(), Foam::symm(), dimensioned< vector >::T(), Foam::tr(), Foam::transform(), Foam::twoSymm(), dynamicInkJetFvMesh::update(), movingConeTopoFvMesh::update(), oscillatingDisplacementPointPatchVectorField::updateCoeffs(), waveDisplacementPointPatchVectorField::updateCoeffs(), oscillatingVelocityPointPatchVectorField::updateCoeffs(), angularOscillatingVelocityPointPatchVectorField::updateCoeffs(), angularOscillatingDisplacementPointPatchVectorField::updateCoeffs(), alphaFixedPressureFvPatchScalarField::updateCoeffs(), MarshakRadiationFvPatchScalarField::updateCoeffs(), MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs(), SRFFreestreamVelocityFvPatchVectorField::updateCoeffs(), waveSurfacePressureFvPatchScalarField::updateCoeffs(), uniformDensityHydrostaticPressureFvPatchScalarField::updateCoeffs(), externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs(), Sine< Type >::value(), PatchFlowRateInjection< CloudType >::volumeToInject(), fvMesh::Vsc(), fvMesh::Vsc0(), wideBandDiffusiveRadiationMixedFvPatchScalarField::wideBandDiffusiveRadiationMixedFvPatchScalarField(), FacePostProcessing< CloudType >::write(), ParticleCollector< CloudType >::write(), dimensionSet::write(), and FSD< ReactionThermo, ThermoType >::~FSD().

◆ value() [2/2]

Type & value ( )

Return non-const reference to value.

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

Referenced by dimensioned< vector >::dimensioned(), and dimensioned< vector >::value().

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 291 of file dimensionedType.C.

Referenced by dimensioned< vector >::component(), and dimensioned< vector >::dimensioned().

Here is the caller graph for this function:

◆ T()

dimensionedTensor T ( ) const

Return transpose.

Definition at line 36 of file dimensionedSphericalTensor.C.

Referenced by dimensioned< vector >::dimensioned(), and dimensioned< vector >::T().

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 302 of file dimensionedType.C.

Referenced by dimensioned< vector >::dimensioned(), dimensioned< vector >::read(), dimensionSet::read(), and Foam::unitSet().

Here is the caller graph for this function:

◆ readIfPresent()

bool readIfPresent ( const dictionary dict)

◆ read() [2/4]

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

Read value from stream and units from dictionary.

Definition at line 317 of file dimensionedType.C.

◆ read() [3/4]

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

Read value from stream and units from table.

Definition at line 342 of file dimensionedType.C.

◆ read() [4/4]

Foam::Istream & read ( Istream is)

Read value from stream and units from system table.

Definition at line 370 of file dimensionedType.C.

◆ operator[]()

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.

Referenced by dimensioned< vector >::dimensioned().

Here is the caller graph for this function:

◆ operator+=()

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

Definition at line 408 of file dimensionedType.C.

Referenced by dimensioned< vector >::dimensioned().

Here is the caller graph for this function:

◆ operator-=()

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

Definition at line 419 of file dimensionedType.C.

Referenced by dimensioned< vector >::dimensioned().

Here is the caller graph for this function:

◆ operator*=()

void operator*= ( const scalar  s)

Definition at line 430 of file dimensionedType.C.

Referenced by dimensioned< vector >::dimensioned().

Here is the caller graph for this function:

◆ operator/=()

void operator/= ( const scalar  s)

Definition at line 440 of file dimensionedType.C.

Referenced by dimensioned< vector >::dimensioned().

Here is the caller 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: