52 adjointSensitivity::adjointSensitivity
65 this->
dict().getOrDefault<bool>
68 adjointSolver_.includeDistance()
71 eikonalSolver_(nullptr),
72 gradDxDbMult_(nullptr),
73 divDxDbMult_(nullptr),
77 dxdbDirectMult_(nullptr),
78 pointDxDbDirectMult_(nullptr),
80 optionsDxDbMult_(nullptr)
96 Info<<
"adjointSensitivity type : " << sensType <<
endl;
98 auto* ctorPtr = dictionaryConstructorTable(sensType);
105 "adjointSensitivity",
107 *dictionaryConstructorTablePtr_
111 return autoPtr<adjointSensitivity>
151 derivatives_ = designVars->assembleSensitivities(*
this);
virtual void write(const word &baseName=word::null)
Write sensitivity fields.
virtual bool readDict(const dictionary &dict)
Read dictionary if changed.
errorManipArg< error, int > exit(error &err, const int errNo=1)
adjointSolver & adjointSolver_
Reference to the underlaying adjoint solver.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Abstract base class for adjoint-based sensitivities.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void write(const word &baseName=word::null)
Write sensitivity fields.
Base class for adjoint solvers.
Abstract base class for adjoint sensitivities.
virtual bool computeDxDbInternalField() const
Should the parameterization compute the internalField of dxdb.
const fvMesh & mesh() const
Return reference to mesh.
static autoPtr< adjointSensitivity > New(const fvMesh &mesh, const dictionary &dict, adjointSolver &adjointSolver)
Return a reference to the selected turbulence model.
const dictionary & optionalSubDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary, otherwise return this dictionary.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
A class for handling words, derived from Foam::string.
autoPtr< adjointMeshMovementSolver > adjointMeshMovementSolver_
Adjoint grid displacement solver.
autoPtr< volScalarField > fieldSensPtr_
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
virtual void assembleSensitivities(autoPtr< designVariables > &designVars)
Assemble sensitivities.
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
defineTypeNameAndDebug(combustionModel, 0)
const scalarField & getSensitivities() const
Returns the sensitivity fields.
virtual const scalarField & calculateSensitivities(autoPtr< designVariables > &designVars)
Calculates and returns sensitivity fields.
const dictionary & dict() const
Return the construction dictionary.
virtual bool readDict(const dictionary &dict)
Read dictionary if changed.
bool includeDistance_
Include distance variation in sensitivity computations.
const word & name() const
Return reference to name.
scalarField derivatives_
The sensitivity derivative values.
Mesh data needed to do the Finite Volume discretisation.
messageStream Info
Information stream (stdout output on master, null elsewhere)
autoPtr< adjointEikonalSolver > eikonalSolver_
Adjoint eikonal equation solver.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Macros to ease declaration of run-time selection tables.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
virtual bool includeDistance() const
Does the adjoint to an equation computing distances need to taken into consideration.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
static constexpr const zero Zero
Global zero (0)