PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
Public Types | Public Member Functions | Protected Attributes | List of all members
pism::inverse::IPTaoTikhonovProblem< ForwardProblem > Class Template Reference

Defines a Tikhonov minimization problem to be solved with a TaoBasicSolver. More...

#include <IPTaoTikhonovProblem.hh>

+ Inheritance diagram for pism::inverse::IPTaoTikhonovProblem< ForwardProblem >:

Public Types

typedef ForwardProblem::DesignVec DesignVec
 
typedef ForwardProblem::StateVec StateVec
 
typedef ForwardProblem::StateVec1 StateVec1
 
typedef ForwardProblem::DesignVecGhosted DesignVecGhosted
 
typedef std::shared_ptr< typename ForwardProblem::DesignVecGhosted > DesignVecGhostedPtr
 
typedef std::shared_ptr< typename ForwardProblem::DesignVec > DesignVecPtr
 
typedef std::shared_ptr< typename ForwardProblem::StateVec > StateVecPtr
 
typedef std::shared_ptr< typename ForwardProblem::StateVec1 > StateVec1Ptr
 

Public Member Functions

 IPTaoTikhonovProblem (ForwardProblem &forward, DesignVec &d0, StateVec &u_obs, double eta, IPFunctional< DesignVec > &designFunctional, IPFunctional< StateVec > &stateFunctional)
 
virtual ~IPTaoTikhonovProblem ()
 
virtual void setInitialGuess (DesignVec &d)
 Sets the initial guess for minimization iterations. If this isn't set explicitly,. More...
 
virtual void evaluateObjectiveAndGradient (Tao tao, Vec x, double *value, Vec gradient)
 Callback provided to TAO for objective evaluation. More...
 
virtual void addListener (typename IPTaoTikhonovProblemListener< ForwardProblem >::Ptr listener)
 Add an object to the list of objects to be called after each iteration. More...
 
virtual StateVecPtr stateSolution ()
 Final value of \(F(d)\), where \(d\) is the solution of the minimization. More...
 
virtual DesignVecPtr designSolution ()
 Value of \(d\), the solution of the minimization problem. More...
 
virtual void connect (Tao tao)
 Callback from TaoBasicSolver, used to wire the connections between a Tao and. More...
 
virtual void monitorTao (Tao tao)
 Callback from TAO after each iteration. The call is forwarded to each element of our list of listeners. More...
 
virtual void convergenceTest (Tao tao)
 Callback from TAO to detect convergence. Allows us to implement a custom convergence check. More...
 
virtual std::shared_ptr< TerminationReasonformInitialGuess (Vec *v)
 Callback from TaoBasicSolver to form the starting iterate for the minimization. See also. More...
 

Protected Attributes

std::shared_ptr< const Gridm_grid
 
ForwardProblem & m_forward
 
DesignVecGhostedPtr m_d
 Current iterate of design parameter. More...
 
DesignVec m_dGlobal
 Initial iterate of design parameter, stored without ghosts for the benefit of TAO. More...
 
DesignVecm_d0
 A-priori estimate of design parameter. More...
 
DesignVecPtr m_d_diff
 Storage for (m_d-m_d0) More...
 
StateVecm_u_obs
 State parameter to match via F(d)=u_obs. More...
 
StateVec1Ptr m_u_diff
 Storage for F(d)-u_obs. More...
 
StateVec m_adjointRHS
 Temporary storage used in gradient computation. More...
 
DesignVecPtr m_grad_design
 Gradient of \(J_D\) at the current iterate. More...
 
DesignVecPtr m_grad_state
 Gradient of \(J_S\) at the current iterate. More...
 
DesignVecPtr m_grad
 
double m_eta
 Penalty parameter/Lagrange multiplier. More...
 
double m_val_design
 Value of \(J_D\) at the current iterate. More...
 
double m_val_state
 Value of \(J_S\) at the current iterate. More...
 
IPFunctional< array::Scalar > & m_designFunctional
 Implementation of \(J_D\). More...
 
IPFunctional< array::Vector > & m_stateFunctional
 Implementation of \(J_S\). More...
 
std::vector< typename IPTaoTikhonovProblemListener< ForwardProblem >::Ptr > m_listeners
 List of iteration callbacks. More...
 
double m_tikhonov_atol
 Convergence parameter: convergence stops when \(||J_D||_2 <\) m_tikhonov_rtol. More...
 
double m_tikhonov_rtol
 

Detailed Description

template<class ForwardProblem>
class pism::inverse::IPTaoTikhonovProblem< ForwardProblem >

Defines a Tikhonov minimization problem to be solved with a TaoBasicSolver.

Suppose \(F\) is a map from a space \(D\) of design variables to a space \(S\) of state variables and we wish to solve a possibly ill-posed problem of the form

\[ F(d) = u \]

where \(u\) is know and \(d\) is unknown. Approximate solutions can be obtained by finding minimizers of an associated Tikhonov functional

\[ J(d) = J_{S}(F(d)-u) + \frac{1}{\eta}J_{D}(d-d_0) \]

where $J_{D}$ and $J_{S}$ are functionals on the spaces \(D\) and \(S\) respectively, \(\eta\) is a penalty parameter, and \(d_0\) is a best a-priori guess for the the solution. The IPTaoTikhonovProblem class encapuslates all of the data required to formulate the minimization problem as a Problem tha can be solved using a TaoBasicSolver. It is templated on the the class ForwardProblem which defines the class of the forward map \(F\) as well as the spaces \(D\) and \(S\). An instance of ForwardProblem, along with specific functionals \(J_D\) and \(J_S\), the parameter \(\eta\), and the data \(y\) and \(x_0\) are provided on constructing a IPTaoTikhonovProblem.

For example, if the SSATaucForwardProblem class defines the map taking yield stresses \(\tau_c\) to the corresponding surface velocity field solving the SSA, a schematic setup of solving the associated Tikhonov problem goes as follows.

SSATaucForwardProblem forwardProblem(grid);
L2NormFunctional2S designFunctional(grid); //J_X
L2NormFunctional2V stateFunctional(grid); //J_Y
array::Vector u_obs; // Set this to the surface velocity observations.
array::Scalar tauc_0; // Set this to the initial guess for tauc.
double eta; // Set this to the desired penalty parameter.
typedef InvSSATauc IPTaoTikhonovProblem<SSATaucForwardProblem>;
InvSSATauc tikhonovProblem(forwardProblem,tauc_0,u_obs,eta,designFunctional,stateFunctional);
TaoBasicSolver<InvSSATauc> solver(com, "cg", tikhonovProblem);
TerminationReason::Ptr reason = solver.solve();
if (reason->succeeded()) {
printf("Success: %s\n",reason->description().c_str());
} else {
printf("Failure: %s\n",reason->description().c_str());
}
std::string printf(const char *format,...)

The class ForwardProblem that defines the forward problem must have the following characteristics:

  1. Contains typedefs for DesignVec and StateVec that effectively define the function spaces \(D\) and \(S\). E.g.

    typedef array::Scalar DesignVec;
    typedef array::Vector StateVec;

    would be appropriate for a map from basal yeild stress to surface velocities.

  2. A method

    TerminationReason::Ptr linearize_at(DesignVec &d);

    that instructs the class to compute the value of F and anything needed to compute its linearization at d. This is the first method called when working with a new iterate of d.

  3. A method

    StateVec &solution()

    that returns the most recently computed value of \(F(d)\) as computed by a call to linearize_at.

  4. A method
    void apply_linearization_transpose(StateVec &du, DesignVec &dzeta);
    that computes the action of \((F')^t\), where \(F'\) is the linearization of \(F\) at the current iterate, and the transpose is computed in the standard sense (i.e. thinking of \(F'\) as a matrix with respect to the bases implied by the DesignVec and StateVec spaces). The need for a transpose arises because

    \[ \frac{d}{dt} J_{S}(F(d+t\delta d)-u) = [DJ_S]_{k}\; F'_{kj} \; \delta d \]

    and hence the gradient of the term \(J_{S}(F(d)-u)\) with respect to \(d\) is given by

    \[ (F')^t (\nabla J_S)^t. \]

Definition at line 169 of file IPTaoTikhonovProblem.hh.


The documentation for this class was generated from the following file: