ENH: dimensionSet::clear() - reset exponents to be dimensionless

This commit is contained in:
Mark Olesen
2019-11-04 16:37:57 +01:00
committed by Andrew Heather
parent 96d260713e
commit ee7bb0459b
2 changed files with 9 additions and 0 deletions

View File

@ -137,6 +137,12 @@ Foam::FixedList<Foam::scalar,7>& Foam::dimensionSet::values()
} }
void Foam::dimensionSet::clear()
{
exponents_ = Zero;
}
void Foam::dimensionSet::reset(const dimensionSet& ds) void Foam::dimensionSet::reset(const dimensionSet& ds)
{ {
exponents_ = ds.exponents_; exponents_ = ds.exponents_;

View File

@ -217,6 +217,9 @@ public:
//- Return non-const access to the exponents as a list //- Return non-const access to the exponents as a list
FixedList<scalar,7>& values(); FixedList<scalar,7>& values();
//- Reset exponents to be dimensionless
void clear();
//- Copy assign the exponents from the dimensionSet //- Copy assign the exponents from the dimensionSet
void reset(const dimensionSet& ds); void reset(const dimensionSet& ds);