|
Tempus Version of the Day
Time Integration
|
Solver for the adjoint jumps of an index-1 DAE. More...
#include <Tempus_AdjointDAEJumpSolver.hpp>
Public Types | |
| typedef Thyra::VectorBase< Scalar > | Vector |
| typedef Thyra::MultiVectorBase< Scalar > | MultiVector |
| typedef Teuchos::ScalarTraits< Scalar >::magnitudeType | Mag |
Public Member Functions | |
| AdjointDAEJumpSolver (const Teuchos::RCP< const DAEStructure< Scalar > > &dae, const Teuchos::RCP< const Teuchos::ParameterList > &pl=Teuchos::null) | |
| Constructor. pl (optional) is the "Algebraic Jump Solver" sublist. | |
| bool | solve (const Thyra::ModelEvaluator< Scalar > &adjoint_model, const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs, const Scalar dt, const MultiVector &b, MultiVector &z) const |
| Solve C^T z = b for each column of b. | |
Static Public Member Functions | |
| static const std::string & | sublistName () |
| Name of the "Sensitivities" sublist with the options of this solver. | |
| static Teuchos::RCP< const Teuchos::ParameterList > | getValidParameters () |
Private Member Functions | |
| Mag | residual (const Thyra::LinearOpBase< Scalar > &ET, const Thyra::LinearOpBase< Scalar > &AT, const MultiVector &b, const MultiVector &z, const Teuchos::Array< Mag > &b_norms, MultiVector &r) const |
Private Attributes | |
| Teuchos::RCP< const DAEStructure< Scalar > > | dae_ |
| double | rel_tol_ |
| int | max_iters_ |
| double | alpha_factor_ |
| double | alpha_growth_ |
| int | max_alpha_increases_ |
| double | min_reduction_ |
| bool | verbose_ |
Solver for the adjoint jumps of an index-1 DAE.
For a "Final Time" or "Sum Over Times" response g, the adjoint of an index-1 DAE jumps at each response time t_k by the differential components of the solution z of C^T z = dg/dx^T, C = P_a A + P_d E, with E = df/dx_dot, A = df/dx at the forward state at t_k, and P_a, P_d the masks of the algebraic and differential equations (see DAEStructure), while its algebraic components give the term -df/dp^T (P_a z) of the sensitivity (see IntegratorAdjointSensitivity).
C is not assembled. The solver uses only evaluations of the adjoint model, which returns the transposed operators: E^T = W(1,0), A^T = W(0,1), and W(alpha,1) = (alpha E + A)^T. With D_alpha = P_a + P_d/alpha, W(alpha,1) D_alpha = C^T + A^T P_d / alpha, since the algebraic rows of E are zero. Hence P = W(alpha,1) D_alpha is a preconditioner of C^T, exact as alpha -> infinity (C is the limit of the row-scaled step matrix of backward Euler as the time step goes to zero), and the solver performs the preconditioned Richardson iterations z <- z + D_alpha^{-1} W(alpha,1)^{-1} (b - C^T z), with the linear solver of the adjoint model, starting from alpha = "Initial Alpha Factor" / dt, where dt is the time step size at t_k. The iteration matrix is P^{-1} A^T P_d / alpha: whenever an iteration reduces the residual by a factor larger than "Minimum Residual Reduction", alpha is multiplied by "Alpha Growth Factor" (and the solver of W(alpha,1) is rebuilt).
Options (sublist "Algebraic Jump Solver" of "Sensitivities"):
Definition at line 72 of file Tempus_AdjointDAEJumpSolver.hpp.
| typedef Thyra::VectorBase<Scalar> Tempus::AdjointDAEJumpSolver< Scalar >::Vector |
Definition at line 74 of file Tempus_AdjointDAEJumpSolver.hpp.
| typedef Thyra::MultiVectorBase<Scalar> Tempus::AdjointDAEJumpSolver< Scalar >::MultiVector |
Definition at line 75 of file Tempus_AdjointDAEJumpSolver.hpp.
| typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Tempus::AdjointDAEJumpSolver< Scalar >::Mag |
Definition at line 76 of file Tempus_AdjointDAEJumpSolver.hpp.
|
inline |
Constructor. pl (optional) is the "Algebraic Jump Solver" sublist.
Definition at line 101 of file Tempus_AdjointDAEJumpSolver.hpp.
|
inlinestatic |
Name of the "Sensitivities" sublist with the options of this solver.
Definition at line 79 of file Tempus_AdjointDAEJumpSolver.hpp.
|
inlinestatic |
Definition at line 85 of file Tempus_AdjointDAEJumpSolver.hpp.
|
inline |
Solve C^T z = b for each column of b.
| adjoint_model | The adjoint model (W_op returns the transpose) |
| inArgs | Forward state at the response time (x, x_dot, t) |
| dt | Time step size at the response time |
| b | Right-hand side, dg/dx^T (x space) |
| z | Solution (residual space), overwritten |
Returns true if the iterations converged.
Definition at line 140 of file Tempus_AdjointDAEJumpSolver.hpp.
|
inlineprivate |
r = b - C^T z, C^T z = A^T (P_a z) + E^T (P_d z); returns max_j |r_j|/|b_j| over the columns with b_j != 0
Definition at line 229 of file Tempus_AdjointDAEJumpSolver.hpp.
|
private |
Definition at line 252 of file Tempus_AdjointDAEJumpSolver.hpp.
|
private |
Definition at line 253 of file Tempus_AdjointDAEJumpSolver.hpp.
|
private |
Definition at line 254 of file Tempus_AdjointDAEJumpSolver.hpp.
|
private |
Definition at line 255 of file Tempus_AdjointDAEJumpSolver.hpp.
|
private |
Definition at line 256 of file Tempus_AdjointDAEJumpSolver.hpp.
|
private |
Definition at line 257 of file Tempus_AdjointDAEJumpSolver.hpp.
|
private |
Definition at line 258 of file Tempus_AdjointDAEJumpSolver.hpp.
|
private |
Definition at line 259 of file Tempus_AdjointDAEJumpSolver.hpp.