optMeshMovement Class Referenceabstract

Abstract base class for translating an update of the design variables into mesh movement. More...

Inheritance diagram for optMeshMovement:
[legend]
Collaboration diagram for optMeshMovement:
[legend]

Public Member Functions

 TypeName ("optMeshMovement")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, optMeshMovement, dictionary,(fvMesh &mesh, const dictionary &dict, const labelList &patchIDs),(mesh, dict, patchIDs))
 
 optMeshMovement (fvMesh &mesh, const dictionary &dict, const labelList &patchIDs)
 Construct from components. More...
 
virtual ~optMeshMovement ()=default
 Destructor. More...
 
void setCorrection (const scalarField &correction)
 Set design variable correction. More...
 
virtual void moveMesh ()
 
autoPtr< displacementMethod > & returnDisplacementMethod ()
 Return displacementMethod. More...
 
const labelListgetPatchIDs ()
 Return patchIDs. More...
 
void writeMeshQualityMetrics ()
 Write mesh quality metrics. More...
 
virtual void storeDesignVariables ()
 
virtual void resetDesignVariables ()
 Reset to starting point of line search. More...
 
virtual scalar computeEta (const scalarField &correction)=0
 Compute eta value based on max displacement. More...
 
bool maxAllowedDisplacementSet () const
 Whether maxAllowedDisplacement has been set. More...
 
virtual labelList getActiveDesignVariables () const
 Return active design variables. More...
 

Static Public Member Functions

static autoPtr< optMeshMovementNew (fvMesh &mesh, const dictionary &dict, const labelList &patchIDs)
 

Protected Member Functions

scalar getMaxAllowedDisplacement () const
 Get maxAllowedDisplacement, is set. More...
 

Protected Attributes

fvMeshmesh_
 
const dictionarydict_
 
scalarField correction_
 Correction of design variables. More...
 
labelList patchIDs_
 IDs of patches to be moved. More...
 
vectorField pointsInit_
 Fall back points in case line-search is used. More...
 
autoPtr< displacementMethoddisplMethodPtr_
 
bool writeMeshQualityMetrics_
 

Detailed Description

Abstract base class for translating an update of the design variables into mesh movement.

Source files

Definition at line 54 of file optMeshMovement.H.

Constructor & Destructor Documentation

◆ optMeshMovement()

optMeshMovement ( fvMesh mesh,
const dictionary dict,
const labelList patchIDs 
)

Construct from components.

Definition at line 61 of file optMeshMovement.C.

References dict, dictionary::found(), and dictionary::get().

Here is the call graph for this function:

◆ ~optMeshMovement()

virtual ~optMeshMovement ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getMaxAllowedDisplacement()

Foam::scalar getMaxAllowedDisplacement ( ) const
protected

Get maxAllowedDisplacement, is set.

Definition at line 45 of file optMeshMovement.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

Here is the call graph for this function:

◆ TypeName()

TypeName ( "optMeshMovement"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
optMeshMovement  ,
dictionary  ,
(fvMesh &mesh, const dictionary &dict, const labelList &patchIDs)  ,
(mesh, dict, patchIDs)   
)

◆ New()

Foam::autoPtr< Foam::optMeshMovement > New ( fvMesh mesh,
const dictionary dict,
const labelList patchIDs 
)
static

Definition at line 93 of file optMeshMovement.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, dictionary::get(), Foam::Info, and mesh.

Referenced by shapeOptimisation::shapeOptimisation().

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

◆ setCorrection()

void setCorrection ( const scalarField correction)

Set design variable correction.

Definition at line 122 of file optMeshMovement.C.

References Foam::correction().

Here is the call graph for this function:

◆ moveMesh()

void moveMesh ( )
virtual

Calculates mesh movemnt based on the correction of the design variables

Reimplemented in optMeshMovementVolumetricBSplinesExternalMotionSolver, optMeshMovementBezier, optMeshMovementVolumetricBSplines, and optMeshMovementNULL.

Definition at line 128 of file optMeshMovement.C.

Referenced by optMeshMovementBezier::moveMesh(), optMeshMovementVolumetricBSplines::moveMesh(), and optMeshMovementVolumetricBSplinesExternalMotionSolver::moveMesh().

Here is the caller graph for this function:

◆ returnDisplacementMethod()

Foam::autoPtr< Foam::displacementMethod > & returnDisplacementMethod ( )

Return displacementMethod.

Definition at line 142 of file optMeshMovement.C.

◆ getPatchIDs()

const Foam::labelList & getPatchIDs ( )

Return patchIDs.

Definition at line 148 of file optMeshMovement.C.

◆ writeMeshQualityMetrics()

void writeMeshQualityMetrics ( )

Write mesh quality metrics.

Definition at line 154 of file optMeshMovement.C.

References Foam::dimless, Foam::endl(), Foam::gAverage(), Foam::gMax(), Foam::Info, cellQuality::nonOrthogonality(), and cellQuality::skewness().

Here is the call graph for this function:

◆ storeDesignVariables()

void storeDesignVariables ( )
virtual

Store design variables and mesh, to act as the starting point of line search

Reimplemented in optMeshMovementVolumetricBSplines.

Definition at line 182 of file optMeshMovement.C.

Referenced by optMeshMovementVolumetricBSplines::storeDesignVariables().

Here is the caller graph for this function:

◆ resetDesignVariables()

void resetDesignVariables ( )
virtual

Reset to starting point of line search.

Reimplemented in optMeshMovementVolumetricBSplines.

Definition at line 188 of file optMeshMovement.C.

References Foam::endl(), and Foam::Info.

Referenced by optMeshMovementVolumetricBSplines::resetDesignVariables().

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

◆ computeEta()

virtual scalar computeEta ( const scalarField correction)
pure virtual

◆ maxAllowedDisplacementSet()

bool maxAllowedDisplacementSet ( ) const

Whether maxAllowedDisplacement has been set.

Definition at line 195 of file optMeshMovement.C.

◆ getActiveDesignVariables()

Foam::labelList getActiveDesignVariables ( ) const
virtual

Return active design variables.

Implemented only for certain parametetisations

Reimplemented in optMeshMovementVolumetricBSplines, optMeshMovementVolumetricBSplinesExternalMotionSolver, and optMeshMovementBezier.

Definition at line 201 of file optMeshMovement.C.

References NotImplemented.

Member Data Documentation

◆ mesh_

fvMesh& mesh_
protected

Definition at line 77 of file optMeshMovement.H.

◆ dict_

const dictionary& dict_
protected

Definition at line 78 of file optMeshMovement.H.

◆ correction_

◆ patchIDs_

labelList patchIDs_
protected

IDs of patches to be moved.

Definition at line 84 of file optMeshMovement.H.

◆ pointsInit_

vectorField pointsInit_
protected

Fall back points in case line-search is used.

Definition at line 87 of file optMeshMovement.H.

◆ displMethodPtr_

autoPtr<displacementMethod> displMethodPtr_
protected

Mesh movement engine and interface for applying mesh movement boundary conditions

Definition at line 91 of file optMeshMovement.H.

Referenced by optMeshMovementBezier::moveMesh(), optMeshMovementVolumetricBSplines::moveMesh(), and optMeshMovementVolumetricBSplinesExternalMotionSolver::moveMesh().

◆ writeMeshQualityMetrics_

bool writeMeshQualityMetrics_
protected

Whether to write the mesh quality metrics to files each time the mesh is updated

Definition at line 95 of file optMeshMovement.H.


The documentation for this class was generated from the following files: