Go to the documentation of this file.
38 namespace incompressible
61 <<
"includeObjectiveContribution set to true in both "
62 <<
"surfaceSensitivities and the parameterization options" <<
nl
63 <<
"This will lead to double contributions " <<
nl
64 <<
"Disabling the former"
103 dict.optionalSubDict(
"surfaceSensitivities"),
109 dSfdbMult_(createZeroBoundaryPtr<vector>(mesh_)),
110 dnfdbMult_(createZeroBoundaryPtr<vector>(mesh_)),
111 dxdbDirectMult_(createZeroBoundaryPtr<vector>(mesh_)),
112 includeObjective_(
true)
148 for (
const label patchI : sensitivityPatchIDs_)
153 const scalar wei =
func.weight();
157 wei*
func.dxdbDirectMultiplier(patchI)*magSfDt;
autoPtr< boundaryVectorField > dxdbDirectMult_
const dictionary & dict() const
Return the construction dictionary.
class for managing incompressible objective functions.
A class for handling words, derived from Foam::string.
defineTypeNameAndDebug(adjointEikonalSolver, 0)
virtual bool readDict(const dictionary &dict)
Read dict if changed.
bool read(const char *buf, int32_t &val)
Same as readInt32.
virtual void accumulateIntegrand(const scalar dt)
Accumulate sensitivity integrands.
Ostream & endl(Ostream &os)
Add newline and flush stream.
sensitivitySurface surfaceSensitivity_
Surface sensitivities.
T lookupOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
void setIncludeSurfaceArea(const bool includeSurfaceArea)
Set includeSurfaceArea bool.
Class including all adjoint fields for incompressible flows.
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
void write()
Write sensitivity fields.
Abstract base class for adjoint-based sensitivities in incompressible flows.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual bool readDict(const dictionary &dict)
Read dictionary if changed.
virtual void accumulateIntegrand(const scalar dt)
Accumulate sensitivity integrands.
virtual void write(const word &baseName=word::null)
Write sensitivity fields.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
void func(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void clear()
Zero sensitivity fields and their constituents.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void setIncludeObjective(const bool includeObjective)
Set includeObjective bool.
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
void read()
Read options from dict.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
autoPtr< boundaryVectorField > dSfdbMult_
Fields related to direct sensitivities.
void read()
Read controls and update solver pointers if necessary.
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
autoPtr< boundaryVectorField > dnfdbMult_
const dictionary & optionalSubDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary, otherwise return this dictionary.
static const Vector< scalar > zero
fv::IOoptionListAdjoint fvOptionsAdjoint(mesh)
Abstract base class for objective functions. No point in making this runTime selectable since its chi...
bool getIncludeObjective() const
Get access to the includeObjective bool.
#define WarningInFunction
Report a warning using Foam::Warning.
virtual bool readDict(const dictionary &dict)
Read dict if changed.
Base class for solution control classes.
virtual void write(const word &baseName=word::null)
Write sensitivity fields.
PtrList< objective > & getObjectiveFunctions()
Return reference to objective functions.
objectiveManager & objectiveManager_