41 optMeshMovementBezier,
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];
93 Foam::optMeshMovementBezier::optMeshMovementBezier
116 cumulativeChange_(Bezier_.nBezier(),
Zero)
125 computeBoundaryMovement(correction_);
128 displMethodPtr_->setMotionField(dx_);
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();
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix by subtracting the matrix multiplied by the current fi...
const labelList patchIDs(pbm.patchSet(polyPatchNames, false, true).sortedToc())
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Abstract base class for translating an update of the design variables into mesh movement.
pointVectorField dx_
Boundary movement due to change of NURBS control points.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
const boolList & confineXmovement() const
Confine x movement.
const dimensionSet dimless
Dimensionless.
virtual scalar computeEta(const scalarField &correction)
Compute eta value based on max displacement.
Macros for easy insertion into run-time selection tables.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Mesh representing a set of points created from polyMesh.
vectorField cumulativeChange_
Cumulative change of control points.
virtual labelList getActiveDesignVariables() const
Return active design variables.
label nBezier() const
Number of Bezier control points.
void moveMesh()
Calculates surface mesh movement.
Type gMax(const FieldField< Field, Type > &f)
defineTypeNameAndDebug(combustionModel, 0)
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
const boolList & confineYmovement() const
Confine y movement.
Bezier Bezier_
Parameterization based on NURBS curves.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
Mesh data needed to do the Finite Volume discretisation.
void computeBoundaryMovement(const scalarField &correction)
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual void moveMesh()
Calculates mesh movemnt based on the correction of the design variables.
Defines the attributes of an object for which implicit objectRegistry management is supported...
const boolList & confineZmovement() const
Confine z movement.
PtrList< pointTensorField > & dxidXj()
dx/db tensor for all control points
static constexpr const zero Zero
Global zero (0)