33 const dictionary& motionDict
36 aspectRatioDict_(motionDict.subOrEmptyDict(
"cellAspectRatioControl")),
37 aspectRatio_(aspectRatioDict_.lookupOrDefault<scalar>(
"aspectRatio", 1.0)),
40 aspectRatioDict_.lookupOrDefault<
vector>
42 "aspectRatioDirection",
48 aspectRatioDirection_ /=
mag(aspectRatioDirection_) + small;
51 <<
"Cell Aspect Ratio Control" <<
nl 52 <<
" Ratio : " << aspectRatio_ <<
nl 53 <<
" Direction : " << aspectRatioDirection_
69 scalar& targetFaceArea,
70 scalar& targetCellSize
73 const scalar cosAngle =
88 alignmentDir *= 0.5*targetCellSize;
94 const vector& alignmentDir,
95 const scalar targetCellSize,
100 const scalar cosAngle =
107 *(targetCellSize/rABMag)
108 *(aspectRatio_ - 1.0);
Ostream & endl(Ostream &os)
Add newline and flush stream.
Vector< scalar > vector
A scalar version of the templated Vector.
virtual ~cellAspectRatioControl()
Destructor.
void updateCellSizeAndFaceArea(vector &alignmentDir, scalar &targetFaceArea, scalar &targetCellSize) const
cellAspectRatioControl(const dictionary &motionDict)
Construct from dictionary.
void updateDeltaVector(const vector &alignmentDir, const scalar targetCellSize, const scalar rABMag, vector &delta) const
dimensioned< scalar > mag(const dimensioned< Type > &)