37 #ifndef adjointSolver_H 38 #define adjointSolver_H 110 const word& managerType,
124 const word& managerType,
136 const word& managerType,
bool computeSensitivities_
Are sensitivities computed.
const word primalSolverName_
Name of primal solver.
TypeName("adjointSolver")
Run-time type information.
virtual bool isConstraint()
Is the solving referring to a constraint.
Base class for solution control classes.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void postLoop()
Functions to be called after loop.
Base class for primal solvers.
const fvMesh & mesh() const
Return the solver mesh.
class for managing incompressible objective functions.
declareRunTimeNewSelectionTable(autoPtr, adjointSolver, adjointSolver,(fvMesh &mesh, const word &managerType, const dictionary &dict, const word &primalSolverName),(mesh, managerType, dict, primalSolverName))
virtual sensitivity & getSensitivityBase()=0
Return the base sensitivity object.
Base class for adjoint solvers.
Abstract base class for adjoint sensitivities.
virtual void clearSensitivities()
Clears the sensitivity field known by the adjoint solver.
virtual void computeObjectiveSensitivities()=0
Compute sensitivities of the underlaying objectives.
virtual bool writeData(Ostream &os) const
Write the sensitivity derivatives.
const objectiveManager & getObjectiveManager() const
Return a const reference to the objective manager.
A class for handling words, derived from Foam::string.
bool isConstraint_
Is the adjoint solver used to tackle a constraint.
static autoPtr< adjointSolver > New(fvMesh &mesh, const word &managerType, const dictionary &dict, const word &primalSolverName)
Return a reference to the selected turbulence model.
virtual const dictionary & dict() const
Return the solver dictionary.
virtual const scalarField & getObjectiveSensitivities()=0
Grab a reference to the computed sensitivities.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
const primalSolver & getPrimalSolver() const
Return a const-reference to the primal solver corresponding to this adjoint solver.
virtual void updatePrimalBasedQuantities()
Update primal based quantities, e.g. the primal fields in adjoint turbulence models.
Mesh data needed to do the Finite Volume discretisation.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
virtual bool readDict(const dictionary &dict)
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
virtual ~adjointSolver()=default
Destructor.
autoPtr< objectiveManager > objectiveManagerPtr_
Object to manage objective functions.
const word & primalSolverName() const
Return the primal solver name.
tmp< scalarField > sensitivities_
Sensitivities field.