34 Foam::cellAspectRatioControl::cellAspectRatioControl
36 const dictionary& motionDict
39 aspectRatioDict_(motionDict.subOrEmptyDict(
"cellAspectRatioControl")),
40 aspectRatio_(aspectRatioDict_.getOrDefault<scalar>(
"aspectRatio", 1)),
43 aspectRatioDict_.getOrDefault<
vector>
45 "aspectRatioDirection",
51 aspectRatioDirection_.normalise();
54 <<
"Cell Aspect Ratio Control" <<
nl 55 <<
" Ratio : " << aspectRatio_ <<
nl 56 <<
" Direction : " << aspectRatioDirection_
72 scalar& targetFaceArea,
73 scalar& targetCellSize
76 const scalar cosAngle =
91 alignmentDir *= 0.5*targetCellSize;
97 const vector& alignmentDir,
98 const scalar targetCellSize,
103 const scalar cosAngle =
110 *(targetCellSize/rABMag)
111 *(aspectRatio_ - 1.0);
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual ~cellAspectRatioControl()
Destructor.
void updateCellSizeAndFaceArea(vector &alignmentDir, scalar &targetFaceArea, scalar &targetCellSize) const
void updateDeltaVector(const vector &alignmentDir, const scalar targetCellSize, const scalar rABMag, vector &delta) const
messageStream Info
Information stream (stdout output on master, null elsewhere)
static constexpr const zero Zero
Global zero (0)