19 #ifndef IP_SSATAUCTIKHONOVLCL_HH_39UGM4S2
20 #define IP_SSATAUCTIKHONOVLCL_HH_39UGM4S2
26 #include "pism/inverse/TaoUtil.hh"
27 #include "pism/inverse/IPTwoBlockVec.hh"
28 #include "pism/inverse/IP_SSATaucForwardProblem.hh"
29 #include "pism/inverse/functional/IPFunctional.hh"
34 class IP_SSATaucTaoTikhonovProblemLCL;
48 typedef std::shared_ptr<IP_SSATaucTaoTikhonovProblemLCLListener>
Ptr;
73 double objectiveValue,
75 const std::shared_ptr<DesignVec> &d,
76 const std::shared_ptr<DesignVec> &diff_d,
77 const std::shared_ptr<DesignVec> &grad_d,
78 const std::shared_ptr<StateVec> &u,
79 const std::shared_ptr<StateVec> &diff_u,
80 const std::shared_ptr<StateVec> &grad_u,
81 const std::shared_ptr<StateVec> &constraints) = 0;
132 std::unique_ptr<IPTwoBlockVec>
m_x;
135 std::shared_ptr<DesignVecGhosted>
m_d;
Abstract base class for functions from ice model vectors to .
Implements the forward problem of the map taking to the corresponding solution of the SSA.
virtual ~IP_SSATaucTaoTikhonovProblemLCLListener()
std::shared_ptr< IP_SSATaucTaoTikhonovProblemLCLListener > Ptr
virtual void iteration(IP_SSATaucTaoTikhonovProblemLCL &problem, double eta, int iter, double objectiveValue, double designValue, const std::shared_ptr< DesignVec > &d, const std::shared_ptr< DesignVec > &diff_d, const std::shared_ptr< DesignVec > &grad_d, const std::shared_ptr< StateVec > &u, const std::shared_ptr< StateVec > &diff_u, const std::shared_ptr< StateVec > &grad_u, const std::shared_ptr< StateVec > &constraints)=0
Callback called after each iteration.
IP_SSATaucTaoTikhonovProblemLCLListener()
Iteration callback class for IP_SSATaucTaoTikhonovProblemLCL.
virtual ~IP_SSATaucTaoTikhonovProblemLCL()=default
std::shared_ptr< DesignVecGhosted > m_d
IPFunctional< array::Scalar > & m_designFunctional
array::Scalar1 m_d_Jdesign
virtual std::shared_ptr< StateVec > stateSolution()
virtual void addListener(Listener::Ptr listener)
array::Vector1 m_u_Jdesign
virtual void applyConstraintsJacobianDesignTranspose(Vec x, Vec y)
virtual std::shared_ptr< DesignVec > designSolution()
virtual void evaluateObjectiveAndGradient(Tao tao, Vec x, double *value, Vec gradient)
static PetscErrorCode jacobian_design_transpose_callback(Mat A, Vec x, Vec y)
virtual void evaluateConstraints(Tao tao, Vec x, Vec r)
std::shared_ptr< DesignVec > m_grad_design
virtual void setInitialGuess(DesignVec &d0)
std::vector< Listener::Ptr > m_listeners
IPFunctional< array::Vector > & m_stateFunctional
std::shared_ptr< StateVec > m_grad_state
std::shared_ptr< StateVec > m_constraints
std::shared_ptr< DesignVecGhosted > m_d_diff
virtual void evaluateConstraintsJacobianState(Tao tao, Vec x, Mat Jstate, Mat Jpc, Mat Jinv, MatStructure *s)
virtual std::shared_ptr< TerminationReason > formInitialGuess(Vec *x)
IP_SSATaucTaoTikhonovProblemLCL(IP_SSATaucForwardProblem &ssaforward, DesignVec &d0, StateVec &u_obs, double eta, IPFunctional< DesignVec > &designFunctional, IPFunctional< StateVec > &stateFunctional)
std::unique_ptr< IPTwoBlockVec > m_x
array::Scalar1 DesignVecGhosted
std::shared_ptr< StateVec > m_u_diff
IP_SSATaucForwardProblem & m_ssaforward
virtual void applyConstraintsJacobianDesign(Vec x, Vec y)
IP_SSATaucTaoTikhonovProblemLCLListener Listener
virtual void evaluateConstraintsJacobianDesign(Tao tao, Vec x, Mat Jdesign)
static PetscErrorCode jacobian_design_callback(Mat A, Vec x, Vec y)
double m_constraintsScale
std::shared_ptr< StateVec > m_uGlobal
Defines a Tikhonov minimization problem of determining from SSA velocities to be solved with a TaoBa...