41#ifndef adjointSolverManager_H
42#define adjointSolverManager_H
55class adjointSolverManager
64 adjointSolverManager(
const adjointSolverManager&) =
delete;
67 void operator=(
const adjointSolverManager&) =
delete;
111 const word& managerType,
113 bool overrideUseSolverName
const word & name() const noexcept
Return the object name.
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....
void clearSensitivities()
Clear sensitivity fields from all adjoint solvers.
TypeName("adjointSolverManager")
label nOneSidedConstraints() const
Number of adjoint solvers corresponding to one-sided constraints.
scalar objectiveValue()
Get objective value.
labelList objectiveSolverIDs_
PtrList< scalarField > constraintSensitivities()
Get constraint sensitivities. One scalarField per constraint.
label nAdjointSolvers() const
Total number of adjoint solvers.
labelList doubleSidedConstraintSolverIDs_
tmp< scalarField > constraintValues()
Get constraint values.
bool isMaster() const
Whether the primal solver corresponding to the adjointSolverManager is the master one,...
bool readDict(const dictionary &dict)
labelList oneSidedConstraintSolverIDs_
tmp< scalarField > aggregateSensitivities()
Aggregate sensitivities from various adjoint solvers.
void computeAllSensitivities()
Compute sensitivities for all adjoint solvers (both objective- and constraint-related ones).
scalar operatingPointWeight_
const word & primalSolverName() const
Const access to the primal solver name.
void updatePrimalBasedQuantities(const word &name)
Update fields related to primal solution.
wordList adjointSolversNames() const
Return the names of all adjointSolvers.
PtrList< adjointSolver > adjointSolvers_
label nConstraints() const
Number of constraints.
virtual bool writeData(Ostream &) const
Pure virtual writeData function.
void solveAdjointEquations()
Update objective function-related values and solve adjoint equations.
const dictionary & dict() const
Const access to the construction dictionary.
label nDoubleSidedConstraints() const
Number of adjoint solvers corresponding to double-sided constraints.
scalar operatingPointWeight() const
Const access to adjoint solvers.
autoPtr< designVariables > & designVars_
virtual ~adjointSolverManager()=default
Destructor.
const word primalSolverName_
const PtrList< adjointSolver > & adjointSolvers() const
Const access to adjoint solvers.
label nActiveAdjointSolvers() const
Return number of active adjoint solvers, either corresponding.
label nObjectives() const
Number of adjoint solvers corresponding to objectives.
const word & managerName() const
Const access to the manager name.
label nActiveAdjointSolvers_
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.
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 managing temporary objects.
A class for handling words, derived from Foam::string.
List< word > wordList
List of word.
List< label > labelList
A List of labels.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.