39 #ifndef objectiveManager_H 40 #define objectiveManager_H 122 void setWrite(
const bool shouldWrite);
129 const scalar weightedObjective,
130 const bool valid =
true void setWrite(const bool shouldWrite)
Should the objectives be written to file upon calling write()?
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const word adjointSolverName_
PtrList< objective > & getObjectiveFunctions()
Return reference to objective functions.
Class for managing objective functions.
void incrementIntegrationTimes(const scalar timeSpan)
Increment integration times by the optimisation cycle time-span.
const word & adjointSolverManagerName() const
Return name of adjointSolverManager.
void updateAndWrite()
Call all functions required prior to the solution of the adjoint equations.
PtrList< objective > objectives_
void updateNormalizationFactor()
Update objective function related values.
A class for handling words, derived from Foam::string.
virtual ~objectiveManager()=default
Destructor.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
virtual bool writeObjectives()
Write objective function history.
virtual bool writeData(Ostream &) const
Pure virtual writeData function.
void negate(DimensionedField< Type, GeoMesh > &result, const DimensionedField< Type, GeoMesh > &f1)
const word & primalSolverName() const
Return name of the primalSolver.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
scalar print(bool negate=false)
Print to screen.
void update()
Update objective function related values.
virtual void addSource(fvVectorMatrix &matrix)
Add contribution to adjoint momentum PDEs.
const word & adjointSolverName() const
Return name of the adjointSolver.
virtual bool readDict(const dictionary &dict)
void updateOrNullify()
Update contributions to adjoint if true, otherwise return nulls.
autoPtr< OFstream > weightedObjectiveFile_
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Mesh data needed to do the Finite Volume discretisation.
const word primalSolverName_
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Macros to ease declaration of run-time selection tables.
TypeName("objectiveManager")
void checkIntegrationTimes() const
Check integration times for unsteady runs.