Go to the documentation of this file.
41 optMeshMovementBezier,
55 dx_.primitiveFieldRef() = vector::zero;
59 const label nBezier = Bezier_.nBezier();
60 const boolList& confineXmovement = Bezier_.confineXmovement();
61 const boolList& confineYmovement = Bezier_.confineYmovement();
62 const boolList& confineZmovement = Bezier_.confineZmovement();
64 for (label iCP = 0; iCP < nBezier; iCP++)
67 if (!confineXmovement[iCP])
72 if (!confineYmovement[iCP])
74 actualMovement[iCP].y() =
correction[iCP + nBezier];
77 if (!confineZmovement[iCP])
79 actualMovement[iCP].z() =
correction[iCP + 2*nBezier];
81 dx_ += Bezier_.dxidXj()[iCP] & actualMovement[iCP];
86 cumulativeChange_ += actualMovement;
87 Info<<
"Cumulative control point change " << cumulativeChange_ <<
endl;
93 Foam::optMeshMovementBezier::optMeshMovementBezier
107 mesh_.time().timeName(),
116 cumulativeChange_(Bezier_.nBezier(),
Zero)
142 const scalar maxDisplacement =
gMax(
mag(dx_.primitiveField()));
145 Info<<
"maxAllowedDisplacement/maxDisplacement \t"
146 << getMaxAllowedDisplacement() <<
"/" << maxDisplacement <<
endl;
147 const scalar eta = getMaxAllowedDisplacement()/maxDisplacement;
148 Info<<
"Setting eta value to " << eta <<
endl;
156 return Bezier_.getActiveDesignVariables();
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
autoPtr< displacementMethod > displMethodPtr_
static constexpr const zero Zero
Global zero (0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
messageStream Info
Information stream (stdout output on master, null elsewhere)
pointVectorField dx_
Boundary movement due to change of NURBS control points.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual scalar computeEta(const scalarField &correction)
Compute eta value based on max displacement.
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
virtual labelList getActiveDesignVariables() const
Return active design variables.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
scalarField correction_
Correction of design variables.
void moveMesh()
Calculates surface mesh movement.
Abstract base class for translating an update of the design variables into mesh movement.
defineTypeNameAndDebug(combustionModel, 0)
void computeBoundaryMovement(const scalarField &correction)
Type gMax(const FieldField< Field, Type > &f)
const dimensionSet dimless
Dimensionless.