Loading...
Searching...
No Matches
noConstraint Class Reference

Applies no constraints to the control points. Enforces the non-overlapping bounds, if present. More...

#include <noConstraint.H>

Inheritance diagram for noConstraint:
Collaboration diagram for noConstraint:

Public Member Functions

 TypeName ("none")
 Runtime type information.
 noConstraint (const fvMesh &mesh, const dictionary &dict, volumetricBSplinesDesignVariables &designVariables)
 Construct from components.
virtual ~noConstraint ()=default
 Destructor.
virtual labelList computeActiveDesignVariables (const labelList &activeCPCoors)
 Compute the active design variables based on the IDs of the active control point coordinates.
virtual void computeBounds (autoPtr< scalarField > &lowerBounds, autoPtr< scalarField > &upperBounds)
 Transform bounds from control points to design variables.
virtual void updateBounds (autoPtr< scalarField > &lowerBounds, autoPtr< scalarField > &upperBounds)
 Update the bounds of the design variables.
virtual tmp< scalarFielddesignVariablesToControlPoints (const scalarField &designVariables)
 Convert design variables to control points, stored in a scalarField.
virtual tmp< scalarFieldcontrolPointsToDesignVariables (const scalarField &cps)
 Return the design variables corresponding to the given control points.
virtual tmp< scalarFieldcorrectionCPs (const scalarField &correctionDVs)
 Convert the correction of the design variables to the correction of the control points.
Public Member Functions inherited from morphingBoxConstraint
 TypeName ("morphingBoxConstraint")
 Runtime type information.
 declareRunTimeSelectionTable (autoPtr, morphingBoxConstraint, dictionary,(const fvMesh &mesh, const dictionary &dict, volumetricBSplinesDesignVariables &designVariables),(mesh, dict, designVariables))
 morphingBoxConstraint (const fvMesh &mesh, const dictionary &dict, volumetricBSplinesDesignVariables &designVariables)
 Construct from components.
virtual ~morphingBoxConstraint ()=default
 Destructor.
virtual tmp< scalarFieldpostProcessSens (const scalarField &controlPointSens, const word &adjointSolverName)
 Chain rule from control points to design variables.
virtual scalar computeEta (scalarField &correction, const scalar maxInitChange)
 Compute eta if not set in the first step.
bool initialiseVars () const
 Initialise the design variables?
virtual bool writeData (Ostream &os) const
 Append useful information to the design variables IOdictionary.

Protected Member Functions

virtual void computeDVsSensitivities (scalarField &dvSens, const scalarField &cpSens)
 Compute sensitivities wrt the design variables (chain rule).
void updateInternalBounds (autoPtr< scalarField > &lowerBounds, autoPtr< scalarField > &upperBounds, const NURBS3DVolume &boxI, const label passed)
 Update the bounds of the internal control points.
void updateBoundaryBounds (autoPtr< scalarField > &lowerBounds, autoPtr< scalarField > &upperBounds, const NURBS3DVolume &boxI, const label passed)
 Update the bounds of the boundary control points.
Protected Member Functions inherited from morphingBoxConstraint
virtual void writeDVSensitivities (const scalarField &sens, const word &name)
 Write sensitivities w.r.t. the design variables.

Additional Inherited Members

Static Public Member Functions inherited from morphingBoxConstraint
static autoPtr< morphingBoxConstraint > New (const fvMesh &mesh, const dictionary &dict, volumetricBSplinesDesignVariables &designVariables)
 Construct and return the selected morphingBoxConstraint.
Protected Attributes inherited from morphingBoxConstraint
const fvMeshmesh_
 Mesh reference.
const dictionary dict_
 Volumetric B-Splines variables dict.
volumetricBSplinesDesignVariablesdesignVariables_
 Reference to underlaying volumetric B-Splines morpher.
volBSplinesBasevolBSplinesBase_
 Easy access to the volBSplinesBase resting in the designVariables_.
scalarField initialCPs_
 Initial CPs stored in scalarField.
bool initialiseVars_
 Initialise the design variables.
fileName derivativesFolder_
 Folder holding the twist sensitivities.

Detailed Description

Applies no constraints to the control points. Enforces the non-overlapping bounds, if present.

Source files

Definition at line 48 of file noConstraint.H.

Constructor & Destructor Documentation

◆ noConstraint()

noConstraint ( const fvMesh & mesh,
const dictionary & dict,
volumetricBSplinesDesignVariables & designVariables )

Construct from components.

Definition at line 189 of file noConstraint.C.

References morphingBoxConstraint::designVariables_, dict, mesh, and morphingBoxConstraint::volBSplinesBase_.

◆ ~noConstraint()

virtual ~noConstraint ( )
virtualdefault

Destructor.

Member Function Documentation

◆ computeDVsSensitivities()

void computeDVsSensitivities ( scalarField & dvSens,
const scalarField & cpSens )
protectedvirtual

Compute sensitivities wrt the design variables (chain rule).

Implements morphingBoxConstraint.

Definition at line 42 of file noConstraint.C.

◆ updateInternalBounds()

void updateInternalBounds ( autoPtr< scalarField > & lowerBounds,
autoPtr< scalarField > & upperBounds,
const NURBS3DVolume & boxI,
const label passed )
protected

Update the bounds of the internal control points.

Definition at line 52 of file noConstraint.C.

References Foam::component(), Field< Type >::component(), NURBS3DVolume::getControlPoints(), NURBS3DVolume::getCPID(), k, and NURBS3DVolume::nCPsPerDirection().

Referenced by updateBounds().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateBoundaryBounds()

void updateBoundaryBounds ( autoPtr< scalarField > & lowerBounds,
autoPtr< scalarField > & upperBounds,
const NURBS3DVolume & boxI,
const label passed )
protected

Update the bounds of the boundary control points.

Definition at line 98 of file noConstraint.C.

References Foam::component(), Field< Type >::component(), NURBS3DVolume::getControlPoints(), NURBS3DVolume::getCPID(), k, NURBS3DVolume::nCPsPerDirection(), and Foam::Zero.

Referenced by updateBounds().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TypeName()

TypeName ( "none" )

Runtime type information.

References dict, and mesh.

◆ computeActiveDesignVariables()

Foam::labelList computeActiveDesignVariables ( const labelList & activeCPCoors)
virtual

Compute the active design variables based on the IDs of the active control point coordinates.

Implements morphingBoxConstraint.

Definition at line 243 of file noConstraint.C.

◆ computeBounds()

void computeBounds ( autoPtr< scalarField > & lowerBounds,
autoPtr< scalarField > & upperBounds )
virtual

Transform bounds from control points to design variables.

Does nothing in this case

Reimplemented from morphingBoxConstraint.

Definition at line 204 of file noConstraint.C.

◆ updateBounds()

void updateBounds ( autoPtr< scalarField > & lowerBounds,
autoPtr< scalarField > & upperBounds )
virtual

Update the bounds of the design variables.

Will update the bound values if nonOverlappingCPs is active

Reimplemented from morphingBoxConstraint.

Definition at line 214 of file noConstraint.C.

References DebugInfo, morphingBoxConstraint::designVariables_, Foam::endl(), updateBoundaryBounds(), updateInternalBounds(), and morphingBoxConstraint::volBSplinesBase_.

Here is the call graph for this function:

◆ designVariablesToControlPoints()

Foam::tmp< Foam::scalarField > designVariablesToControlPoints ( const scalarField & designVariables)
virtual

Convert design variables to control points, stored in a scalarField.

Implements morphingBoxConstraint.

Definition at line 252 of file noConstraint.C.

◆ controlPointsToDesignVariables()

Foam::tmp< Foam::scalarField > controlPointsToDesignVariables ( const scalarField & cps)
virtual

Return the design variables corresponding to the given control points.

Implements morphingBoxConstraint.

Definition at line 261 of file noConstraint.C.

◆ correctionCPs()

Foam::tmp< Foam::scalarField > correctionCPs ( const scalarField & correctionDVs)
virtual

Convert the correction of the design variables to the correction of the control points.

Implements morphingBoxConstraint.

Definition at line 270 of file noConstraint.C.

References Foam::correction().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/shape/volumetricBSplines/morphingBoxConstraints/none/noConstraint.H
  • src/optimisation/adjointOptimisation/adjoint/optimisation/designVariables/shape/volumetricBSplines/morphingBoxConstraints/none/noConstraint.C