KADATH
polar_adapted_add_eq.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 "adapted_polar.hpp"
21 #include "system_of_eqs.hpp"
22 namespace Kadath {
23 void Space_polar_adapted::add_eq (System_of_eqs& sys, const char* eq, const char* rac, const char* rac_der, int nused, Array<int>** pused) const {
24  for (int dd=sys.get_dom_min() ; dd<sys.get_dom_max(); dd++) {
25  sys.add_eq_inside (dd, eq, nused, pused) ;
26  sys.add_eq_matching (dd, OUTER_BC, rac, nused, pused) ;
27  sys.add_eq_matching (dd, OUTER_BC, rac_der, nused, pused) ;
28  }
29  sys.add_eq_inside (sys.get_dom_max(), eq, nused, pused) ;
30 }}
void add_eq(System_of_eqs &syst, const char *eq, const char *rac, const char *rac_der, int nused=-1, Array< int > **pused=0x0) const
Adds a bulk equation and two matching conditions.
Class used to describe and solve a system of equations.
virtual void add_eq_inside(int dom, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
Addition of an equation to be solved inside a domain (assumed to be second order).
Definition: add_eq.cpp:26
virtual void add_eq_matching(int dom, int bb, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
Addition of an equation describing a matching condition between two domains (standard setting)
Definition: add_eq.cpp:198
int get_dom_max() const
Returns the highest index of the domains.
int get_dom_min() const
Returns the smallest index of the domains.