PISM, A Parallel Ice Sheet Model 2.2.1-cd005eec8 committed by Constantine Khrulev on 2025-03-07
Loading...
Searching...
No Matches
IP_SSATaucTaoTikhonovProblem.cc
Go to the documentation of this file.
1// Copyright (C) 2013, 2014, 2015, 2016, 2023 David Maxwell and Constantine Khroulev
2//
3// This file is part of PISM.
4//
5// PISM is free software; you can redistribute it and/or modify it under the
6// terms of the GNU General Public License as published by the Free Software
7// Foundation; either version 2 of the License, or (at your option) any later
8// version.
9//
10// PISM is distributed in the hope that it will be useful, but WITHOUT ANY
11// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13// details.
14//
15// You should have received a copy of the GNU General Public License
16// along with PISM; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19
20#include "pism/inverse/IP_SSATaucTaoTikhonovProblem.hh"
21
22namespace pism {
23namespace inverse {
24
26 PetscErrorCode ierr;
27
29
30 const char *type;
31 ierr = TaoGetType(tao,&type);
32 PISM_CHK(ierr, "TaoGetType");
33
34 if (strcmp(type,"blmvm") == 0) {
36 }
37}
38
39
40void IP_SSATaucTaoTikhonovProblem::getVariableBounds(Tao /*tao*/, Vec lo, Vec hi) {
41 double zeta_min = 0.0, zeta_max = 0.0, tauc_min = 0.0, tauc_max = 0.0;
42
43 tauc_min = m_grid->ctx()->config()->get_number("inverse.ssa.tauc_min");
44 tauc_max = m_grid->ctx()->config()->get_number("inverse.ssa.tauc_max");
45
47 tauc_param.fromDesignVariable(tauc_min,&zeta_min);
48 tauc_param.fromDesignVariable(tauc_max,&zeta_max);
49
50 PetscErrorCode ierr = VecSet(lo,zeta_min);
51 PISM_CHK(ierr, "VecSet");
52
53 ierr = VecSet(hi,zeta_max);
54 PISM_CHK(ierr, "VecSet");
55}
56
57
58} // end of namespace inverse
59} // end of namespace pism
virtual void fromDesignVariable(double d, double *OUTPUT)=0
Converts from to a parameterization value such that .
virtual void connect(Tao tao)
Callback from TaoBasicSolver, used to wire the connections between a Tao and.
virtual IPDesignVariableParameterization & tauc_param()
Exposes the parameterization being used.
virtual void connect(Tao tao)
Callback from TaoBasicSolver, used to wire the connections between a Tao and.
virtual void getVariableBounds(Tao tao, Vec lo, Vec hi)
Callback to TAO to set bounds on for constrained minimization algorithms.
static void connect(Tao tao, Problem &p)
Definition TaoUtil.hh:279
#define PISM_CHK(errcode, name)