39 #ifndef objectiveManager_H 40 #define objectiveManager_H 151 const scalar weightedObjective,
152 const bool valid =
true
virtual void addTMEqn1Source(fvScalarMatrix &adjTMEqn1)=0
Add contribution to first adjoint turbulence model PDE.
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 incompressible objective functions.
autoPtr< OFstream > weigthedObjectiveFile_
virtual bool writeObjectives(const scalar weightedObjective, const bool valid=true)
Write objective function history.
void incrementIntegrationTimes(const scalar timeSpan)
Increment integration times by the optimisation cycle time-span.
const word & adjointSolverManagerName() const
Return name of adjointSolverManager.
declareRunTimeSelectionTable(autoPtr, objectiveManager, dictionary,(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName),(mesh, dict, adjointSolverName, primalSolverName))
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.
static autoPtr< objectiveManager > New(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName)
Return a reference to the selected turbulence model.
virtual void addPaEqnSource(fvScalarMatrix &paEqn)=0
Add contribution to adjoint momentum PDEs.
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 writeData(Ostream &) const
Pure virtual writeData function.
const word & primalSolverName() const
Return name of the primalSolver.
virtual void addTMEqn2Source(fvScalarMatrix &adjTMEqn2)=0
Add contribution to second adjoint turbulence model PDE.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
scalar print()
Print to screen.
void update()
Update objective function related values.
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.
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...
fvScalarMatrix paEqn(fvm::d2dt2(pa) - sqr(c0) *fvc::laplacian(pa))
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.
virtual void addUaEqnSource(fvVectorMatrix &UaEqn)=0
Add contribution to adjoint momentum PDEs.