42 virtual bool solve()
override;
67 const NumericVector<Number> & solution,
68 NumericVector<Number> & rhs)
override;
80 NumericVector<Number> & residual);
91 return "forward_solution" + std::to_string(tstep);
The solve object is responsible for solving the adjoint version of a forward model.
Transient adjoint solve object.
void evaluateTimeResidual(const NumericVector< Number > &solution, NumericVector< Number > &residual)
This evaluates the time part of the adjoint residual.
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()
std::vector< std::string > & _forward_solutions
Name of the forward solution at each time step residing in the adjoint system.
NumericVector< Number > & _old_time_residual
The residual contribution from previous adjoint solutions.
static std::string getForwardSolutionName(int tstep)
Prescribed name of the forward solution at a specified time step.
virtual void assembleAdjointSystem(SparseMatrix< Number > &matrix, const NumericVector< Number > &solution, NumericVector< Number > &rhs) override
Overriding parent class so the previous time-derivative residual is added to the right-hand-side of t...
void insertForwardSolution(int tstep)
This function should be called after every converged forward time step.