38 #ifndef volumetricBSplinesDesignVariables_H 39 #define volumetricBSplinesDesignVariables_H 112 const word& boundsName,
dimensionedScalar sign(const dimensionedScalar &ds)
void readBounds(autoPtr< scalar > lowerBoundPtr=nullptr, autoPtr< scalar > upperBoundPtr=nullptr)
Read bounds for design variables, if present.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix by subtracting the matrix multiplied by the current fi...
autoPtr< morphingBoxConstraint > constraint_
Constraint imposed on the movement of the design variables.
virtual bool globalSum() const
Whether to use global sum when computing matrix-vector products in update methods.
virtual void evolveNumber()
For design variables with a dynamic character (i.e. changing.
bool updateBounds_
Should the bounds of the non-overlapping control points be updated in each optimisation cycle...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Abstract base class for adjoint-based sensitivities.
virtual scalar computeEta(scalarField &correction)
Compute eta if not set in the first step.
volBSplinesBase & volBSplinesBase_
Reference to underlaying volumetric B-Splines morpher.
void designVariablesToControlPoints()
Set control points based on current design variables values.
TypeName("volumetricBSplines")
Runtime type information.
virtual tmp< scalarField > assembleSensitivities(adjointSensitivity &adjointSens)
Assemble the sensitivity derivatives, by also applying possible constraints.
localIOdictionary is derived from IOdictionary but excludes parallel master reading.
virtual void update(scalarField &correction)
Update design variables based on a given correction.
void writeBounds(const scalarField &bounds, const word &name) const
Write current bounds to file.
virtual tmp< volVectorField > dCdb(const label varID) const
Get dCdb for given design variable.
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
void controlPointsToDesignVariables()
Set the design variables based on the current control points.
const word & name() const
Name function is needed to disambiguate those inherited from regIOobject and dictionary.
Volumetric B-Splines design variables for shape optimisation.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool nonOverlappingCPs() const
Are control points non-overlapping.
void setActiveDesignVariables()
Set IDs of active design variables.
OBJstream os(runTime.globalPath()/outputName)
virtual tmp< vectorField > dxdbFace(const label patchI, const label varID) const
Get dxdb for given design variable and patch.
tmp< vectorField > controlPointMovement(const scalarField &correction)
Transform correction of design variables to control points movement.
virtual tmp< vectorField > dSdb(const label patchI, const label varID) const
Get dSdb for given design variable and patch.
virtual ~volumetricBSplinesDesignVariables()=default
Destructor.
void setDisplacement(const vectorField &cpMovement)
Set the field driving the displacement method.
Abstract base class for defining design variables for shape optimisation.
Mesh data needed to do the Finite Volume discretisation.
virtual label sensSize() const
Size of the active control points.
virtual void resetDesignVariables()
Reset to starting point of line search.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
virtual tmp< vectorField > dxdbVol(const label varID) const
Get dxdb for all mesh points.
A class for managing temporary objects.
virtual bool writeData(Ostream &os) const
Write fields to support continuation.
virtual const labelList & activeSensitivities() const
Components of the active control points.
const volBSplinesBase & getVolBSplinesBase() const
Constant access to the volBSplinesBase object.
virtual tmp< vectorField > dndb(const label patchI, const label varID) const
Get dndb for given design variable and patch.
bool nonOverlappingCPs_
Should the control points be non-overlapping.
bool updateBounds() const
Are bounds to be updated after each optmisation cycle.
Class constructing a number of volumetric B-Splines boxes, read from dynamicMeshDict. Useful for various sensitivities and optMeshMovement classes.