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