FreeFOAM The Cross-Platform CFD Toolkit
dimensioned< Type > Class Template Reference

Generic dimensioned Type class. More...

#include <OpenFOAM/dimensionedType.H>


Detailed Description

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

Generic dimensioned Type class.

Source files

Definition at line 65 of file dimensionedType.H.

+ Inheritance diagram for dimensioned< Type >:

List of all members.

Public Types

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

Public Member Functions

 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.
 dimensioned (const Type &t)
 Construct given a value (creates dimensionless value).
 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.
const wordname () const
 Return const reference to name.
wordname ()
 Return non-const reference to name.
const dimensionSetdimensions () const
 Return const reference to dimensions.
dimensionSetdimensions ()
 Return non-const reference to dimensions.
const Type & value () const
 Return const reference to value.
Type & value ()
 Return non-const reference to value.
dimensioned< cmptTypecomponent (const direction) const
 Return a component as a dimensioned<cmptType>
void replace (const direction, const dimensioned< cmptType > &)
 Return a component with a dimensioned<cmptType>
dimensioned< Type > T () const
 Return transpose.
bool readIfPresent (const dictionary &)
 Update the value of dimensioned<Type> if found in the dictionary.
dimensioned< cmptTypeoperator[] (const direction) const
 Return a component as a dimensioned<cmptType>
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 Type &defaultValue=pTraits< Type >::zero, const dimensionSet &dims=dimless)
 Construct from dictionary, with default value.
static dimensioned< Type > lookupOrAddToDict (const word &, dictionary &, const Type &defaultValue=pTraits< Type >::zero, const dimensionSet &dims=dimless)
 Construct from dictionary, with default value.

Friends

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

Member Typedef Documentation

typedef pTraits<Type>::cmptType cmptType

Component type.

Definition at line 82 of file dimensionedType.H.


Constructor & Destructor Documentation

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

Construct given a name, a value and its dimensionSet.

Definition at line 69 of file dimensionedType.C.

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

Construct from a dimensioned<Type> changing the name.

Definition at line 83 of file dimensionedType.C.

dimensioned ( const Type &  t)
inline

Construct given a value (creates dimensionless value).

Definition at line 94 of file dimensionedType.H.

dimensioned ( Istream is)

Construct from Istream.

Definition at line 96 of file dimensionedType.C.

dimensioned ( const word name,
Istream is 
)

Construct from an Istream with a given name.

Definition at line 108 of file dimensionedType.C.

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

Construct from an Istream with a given name and dimensions.

Definition at line 121 of file dimensionedType.C.


Member Function Documentation

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

Construct from dictionary, with default value.

Definition at line 39 of file dimensionedType.C.

References dictionary::lookupOrDefault(), and Foam::name().

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

Construct from dictionary, with default value.

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

Definition at line 53 of file dimensionedType.C.

References dictionary::lookupOrAddDefault(), and Foam::name().

word & name ( )

Return non-const reference to name.

Definition at line 142 of file dimensionedType.C.

const dimensionSet & dimensions ( ) const
dimensionSet & dimensions ( )

Return non-const reference to dimensions.

Definition at line 155 of file dimensionedType.C.

const Type & value ( ) const

Return const reference to value.

Definition at line 162 of file dimensionedType.C.

Referenced by Time::adjustDeltaT(), spray::atomizationLoop(), LISA::atomizeParcel(), blobsSwirlInjector::blobsSwirlInjector(), Foam::bound(), spray::breakupLoop(), ThermoParcel< ParcelType >::calcHeatTransfer(), fieldMinMax::calcMinMaxFields(), spray::calculateAmbientPressure(), spray::calculateAmbientTemperature(), fieldAverage::calculateMeanFields(), fieldAverage::calculatePrime2MeanFields(), Foam::cbrt(), ChomiakInjector::ChomiakInjector(), Foam::cof(), constInjector::constInjector(), LienLeschzinerLowRe::correct(), LRR::correct(), LaunderGibsonRSTM::correct(), definedHollowConeInjector::definedHollowConeInjector(), definedPressureSwirlInjector::definedPressureSwirlInjector(), Foam::det(), Foam::dev(), Foam::dev2(), gradientDispersionRAS::disperseParcels(), stochasticDispersionRAS::disperseParcels(), LRR::divDevReff(), LaunderGibsonRSTM::divDevReff(), blackBodyEmission::EbDeltaLambdaT(), Foam::eigenValues(), Foam::eigenVectors(), engineMesh::engineMesh(), ThermoCloud< ParcelType >::Ep(), evaluateError::evaluateError(), spray::evaporationSource(), spray::evolve(), Foam::MULES::explicitSolve(), basicMultiComponentMixture::fres(), EulerD2dt2Scheme< Type >::fvcD2dt2(), EulerDdtScheme< Type >::fvcDdt(), backwardDdtScheme< Type >::fvcDdt(), localEulerDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), boundedBackwardDdtScheme::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), CrankNicholsonDdtScheme< Type >::fvcDdt(), EulerD2dt2Scheme< Type >::fvmD2dt2(), EulerDdtScheme< Type >::fvmDdt(), backwardDdtScheme< Type >::fvmDdt(), localEulerDdtScheme< Type >::fvmDdt(), boundedBackwardDdtScheme::fvmDdt(), CoEulerDdtScheme< Type >::fvmDdt(), SLTSDdtScheme< Type >::fvmDdt(), CrankNicholsonDdtScheme< Type >::fvmDdt(), GeometricField< Type, PatchField, GeoMesh >::GeometricField(), greyDiffusiveRadiationMixedFvPatchScalarField::greyDiffusiveRadiationMixedFvPatchScalarField(), spray::heatTransferSource(), Foam::hypot(), if(), ignitionSite::ignited(), ignitionSite::igniting(), spray::inject(), Foam::inv(), Foam::MULES::limiter(), Foam::mag(), Foam::magSqr(), MarshakRadiationFixedTMixedFvPatchScalarField::MarshakRadiationFixedTMixedFvPatchScalarField(), MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField(), Foam::max(), GeometricField< Type, PatchField, GeoMesh >::max(), Foam::min(), GeometricField< Type, PatchField, GeoMesh >::min(), spray::momentumSource(), layeredEngineMesh::move(), fvMotionSolverEngineMesh::move(), solidParticleCloud::move(), trackedParticle::move(), solidParticle::move(), molecule::move(), parcel::move(), movingConeTopoFvMesh::movingConeTopoFvMesh(), Foam::neg(), Foam::operator*(), Foam::operator+(), Time::operator+=(), Foam::operator-(), Foam::operator/(), Foam::operator<(), Foam::operator<<(), DimensionedField< Type, GeoMesh >::operator=(), GeometricField< Type, PatchField, GeoMesh >::operator=(), GeometricField< Type, PatchField, GeoMesh >::operator==(), Foam::operator>(), porousZone::porousZone(), Foam::pos(), Foam::pow(), Foam::pow3(), Foam::pow4(), Foam::pow5(), Foam::pow6(), pressureSwirlInjector::pressureSwirlInjector(), GenSGSStress::read(), LRR::read(), LaunderGibsonRSTM::read(), Time::readDict(), GeometricField< Type, PatchField, GeoMesh >::replace(), Time::setDeltaT(), Time::setEndTime(), Time::setTime(), Foam::sign(), Foam::skew(), Foam::resError::Sp(), Foam::fvm::Sp(), Foam::sqr(), Foam::sqrt(), Foam::stabilise(), Foam::symm(), dimensioned< Type >::T(), Foam::tr(), Foam::transform(), Foam::twoSymm(), movingWallVelocityFvPatchVectorField::updateCoeffs(), oscillatingDisplacementPointPatchVectorField::updateCoeffs(), buoyantPressureFvPatchScalarField::updateCoeffs(), SRFFreestreamVelocityFvPatchVectorField::updateCoeffs(), oscillatingVelocityPointPatchVectorField::updateCoeffs(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), angularOscillatingVelocityPointPatchVectorField::updateCoeffs(), angularOscillatingDisplacementPointPatchVectorField::updateCoeffs(), alphaFixedPressureFvPatchScalarField::updateCoeffs(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), MarshakRadiationFvPatchScalarField::updateCoeffs(), MarshakRadiationFixedTMixedFvPatchScalarField::updateCoeffs(), uniformDensityHydrostaticPressureFvPatchScalarField::updateCoeffs(), surfaceDisplacementPointPatchVectorField::updateCoeffs(), fvMesh::Vsc(), fvMesh::Vsc0(), and wideBandDiffusiveRadiationMixedFvPatchScalarField::wideBandDiffusiveRadiationMixedFvPatchScalarField().

Type & value ( )

Return non-const reference to value.

Definition at line 168 of file dimensionedType.C.

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

Return a component as a dimensioned<cmptType>

Definition at line 176 of file dimensionedType.C.

References Foam::name().

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

Return a component with a dimensioned<cmptType>

Definition at line 191 of file dimensionedType.C.

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

Return a component as a dimensioned<cmptType>

Definition at line 212 of file dimensionedType.C.

References Foam::component().

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

Definition at line 222 of file dimensionedType.C.

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

Definition at line 233 of file dimensionedType.C.

void operator*= ( const scalar  s)

Definition at line 244 of file dimensionedType.C.

void operator/= ( const scalar  s)

Definition at line 254 of file dimensionedType.C.


Friends And Related Function Documentation

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

Definition at line 360 of file dimensionedType.C.

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

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