KADATH
space.hpp
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 #ifndef __SPACE_HPP_
21 #define __SPACE_HPP_
22 
23 #include "headcpp.hpp"
24 #include "base_spectral.hpp"
25 #include "array.hpp"
26 #include "param.hpp"
27 
28 #define CHEB_TYPE 1
29 #define LEG_TYPE 2
30 
31 
32 
33 #define OUTER_BC 1
34 #define INNER_BC 2
35 #define CHI_ONE_BC 3
36 #define ETA_PLUS_BC 4
37 #define ETA_MINUS_BC 5
38 #define TIME_INIT 6
39 
40 #include "point.hpp"
41 
42 namespace Kadath {
43  class Space ;
44  class Scalar ;
45  class System_of_eqs ;
46  class Val_domain ;
47  class Term_eq ;
48  class Base_tensor ;
49  class Metric ;
50  class Tensor ;
51 
60  class Domain : public Memory_mapped {
61 
62  protected:
63  int num_dom ;
64  int ndim ;
66  mutable Dim_array nbr_coefs ;
67 
73  int type_base ;
74 
75  Memory_mapped_array<Array<double>*> coloc ;
76  mutable Memory_mapped_array<Val_domain*> absol ;
77  mutable Memory_mapped_array<Val_domain*> cart ;
78  mutable Val_domain* radius ;
79  mutable Memory_mapped_array<Val_domain*> cart_surr ;
80 
81  explicit Domain (int num, int ttype, const Dim_array& res) ;
82  explicit Domain (int, FILE*) ;
83  Domain (const Domain& so) ;
84  Domain(Domain && so) noexcept;
85 
86  public:
87  virtual ~Domain() {del_deriv();}
88  virtual void save (FILE*) const ;
90  int get_num() const {return num_dom ;}
92  Dim_array const & get_nbr_points() const {return nbr_points ;}
94  Dim_array const & get_nbr_coefs() const {return nbr_coefs ;}
96  int get_ndim() const {return ndim; }
98  int get_type_base() const {return type_base ;}
99  Array<double> const & get_coloc (int) const ;
100  virtual Point get_center() const ;
101  virtual const Val_domain & get_chi() const ;
102  virtual const Val_domain & get_eta() const ;
103  virtual const Val_domain & get_X() const ;
104  virtual const Val_domain & get_T() const ;
105 
106  public:
107  Val_domain const & get_absol(int i) const ;
108  Val_domain const & get_radius() const ;
113  Val_domain const & get_cart(int i) const ;
118  Val_domain const & get_cart_surr(int i) const ;
119 
120  protected:
125  virtual void del_deriv() ;
126  virtual void do_radius () const ;
127  virtual void do_cart () const ;
128  virtual void do_cart_surr () const ;
129  virtual void do_absol() const ;
130 
131  public:
133  void operator= (const Domain&) = delete;
135  Domain& operator=(Domain &&) noexcept;
136 
137  private:
142  virtual void set_cheb_base(Base_spectral& so) const ;
147  virtual void set_legendre_base(Base_spectral& so) const ;
152  virtual void set_anti_cheb_base(Base_spectral& so) const ;
157  virtual void set_anti_legendre_base(Base_spectral& so) const ;
163  virtual void set_cheb_base_with_m(Base_spectral& so, int m) const ;
169  virtual void set_legendre_base_with_m(Base_spectral& so, int m) const ;
175  virtual void set_anti_cheb_base_with_m(Base_spectral& so, int m) const ;
181  virtual void set_anti_legendre_base_with_m(Base_spectral& so, int m) const ;
182 
183 
188  virtual void set_cheb_base_r_spher(Base_spectral& so) const ;
189 
194  virtual void set_cheb_base_t_spher(Base_spectral& so) const ;
199  virtual void set_cheb_base_p_spher(Base_spectral& so) const ;
204  virtual void set_cheb_base_r_mtz(Base_spectral& so) const ;
205 
210  virtual void set_cheb_base_t_mtz(Base_spectral& so) const ;
215  virtual void set_cheb_base_p_mtz(Base_spectral& so) const ;
216 
221  virtual void set_cheb_base_rt_spher(Base_spectral& so) const ;
226  virtual void set_cheb_base_rp_spher(Base_spectral& so) const ;
231  virtual void set_cheb_base_tp_spher(Base_spectral& so) const ;
232 
237  virtual void set_legendre_base_r_spher(Base_spectral& so) const ;
242  virtual void set_legendre_base_t_spher(Base_spectral& so) const ;
247  virtual void set_legendre_base_p_spher(Base_spectral& so) const ;
252  virtual void set_legendre_base_r_mtz(Base_spectral& so) const ;
257  virtual void set_legendre_base_t_mtz(Base_spectral& so) const ;
262  virtual void set_legendre_base_p_mtz(Base_spectral& so) const ;
263 
268  virtual void set_cheb_base_x_cart(Base_spectral& so) const ;
273  virtual void set_cheb_base_y_cart(Base_spectral& so) const ;
278  virtual void set_cheb_base_z_cart(Base_spectral& so) const ;
283  virtual void set_cheb_base_xy_cart(Base_spectral& so) const ;
288  virtual void set_cheb_base_xz_cart(Base_spectral& so) const ;
293  virtual void set_cheb_base_yz_cart(Base_spectral& so) const ;
298  virtual void set_legendre_base_x_cart(Base_spectral& so ) const ;
303  virtual void set_legendre_base_y_cart(Base_spectral& so) const ;
308  virtual void set_legendre_base_z_cart(Base_spectral& so) const ;
309 
314  virtual void set_cheb_xodd_base(Base_spectral& so) const ;
319  virtual void set_legendre_xodd_base(Base_spectral& so) const ;
324  virtual void set_cheb_todd_base(Base_spectral& so) const ;
329  virtual void set_legendre_todd_base(Base_spectral& so) const ;
334  virtual void set_cheb_xodd_todd_base(Base_spectral& so) const ;
339  virtual void set_legendre_xodd_todd_base(Base_spectral& so) const ;
340 
345  virtual void set_cheb_base_odd(Base_spectral& so) const ;
350  virtual void set_legendre_base_odd(Base_spectral& so) const ;
351 
356  virtual void set_cheb_r_base(Base_spectral& so) const ;
361  virtual void set_legendre_r_base(Base_spectral& so) const ;
362 
363  virtual void do_coloc () ;
364 
365  public:
372  virtual bool is_in(const Point& xx, double prec=1e-13) const ;
378  virtual const Point absol_to_num(const Point& xxx) const ;
385  virtual const Point absol_to_num_bound(const Point& xxx, int bound) const ;
392  virtual void do_der_abs_from_der_var(const Val_domain *const *const der_var, Val_domain **const der_abs) const ;
397  virtual Base_spectral mult (const Base_spectral&, const Base_spectral&) const ;
398 
399  public:
400 
401  virtual double get_rmin() const ;
402  virtual double get_rmax() const ;
403 
407  virtual Val_domain mult_cos_phi (const Val_domain&) const ;
411  virtual Val_domain mult_sin_phi (const Val_domain&) const ;
415  virtual Val_domain mult_cos_theta (const Val_domain&) const ;
419  virtual Val_domain mult_sin_theta (const Val_domain&) const ;
423  virtual Val_domain div_sin_theta (const Val_domain&) const ;
427  virtual Val_domain div_cos_theta (const Val_domain&) const ;
431  virtual Val_domain div_x (const Val_domain&) const ;
435  virtual Val_domain div_chi (const Val_domain&) const ;
439  virtual Val_domain div_xm1 (const Val_domain&) const ;
443  virtual Val_domain div_1mx2 (const Val_domain&) const ;
447  virtual Val_domain div_xp1 (const Val_domain&) const ;
451  virtual Val_domain mult_xm1 (const Val_domain&) const ;
455  virtual Val_domain div_sin_chi (const Val_domain&) const ;
459  virtual Val_domain mult_cos_time (const Val_domain&) const ;
463  virtual Val_domain mult_sin_time (const Val_domain&) const ;
464 
471  virtual Tensor change_basis_cart_to_spher (int dd, const Tensor& so) const ;
472 
479  virtual Tensor change_basis_spher_to_cart (int dd, const Tensor& so) const ;
480 
487  virtual Val_domain laplacian (const Val_domain& so, int m) const ;
494  virtual Val_domain laplacian2 (const Val_domain& so, int m) const ;
495 
501  virtual Val_domain der_r (const Val_domain& so) const ;
502 
508  virtual Val_domain der_t (const Val_domain& so) const ;
509 
515  virtual Val_domain der_p (const Val_domain& so) const ;
516 
522  virtual Val_domain der_r_rtwo (const Val_domain& so) const ;
528  virtual Val_domain srdr (const Val_domain& so) const ;
534  virtual Val_domain ddr (const Val_domain& so) const ;
540  virtual Val_domain ddp (const Val_domain& so) const ;
546  virtual Val_domain ddt (const Val_domain& so) const ;
552  virtual Val_domain dt (const Val_domain& so) const ;
553 
554 
560  virtual Val_domain dtime (const Val_domain& so) const ;
561 
567  virtual Val_domain ddtime (const Val_domain& so) const ;
568 
569 
576  virtual const Term_eq* give_normal (int bound, int tipe) const ;
577 
578  // Multipoles extraction
588  virtual double multipoles_sym (int k, int j, int bound, const Val_domain& so, const Array<double>& passage) const ;
589 
599  virtual double multipoles_asym (int k, int j, int bound, const Val_domain& so, const Array<double>& passage) const ;
600 
610  virtual Term_eq multipoles_sym (int k, int j, int bound, const Term_eq& so, const Array<double>& passage) const ;
620  virtual Term_eq multipoles_asym (int k, int j, int bound, const Term_eq& so, const Array<double>& passage) const ;
621 
632  virtual Term_eq radial_part_sym (const Space& space, int k, int j, const Term_eq& omega, Term_eq (*f) (const Space&, int, int, const Term_eq&, const Param&), const Param& param) const ;
643  virtual Term_eq radial_part_asym (const Space& space, int k, int j, const Term_eq& omega, Term_eq (*f) (const Space&, int, int, const Term_eq&, const Param&), const Param& param) const ;
644 
655  virtual Term_eq harmonics_sym (const Term_eq& so, const Term_eq& omega, int bound , Term_eq (*f) (const Space&, int, int, const Term_eq&, const Param&), const Param& param, const Array<double>& passage) const ;
656 
667  virtual Term_eq harmonics_asym (const Term_eq& so, const Term_eq& omega, int bound, Term_eq (*f) (const Space&, int, int, const Term_eq&, const Param&), const Param& param, const Array<double>& passage) const ;
668 
678  virtual Term_eq der_multipoles_sym (int k, int j, int bound, const Term_eq& so, const Array<double>& passage) const ;
679 
689  virtual Term_eq der_multipoles_asym (int k, int j, int bound, const Term_eq& so, const Array<double>& passage) const ;
690 
691 
692 
703  virtual Term_eq der_radial_part_asym (const Space& space, int k, int j, const Term_eq& omega, Term_eq (*f) (const Space&, int, int, const Term_eq&, const Param&), const Param& param) const ;
704 
715  virtual Term_eq der_radial_part_sym (const Space& space, int k, int j, const Term_eq& omega, Term_eq (*f) (const Space&, int, int, const Term_eq&, const Param& param), const Param& param) const ;
716 
717 
728  virtual Term_eq der_harmonics_sym (const Term_eq& so, const Term_eq& omega, int bound, Term_eq (*f) (const Space&, int, int, const Term_eq&, const Param&), const Param& param, const Array<double>& passage) const ;
729 
740  virtual Term_eq der_harmonics_asym (const Term_eq& so, const Term_eq& omega, int bound, Term_eq (*f) (const Space&, int, int, const Term_eq&, const Param&), const Param& param, const Array<double>& passage) const ;
741 
742  // Abstract stuff
743  protected:
751  Term_eq do_comp_by_comp (const Term_eq& so, Val_domain (Domain::*pfunc) (const Val_domain&) const) const ;
761  Term_eq do_comp_by_comp_with_int (const Term_eq& so, int val, Val_domain (Domain::*pfunc) (const Val_domain&, int) const) const ;
762 
763  public:
770  virtual Term_eq der_normal_term_eq (const Term_eq& so, int bound) const ;
771 
777  virtual Term_eq div_1mx2_term_eq (const Term_eq&) const ;
778 
785  virtual Term_eq lap_term_eq (const Term_eq& so, int m) const ;
786 
793  virtual Term_eq lap2_term_eq (const Term_eq& so, int m) const ;
794 
800  virtual Term_eq mult_r_term_eq (const Term_eq& so) const ;
801 
807  virtual Term_eq integ_volume_term_eq (const Term_eq& so) const ;
808 
814  virtual Term_eq grad_term_eq (const Term_eq& so) const ;
815 
821  virtual Term_eq div_r_term_eq (const Term_eq&) const ;
822 
823 
830  virtual Term_eq integ_term_eq (const Term_eq& so, int bound) const ;
831 
837  virtual Term_eq dr_term_eq (const Term_eq& so) const ;
838 
844  virtual Term_eq dtime_term_eq (const Term_eq& so) const ;
845 
851  virtual Term_eq ddtime_term_eq (const Term_eq& so) const ;
852 
863  virtual Term_eq derive_flat_spher (int tipe, char ind, const Term_eq& so, const Metric* manip) const ;
864 
865 
877  virtual Term_eq derive_flat_mtz (int tipe, char ind, const Term_eq& so, const Metric* manip) const ;
878 
879 
890  virtual Term_eq derive_flat_cart (int tipe, char ind, const Term_eq& so, const Metric* manip) const ;
891 
895  virtual int nbr_unknowns_from_adapted () const {return 0;} ;
899  virtual void vars_to_terms() const {} ;
906  virtual void affecte_coef(int& conte, int cc, bool& found) const {} ;
913  virtual void xx_to_vars_from_adapted (Val_domain& shape, const Array<double>& xx, int& conte) const {} ;
914 
921  virtual void xx_to_vars_from_adapted (double bound, const Array<double>& xx, int& conte) const {} ;
922 
928  virtual void xx_to_ders_from_adapted (const Array<double>& xx, int& conte) const {} ;
929 
934  virtual void update_term_eq (Term_eq* so) const ;
942  virtual void update_variable (const Val_domain& shape, const Scalar& oldval, Scalar& newval) const {} ;
943 
944 
952  virtual void update_variable (double bound, const Scalar& oldval, Scalar& newval) const {} ;
953 
961  virtual void update_constante (const Val_domain& shape, const Scalar& oldval, Scalar& newval) const {} ;
962 
970  virtual void update_constante (double bound, const Scalar& oldval, Scalar& newval) const {} ;
971 
972 
977  virtual void update_mapping(const Val_domain& shape) {} ;
982  virtual void update_mapping(double bound) {} ;
983 
989  virtual void set_val_inf (Val_domain& so, double xx) const ;
995  virtual Val_domain mult_r (const Val_domain& so) const ;
1001  virtual Val_domain mult_x (const Val_domain& so) const ;
1007  virtual Val_domain div_r (const Val_domain& so) const ;
1013  virtual Val_domain div_1mrsL (const Val_domain& so) const ;
1019  virtual Val_domain mult_1mrsL (const Val_domain& so) const ;
1020 
1026  virtual double integ_volume (const Val_domain& so) const ;
1027 
1035  virtual void find_other_dom (int dom, int bound, int& otherdom, int& otherbound) const ;
1042  virtual Val_domain der_normal (const Val_domain& so, int bound) const ;
1049  virtual Val_domain der_partial_var (const Val_domain& so, int ind) const ;
1050 
1057  virtual double integ (const Val_domain& so, int bound) const ;
1063  virtual double integrale (const Val_domain& so) const ;
1064 
1070  virtual Term_eq partial_spher (const Term_eq& so) const ;
1076  virtual Term_eq partial_cart (const Term_eq& so) const ;
1083  virtual Term_eq partial_mtz (const Term_eq& so) const ;
1089  virtual Term_eq connection_spher (const Term_eq& so) const ;
1096  virtual Term_eq connection_mtz (const Term_eq& so) const ;
1097 
1105  virtual double val_boundary (int bound, const Val_domain& so, const Index& ind) const ;
1112  virtual int nbr_points_boundary (int bound, const Base_spectral& base) const ;
1120  virtual void do_which_points_boundary (int bound, const Base_spectral& base, Index** ind, int start) const ;
1121 
1129  virtual int nbr_unknowns (const Tensor& so, int dom) const ;
1140  virtual Array<int> nbr_conditions (const Tensor& eq, int dom, int order, int n_cmp=-1, Array<int>** p_cmp=0x0) const ;
1152  virtual Array<int> nbr_conditions_boundary (const Tensor& eq, int dom, int bound, int n_cmp=-1, Array<int>** p_cmp=0x0) const ;
1153 
1166  virtual void export_tau (const Tensor& eq, int dom, int order, Array<double>& res, int& pos_res, const Array<int>& ncond,int n_cmp=-1, Array<int>** p_cmp=0x0) const ;
1167 
1180  virtual void export_tau_boundary (const Tensor& eq , int dom, int bound, Array<double>& res, int& pos_res, const Array<int>& ncond, int n_cmp=-1, Array<int>** p_cmp=0x0) const ;
1181 
1197  virtual void export_tau_boundary_exception (const Tensor& eq, int dom, int bound, Array<double>& res, int& pos_res, const Array<int>& ncond,
1198  const Param& param, int type_exception, const Tensor& exception, int n_cmp=-1, Array<int>** p_cmp=0x0) const ;
1199 
1208  virtual void affecte_tau (Tensor& so, int dom, const Array<double>& cf, int& pos_cf) const ;
1209 
1218  virtual void affecte_tau_one_coef (Tensor& so, int dom, int cc, int& pos_cf) const ;
1219 
1230  virtual Array<int> nbr_conditions_array (const Tensor& eq, int dom, const Array<int>& order, int n_cmp=-1, Array<int>** p_cmp=0x0) const ;
1243  virtual Array<int> nbr_conditions_boundary_array (const Tensor& eq, int dom, int bound, const Array<int>& order, int n_cmp=-1, Array<int>** p_cmp=0x0) const ;
1244 
1257  virtual void export_tau_array (const Tensor& eq, int dom, const Array<int>& order, Array<double>& res, int& pos_res, const Array<int>& ncond,
1258  int n_cmp=-1, Array<int>** p_cmp=0x0) const ;
1272  virtual void export_tau_boundary_array (const Tensor& eq, int dom, int bound, const Array<int>& order, Array<double>& res, int& pos_res,
1273  const Array<int>& ncond, int n_cmp=-1, Array<int>** p_cmp=0x0) const ;
1274 
1287  virtual Array<int> nbr_conditions_boundary_one_side (const Tensor& eq, int dom, int bound, int n_cmp=-1, Array<int>** p_cmp=0x0) const ;
1288 
1302  virtual void export_tau_boundary_one_side (const Tensor& eq, int dom, int bound, Array<double>& res, int& pos_res,
1303  const Array<int>& ncond, int n_cmp=-1, Array<int>** p_cmp=0x0) const ;
1304 
1310  virtual int give_place_var (char* name) const ;
1311 
1322  Term_eq import (int numdom, int bound, int n_ope, Term_eq** parts) const ;
1323 
1334  virtual Tensor import (int numdom, int bound, int n_ope, const Array<int>& other_doms, Tensor** parts) const ;
1335 
1343  virtual void filter (Tensor& tt, int dom, double treshold) const ;
1344  public:
1350  virtual ostream & print(ostream &o) const = 0;
1351  friend inline ostream& operator<< (ostream& o, const Domain& so) {return so.print(o);}
1352  friend class Val_domain ;
1353  friend class Metric_ADS ;
1354  friend class Metric_AADS ;
1355  } ;
1356 
1362  class Space {
1363 
1364  protected:
1366  int ndim ;
1367  int type_base ;
1369  Space () ;
1370  virtual ~Space () ;
1371 
1372  public:
1373  int get_ndim() const
1374  {return ndim ;} ;
1375  int get_nbr_domains() const
1376  {return nbr_domains ;} ;
1377  int get_type_base() const
1378  {return type_base ;} ;
1379  virtual void save (FILE*) const ;
1380 
1385  const Domain* get_domain(int i) const {
1386  assert ((i>=0) && (i<nbr_domains)) ;
1387  return domains[i] ;
1388  }
1389 
1390  // Things for adapted domains
1394  virtual int nbr_unknowns_from_variable_domains() const {return 0;} ;
1401  virtual void affecte_coef_to_variable_domains (int&conte, int cc, Array<int>& doms) const {};
1407  virtual void xx_to_ders_variable_domains (const Array<double>& xx, int& conte) const {};
1414  virtual void xx_to_vars_variable_domains (System_of_eqs* syst, const Array<double>& xx, int& conte) const {};
1415 
1423  virtual Array<int> get_indices_matching_non_std(int dom, int bound) const ;
1424 
1425  friend ostream& operator << (ostream& o, const Space& so) ;
1426  } ;
1427 
1428  // standard constructor
1429  inline Domain::Domain (int num, int ttype, const Dim_array& res) :
1430  num_dom{num}, ndim{res.get_ndim()}, nbr_points{res}, nbr_coefs{ndim}, type_base{ttype} , coloc{ndim,initialize},
1431  absol{ndim,initialize}, cart{ndim,initialize}, radius{nullptr}, cart_surr{ndim,initialize}
1432  {}
1433 
1434  inline Domain::Domain(Domain && so) noexcept :
1435  num_dom{so.num_dom}, ndim{so.ndim}, nbr_points{std::move(so.nbr_points)}, nbr_coefs{std::move(so.nbr_coefs)},
1436  type_base{so.type_base}, coloc{std::move(so.coloc)}, absol{std::move(so.absol)}, cart{std::move(so.cart)},
1437  radius{so.radius}, cart_surr{std::move(so.cart_surr)}
1438  {
1439  so.radius = nullptr;
1440  }
1441 
1442  inline Domain & Domain::operator=(Domain && so) noexcept {
1443  num_dom = so.num_dom;
1444  ndim = so.ndim;
1445  nbr_points = std::move(so.nbr_points);
1446  nbr_coefs = std::move(so.nbr_coefs);
1447  type_base = so.type_base;
1448  coloc = std::move(so.coloc);
1449  absol = std::move(so.absol);
1450  cart = std::move(so.cart);
1451  std::swap(radius,so.radius);
1452  cart_surr = std::move(so.cart_surr);
1453  return *this;
1454  }
1455 
1456 // Returns absolute coordinates
1457  inline Val_domain const & Domain::get_absol(int i) const {
1458  assert ((i>0) && (i<=ndim)) ;
1459  if (absol[i-1]== nullptr)
1460  do_absol() ;
1461  return *absol[i-1] ;
1462  }
1463 
1464 // Returns the generalized radius
1465  inline Val_domain const & Domain::get_radius() const {
1466  if (radius == nullptr)
1467  do_radius() ;
1468  return *radius ;
1469  }
1470 // Returns cartesian coordinate
1471  inline Val_domain const & Domain::get_cart(int i) const {
1472  assert ((i>0) && (i<=ndim)) ;
1473  if (cart[i-1]== nullptr)
1474  do_cart() ;
1475  return *cart[i-1] ;
1476  }
1477 
1478 // Returns cartesian coordinate over radius
1479  inline Val_domain const & Domain::get_cart_surr(int i) const {
1480  assert ((i>0) && (i<=ndim)) ;
1481  if (cart_surr[i-1]== nullptr)
1482  do_cart_surr() ;
1483  return *cart_surr[i-1] ;
1484  }
1485 
1486  inline Array<double> const & Domain::get_coloc (int i) const {
1487  assert ((i>0) && (i<=ndim)) ;
1488  assert (coloc[i-1] !=nullptr) ;
1489  return *coloc[i-1] ;
1490  }
1491 
1492 }
1493 #endif
Class for storing the basis of decompositions of a field.
Class for storing the dimensions of an array.
Definition: dim_array.hpp:34
Abstract class that implements the fonctionnalities common to all the type of domains.
Definition: space.hpp:60
virtual void del_deriv()
Destroys the derivated members (like coloc, cart and radius), when changing the type of colocation po...
Definition: domain.cpp:77
virtual void export_tau_array(const Tensor &eq, int dom, const Array< int > &order, Array< double > &res, int &pos_res, const Array< int > &ncond, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to one tensorial one in the bulk.
Definition: domain.cpp:1539
Val_domain * radius
The generalized radius.
Definition: space.hpp:78
virtual Val_domain div_cos_theta(const Val_domain &) const
Division by .
Definition: domain.cpp:1254
virtual const Val_domain & get_T() const
Returns the variable .
Definition: domain.cpp:1405
virtual void set_legendre_base_odd(Base_spectral &so) const
Gives the base using odd Legendre polynomials$.
Definition: domain.cpp:1164
virtual Point get_center() const
Returns the center.
Definition: domain.cpp:1381
virtual void set_cheb_base_yz_cart(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the component of a vector.
Definition: domain.cpp:1183
virtual Val_domain laplacian(const Val_domain &so, int m) const
Computes the ordinary flat Laplacian for a scalar field with an harmonic index m.
Definition: domain.cpp:87
virtual void xx_to_ders_from_adapted(const Array< double > &xx, int &conte) const
Affects the derivative part of variable a Domain from a set of values.
Definition: space.hpp:928
virtual Val_domain ddr(const Val_domain &so) const
Compute the second radial derivative w of a scalar field.
Definition: domain.cpp:1452
virtual void set_cheb_base_r_mtz(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the radial component of a vector in the MTZ setting.
Definition: domain.cpp:1089
virtual Term_eq derive_flat_spher(int tipe, char ind, const Term_eq &so, const Metric *manip) const
Computes the flat derivative of a Term_eq, in spherical orthonormal coordinates.
Definition: domain.cpp:1721
Memory_mapped_array< Val_domain * > cart
Cartesian coordinates.
Definition: space.hpp:77
virtual Term_eq partial_mtz(const Term_eq &so) const
Computes the part of the gradient containing the partial derivative of the field, in orthonormal coor...
Definition: domain.cpp:463
virtual void set_val_inf(Val_domain &so, double xx) const
Sets the value at infinity of a Val_domain : not implemented for this type of Domain.
Definition: domain.cpp:1266
virtual void filter(Tensor &tt, int dom, double treshold) const
Puts to zero all the coefficients below a given treshold.
Definition: domain.cpp:1759
virtual void do_der_abs_from_der_var(const Val_domain *const *const der_var, Val_domain **const der_abs) const
Computes the derivative with respect to the absolute Cartesian coordinates from the derivative with r...
Definition: domain.cpp:960
virtual Val_domain der_p(const Val_domain &so) const
Compute the derivative with respect to of a scalar field.
Definition: domain.cpp:1440
Memory_mapped_array< Val_domain * > absol
Asbolute coordinates (if defined ; usually Cartesian-like)
Definition: space.hpp:76
virtual void set_anti_legendre_base(Base_spectral &so) const
Gives the base using Legendre polynomials, for functions antisymetric with respect to .
Definition: domain.cpp:1007
int get_ndim() const
Returns the number of dimensions.
Definition: space.hpp:96
virtual int nbr_unknowns_from_adapted() const
Gives the number of unknowns coming from the variable shape of the domain.
Definition: space.hpp:895
virtual Base_spectral mult(const Base_spectral &, const Base_spectral &) const
Method for the multiplication of two Base_spectral.
Definition: domain.cpp:966
virtual Val_domain mult_sin_theta(const Val_domain &) const
Multiplication by .
Definition: domain.cpp:1236
int ndim
Number of dimensions.
Definition: space.hpp:64
virtual void vars_to_terms() const
The Term_eq describing the variable shape of the Domain are updated.
Definition: space.hpp:899
virtual Term_eq radial_part_sym(const Space &space, int k, int j, const Term_eq &omega, Term_eq(*f)(const Space &, int, int, const Term_eq &, const Param &), const Param &param) const
Gives some radial fit for a given multipole, intended for symmetric scalar function.
Definition: domain.cpp:1647
virtual Val_domain mult_cos_phi(const Val_domain &) const
Multiplication by .
Definition: domain.cpp:1230
virtual Val_domain div_xm1(const Val_domain &) const
Division by .
Definition: domain.cpp:1272
Term_eq do_comp_by_comp(const Term_eq &so, Val_domain(Domain::*pfunc)(const Val_domain &) const) const
Function used to apply the same operation to all the components of a tensor, in the current domain.
Definition: domain.cpp:283
virtual Val_domain div_sin_chi(const Val_domain &) const
Division by .
Definition: domain.cpp:1345
virtual Val_domain div_1mrsL(const Val_domain &so) const
Division by .
Definition: domain.cpp:1284
virtual ~Domain()
Destructor.
Definition: space.hpp:87
virtual Val_domain mult_cos_time(const Val_domain &) const
Multiplication by .
Definition: domain.cpp:1315
virtual Term_eq integ_term_eq(const Term_eq &so, int bound) const
Surface integral of a Term_eq.
Definition: domain.cpp:187
virtual double get_rmax() const
Returns the maximum radius.
Definition: domain.cpp:1369
virtual Array< int > nbr_conditions_array(const Tensor &eq, int dom, const Array< int > &order, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
Definition: domain.cpp:1510
Dim_array const & get_nbr_coefs() const
Returns the number of coefficients.
Definition: space.hpp:94
virtual Val_domain ddp(const Val_domain &so) const
Compute the second derivative with respect to of a scalar field.
Definition: domain.cpp:1456
int get_num() const
Returns the index of the curent domain.
Definition: space.hpp:90
virtual Val_domain der_r(const Val_domain &so) const
Compute the radial derivative of a scalar field.
Definition: domain.cpp:1429
virtual Val_domain der_partial_var(const Val_domain &so, int ind) const
Partial derivative with respect to a coordinate.
Definition: domain.cpp:1423
virtual const Term_eq * give_normal(int bound, int tipe) const
Returns the vector normal to a surface.
Definition: domain.cpp:1715
Memory_mapped_array< Val_domain * > cart_surr
Cartesian coordinates divided by the radius.
Definition: space.hpp:79
virtual void update_term_eq(Term_eq *so) const
Update the value of a field, after the shape of the Domain has been changed by the system.
Definition: domain.cpp:1749
virtual void set_cheb_base_rt_spher(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the component of a 2-tensor.
Definition: domain.cpp:1106
virtual Val_domain dtime(const Val_domain &so) const
Computes the time derivative of a field.
Definition: domain.cpp:1474
virtual void set_legendre_base_t_mtz(Base_spectral &so) const
Gives the base using Legendre polynomials, for the component of a vector in the MTZ context.
Definition: domain.cpp:1147
virtual Val_domain div_xp1(const Val_domain &) const
Division by .
Definition: domain.cpp:1278
virtual double val_boundary(int bound, const Val_domain &so, const Index &ind) const
Computes the value of a field at a boundary.
Definition: domain.cpp:1581
virtual Val_domain mult_xm1(const Val_domain &) const
Multiplication by .
Definition: domain.cpp:1297
virtual void affecte_coef(int &conte, int cc, bool &found) const
The variation of the functions describing the shape of the Domain are affected from the unknowns of t...
Definition: space.hpp:906
virtual Term_eq div_r_term_eq(const Term_eq &) const
Division by of a Term_eq.
Definition: domain.cpp:169
Val_domain const & get_absol(int i) const
Returns the absolute coordinates.
Definition: space.hpp:1457
virtual void set_cheb_base_xz_cart(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the component of a vector.
Definition: domain.cpp:1176
virtual Val_domain dt(const Val_domain &so) const
Compute the derivative with respect to of a scalar field.
Definition: domain.cpp:1468
virtual void set_cheb_xodd_base(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for odd functions in (critic space case)
Definition: domain.cpp:1036
virtual int nbr_unknowns(const Tensor &so, int dom) const
Computes the number of true unknowns of a Tensor, in a given domain.
Definition: domain.cpp:1498
virtual Val_domain div_r(const Val_domain &so) const
Division by .
Definition: domain.cpp:1339
virtual void do_cart_surr() const
Computes the Cartesian coordinates over the radius.
Definition: domain.cpp:1611
virtual void set_cheb_base_p_spher(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the component of a vector.
Definition: domain.cpp:1084
virtual Val_domain der_r_rtwo(const Val_domain &so) const
Compute the radial derivative multiplied by of a scalar field.
Definition: domain.cpp:1446
virtual void update_variable(const Val_domain &shape, const Scalar &oldval, Scalar &newval) const
Update the value of a scalar, after the shape of the Domain has been changed by the system.
Definition: space.hpp:942
virtual void set_cheb_base_t_spher(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the component of a vector.
Definition: domain.cpp:1078
virtual void xx_to_vars_from_adapted(Val_domain &shape, const Array< double > &xx, int &conte) const
Computes the new boundary of a Domain from a set of values.
Definition: space.hpp:913
Domain(int num, int ttype, const Dim_array &res)
Constructor from a number of points and a type of base.
Definition: space.hpp:1429
virtual void update_mapping(const Val_domain &shape)
Updates the variables parts of the Domain.
Definition: space.hpp:977
virtual void export_tau(const Tensor &eq, int dom, int order, Array< double > &res, int &pos_res, const Array< int > &ncond, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to a tensorial one in the bulk.
Definition: domain.cpp:1533
virtual void update_constante(const Val_domain &shape, const Scalar &oldval, Scalar &newval) const
Update the value of a scalar, after the shape of the Domain has been changed by the system.
Definition: space.hpp:961
virtual void set_legendre_base_r_spher(Base_spectral &so) const
Gives the base using Legendre polynomials, for the radial component of a vector.
Definition: domain.cpp:1123
virtual int nbr_points_boundary(int bound, const Base_spectral &base) const
Computes the number of relevant collocation points on a boundary.
Definition: domain.cpp:1587
int num_dom
Number of the current domain (used by the Space)
Definition: space.hpp:63
virtual void set_cheb_r_base(Base_spectral &so) const
Gives the base using odd Chebyshev polynomials$ for the radius.
Definition: domain.cpp:989
virtual void set_cheb_base(Base_spectral &so) const
Gives the standard base for Chebyshev polynomials.
Definition: domain.cpp:978
virtual bool is_in(const Point &xx, double prec=1e-13) const
Check whether a point lies inside Domain.
Definition: domain.cpp:942
Term_eq do_comp_by_comp_with_int(const Term_eq &so, int val, Val_domain(Domain::*pfunc)(const Val_domain &, int) const) const
Function used to apply the same operation to all the components of a tensor, in the current domain.
Definition: domain.cpp:228
virtual void set_cheb_base_z_cart(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the component of a vector.
Definition: domain.cpp:1200
Dim_array nbr_coefs
Number of coefficients.
Definition: space.hpp:66
virtual void set_cheb_base_rp_spher(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the component of a 2-tensor.
Definition: domain.cpp:1112
Dim_array const & get_nbr_points() const
Returns the number of points.
Definition: space.hpp:92
virtual Val_domain mult_x(const Val_domain &so) const
Multiplication by .
Definition: domain.cpp:1309
virtual Term_eq div_1mx2_term_eq(const Term_eq &) const
Returns the division by of a Term_eq.
Definition: domain.cpp:1765
virtual void set_legendre_base_y_cart(Base_spectral &so) const
Gives the base using Legendre polynomials, for the component of a vector.
Definition: domain.cpp:1212
virtual Val_domain div_sin_theta(const Val_domain &) const
Division by .
Definition: domain.cpp:1248
virtual Term_eq partial_cart(const Term_eq &so) const
Computes the part of the gradient containing the partial derivative of the field, in Cartesian coordi...
Definition: domain.cpp:338
virtual void set_cheb_base_tp_spher(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the component of a 2-tensor.
Definition: domain.cpp:1118
virtual void set_legendre_xodd_base(Base_spectral &so) const
Gives the base using Legendre polynomials, for odd functions in (critic space case)
Definition: domain.cpp:1042
virtual const Val_domain & get_chi() const
Returns the variable .
Definition: domain.cpp:1387
virtual void set_legendre_base_with_m(Base_spectral &so, int m) const
Gives the stnadard base using Legendre polynomials.
Definition: domain.cpp:1018
friend ostream & operator<<(ostream &o, const Domain &so)
Display.
Definition: space.hpp:1351
virtual Array< int > nbr_conditions_boundary_array(const Tensor &eq, int dom, int bound, const Array< int > &order, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Computes number of discretized equations associated with a given tensorial equation on a boundary.
Definition: domain.cpp:1522
virtual const Point absol_to_num_bound(const Point &xxx, int bound) const
Computes the numerical coordinates from the physical ones for a point lying on a boundary.
Definition: domain.cpp:954
virtual Val_domain mult_1mrsL(const Val_domain &so) const
Multiplication by .
Definition: domain.cpp:1291
virtual Term_eq der_harmonics_asym(const Term_eq &so, const Term_eq &omega, int bound, Term_eq(*f)(const Space &, int, int, const Term_eq &, const Param &), const Param &param, const Array< double > &passage) const
Fit, spherical harmonic by spherical harmonic, for the radial derivative of an anti-symmetric functio...
Definition: domain.cpp:1708
virtual void set_cheb_todd_base(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for odd functions in (critic space case)
Definition: domain.cpp:1048
virtual ostream & print(ostream &o) const =0
Delegate function to virtualize the << operator.
virtual Val_domain der_t(const Val_domain &so) const
Compute the derivative with respect to of a scalar field.
Definition: domain.cpp:1435
virtual Term_eq der_harmonics_sym(const Term_eq &so, const Term_eq &omega, int bound, Term_eq(*f)(const Space &, int, int, const Term_eq &, const Param &), const Param &param, const Array< double > &passage) const
Fit, spherical harmonic by spherical harmonic, for the radial derivative of a symmetric function.
Definition: domain.cpp:1701
virtual double get_rmin() const
Returns the minimum radius.
Definition: domain.cpp:1375
virtual Val_domain mult_r(const Val_domain &so) const
Multiplication by .
Definition: domain.cpp:1303
virtual void set_cheb_base_y_cart(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the component of a vector.
Definition: domain.cpp:1194
virtual void save(FILE *) const
Saving function.
Definition: domain.cpp:68
virtual Array< int > nbr_conditions_boundary_one_side(const Tensor &eq, int dom, int bound, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Computes number of discretized equations associated with a given tensorial equation on a boundary.
Definition: domain.cpp:1527
virtual Val_domain mult_sin_time(const Val_domain &) const
Multiplication by .
Definition: domain.cpp:1321
virtual double multipoles_sym(int k, int j, int bound, const Val_domain &so, const Array< double > &passage) const
Extraction of a given multipole, at some boundary, for a symmetric scalar function.
Definition: domain.cpp:1623
virtual Val_domain srdr(const Val_domain &so) const
Compute the of a scalar field .
Definition: domain.cpp:1333
virtual Term_eq dtime_term_eq(const Term_eq &so) const
Time derivative of a Term_eq.
Definition: domain.cpp:149
void operator=(const Domain &)=delete
Sylvain's stuff.
virtual double multipoles_asym(int k, int j, int bound, const Val_domain &so, const Array< double > &passage) const
Extraction of a given multipole, at some boundary, for a anti-symmetric scalar function.
Definition: domain.cpp:1629
virtual Term_eq der_multipoles_asym(int k, int j, int bound, const Term_eq &so, const Array< double > &passage) const
Extraction of a given multipole, at some boundary, for the radial derivative of an anti-symmetric sca...
Definition: domain.cpp:1681
virtual Term_eq connection_spher(const Term_eq &so) const
Computes the part of the gradient involving the connections, in spherical orthonormal coordinates.
Definition: domain.cpp:544
virtual const Val_domain & get_X() const
Returns the variable .
Definition: domain.cpp:1399
virtual Val_domain div_1mx2(const Val_domain &) const
Division by .
Definition: domain.cpp:1327
virtual void set_anti_legendre_base_with_m(Base_spectral &so, int m) const
Gives the base using Legendre polynomials, for functions antisymetric with respect to .
Definition: domain.cpp:1030
virtual void export_tau_boundary(const Tensor &eq, int dom, int bound, Array< double > &res, int &pos_res, const Array< int > &ncond, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to a tensorial one on a given boundary It makes use ...
Definition: domain.cpp:1545
Val_domain const & get_radius() const
Returns the generalized radius.
Definition: space.hpp:1465
virtual Term_eq lap2_term_eq(const Term_eq &so, int m) const
Returns the flat 2d-Laplacian of Term_eq, for a given harmonic.
Definition: domain.cpp:161
virtual void affecte_tau_one_coef(Tensor &so, int dom, int cc, int &pos_cf) const
Sets at most one coefficient of a Tensor to 1.
Definition: domain.cpp:1575
virtual Term_eq dr_term_eq(const Term_eq &so) const
Radial derivative of a Term_eq.
Definition: domain.cpp:145
virtual void update_mapping(double bound)
Updates the variables parts of the Domain.
Definition: space.hpp:982
virtual Val_domain ddt(const Val_domain &so) const
Compute the second derivative with respect to of a scalar field.
Definition: domain.cpp:1462
virtual void xx_to_vars_from_adapted(double bound, const Array< double > &xx, int &conte) const
Computes the new boundary of a Domain from a set of values.
Definition: space.hpp:921
virtual void set_cheb_base_t_mtz(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the component of a vector in the MTZ setting.
Definition: domain.cpp:1095
virtual Term_eq derive_flat_cart(int tipe, char ind, const Term_eq &so, const Metric *manip) const
Computes the flat derivative of a Term_eq, in Cartesian coordinates.
Definition: domain.cpp:1733
virtual Term_eq grad_term_eq(const Term_eq &so) const
Gradient of Term_eq.
Definition: domain.cpp:173
virtual Term_eq der_radial_part_asym(const Space &space, int k, int j, const Term_eq &omega, Term_eq(*f)(const Space &, int, int, const Term_eq &, const Param &), const Param &param) const
Gives some radial fit for a given multipole, intended for the radial derivative of an anti-symmetric ...
Definition: domain.cpp:1694
virtual void set_legendre_todd_base(Base_spectral &so) const
Gives the base using Legendre polynomials, for odd functions in (critic space case)
Definition: domain.cpp:1054
virtual void set_legendre_base_r_mtz(Base_spectral &so) const
Gives the base using Legendre polynomials, for the radial component of a vector in the MTZ context.
Definition: domain.cpp:1141
virtual Tensor change_basis_cart_to_spher(int dd, const Tensor &so) const
Changes the tensorial basis from Cartsian to spherical in a given domain.
Definition: domain.cpp:1357
virtual void set_legendre_base_z_cart(Base_spectral &so) const
Gives the base using Legendre polynomials, for the component of a vector.
Definition: domain.cpp:1218
virtual Val_domain mult_sin_phi(const Val_domain &) const
Multiplication by .
Definition: domain.cpp:1242
virtual void set_cheb_base_r_spher(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the radial component of a vector.
Definition: domain.cpp:1072
virtual Term_eq der_normal_term_eq(const Term_eq &so, int bound) const
Returns the normal derivative of a Term_eq.
Definition: domain.cpp:141
int get_type_base() const
Returns the type of the basis.
Definition: space.hpp:98
virtual void update_constante(double bound, const Scalar &oldval, Scalar &newval) const
Update the value of a scalar, after the shape of the Domain has been changed by the system.
Definition: space.hpp:970
virtual Term_eq partial_spher(const Term_eq &so) const
Computes the part of the gradient containing the partial derivative of the field, in spherical orthon...
Definition: domain.cpp:383
virtual void do_which_points_boundary(int bound, const Base_spectral &base, Index **ind, int start) const
Lists all the indices corresponding to true collocation points on a boundary.
Definition: domain.cpp:1593
Dim_array nbr_points
Number of colocation points.
Definition: space.hpp:65
virtual void set_cheb_base_odd(Base_spectral &so) const
Gives the base using odd Chebyshev polynomials$.
Definition: domain.cpp:1158
virtual Array< int > nbr_conditions_boundary(const Tensor &eq, int dom, int bound, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Computes number of discretized equations associated with a given tensorial equation on a boundary.
Definition: domain.cpp:1516
virtual void set_cheb_xodd_todd_base(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for odd functions in and in (critic space case)
Definition: domain.cpp:1060
virtual void set_legendre_base_p_spher(Base_spectral &so) const
Gives the base using Legendre polynomials, for the component of a vector.
Definition: domain.cpp:1135
virtual Term_eq der_radial_part_sym(const Space &space, int k, int j, const Term_eq &omega, Term_eq(*f)(const Space &, int, int, const Term_eq &, const Param &param), const Param &param) const
Gives some radial fit for a given multipole, intended for the radial derivative of a symmetric scalar...
Definition: domain.cpp:1687
virtual Term_eq lap_term_eq(const Term_eq &so, int m) const
Returns the flat Laplacian of Term_eq, for a given harmonic.
Definition: domain.cpp:157
virtual void set_legendre_base_t_spher(Base_spectral &so) const
Gives the base using Legendre polynomials, for the component of a vector.
Definition: domain.cpp:1129
virtual void export_tau_boundary_array(const Tensor &eq, int dom, int bound, const Array< int > &order, Array< double > &res, int &pos_res, const Array< int > &ncond, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to one tensorial one on a given boundary It makes us...
Definition: domain.cpp:1557
virtual Val_domain laplacian2(const Val_domain &so, int m) const
Computes the ordinary flat 2dè- Laplacian for a scalar field with an harmonic index m.
Definition: domain.cpp:100
virtual Term_eq derive_flat_mtz(int tipe, char ind, const Term_eq &so, const Metric *manip) const
Computes the flat derivative of a Term_eq, in spherical coordinates where the constant radii sections...
Definition: domain.cpp:1727
int type_base
Type of colocation point :
Definition: space.hpp:73
virtual void set_legendre_base_x_cart(Base_spectral &so) const
Gives the base using Legendre polynomials, for the component of a vector.
Definition: domain.cpp:1206
virtual Tensor change_basis_spher_to_cart(int dd, const Tensor &so) const
Changes the tensorial basis from spherical to Cartesian in a given domain.
Definition: domain.cpp:1363
virtual double integ_volume(const Val_domain &so) const
Volume integral.
Definition: domain.cpp:1753
virtual void set_cheb_base_x_cart(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the component of a vector.
Definition: domain.cpp:1188
virtual void set_legendre_base_p_mtz(Base_spectral &so) const
Gives the base using Legendre polynomials, for the component of a vector in the MTZ context.
Definition: domain.cpp:1153
virtual void update_variable(double bound, const Scalar &oldval, Scalar &newval) const
Update the value of a scalar, after the shape of the Domain has been changed by the system.
Definition: space.hpp:952
virtual Val_domain der_normal(const Val_domain &so, int bound) const
Normal derivative with respect to a given surface.
Definition: domain.cpp:1417
virtual void set_legendre_base(Base_spectral &so) const
Gives the standard base for Legendre polynomials.
Definition: domain.cpp:983
virtual Term_eq harmonics_asym(const Term_eq &so, const Term_eq &omega, int bound, Term_eq(*f)(const Space &, int, int, const Term_eq &, const Param &), const Param &param, const Array< double > &passage) const
Fit, spherical harmonic by spherical harmonic, for an anti-symmetric function.
Definition: domain.cpp:1668
virtual void do_cart() const
Computes the Cartesian coordinates.
Definition: domain.cpp:1605
virtual void set_cheb_base_xy_cart(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the component of a vector.
Definition: domain.cpp:1169
virtual Term_eq harmonics_sym(const Term_eq &so, const Term_eq &omega, int bound, Term_eq(*f)(const Space &, int, int, const Term_eq &, const Param &), const Param &param, const Array< double > &passage) const
Fit, spherical harmonic by spherical harmonic, for a symmetric function.
Definition: domain.cpp:1661
virtual void export_tau_boundary_one_side(const Tensor &eq, int dom, int bound, Array< double > &res, int &pos_res, const Array< int > &ncond, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to one tensorial one on a given boundary.
Definition: domain.cpp:1563
virtual Val_domain div_chi(const Val_domain &) const
Division by .
Definition: domain.cpp:1351
virtual void set_anti_cheb_base(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for functions antisymetric with respect to .
Definition: domain.cpp:1001
virtual void export_tau_boundary_exception(const Tensor &eq, int dom, int bound, Array< double > &res, int &pos_res, const Array< int > &ncond, const Param &param, int type_exception, const Tensor &exception, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to one tensorial one on a given boundary,...
Definition: domain.cpp:1550
virtual int give_place_var(char *name) const
Translates a name of a coordinate into its corresponding numerical name.
Definition: domain.cpp:1739
virtual void set_legendre_xodd_todd_base(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for odd functions in and in (critic space case)
Definition: domain.cpp:1066
Val_domain const & get_cart(int i) const
Returns a Cartesian coordinates.
Definition: space.hpp:1471
virtual const Val_domain & get_eta() const
Returns the variable .
Definition: domain.cpp:1393
virtual Term_eq connection_mtz(const Term_eq &so) const
Computes the part of the gradient involving the connections, in spherical coordinates where the const...
Definition: domain.cpp:722
virtual void affecte_tau(Tensor &so, int dom, const Array< double > &cf, int &pos_cf) const
Affects some coefficients to a Tensor.
Definition: domain.cpp:1569
virtual void set_cheb_base_p_mtz(Base_spectral &so) const
Gives the base using Chebyshev polynomials, for the component of a vector in the MTZ setting.
Definition: domain.cpp:1101
Memory_mapped_array< Array< double > * > coloc
Colocation points in each dimension (stored in ndim 1d- arrays)
Definition: space.hpp:75
virtual void find_other_dom(int dom, int bound, int &otherdom, int &otherbound) const
Gives the informations corresponding the a touching neighboring domain.
Definition: domain.cpp:1411
virtual void do_radius() const
Computes the generalized radius.
Definition: domain.cpp:1617
virtual Val_domain ddtime(const Val_domain &so) const
Computes the second time derivative of a field.
Definition: domain.cpp:1480
virtual Val_domain div_x(const Val_domain &) const
Division by .
Definition: domain.cpp:1260
virtual void set_legendre_r_base(Base_spectral &so) const
Gives the base using odd Legendre polynomials$ for the radius.
Definition: domain.cpp:995
virtual Term_eq der_multipoles_sym(int k, int j, int bound, const Term_eq &so, const Array< double > &passage) const
Extraction of a given multipole, at some boundary, for the radial derivative a symmetric scalar funct...
Definition: domain.cpp:1675
virtual void set_cheb_base_with_m(Base_spectral &so, int m) const
Gives the standard base using Chebyshev polynomials.
Definition: domain.cpp:1012
virtual Val_domain mult_cos_theta(const Val_domain &) const
Multiplication by .
Definition: domain.cpp:1224
virtual void set_anti_cheb_base_with_m(Base_spectral &so, int m) const
Gives the base using Chebyshev polynomials, for functions antisymetric with respect to .
Definition: domain.cpp:1024
virtual Term_eq integ_volume_term_eq(const Term_eq &so) const
Volume integral of a Term_eq.
Definition: domain.cpp:901
virtual void do_coloc()
Computes the colocation points.
Definition: domain.cpp:972
Array< double > const & get_coloc(int) const
Returns the colocation points for a given variable.
Definition: space.hpp:1486
virtual void do_absol() const
Computes the absolute coordinates.
Definition: domain.cpp:1599
virtual Term_eq radial_part_asym(const Space &space, int k, int j, const Term_eq &omega, Term_eq(*f)(const Space &, int, int, const Term_eq &, const Param &), const Param &param) const
Gives some radial fit for a given multipole, intended for anti-symmetric scalar function.
Definition: domain.cpp:1654
virtual Term_eq mult_r_term_eq(const Term_eq &so) const
Multiplication by of a Term_eq.
Definition: domain.cpp:165
virtual double integ(const Val_domain &so, int bound) const
Surface integral on a given boundary.
Definition: domain.cpp:1486
virtual Term_eq ddtime_term_eq(const Term_eq &so) const
Second time derivative of a Term_eq.
Definition: domain.cpp:153
virtual const Point absol_to_num(const Point &xxx) const
Computes the numerical coordinates from the physical ones.
Definition: domain.cpp:948
virtual Array< int > nbr_conditions(const Tensor &eq, int dom, int order, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
Definition: domain.cpp:1504
Val_domain const & get_cart_surr(int i) const
Returns a Cartesian coordinates divided by the radius.
Definition: space.hpp:1479
virtual double integrale(const Val_domain &so) const
Volume integral.
Definition: domain.cpp:1492
Class that gives the position inside a multi-dimensional Array.
Definition: index.hpp:38
Class to manage asymptotically anti de Sitter metrics.
Class to manage anti de Sitter metrics.
Definition: metric_AADS.hpp:45
Purely abstract class for metric handling.
Definition: metric.hpp:39
Parameter storage.
Definition: param.hpp:30
The class Point is used to store the coordinates of a point.
Definition: point.hpp:30
The class Scalar does not really implements scalars in the mathematical sense but rather tensorial co...
Definition: scalar.hpp:67
The Space class is an ensemble of domains describing the whole space of the computation.
Definition: space.hpp:1362
virtual void xx_to_ders_variable_domains(const Array< double > &xx, int &conte) const
Update the vairable domains from a set of values.
Definition: space.hpp:1407
virtual ~Space()
Destructor.
Definition: space.cpp:31
virtual Array< int > get_indices_matching_non_std(int dom, int bound) const
Gives the number of the other domains, touching a given boundary.
Definition: space.cpp:66
friend ostream & operator<<(ostream &o, const Space &so)
Display.
Definition: space.cpp:39
int type_base
Type of basis used (i.e. using either Chebyshev or Legendre polynomials).
Definition: space.hpp:1367
virtual void save(FILE *) const
Saving function.
Definition: space.cpp:60
Space()
Standard constructor.
Definition: space.cpp:27
const Domain * get_domain(int i) const
returns a pointer on the domain.
Definition: space.hpp:1385
virtual void xx_to_vars_variable_domains(System_of_eqs *syst, const Array< double > &xx, int &conte) const
Update the variables of a system, from the variation of the shape of the domains.
Definition: space.hpp:1414
virtual int nbr_unknowns_from_variable_domains() const
Gives the number of unknowns coming from the variable shape of the domain.
Definition: space.hpp:1394
int get_ndim() const
Returns the number of dimensions.
Definition: space.hpp:1373
int get_type_base() const
Returns the type of basis.
Definition: space.hpp:1377
int ndim
Number of dimensions (should be the same for all the Domains).
Definition: space.hpp:1366
int get_nbr_domains() const
Returns the number of Domains.
Definition: space.hpp:1375
Domain ** domains
Pointers on the various Domains.
Definition: space.hpp:1368
int nbr_domains
Number od Domains.
Definition: space.hpp:1365
virtual void affecte_coef_to_variable_domains(int &conte, int cc, Array< int > &doms) const
The variation of the functions describing the shape of the Domain are affected from the unknowns of t...
Definition: space.hpp:1401
Class used to describe and solve a system of equations.
Tensor handling.
Definition: tensor.hpp:149
This class is intended to describe the manage objects appearing in the equations.
Definition: term_eq.hpp:62
Class for storing the basis of decompositions of a field and its values on both the configuration and...
Definition: val_domain.hpp:69