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