39 #ifndef morphingBoxConstraint_H 40 #define morphingBoxConstraint_H 51 class volumetricBSplinesDesignVariables;
210 const word& adjointSolverName
217 const scalar maxInitChange
virtual labelList computeActiveDesignVariables(const labelList &activeCPCoors)=0
Compute the active design variables based on the IDs of the active control point coordinates.
virtual scalar computeEta(scalarField &correction, const scalar maxInitChange)
Compute eta if not set in the first step.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix by subtracting the matrix multiplied by the current fi...
A class for handling file names.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const fvMesh & mesh_
Mesh reference.
declareRunTimeSelectionTable(autoPtr, morphingBoxConstraint, dictionary,(const fvMesh &mesh, const dictionary &dict, volumetricBSplinesDesignVariables &designVariables),(mesh, dict, designVariables))
fileName derivativesFolder_
Folder holding the twist sensitivities.
bool initialiseVars() const
Initialise the design variables?
virtual void computeBounds(autoPtr< scalarField > &lowerBounds, autoPtr< scalarField > &upperBounds)
Transform bounds from control points to design variables.
virtual bool writeData(Ostream &os) const
Append useful information to the design variables IOdictionary.
virtual tmp< scalarField > designVariablesToControlPoints(const scalarField &designVariables)=0
Convert design variables to control points, stored in a scalarField.
virtual ~morphingBoxConstraint()=default
Destructor.
volBSplinesBase & volBSplinesBase_
Easy access to the volBSplinesBase resting in the designVariables_.
virtual tmp< scalarField > postProcessSens(const scalarField &controlPointSens, const word &adjointSolverName)
Chain rule from control points to design variables.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
static autoPtr< morphingBoxConstraint > New(const fvMesh &mesh, const dictionary &dict, volumetricBSplinesDesignVariables &designVariables)
Construct and return the selected morphingBoxConstraint.
A class for handling words, derived from Foam::string.
Volumetric B-Splines design variables for shape optimisation.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
TypeName("morphingBoxConstraint")
Runtime type information.
virtual tmp< scalarField > correctionCPs(const scalarField &correction)=0
Convert the correction of the design variables to the correction of the control points.
virtual void computeDVsSensitivities(scalarField &dvSens, const scalarField &cpSens)=0
Compute sensitivities wrt the design variables (chain rule)
volumetricBSplinesDesignVariables & designVariables_
Reference to underlaying volumetric B-Splines morpher.
Abstract base class for defining constraints for the control points of volumetric B-Splines morphing ...
Abstract base class for defining design variables.
scalarField initialCPs_
Initial CPs stored in scalarField.
Mesh data needed to do the Finite Volume discretisation.
const dictionary dict_
Volumetric B-Splines variables dict.
virtual void updateBounds(autoPtr< scalarField > &lowerBounds, autoPtr< scalarField > &upperBounds)
Update the bounds of the design variables.
virtual void writeDVSensitivities(const scalarField &sens, const word &name)
Write sensitivities w.r.t. the design variables.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Macros to ease declaration of run-time selection tables.
virtual tmp< scalarField > controlPointsToDesignVariables(const scalarField &cps)=0
Return the design variables corresponding to the given control points.
A class for managing temporary objects.
bool initialiseVars_
Initialise the design variables.
Class constructing a number of volumetric B-Splines boxes, read from dynamicMeshDict. Useful for various sensitivities and optMeshMovement classes.