22 params.
addClassDescription(
"Executioner for evaluating transient simulations and their adjoint.");
33 params.
renameParam(
"system_names",
"forward_system",
"");
40 _adjoint_solve(*this),
41 _forward_times(declareRecoverableData<
std::vector<Real>>(
"forward_times"))
50 "scheme", getParam<MooseEnum>(
"scheme"),
" is not supported for computing adjoint.");
registerMooseObject("OptimizationApp", TransientAndAdjoint)
void setForwardSolution(int tstep)
Takes the previously saved forward solutions residing in the adjoint system and copies them to the av...
virtual bool solve() override
Overriding parent class so the time-derivative residual is stored for the next time step.
static InputParameters validParams()
void insertForwardSolution(int tstep)
This function should be called after every converged forward time step.
void timestepSetup() override
virtual void onTimestepBegin() override
virtual void outputStep(ExecFlagType type)
bool isRecovering() const
bool testCheckpointHalfTransient() const
void paramError(const std::string ¶m, Args... args) const
std::vector< Real > & _forward_times
Cached forward time points so we can properly loop backward in time.
static InputParameters validParams()
virtual void postExecute() override
For solving the adjoint problem.
virtual void preExecute() override
For storing the initial condition.
AdjointTransientSolve _adjoint_solve
The transient adjoint solve object responsible for storing forward solutions and solving the adjoint ...
virtual void postStep() override
For storing the converged solution.
TransientAndAdjoint(const InputParameters ¶meters)
bool & _last_solve_converged
Moose::TimeIntegratorType getTimeScheme() const
virtual bool lastSolveConverged() const override
virtual void preExecute() override
virtual void postExecute() override
static InputParameters validParams()
const ExecFlagType EXEC_ADJOINT_TIMESTEP_END