40 optMeshMovementVolumetricBSplinesExternalMotionSolver,
46 optMeshMovementVolumetricBSplinesExternalMotionSolver,
64 for (label iCP = 0; iCP < nCPs; iCP++)
79 const label nb = boxes[iNURB].getControlPoints().size();
80 for (label cpI = 0; cpI < nb; ++cpI)
82 const label globalCP = passedCPs + cpI;
88 boxes[iNURB].patchDxDb(patchI, cpI)
107 Foam::optMeshMovementVolumetricBSplinesExternalMotionSolver::
108 optMeshMovementVolumetricBSplinesExternalMotionSolver
134 cpMovement_(volBSplinesBase_.getTotalControlPointsNumber(),
Zero)
143 computeBoundaryMovement(correction_);
146 displMethodPtr_->setMotionField(dx_);
151 volBSplinesBase_.moveControlPoints(cpMovement_);
154 volBSplinesBase_.writeControlPoints();
170 scalar maxDisplacement =
gMax(
mag(dx_.primitiveField()));
173 Info<<
"maxAllowedDisplacement/maxDisplacement \t" 174 << getMaxAllowedDisplacement() <<
"/" << maxDisplacement <<
endl;
175 scalar eta = getMaxAllowedDisplacement() / maxDisplacement;
186 return volBSplinesBase_.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...
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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
Dimensionless.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
void computeBoundaryMovement(const scalarField &correction)
Macros for easy insertion into run-time selection tables.
virtual labelList getActiveDesignVariables() const
Return active design variables.
Mesh representing a set of points created from polyMesh.
#define forAll(list, i)
Loop across all elements in list.
volBSplinesBase & volBSplinesBase_
Reference to underlaying volumetric B-Splines morpher.
pointVectorField dx_
Boundary movement due to change of NURBS control points.
void boundControlPointMovement(vectorField &controlPointsMovement) const
Bound control points movement.
Type gMax(const FieldField< Field, Type > &f)
defineTypeNameAndDebug(combustionModel, 0)
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
void moveMesh()
Calculates surface mesh movement.
label getTotalControlPointsNumber() const
Get cumulative number of control points from all boxes.
PtrList< NURBS3DVolume > & boxesRef()
Get non-const reference to the vol. B-splines boxes.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
Mesh data needed to do the Finite Volume discretisation.
vectorField cpMovement_
Movement of control points.
virtual scalar computeEta(const scalarField &correction)
Compute eta value based on max displacement.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
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...
labelList patchIDs_
IDs of patches to be moved.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
Class constructing a number of volumetric B-Splines boxes, read from dynamicMeshDict. Useful for various sensitivities and optMeshMovement classes.
static constexpr const zero Zero
Global zero (0)