FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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 >:
Collaboration 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 word &  name () const
 Return const reference to name.
word &  name ()
 Return non-const reference to name.
const dimensionSet &  dimensions () const
 Return const reference to dimensions.
dimensionSet &  dimensions ()
 Return non-const reference to dimensions.
const Type &  value () const
 Return const reference to value.
Type &  value ()
 Return non-const reference to value.
dimensioned< cmptType >  component (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< cmptType >  operator[] (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

Istream &  operator>> (Istream &, dimensioned< Type > &)
Ostream &  operator (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(), stochasticDispersionRAS::disperseParcels(), gradientDispersionRAS::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(), SLTSDdtScheme< Type >::fvcDdt(), localEulerDdtScheme< Type >::fvcDdt(), EulerDdtScheme< Type >::fvcDdt(), CrankNicholsonDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), boundedBackwardDdtScheme::fvcDdt(), backwardDdtScheme< Type >::fvcDdt(), EulerD2dt2Scheme< Type >::fvmD2dt2(), SLTSDdtScheme< Type >::fvmDdt(), localEulerDdtScheme< Type >::fvmDdt(), EulerDdtScheme< Type >::fvmDdt(), CrankNicholsonDdtScheme< Type >::fvmDdt(), CoEulerDdtScheme< Type >::fvmDdt(), boundedBackwardDdtScheme::fvmDdt(), backwardDdtScheme< Type >::fvmDdt(), GeometricField< Type, PatchField, GeoMesh >::GeometricField(), greyDiffusiveRadiationMixedFvPatchScalarField::greyDiffusiveRadiationMixedFvPatchScalarField(), spray::heatTransferSource(), Foam::hypot(), ignitionSite::ignited(), ignitionSite::igniting(), spray::inject(), Foam::inv(), Foam::MULES::limiter(), Foam::mag(), Foam::magSqr(), MarshakRadiationFixedTMixedFvPatchScalarField::MarshakRadiationFixedTMixedFvPatchScalarField(), MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField(), GeometricField< Type, PatchField, GeoMesh >::max(), Foam::max(), GeometricField< Type, PatchField, GeoMesh >::min(), Foam::min(), veryInhomogeneousMixture< ThermoType >::mixture(), inhomogeneousMixture< ThermoType >::mixture(), egrMixture< ThermoType >::mixture(), dieselMixture< ThermoType >::mixture(), spray::momentumSource(), solidParticleCloud::move(), solidParticle::move(), molecule::move(), parcel::move(), layeredEngineMesh::move(), fvMotionSolverEngineMesh::move(), trackedParticle::move(), movingConeTopoFvMesh::movingConeTopoFvMesh(), Foam::neg(), Foam::operator*(), Foam::operator+(), Time::operator+=(), Foam::operator-(), Foam::operator/(), Foam::operator<(), Foam::operator<<(), GeometricField< Type, PatchField, GeoMesh >::operator=(), DimensionedField< Type, 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(), LRR::read(), LaunderGibsonRSTM::read(), GenSGSStress::read(), Time::readDict(), GeometricField< Type, PatchField, GeoMesh >::replace(), Time::setDeltaT(), Time::setEndTime(), Time::setTime(), Foam::sign(), Foam::skew(), Foam::fvm::Sp(), Foam::resError::Sp(), Foam::sqr(), Foam::sqrt(), Foam::stabilise(), Foam::symm(), dimensioned< Type >::T(), Foam::tr(), Foam::transform(), Foam::twoSymm(), alphaFixedPressureFvPatchScalarField::updateCoeffs(), MarshakRadiationFixedTMixedFvPatchScalarField::updateCoeffs(), MarshakRadiationFvPatchScalarField::updateCoeffs(), uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs(), surfaceDisplacementPointPatchVectorField::updateCoeffs(), oscillatingVelocityPointPatchVectorField::updateCoeffs(), oscillatingDisplacementPointPatchVectorField::updateCoeffs(), angularOscillatingVelocityPointPatchVectorField::updateCoeffs(), angularOscillatingDisplacementPointPatchVectorField::updateCoeffs(), uniformDensityHydrostaticPressureFvPatchScalarField::updateCoeffs(), movingWallVelocityFvPatchVectorField::updateCoeffs(), buoyantPressureFvPatchScalarField::updateCoeffs(), SRFFreestreamVelocityFvPatchVectorField::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>

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: