Go to the documentation of this file.
40 optMeshMovementBezier,
54 dx_.primitiveFieldRef() = vector::zero;
58 const label nBezier = Bezier_.nBezier();
59 const boolList& confineXmovement = Bezier_.confineXmovement();
60 const boolList& confineYmovement = Bezier_.confineYmovement();
61 const boolList& confineZmovement = Bezier_.confineZmovement();
63 for (label iCP = 0; iCP < nBezier; iCP++)
66 if (!confineXmovement[iCP])
71 if (!confineYmovement[iCP])
73 actualMovement[iCP].y() =
correction[iCP + nBezier];
76 if (!confineZmovement[iCP])
78 actualMovement[iCP].z() =
correction[iCP + 2*nBezier];
80 dx_ += Bezier_.dxidXj()[iCP] & actualMovement[iCP];
85 cumulativeChange_ += actualMovement;
86 Info<<
"Cumulative control point change " << cumulativeChange_ <<
endl;
92 Foam::optMeshMovementBezier::optMeshMovementBezier
106 mesh_.time().timeName(),
115 cumulativeChange_(Bezier_.nBezier(),
Zero)
141 const scalar maxDisplacement =
gMax(
mag(dx_.primitiveField()));
144 Info<<
"maxAllowedDisplacement/maxDisplacement \t"
145 << getMaxAllowedDisplacement() <<
"/" << maxDisplacement <<
endl;
146 const scalar eta = getMaxAllowedDisplacement()/maxDisplacement;
147 Info<<
"Setting eta value to " << eta <<
endl;
155 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_
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
static constexpr const zero Zero
Global zero (0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
messageStream Info
Information stream (uses stdout - output is on the master only)
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.
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)