Go to the documentation of this file.
106 <<
"Cannot find unitSet in dictionary " <<
dict.
name()
115 <<
"Cannot find " << unitSetCoeffs <<
" in dictionary "
125 if (iter().keyword() !=
"writeUnits")
128 dt.
read(iter().stream(), unitDict);
129 bool ok =
unitSetPtr_->insert(iter().keyword(), dt);
133 <<
"Duplicate unit " << iter().keyword()
134 <<
" in DimensionSets dictionary"
151 if (writeUnitNames.
size() != 0 && writeUnitNames.
size() != 7)
154 <<
"Cannot find entry \"writeUnits\" in " << unitDict.
name()
155 <<
" or it is not a wordList of size 7"
173 const dimensionSet
dimless(0, 0, 0, 0, 0, 0, 0);
175 const dimensionSet
dimMass(1, 0, 0, 0, 0, 0, 0);
176 const dimensionSet
dimLength(0, 1, 0, 0, 0, 0, 0);
177 const dimensionSet
dimTime(0, 0, 1, 0, 0, 0, 0);
179 const dimensionSet
dimMoles(0, 0, 0, 0, 1, 0, 0);
180 const dimensionSet
dimCurrent(0, 0, 0, 0, 0, 1, 0);
215 units_(unitNames.
size()),
216 conversion_(unitNames.
size()),
217 conversionPivots_(unitNames.
size()),
232 if (unitNames.
size() == 7)
237 for (
label rowI = 0; rowI < conversion_.n(); rowI++)
239 scalar*
row = conversion_[rowI];
241 for (
label columnI = 0; columnI < conversion_.m(); columnI++)
247 conversionPivots_.setSize(conversion_.n());
const dimensionSet dimPressure
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
const dimensionSet dimGasConstant
addDimensionSetsToDebug addDimensionSetsToDebug_("DimensionSets")
A class for handling words, derived from string.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
#define forAll(list, i)
Loop across all elements in list.
const dimensionSet dimVelocity
const dimensionSet dimEnergy
const fileName & name() const
Return the dictionary name.
const dimensionSet dimDensity
Template functions to aid in the implementation of demand driven data.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
const dimensionSet dimMoles(0, 0, 0, 0, 1, 0, 0)
const HashTable< dimensionedScalar > & unitSet()
Set of all dimensions.
const dimensionSet dimForce
virtual void readData(Foam::Istream &is)
Read.
HashTable< dimensionedScalar > * unitSetPtr_(NULL)
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const dimensionSet dimCompressibility
void deleteDemandDrivenData(DataPtr &dataPtr)
const dimensionSet dimCurrent(0, 0, 0, 0, 0, 1, 0)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const dimensionSet dimArea(sqr(dimLength))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dictionary * dimensionSystemsPtr_(NULL)
Since dimensionSystems() can be reread we actually store a copy of.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Pre-declare SubField and related Field type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
dimensionedScalar pow3(const dimensionedScalar &ds)
const dimensionSets & writeUnitSet()
Set of units.
dictionary & dimensionSystems()
Top level dictionary.
addDimensionSetsToDebug(const char *name)
const dimensionSet dimSpecificHeatCapacity(dimGasConstant)
void read(const dictionary &)
Update the value of dimensioned<Type>
const dimensionSet dimPower
const dimensionSet dimViscosity
A list of keyword definitions, which are a keyword followed by any number of values (e....
const dimensionSet dimDynamicViscosity
Generic dimensioned Type class.
labelList conversionPivots_
See above.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
dimensionSets(const HashTable< dimensionedScalar > &, const wordList &unitNames)
Construct from all units and set of units to use for inversion.
void LUBacksubstitute(const scalarSquareMatrix &luMmatrix, const labelList &pivotIndices, List< Type > &source)
LU back-substitution with given source, returning the solution.
scalarSquareMatrix conversion_
LU decomposition of dimensions.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void LUDecompose(scalarSquareMatrix &matrix, labelList &pivotIndices)
LU decompose the matrix with pivoting.
const dimensionSet dimAcceleration
An STL-conforming hash table.
virtual void writeData(Foam::Ostream &os) const
Write.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void coefficients(scalarField &) const
(if valid) obtain set of coefficients of unitNames
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
const dimensionSet dimLuminousIntensity(0, 0, 0, 0, 0, 0, 1)
dimensionSets * writeUnitSetPtr_(NULL)
const dimensionSet dimVol(dimVolume)
void addDimensionSetObject(const char *name, simpleRegIOobject *obj)
Register DimensionSets read/write object.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const dimensionSet & dimensions() const
Return const reference to dimensions.
const dimensionSet dimVolume(pow3(dimLength))
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Abstract base class for registered object with I/O. Used in debug symbol registration.
dictionary & switchSet(const char *subDictName, dictionary *&subDictPtr)
Internal function to lookup a sub-dictionary from controlDict.
virtual ~addDimensionSetsToDebug()
word name(const complex &)
Return a string representation of a complex.