57 #ifndef ShapeSensitivitiesBase_H 58 #define ShapeSensitivitiesBase_H tmp< pointScalarField > getWallPointSensNormal()
Get wall point sensitivity projected to normal field.
void writeFaceBasedSens() const
Write face-based sensitivities, if present.
tmp< volVectorField > getWallFaceSensVec()
Get wall face sensitivity vectors field.
virtual void write(const word &baseName=word::null)
Write sensitivity fields.
autoPtr< pointBoundaryVectorField > wallPointSensVecPtr_
Wall point sens w.r.t. (x,y.z)
void allocateEikonalSolver()
Allocate the adjoint eikonal solver.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
labelHashSet sensitivityPatchIDs_
Patches on which to compute shape sensitivities.
Abstract base class for adjoint-based sensitivities.
tmp< volVectorField > getWallFaceSensNormalVec()
Get wall face normal sens as vectors field.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
tmp< GeometricField< Type, fvPatchField, volMesh > > constructVolSensitivtyField(const autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > &sensFieldPtr, const word &name) const
Constructs volField based on boundaryField and writes it.
autoPtr< boundaryVectorField > wallFaceSensNormalVecPtr_
Normal sens as vectors.
Base class for adjoint solvers.
autoPtr< boundaryVectorField > wallFaceSensVecPtr_
Wall face sens w.r.t. (x,y.z)
const fvMesh & mesh() const
Return reference to mesh.
virtual ~ShapeSensitivitiesBase()=default
Destructor.
autoPtr< boundaryScalarField > wallFaceSensNormalPtr_
Wall face sens projected to normal.
autoPtr< pointBoundaryScalarField > wallPointSensNormalPtr_
Wall point sens projected to normal.
void clearSurfaceFields()
Clear surface/point fields.
bool writeAllSurfaceFiles_
Whether to write all surface sensitivity fields.
virtual const boundaryVectorField & getWallFaceSensNormalVecBoundary() const
Get wall face normal sens as vectors field.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
virtual const boundaryVectorField & getWallFaceSensVecBoundary() const
Get wall face sensitivity vectors field.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
void constructAndWriteSensitivityField(const autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > &sensFieldPtr, const word &name) const
Constructs volField based on boundaryField and writes it.
Generic templated field type.
tmp< pointVectorField > getWallPointSensNormalVec()
Get wall point sens as vectors field.
A class for handling words, derived from Foam::string.
void constructAndWriteSensitivtyPointField(const autoPtr< List< Field< Type >>> &sensFieldPtr, const word &name) const
Constructs pointField based on boundaryField and writes it.
virtual const boundaryScalarField & getWallFaceSensNormalBoundary() const
Get wall face sensitivity projected to normal field.
virtual bool readDict(const dictionary &dict)
Read dict if changed.
static const word null
An empty word.
void writePointBasedSens() const
Write point-based sensitivities, if present.
virtual const labelHashSet & geometryVariationIntegrationPatches() const
Return set of patches on which to compute direct sensitivities.
TypeName("ShapeSensitivitiesBase")
Runtime type information.
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
tmp< volScalarField > getWallFaceSensNormal()
Get wall face sensitivity projected to normal field.
tmp< pointVectorField > getWallPointSensVec()
Get wall point sensitivity vectors field.
autoPtr< pointBoundaryVectorField > wallPointSensNormalVecPtr_
Normal sens as vectors.
Base class supporting Shape sensitivity derivatives.
Useful typenames for fields defined only at the boundaries.
Generic GeometricBoundaryField class.
const dictionary & dict() const
Return the construction dictionary.
void clearSensitivities()
Zero sensitivity fields and their constituents.
void setSensitivityPatchIDs(const labelHashSet &sensPatchIDs)
Overwrite sensitivityPatchIDs.
Mesh data needed to do the Finite Volume discretisation.
void clearMultipliers()
Clear multipliers.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
const labelHashSet & sensitivityPatchIDs() const
Get patch IDs on which sensitivities are computed.
A class for managing temporary objects.
virtual void accumulateIntegrand(const scalar dt)
Accumulate sensitivity integrands.
bool hasMultiplier(bool(objective::*hasFunction)() const)
Check if any of the available objective has a certain multiplier, provided through a function object...
void allocateMultipliers()
Allocate multiplier fields.