39#ifndef objectiveManager_H
40#define objectiveManager_H
76 objectiveManager(
const objectiveManager&) =
delete;
79 void operator=(
const objectiveManager&) =
delete;
122 void setWrite(
const bool shouldWrite);
129 const scalar weightedObjective,
130 const bool valid =
true
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
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.
PtrList< objective > & getObjectiveFunctions()
Return reference to objective functions.
void updateAndWrite()
Call all functions required prior to the solution of the adjoint equations.
const word & adjointSolverName() const
Return name of the adjointSolver.
virtual void addSource(fvVectorMatrix &matrix)
Add contribution to adjoint momentum PDEs.
virtual ~objectiveManager()=default
Destructor.
virtual bool readDict(const dictionary &dict)
void setWrite(const bool shouldWrite)
Should the objectives be written to file upon calling write()?
virtual bool writeObjectives()
Write objective function history.
scalar print(bool negate=false)
Print to screen.
void checkIntegrationTimes() const
Check integration times for unsteady runs.
PtrList< objective > objectives_
TypeName("objectiveManager")
virtual bool writeData(Ostream &) const
Pure virtual writeData function.
const word & adjointSolverManagerName() const
Return name of adjointSolverManager.
void updateOrNullify()
Update contributions to adjoint if true, otherwise return nulls.
void incrementIntegrationTimes(const scalar timeSpan)
Increment integration times by the optimisation cycle time-span.
void update()
Update objective function related values.
const word primalSolverName_
void updateNormalizationFactor()
Update objective function related values.
const word adjointSolverName_
autoPtr< OFstream > weightedObjectiveFile_
const word & primalSolverName() const
Return name of the primalSolver.
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
A class for handling words, derived from Foam::string.
fvMatrix< scalar > fvScalarMatrix
fvMatrix< vector > fvVectorMatrix
void negate(DimensionedField< Type, GeoMesh > &result, const DimensionedField< Type, GeoMesh > &f1)
Macros to ease declaration of run-time selection tables.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.