53class addDimensionSetsToDebug
59 addDimensionSetsToDebug(
const addDimensionSetsToDebug&) =
delete;
60 void operator=(
const addDimensionSetsToDebug&) =
delete;
62 explicit addDimensionSetsToDebug(
const char* name)
67 virtual ~addDimensionSetsToDebug()
69 deleteDemandDrivenData(dimensionSystemsPtr_);
70 deleteDemandDrivenData(unitSetPtr_);
71 deleteDemandDrivenData(writeUnitSetPtr_);
88addDimensionSetsToDebug addDimensionSetsToDebug_(
"DimensionSets");
120 <<
"Cannot find unitSet in dictionary " <<
dict.
name()
131 <<
"Cannot find " << unitSetCoeffs <<
" in dictionary "
142 for (
const entry& dEntry : unitDict)
144 if (
"writeUnits" == dEntry.keyword())
146 dEntry.readEntry(writeUnitNames);
151 dt.
read(dEntry.stream(), unitDict);
153 bool ok =
unitSetPtr_->insert(dEntry.keyword(), dt);
157 <<
"Duplicate unit " << dEntry.keyword()
158 <<
" in DimensionSets dictionary"
164 if (writeUnitNames.
size() != 0 && writeUnitNames.
size() != 7)
167 <<
"Cannot find entry \"writeUnits\" in " << unitDict.
name()
168 <<
" or it is not a wordList of size 7"
232 units_(unitNames.size()),
233 conversion_(unitNames.size()),
234 conversionPivots_(unitNames.size()),
249 if (unitNames.
size() == 7)
254 for (label rowI = 0; rowI < conversion_.
m(); rowI++)
256 scalar* row = conversion_[rowI];
258 for (label columnI = 0; columnI < conversion_.
n(); columnI++)
264 conversionPivots_.
setSize(conversion_.
m());
A HashTable similar to std::unordered_map.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void setSize(const label n)
Alias for resize()
label n() const noexcept
The number of columns.
label m() const noexcept
The number of rows.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
Find and return a sub-dictionary pointer if present.
const fileName & name() const noexcept
The dictionary name.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Construction of unit sets.
const PtrList< dimensionedScalar > & units() const noexcept
Return the units.
void coefficients(scalarField &exponents) const
(if valid) obtain set of coefficients of unitNames
const dimensionSet & dimensions() const
Return const reference to dimensions.
bool read(const dictionary &dict)
A keyword and a list of tokens is an 'entry'.
Abstract base class for registered object with I/O. Used in debug symbol registration.
A class for handling words, derived from Foam::string.
Template functions to aid in the implementation of demand driven data.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
dictionary & switchSet(const char *subDictName, dictionary *&subDictPtr)
Internal function to lookup a sub-dictionary from controlDict.
const dimensionSet dimPressure
const dimensionSet dimViscosity
const dimensionSet dimPower
const dimensionSet dimless
Dimensionless.
const dimensionSet dimCompressibility
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimEnergy
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensionedScalar pow3(const dimensionedScalar &ds)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const dimensionSet dimCurrent(0, 0, 0, 0, 0, 1, 0)
void LUBacksubstitute(const scalarSquareMatrix &luMmatrix, const labelList &pivotIndices, List< Type > &source)
const dimensionSet dimMoles(0, 0, 0, 0, 1, 0, 0)
const dimensionSet dimArea(sqr(dimLength))
const dimensionSet dimVelocity
void LUDecompose(scalarSquareMatrix &matrix, labelList &pivotIndices)
LU decompose the matrix with pivoting.
const dimensionSet dimGasConstant
dictionary & dimensionSystems()
Top level dictionary.
dictionary * dimensionSystemsPtr_(nullptr)
const dimensionSet dimSpecificHeatCapacity(dimGasConstant)
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
const HashTable< dimensionedScalar > & unitSet()
Set of all dimensions.
const dimensionSet dimForce
const dimensionSets & writeUnitSet()
Set of units.
const dimensionSet dimDynamicViscosity
const dimensionSet dimAcceleration
const dimensionSet dimVolume(pow3(dimLength))
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
HashTable< dimensionedScalar > * unitSetPtr_(nullptr)
const dimensionSet dimDensity
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionSets * writeUnitSetPtr_(nullptr)
void deleteDemandDrivenData(DataPtr &dataPtr)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
const dimensionSet dimVol(dimVolume)
Older spelling for dimVolume.
const dimensionSet dimLuminousIntensity(0, 0, 0, 0, 0, 0, 1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.
const bool writeData(pdfDictionary.get< bool >("writeData"))