39#ifndef objectiveManager_H
40#define objectiveManager_H
151 const scalar weightedObjective,
152 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,...
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
class for managing incompressible objective functions.
virtual void addTMEqn2Source(fvScalarMatrix &adjTMEqn2)=0
Add contribution to second adjoint turbulence model PDE.
autoPtr< OFstream > weigthedObjectiveFile_
virtual bool writeObjectives(const scalar weightedObjective, const bool valid=true)
Write objective function history.
PtrList< objective > & getObjectiveFunctions()
Return reference to objective functions.
const word & adjointSolverName() const
Return name of the adjointSolver.
scalar print()
Print to screen.
declareRunTimeSelectionTable(autoPtr, objectiveManager, dictionary,(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName),(mesh, dict, adjointSolverName, primalSolverName))
virtual void addUaEqnSource(fvVectorMatrix &UaEqn)=0
Add contribution to adjoint momentum PDEs.
virtual void addPaEqnSource(fvScalarMatrix &paEqn)=0
Add contribution to adjoint momentum PDEs.
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 ~objectiveManager()=default
Destructor.
virtual bool readDict(const dictionary &dict)
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.
virtual void addTMEqn1Source(fvScalarMatrix &adjTMEqn1)=0
Add contribution to first adjoint turbulence model PDE.
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_
const word & primalSolverName() const
Return name of the primalSolver.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for handling words, derived from Foam::string.
fvScalarMatrix paEqn(fvm::d2dt2(pa) - sqr(c0) *fvc::laplacian(pa))
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.