KADATH
domain_critic_outer_ope.cpp
1 /*
2  Copyright 2017 Philippe Grandclement
3 
4  This file is part of Kadath.
5 
6  Kadath is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Kadath is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Kadath. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #include "headcpp.hpp"
21 #include "critic.hpp"
22 #include "array_math.hpp"
23 #include "val_domain.hpp"
24 namespace Kadath {
25 int div_x_1d (int, Array<double>&) ;
26 
28 
29  switch (which_var) {
30  case 0 :
31  return so.der_var(1)/(1-xlim)*2. ;
32  break ;
33  case 1 :
34  return so.der_var(2) ;
35  break ;
36 
37  default:
38  cerr << "Unknown variable in Domain_critic_outer::der_partial_var" << endl ;
39  abort() ;
40  }
41 }}
virtual Val_domain der_partial_var(const Val_domain &, int) const
Partial derivative with respect to a coordinate.
double xlim
Relates the numerical to the variable.
Definition: critic.hpp:202
Class for storing the basis of decompositions of a field and its values on both the configuration and...
Definition: val_domain.hpp:69
Val_domain der_var(int i) const
Computes the derivative with respect to a numerical coordinate.
Definition: val_domain.cpp:670