noConstraint Class Reference

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

Inheritance diagram for noConstraint:
Collaboration diagram for noConstraint:

Public Member Functions

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

Protected Member Functions

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

Additional Inherited Members

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

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 190 of file noConstraint.C.

◆ ~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 43 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 53 of file noConstraint.C.

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

Here is the call 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 99 of file noConstraint.C.

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

Here is the call graph for this function:

◆ TypeName()

TypeName ( "none"  )

Runtime type information.

◆ 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 244 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 205 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 215 of file noConstraint.C.

References DebugInfo, Foam::endl(), NURBS3DVolume::getControlPoints(), and UList< T >::size().

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 253 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 262 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 271 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: