45 const scalar blockFraction,
46 const scalar nDivFraction,
47 const scalar expansionRatio
50 blockFraction_(blockFraction),
60 const scalar expansionRatio
81 if (expansionRatio_ < 0)
83 expansionRatio_ = 1.0/(-expansionRatio_);
90 return gradingDescriptor
104 equal(blockFraction_, gd.blockFraction_)
105 &&
equal(nDivFraction_, gd.nDivFraction_)
106 &&
equal(expansionRatio_, gd.expansionRatio_);
125 gd.blockFraction_ = 1.0;
126 gd.nDivFraction_ = 1.0;
127 gd.expansionRatio_ = t.number();
131 is >> gd.blockFraction_ >> gd.nDivFraction_ >> gd.expansionRatio_;
132 is.readEnd(
"gradingDescriptor");
144 if (
equal(gd.blockFraction_, 1))
146 os << gd.expansionRatio_;
153 << gd.expansionRatio_
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool readEnd(const char *funcName)
End read of data chunk, ends with ')'.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Handles the specification for grading within a section of a block.
void correct()
Adjust expansion ratio.
bool operator==(const gradingDescriptor &) const
scalar nDivFraction() const
scalar blockFraction() const
scalar expansionRatio() const
bool operator!=(const gradingDescriptor &) const
gradingDescriptor()
Default construct (1, 1, 1).
gradingDescriptor inv() const
Return the inverse gradingDescriptor with 1/expansionRatio.
A token holds an item read from Istream.
bool isNumber() const noexcept
Token is (signed/unsigned) integer type, FLOAT or DOUBLE.
bool isPunctuation() const noexcept
Token is PUNCTUATION.
@ BEGIN_LIST
Begin list [isseparator].
@ END_LIST
End list [isseparator].
scalar number() const
Return label, float or double value.
OBJstream os(runTime.globalPath()/outputName)
bool equal(const T &a, const T &b)
Compare two values for equality.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
Istream & operator>>(Istream &, directionInfo &)