67 scalar sumBlockFraction = 0;
68 scalar sumNDivFraction = 0;
70 for (
const gradingDescriptor& gd : *
this)
72 sumBlockFraction += gd.blockFraction_;
73 sumNDivFraction += gd.nDivFraction_;
76 for (gradingDescriptor& gd : *
this)
78 gd.blockFraction_ /= sumBlockFraction;
79 gd.nDivFraction_ /= sumNDivFraction;
87 gradingDescriptors ret(*
this);
91 ret[i] = operator[](ret.size() - i - 1).
inv();
107 gds = gradingDescriptors(gradingDescriptor(t.number()));
115 is >>
static_cast<List<gradingDescriptor>&
>(gds);
void correct()
Adjust expansion ratio.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
gradingDescriptors inv() const
Return the inverse gradingDescriptors with 1/expansionRatio.
void correct()
Adjust expansion ratios.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
gradingDescriptors()
Default construct with a single default gradingDescriptor.
#define forAll(list, i)
Loop across all elements in list.
Istream & operator>>(Istream &, directionInfo &)
Handles the specification for grading within a section of a block.
void normalise()
Normalize blockFractions and nDivFractions for the list of gradingDescriptors, and call correct() ...
List of gradingDescriptor for the sections of a block with additional IO functionality.