KADATH
ope_eq.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 __OPE_EQ_HPP_
21 #define __OPE_EQ_HPP_
22 
23 #include "term_eq.hpp"
24 namespace Kadath {
25 
32  class Ope_eq : public Memory_mapped {
33 
34  protected:
35  const System_of_eqs* syst ;
36  int dom ;
37  int n_ope ;
38  MMPtr_array<Ope_eq> parts ;
45  Ope_eq (const System_of_eqs* syst, int dom, int np = 0) ;
46  Ope_eq (const Ope_eq&) = delete;
47  public:
48  virtual ~Ope_eq() ;
49 
53  int get_dom() const {return dom; } ;
54 
59  virtual Term_eq action() const = 0;
60  } ;
61 
62  inline Ope_eq::Ope_eq(const System_of_eqs* zesys, int dd, int nn) :
63  syst{zesys}, dom{dd}, n_ope{nn}, parts{n_ope,initialize}
64  {}
65 
66  inline Ope_eq::~Ope_eq() {for(auto & x : parts) safe_delete(x);}
67 
72 class Ope_id : public Ope_eq {
73 
74  protected:
75  const Term_eq* target ;
76  int valence ;
77  char* name_ind ;
79  bool need_sum ;
80 
81  public:
90  Ope_id (const System_of_eqs* syst, const Term_eq* so, int valence, char* names, Array<int>* ttype) ;
96  Ope_id (const System_of_eqs* syst, const Term_eq* so) ;
97  ~Ope_id() override;
98  public:
99  Term_eq action() const override;
100 } ;
101 
102 
107 class Ope_pow : public Ope_eq {
108 
109  protected:
110  int power ;
111  public:
118  Ope_pow(const System_of_eqs* syst, int pow, Ope_eq* so) ;
119  ~Ope_pow() override ;
120 
121  Term_eq action() const override;
122 } ;
123 
128 class Ope_minus : public Ope_eq {
129 
130  public:
136  Ope_minus(const System_of_eqs* syst, Ope_eq* so) ;
137  ~Ope_minus() override ;
138 
139  Term_eq action() const override;
140 } ;
141 
146 class Ope_add : public Ope_eq {
147 
148  public:
155  Ope_add(const System_of_eqs* syst, Ope_eq* aa, Ope_eq* bb) ;
156  ~Ope_add() override ;
157 
158  Term_eq action() const override;
159 } ;
160 
165 class Ope_sub : public Ope_eq {
166 
167  public:
174  Ope_sub(const System_of_eqs* syst, Ope_eq* aa, Ope_eq* bb) ;
175  ~Ope_sub() override ;
176 
177  Term_eq action() const override;
178 } ;
179 
185 class Ope_mult : public Ope_eq {
186 
187  public:
194  Ope_mult(const System_of_eqs* syst, Ope_eq* aa, Ope_eq* bb) ;
195  ~Ope_mult() override ;
196 
197  Term_eq action() const override;
198 } ;
199 
205 class Ope_div: public Ope_eq {
206 
207  public:
214  Ope_div(const System_of_eqs* syst, Ope_eq* aa, Ope_eq* bb) ;
215  ~Ope_div() override ;
216 
217  Term_eq action() const override;
218 } ;
219 
225 class Ope_lap: public Ope_eq {
226 
227  public:
233  Ope_lap(const System_of_eqs* syst, Ope_eq* so) ;
234  ~Ope_lap() override ;
235 
236  Term_eq action() const override;
237 } ;
238 
244 class Ope_dtime: public Ope_eq {
245 
246  public:
252  Ope_dtime(const System_of_eqs* syst, Ope_eq* so) ;
253  ~Ope_dtime() override ;
254 
255  Term_eq action() const override;
256 } ;
257 
264 class Ope_ddtime: public Ope_eq {
265 
266  public:
272  Ope_ddtime(const System_of_eqs* syst, Ope_eq* so) ;
273  ~Ope_ddtime() override ;
274 
275  Term_eq action() const override;
276 } ;
277 
283 class Ope_lap2: public Ope_eq {
284 
285  public:
291  Ope_lap2(const System_of_eqs* syst, Ope_eq* so) ;
292  ~Ope_lap2() override ;
293 
294  Term_eq action() const override;
295 } ;
296 
302 class Ope_dn: public Ope_eq {
303 
304  protected:
305  int bound ;
306 
307  public:
314  Ope_dn(const System_of_eqs* syst, int bb, Ope_eq* so) ;
315  ~Ope_dn() override ;
316 
317  Term_eq action() const override;
318 } ;
319 
325 class Ope_grad: public Ope_eq {
326 
327  public:
333  Ope_grad(const System_of_eqs* syst, Ope_eq* so) ;
334  ~Ope_grad() override ;
335 
336  Term_eq action() const override;
337 } ;
338 
344 class Ope_scal: public Ope_eq {
345 
346  public:
353  Ope_scal(const System_of_eqs* syst, Ope_eq* aa, Ope_eq* bb) ;
354  ~Ope_scal() override ;
355 
356  Term_eq action() const override;
357 } ;
358 
364 class Ope_der: public Ope_eq {
365 
366  protected:
367  int type_der ;
368  char ind_der ;
369 
370  public:
378  Ope_der(const System_of_eqs* syst, int typeder, char indder, Ope_eq* so) ;
379  ~Ope_der() override ;
380 
381  Term_eq action() const override;
382 } ;
383 
389 class Ope_der_flat: public Ope_eq {
390 
391  protected:
392  int type_der ;
393  char ind_der ;
394 
395  public:
403  Ope_der_flat(const System_of_eqs* syst, int typeder, char indder, Ope_eq* so) ;
404  ~Ope_der_flat() override ;
405 
406  Term_eq action() const override;
407 } ;
408 
414 class Ope_der_background: public Ope_eq {
415 
416  protected:
417  int type_der ;
418  char ind_der ;
419 
420  public:
428  Ope_der_background(const System_of_eqs* syst, int typeder, char indder, Ope_eq* so) ;
429  ~Ope_der_background() override ;
430 
431  Term_eq action() const override;
432 } ;
433 
438 class Ope_int: public Ope_eq {
439 
440  protected:
441  int bound ;
442 
443  public:
450  Ope_int(const System_of_eqs* syst, int bb, Ope_eq* so) ;
451  ~Ope_int() override ;
452 
453  Term_eq action() const override;
454 } ;
455 
460 class Ope_int_volume: public Ope_eq {
461 
462  public:
468  Ope_int_volume (const System_of_eqs* syst, Ope_eq* so) ;
469  ~Ope_int_volume() override ;
470 
471  Term_eq action() const override;
472 } ;
473 
480 class Ope_def: public Ope_eq {
481  protected:
483  public:
492  Ope_def (const System_of_eqs* syst, Ope_eq* so, int val, char* name, Array<int>* ttype) ;
493  ~Ope_def() override ;
494  Term_eq action() const override;
495  Term_eq* get_res() ;
496  void compute_res() ;
497 } ;
498 
503 class Ope_mult_r: public Ope_eq {
504 
505  public:
511  Ope_mult_r (const System_of_eqs* syst, Ope_eq* so) ;
512  ~Ope_mult_r() override ;
513 
514  Term_eq action() const override;
515 } ;
516 
521 class Ope_mult_x: public Ope_eq {
522 
523  public:
529  Ope_mult_x (const System_of_eqs* syst, Ope_eq* so) ;
530  ~Ope_mult_x() override ;
531 
532  Term_eq action() const override;
533 } ;
534 
539 class Ope_srdr: public Ope_eq {
540 
541  public:
547  Ope_srdr (const System_of_eqs* syst, Ope_eq* so) ;
548  ~Ope_srdr() override ;
549 
550  Term_eq action() const override;
551 } ;
552 
553 
554 
559 class Ope_ddr: public Ope_eq {
560 
561  public:
567  Ope_ddr (const System_of_eqs* syst, Ope_eq* so) ;
568  ~Ope_ddr() override ;
569 
570  Term_eq action() const override;
571 } ;
572 
577 class Ope_dr: public Ope_eq {
578 
579  public:
585  Ope_dr (const System_of_eqs* syst, Ope_eq* so) ;
586  ~Ope_dr() override ;
587 
588  Term_eq action() const override;
589 } ;
590 
595 class Ope_ddp: public Ope_eq {
596 
597  public:
603  Ope_ddp (const System_of_eqs* syst, Ope_eq* so) ;
604  ~Ope_ddp() override ;
605 
606  Term_eq action() const override;
607 } ;
608 
613 class Ope_dt: public Ope_eq {
614 
615  public:
621  Ope_dt (const System_of_eqs* syst, Ope_eq* so) ;
622  ~Ope_dt() override ;
623 
624  Term_eq action() const override;
625 } ;
626 
631 class Ope_ddt: public Ope_eq {
632 
633  public:
639  Ope_ddt (const System_of_eqs* syst, Ope_eq* so) ;
640  ~Ope_ddt() override ;
641 
642  Term_eq action() const override;
643 } ;
644 
649 class Ope_div_r: public Ope_eq {
650 
651  public:
657  Ope_div_r (const System_of_eqs* syst, Ope_eq* so) ;
658  ~Ope_div_r() override ;
659 
660  Term_eq action() const override;
661 } ;
662 
667 class Ope_div_rsint: public Ope_eq {
668 
669  public:
675  Ope_div_rsint (const System_of_eqs* syst, Ope_eq* so) ;
676  ~Ope_div_rsint() override ;
677 
678  Term_eq action() const override;
679 } ;
680 
685 class Ope_mult_rsint: public Ope_eq {
686 
687  public:
693  Ope_mult_rsint (const System_of_eqs* syst, Ope_eq* so) ;
694  ~Ope_mult_rsint() override ;
695 
696  Term_eq action() const override;
697 } ;
698 
703 class Ope_div_cost: public Ope_eq {
704 
705  public:
711  Ope_div_cost (const System_of_eqs* syst, Ope_eq* so) ;
712  ~Ope_div_cost() override ;
713 
714  Term_eq action() const override;
715 } ;
716 
717 
718 
723 class Ope_div_xpone: public Ope_eq {
724 
725  public:
731  Ope_div_xpone (const System_of_eqs* syst, Ope_eq* so) ;
732  ~Ope_div_xpone() override ;
733 
734  Term_eq action() const override;
735 } ;
736 
741 class Ope_div_1mx2: public Ope_eq {
742 
743  public:
749  Ope_div_1mx2 (const System_of_eqs* syst, Ope_eq* so) ;
750  ~Ope_div_1mx2() override ;
751 
752  Term_eq action() const override;
753 } ;
754 
759 class Ope_div_1mrsL: public Ope_eq {
760 
761  public:
767  Ope_div_1mrsL (const System_of_eqs* syst, Ope_eq* so) ;
768  ~Ope_div_1mrsL() override ;
769 
770  Term_eq action() const override;
771 } ;
772 
777 class Ope_mult_1mrsL: public Ope_eq {
778 
779  public:
785  Ope_mult_1mrsL (const System_of_eqs* syst, Ope_eq* so) ;
786  ~Ope_mult_1mrsL() override ;
787 
788  Term_eq action() const override;
789 } ;
790 
795 class Ope_mult_sint: public Ope_eq {
796 
797  public:
803  Ope_mult_sint (const System_of_eqs* syst, Ope_eq* so) ;
804  ~Ope_mult_sint() override ;
805 
806  Term_eq action() const override;
807 } ;
808 
813 class Ope_div_sint: public Ope_eq {
814 
815  public:
821  Ope_div_sint (const System_of_eqs* syst, Ope_eq* so) ;
822  ~Ope_div_sint() override ;
823 
824  Term_eq action() const override;
825 } ;
826 
827 
832 class Ope_partial : public Ope_eq {
833  protected:
834  char ind_der ;
835  public:
842  Ope_partial (const System_of_eqs* syst, char name, Ope_eq* so) ;
843  ~Ope_partial() override ;
844 
845  Term_eq action() const override;
846 } ;
847 
852 class Ope_determinant : public Ope_eq {
853  public:
859  Ope_determinant (const System_of_eqs* syst, Ope_eq* so) ;
860  ~Ope_determinant() override ;
861 
862  Term_eq action() const override;
863 } ;
864 
869 class Ope_inverse : public Ope_eq {
870  public:
876  Ope_inverse (const System_of_eqs* syst, Ope_eq* so) ;
877  ~Ope_inverse() override ;
878 
879  Term_eq action() const override;
880 } ;
881 
887 class Ope_inverse_nodet : public Ope_eq {
888  public:
895  ~Ope_inverse_nodet() override ;
896 
897  Term_eq action() const override;
898 } ;
899 
904 class Ope_partial_var : public Ope_eq {
905  protected:
907  int which_var ;
908 
909  public:
916  Ope_partial_var (const System_of_eqs* syst, int which, Ope_eq* so) ;
917  ~Ope_partial_var() override ;
918 
919  Term_eq action() const override;
920 } ;
921 
926 class Ope_mode : public Ope_eq {
927  protected:
928  int bound ;
934  double value ;
935 
936  public:
945  Ope_mode (const System_of_eqs* syst, int bb, const Index& ind, double val, Ope_eq* so) ;
946  ~Ope_mode() override ;
947 
948  Term_eq action() const override;
949 } ;
950 
955 class Ope_val_mode : public Ope_eq {
956  protected:
958  double value ;
959 
960  public:
968  Ope_val_mode (const System_of_eqs* syst, const Index& ind, double val, Ope_eq* so) ;
969  ~Ope_val_mode() override ;
970 
971  Term_eq action() const override;
972 } ;
973 
978 class Ope_val : public Ope_eq {
979  protected:
981 
982  public:
989  Ope_val(const System_of_eqs* syst, const Index& ind, Ope_eq* so) ;
990  ~Ope_val() override ;
991 
992  Term_eq action() const override;
993 } ;
994 
999 class Ope_point : public Ope_eq {
1000  protected:
1002 
1003  public:
1010  Ope_point(const System_of_eqs* syst, const Point& pp, Ope_eq* so) ;
1011  ~Ope_point() override ;
1012 
1013  Term_eq action() const override;
1014 } ;
1015 
1020 class Ope_val_ori : public Ope_eq {
1021 
1022  public:
1029  Ope_val_ori(const System_of_eqs* syst, int dd, Ope_eq* so) ;
1030  ~Ope_val_ori() override ;
1031 
1032  Term_eq action() const override;
1033 } ;
1034 
1039 class Ope_sqrt: public Ope_eq {
1040 
1041  public:
1047  Ope_sqrt(const System_of_eqs* syst, Ope_eq* so) ;
1048  ~Ope_sqrt() override ;
1049 
1050  Term_eq action() const override;
1051 } ;
1052 
1058 class Ope_sqrt_anti: public Ope_eq {
1059 
1060  public:
1066  Ope_sqrt_anti(const System_of_eqs* syst, Ope_eq* so) ;
1067  ~Ope_sqrt_anti() override ;
1068 
1069  Term_eq action() const override;
1070 } ;
1071 
1077 class Ope_sqrt_nonstd: public Ope_eq {
1078 
1079  public:
1085  Ope_sqrt_nonstd(const System_of_eqs* syst, Ope_eq* so) ;
1086  ~Ope_sqrt_nonstd() override ;
1087 
1088  Term_eq action() const override;
1089 } ;
1090 
1095 class Ope_exp: public Ope_eq {
1096 
1097  public:
1103  Ope_exp(const System_of_eqs* syst, Ope_eq* so) ;
1104  ~Ope_exp() override ;
1105 
1106  Term_eq action() const override;
1107 } ;
1108 
1113 class Ope_log: public Ope_eq {
1114 
1115  public:
1121  Ope_log(const System_of_eqs* syst, Ope_eq* so) ;
1122  ~Ope_log() override ;
1123 
1124  Term_eq action() const override;
1125 } ;
1126 
1131 class Ope_cosh: public Ope_eq {
1132 
1133  public:
1139  Ope_cosh(const System_of_eqs* syst, Ope_eq* so) ;
1140  ~Ope_cosh() override ;
1141 
1142  Term_eq action() const override;
1143 } ;
1144 
1149 class Ope_sinh: public Ope_eq {
1150 
1151  public:
1157  Ope_sinh(const System_of_eqs* syst, Ope_eq* so) ;
1158  ~Ope_sinh() override ;
1159 
1160  Term_eq action() const override;
1161 } ;
1162 
1163 
1168 class Ope_atanh: public Ope_eq {
1169 
1170  public:
1176  Ope_atanh(const System_of_eqs* syst, Ope_eq* so) ;
1177  ~Ope_atanh() override ;
1178 
1179  Term_eq action() const override;
1180 } ;
1181 
1186 class Ope_cos: public Ope_eq {
1187 
1188  public:
1194  Ope_cos(const System_of_eqs* syst, Ope_eq* so) ;
1195  ~Ope_cos() override ;
1196 
1197  Term_eq action() const override;
1198 } ;
1199 
1204 class Ope_sin: public Ope_eq {
1205 
1206  public:
1212  Ope_sin(const System_of_eqs* syst, Ope_eq* so) ;
1213  ~Ope_sin() override ;
1214 
1215  Term_eq action() const override;
1216 } ;
1217 
1222 class Ope_fit_waves : public Ope_eq {
1223  public:
1230  Ope_fit_waves (const System_of_eqs* syst, Ope_eq* so, Ope_eq* ome) ;
1231  ~Ope_fit_waves() override ;
1232 
1233  Term_eq action() const override;
1234 } ;
1235 
1241 class Ope_user: public Ope_eq {
1242  protected:
1244  Term_eq (*pope) (const Term_eq&, Param*) ;
1245 
1246  public:
1254  Ope_user (const System_of_eqs* syst, Term_eq (*zeope) (const Term_eq&, Param*), Param* par, Ope_eq* so) ;
1255  ~Ope_user() override ;
1256  Term_eq action() const override;
1257 } ;
1258 
1264 class Ope_user_bin: public Ope_eq {
1265  protected:
1267  Term_eq (*pope) (const Term_eq&, const Term_eq&, Param*) ;
1268 
1269  public:
1278  Ope_user_bin (const System_of_eqs* syst, Term_eq (*zeope) (const Term_eq&, const Term_eq&, Param*), Param* par, Ope_eq* aa, Ope_eq* bb) ;
1279  ~Ope_user_bin() override ;
1280  Term_eq action() const override;
1281 } ;
1282 
1283 
1288 class Ope_import: public Ope_eq {
1289 
1290  protected:
1291  int bound ;
1298 
1299  public:
1307  Ope_import(const System_of_eqs* syst, int dd, int bb, const char* field) ;
1308  ~Ope_import() override ;
1309 
1310  Term_eq action() const override;
1311 } ;
1312 
1317 class Ope_change_basis: public Ope_eq {
1318 
1319  protected:
1321 
1322  public:
1329  Ope_change_basis(const System_of_eqs* syst, int target, Ope_eq* so) ;
1330  ~Ope_change_basis() override ;
1331 
1332  Term_eq action() const override;
1333 } ;
1334 
1340 class Ope_def_global : public Ope_eq {
1341  protected:
1344  public:
1351  Ope_def_global (const System_of_eqs* syst, int dom, const char* name_ope) ;
1352  ~Ope_def_global() override ;
1353  Term_eq action() const override;
1354  Term_eq* get_res() ;
1355  void compute_res() ;
1356 } ;
1357 
1363 class Ope_conjug: public Ope_eq {
1364 
1365  public:
1371  Ope_conjug(const System_of_eqs* syst, Ope_eq* so) ;
1372  ~Ope_conjug() override ;
1373 
1374  Term_eq action() const override;
1375 } ;
1376 }
1377 #endif
Class that gives the position inside a multi-dimensional Array.
Definition: index.hpp:38
The operator addition.
Definition: ope_eq.hpp:146
~Ope_add() override
Destructor.
Definition: ope_add.cpp:30
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_add.cpp:33
Ope_add(const System_of_eqs *syst, Ope_eq *aa, Ope_eq *bb)
Constructor.
Definition: ope_add.cpp:23
Operator inverse hyperbolic tangent (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1168
Ope_atanh(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_atanh.cpp:26
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_atanh.cpp:33
~Ope_atanh() override
Destructor.
Definition: ope_atanh.cpp:30
Operator changin the tensorial basis of a field.
Definition: ope_eq.hpp:1317
Ope_change_basis(const System_of_eqs *syst, int target, Ope_eq *so)
Constructor.
int target_basis
The desired tensorial basis.
Definition: ope_eq.hpp:1320
~Ope_change_basis() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Complex conjugate (only changes the m_quant parameter so far).
Definition: ope_eq.hpp:1363
Ope_conjug(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_conjug.cpp:24
~Ope_conjug() override
Destructor.
Definition: ope_conjug.cpp:29
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_conjug.cpp:32
Operator cosine (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1186
Ope_cos(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_cos.cpp:26
~Ope_cos() override
Destructor.
Definition: ope_cos.cpp:30
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_cos.cpp:33
Operator hyperbolic cosine (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1131
~Ope_cosh() override
Destructor.
Definition: ope_cosh.cpp:30
Ope_cosh(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_cosh.cpp:26
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_cosh.cpp:33
The operator second derivative wrt .
Definition: ope_eq.hpp:595
~Ope_ddp() override
Destructor.
Definition: ope_ddp.cpp:28
Ope_ddp(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_ddp.cpp:24
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_ddp.cpp:31
The operator second radial derivative.
Definition: ope_eq.hpp:559
Ope_ddr(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_ddr.cpp:24
~Ope_ddr() override
Destructor.
Definition: ope_ddr.cpp:28
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_ddr.cpp:31
The operator second derivative wrt .
Definition: ope_eq.hpp:631
Ope_ddt(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_ddt.cpp:24
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_ddt.cpp:31
~Ope_ddt() override
Destructor.
Definition: ope_ddt.cpp:28
Second time derivative Computes the second time derivative.
Definition: ope_eq.hpp:264
~Ope_ddtime() override
Destructor.
Definition: ope_ddtime.cpp:28
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_ddtime.cpp:31
Ope_ddtime(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_ddtime.cpp:24
Operator for a global definition (i.e.
Definition: ope_eq.hpp:1340
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Term_eq ** auxi
Various parts of the result (i.e. the contributions of the various domains).
Definition: ope_eq.hpp:1343
Term_eq * res
Result.
Definition: ope_eq.hpp:1342
Ope_def_global(const System_of_eqs *syst, int dom, const char *name_ope)
Constructor.
Term_eq * get_res()
Returns the result.
void compute_res()
Forces the computation of the result (when things have changed).
The operator definition.
Definition: ope_eq.hpp:480
void compute_res()
Forces the computation of the result (when things have changed).
Definition: ope_def.cpp:75
Term_eq * res
Result of the current definition.
Definition: ope_eq.hpp:482
Ope_def(const System_of_eqs *syst, Ope_eq *so, int val, char *name, Array< int > *ttype)
Constructor.
Definition: ope_def.cpp:22
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_def.cpp:60
Term_eq * get_res()
Returns the result.
Definition: ope_def.cpp:71
The operator covariant derivative with respect to the background metric.
Definition: ope_eq.hpp:414
Ope_der_background(const System_of_eqs *syst, int typeder, char indder, Ope_eq *so)
Constructor.
char ind_der
Name of the index of the derivative.
Definition: ope_eq.hpp:418
int type_der
Type of derivative (CON or COV)
Definition: ope_eq.hpp:417
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_der_background() override
Destructor.
The operator covariant derivative with respect to the flat metric.
Definition: ope_eq.hpp:389
Ope_der_flat(const System_of_eqs *syst, int typeder, char indder, Ope_eq *so)
Constructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_der_flat() override
Destructor.
char ind_der
Name of the index of the derivative.
Definition: ope_eq.hpp:393
int type_der
Type of derivative (CON or COV)
Definition: ope_eq.hpp:392
The operator covariant derivative.
Definition: ope_eq.hpp:364
Ope_der(const System_of_eqs *syst, int typeder, char indder, Ope_eq *so)
Constructor.
Definition: ope_der.cpp:27
char ind_der
Name of the index of the derivative.
Definition: ope_eq.hpp:368
int type_der
Type of derivative (CON or COV)
Definition: ope_eq.hpp:367
~Ope_der() override
Destructor.
Definition: ope_der.cpp:34
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_der.cpp:37
The operator determinant.
Definition: ope_eq.hpp:852
~Ope_determinant() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_determinant(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator division by (for AADS spacetimes).
Definition: ope_eq.hpp:759
~Ope_div_1mrsL() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_div_1mrsL(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator division by .
Definition: ope_eq.hpp:741
~Ope_div_1mx2() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_div_1mx2(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator division by .
Definition: ope_eq.hpp:703
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_div_cost() override
Destructor.
Ope_div_cost(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator division by .
Definition: ope_eq.hpp:649
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_div_r.cpp:31
~Ope_div_r() override
Destructor.
Definition: ope_div_r.cpp:28
Ope_div_r(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_div_r.cpp:24
The operator division by .
Definition: ope_eq.hpp:667
Ope_div_rsint(const System_of_eqs *syst, Ope_eq *so)
Constructor.
~Ope_div_rsint() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
The operator division by .
Definition: ope_eq.hpp:813
Term_eq action() const override
Destructor
Ope_div_sint(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator division by .
Definition: ope_eq.hpp:723
Ope_div_xpone(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_div_xpone() override
Destructor.
The operator Division.
Definition: ope_eq.hpp:205
~Ope_div() override
Destructor.
Definition: ope_div.cpp:31
Ope_div(const System_of_eqs *syst, Ope_eq *aa, Ope_eq *bb)
Constructor.
Definition: ope_div.cpp:24
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_div.cpp:34
The operator normal derivative Computes the derivative in the direction normal to a given boundary.
Definition: ope_eq.hpp:302
~Ope_dn() override
Destructor.
Definition: ope_dn.cpp:29
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_dn.cpp:32
Ope_dn(const System_of_eqs *syst, int bb, Ope_eq *so)
Constructor.
Definition: ope_dn.cpp:25
int bound
The boundary.
Definition: ope_eq.hpp:305
The operator first radial derivative.
Definition: ope_eq.hpp:577
Ope_dr(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_dr.cpp:24
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_dr.cpp:31
~Ope_dr() override
Destructor.
Definition: ope_dr.cpp:28
The operator first derivative wrt .
Definition: ope_eq.hpp:613
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_dt.cpp:31
~Ope_dt() override
Destructor.
Definition: ope_dt.cpp:28
Ope_dt(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_dt.cpp:24
The operator time derivative.
Definition: ope_eq.hpp:244
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_dtime.cpp:31
~Ope_dtime() override
Destructor.
Definition: ope_dtime.cpp:28
Ope_dtime(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_dtime.cpp:24
Abstract class that describes the various operators that can appear in the equations.
Definition: ope_eq.hpp:32
const System_of_eqs * syst
The associated System_of_eqs.
Definition: ope_eq.hpp:35
virtual ~Ope_eq()
Destructor.
Definition: ope_eq.hpp:66
int get_dom() const
Definition: ope_eq.hpp:53
Ope_eq(const Ope_eq &)=delete
Copy constructor.
MMPtr_array< Ope_eq > parts
Pointers of the various parts of the current operator.
Definition: ope_eq.hpp:38
virtual Term_eq action() const =0
Computes the action of the current Ope_eq using its various parts.
int n_ope
Number of terms involved (2 for + for instance, only one for sqrt...)
Definition: ope_eq.hpp:37
int dom
Index of the Domain where the operator is defined.
Definition: ope_eq.hpp:36
Ope_eq(const System_of_eqs *syst, int dom, int np=0)
Constructor.
Definition: ope_eq.hpp:62
Operator exponential (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1095
Ope_exp(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_exp.cpp:24
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_exp.cpp:31
~Ope_exp() override
Destructor.
Definition: ope_exp.cpp:28
Operator that fits a field to outgoing waves (highly specialized stuff)
Definition: ope_eq.hpp:1222
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_fit_waves(const System_of_eqs *syst, Ope_eq *so, Ope_eq *ome)
Constructor.
~Ope_fit_waves() override
Destructor.
The operator flat gradient Intended for systems where no metric has been defined.
Definition: ope_eq.hpp:325
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_grad.cpp:31
~Ope_grad() override
Destructor.
Definition: ope_grad.cpp:28
Ope_grad(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_grad.cpp:24
The operator identity.
Definition: ope_eq.hpp:72
int valence
Valence of the result.
Definition: ope_eq.hpp:76
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_id.cpp:49
Ope_id(const System_of_eqs *syst, const Term_eq *so, int valence, char *names, Array< int > *ttype)
Constructor.
Definition: ope_id.cpp:26
const Term_eq * target
The input&#160;Term_eq.
Definition: ope_eq.hpp:75
char * name_ind
The names of the various indices (if a Tensor of valence >0)
Definition: ope_eq.hpp:77
Array< int > * type_ind
The type of the indices.
Definition: ope_eq.hpp:78
bool need_sum
True if an inner contraction is needed to compute the result.
Definition: ope_eq.hpp:79
~Ope_id() override
Destructor.
Definition: ope_id.cpp:42
Operator importing the values of a field from a neighborig Domain.
Definition: ope_eq.hpp:1288
Array< int > others
2d array containing.
Definition: ope_eq.hpp:1297
~Ope_import() override
Destructor.
Definition: ope_import.cpp:35
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_import.cpp:38
int bound
The boundary where the field is imported.
Definition: ope_eq.hpp:1291
Ope_import(const System_of_eqs *syst, int dd, int bb, const char *field)
Constructor.
Definition: ope_import.cpp:26
The operator volume integral (in a given Domain)
Definition: ope_eq.hpp:460
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_int_volume() override
Destructor.
Ope_int_volume(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator surface integral.
Definition: ope_eq.hpp:438
int bound
Boundary where the integral is computed.
Definition: ope_eq.hpp:441
~Ope_int() override
Destructor.
Definition: ope_int.cpp:28
Ope_int(const System_of_eqs *syst, int bb, Ope_eq *so)
Constructor.
Definition: ope_int.cpp:24
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_int.cpp:31
The operator inverse (of a Metric_tensor ; i.e.
Definition: ope_eq.hpp:887
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_inverse_nodet(const System_of_eqs *syst, Ope_eq *so)
Constructor.
~Ope_inverse_nodet() override
Destructor.
The operator inverse (of a Metric_tensor ; i.e.
Definition: ope_eq.hpp:869
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_inverse.cpp:31
Ope_inverse(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_inverse.cpp:24
~Ope_inverse() override
Destructor.
Definition: ope_inverse.cpp:28
The operator Laplacian 2D.
Definition: ope_eq.hpp:283
~Ope_lap2() override
Destructor.
Definition: ope_lap2.cpp:29
Ope_lap2(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_lap2.cpp:24
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_lap2.cpp:32
The operator Laplacian 3D.
Definition: ope_eq.hpp:225
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_lap.cpp:32
Ope_lap(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_lap.cpp:24
~Ope_lap() override
Destructor.
Definition: ope_lap.cpp:29
Operator logarithm (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1113
Ope_log(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_log.cpp:24
~Ope_log() override
Destructor.
Definition: ope_log.cpp:28
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_log.cpp:31
The operator minus.
Definition: ope_eq.hpp:128
~Ope_minus() override
Destructor.
Definition: ope_minus.cpp:28
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_minus.cpp:31
Ope_minus(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_minus.cpp:24
This operator gives the value of one coefficient of a field, on a given boundary.
Definition: ope_eq.hpp:926
double value
The result is the coefficient minus value.
Definition: ope_eq.hpp:934
Ope_mode(const System_of_eqs *syst, int bb, const Index &ind, double val, Ope_eq *so)
Constructor.
Definition: ope_mode.cpp:24
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_mode.cpp:32
Index pos_cf
The desired coefficient.
Definition: ope_eq.hpp:933
int bound
The boundary where the coefficients are read.
Definition: ope_eq.hpp:928
~Ope_mode() override
Destructor.
Definition: ope_mode.cpp:29
The operator multiplication by (for AADS spacetimes).
Definition: ope_eq.hpp:777
Ope_mult_1mrsL(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_mult_1mrsL() override
Destructor.
The operator multiplication by .
Definition: ope_eq.hpp:503
~Ope_mult_r() override
Destructor.
Definition: ope_mult_r.cpp:28
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_mult_r.cpp:31
Ope_mult_r(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_mult_r.cpp:24
The operator multiplication by .
Definition: ope_eq.hpp:685
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_mult_rsint() override
Destructor.
Ope_mult_rsint(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator multiplication by .
Definition: ope_eq.hpp:795
Term_eq action() const override
Destructor
Ope_mult_sint(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator multiplication by (what it means depend on the Space considered).
Definition: ope_eq.hpp:521
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_mult_x.cpp:31
~Ope_mult_x() override
Destructor.
Definition: ope_mult_x.cpp:28
Ope_mult_x(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_mult_x.cpp:24
The operator Multiplication.
Definition: ope_eq.hpp:185
~Ope_mult() override
Destructor.
Definition: ope_mult.cpp:28
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_mult.cpp:31
Ope_mult(const System_of_eqs *syst, Ope_eq *aa, Ope_eq *bb)
Constructor.
Definition: ope_mult.cpp:22
The operator partial derivative wrt one variable (same thing as Ope_partial ??)
Definition: ope_eq.hpp:904
int which_var
Index of the variable wrt which the derivative is taken.
Definition: ope_eq.hpp:907
~Ope_partial_var() override
Destructor.
Ope_partial_var(const System_of_eqs *syst, int which, Ope_eq *so)
Constructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
The operator partial derivative.
Definition: ope_eq.hpp:832
char ind_der
name of the index
Definition: ope_eq.hpp:834
Ope_partial(const System_of_eqs *syst, char name, Ope_eq *so)
Constructor.
Definition: ope_partial.cpp:23
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_partial.cpp:30
~Ope_partial() override
Destructor.
Definition: ope_partial.cpp:27
This operator gives the value of a field at a point (arbitrary not necesseraly a collocation one)
Definition: ope_eq.hpp:999
~Ope_point() override
Destructor.
Definition: ope_point.cpp:32
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_point.cpp:35
Point num
Absolute coordinates of the point.
Definition: ope_eq.hpp:1001
Ope_point(const System_of_eqs *syst, const Point &pp, Ope_eq *so)
Constructor.
Definition: ope_point.cpp:25
The operator power-law.
Definition: ope_eq.hpp:107
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_pow.cpp:31
Ope_pow(const System_of_eqs *syst, int pow, Ope_eq *so)
Constructor.
Definition: ope_pow.cpp:24
int power
The exponent (an integer, possibly negative).
Definition: ope_eq.hpp:110
~Ope_pow() override
Destructor.
Definition: ope_pow.cpp:28
The operator flat scalar product Intended for systems where no metric has been defined.
Definition: ope_eq.hpp:344
~Ope_scal() override
Destructor.
Definition: ope_scal.cpp:30
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_scal.cpp:33
Ope_scal(const System_of_eqs *syst, Ope_eq *aa, Ope_eq *bb)
Constructor.
Definition: ope_scal.cpp:23
Operator sine (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1204
~Ope_sin() override
Destructor.
Definition: ope_sin.cpp:30
Ope_sin(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_sin.cpp:26
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_sin.cpp:33
Operator hyperbolic sine (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1149
Ope_sinh(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_sinh.cpp:26
~Ope_sinh() override
Destructor.
Definition: ope_sinh.cpp:30
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_sinh.cpp:33
Operator square-root (only defined for a scalar field or a double).
Definition: ope_eq.hpp:1058
~Ope_sqrt_anti() override
Destructor.
Ope_sqrt_anti(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Operator square-root (only defined for a scalar field or a double).
Definition: ope_eq.hpp:1077
~Ope_sqrt_nonstd() override
Destructor.
Ope_sqrt_nonstd(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Operator square-root (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1039
Ope_sqrt(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_sqrt.cpp:24
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_sqrt.cpp:31
~Ope_sqrt() override
Destructor.
Definition: ope_sqrt.cpp:28
The operator multiplication by .
Definition: ope_eq.hpp:539
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_srdr.cpp:31
~Ope_srdr() override
Destructor.
Definition: ope_srdr.cpp:28
Ope_srdr(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Definition: ope_srdr.cpp:24
The operator substraction.
Definition: ope_eq.hpp:165
Ope_sub(const System_of_eqs *syst, Ope_eq *aa, Ope_eq *bb)
Constructor.
Definition: ope_sub.cpp:22
~Ope_sub() override
Destructor.
Definition: ope_sub.cpp:28
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_sub.cpp:31
Operator defined by the user in the System_of_eqs This version is intended to work with two arguments...
Definition: ope_eq.hpp:1264
Param * par
Parameters required by the function.
Definition: ope_eq.hpp:1266
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Term_eq(* pope)(const Term_eq &, const Term_eq &, Param *)
The function that implements the action of the operator.
Definition: ope_eq.hpp:1267
Ope_user_bin(const System_of_eqs *syst, Term_eq(*zeope)(const Term_eq &, const Term_eq &, Param *), Param *par, Ope_eq *aa, Ope_eq *bb)
Constructor.
~Ope_user_bin() override
Destructor.
Operator defined by the user in the System_of_eqs This version is intended to work with one argument.
Definition: ope_eq.hpp:1241
~Ope_user() override
Destructor.
Definition: ope_user.cpp:31
Param * par
Parameters required by the function.
Definition: ope_eq.hpp:1243
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_user.cpp:34
Term_eq(* pope)(const Term_eq &, Param *)
The function that implements the action of the operator.
Definition: ope_eq.hpp:1244
Ope_user(const System_of_eqs *syst, Term_eq(*zeope)(const Term_eq &, Param *), Param *par, Ope_eq *so)
Constructor.
Definition: ope_user.cpp:25
This operator gives the value of one coefficient of a field.
Definition: ope_eq.hpp:955
double value
The result is the coefficient minus value.
Definition: ope_eq.hpp:958
Index pos_cf
The desired coefficient.
Definition: ope_eq.hpp:957
~Ope_val_mode() override
Destructor.
Ope_val_mode(const System_of_eqs *syst, const Index &ind, double val, Ope_eq *so)
Constructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
This operator gives the value of a field at the origin.
Definition: ope_eq.hpp:1020
~Ope_val_ori() override
Destructor.
Definition: ope_val_ori.cpp:29
Ope_val_ori(const System_of_eqs *syst, int dd, Ope_eq *so)
Constructor.
Definition: ope_val_ori.cpp:24
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_val_ori.cpp:32
This operator gives the value of a field at a given collocation point.
Definition: ope_eq.hpp:978
Ope_val(const System_of_eqs *syst, const Index &ind, Ope_eq *so)
Constructor.
Definition: ope_val.cpp:24
~Ope_val() override
Destructor.
Definition: ope_val.cpp:29
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Definition: ope_val.cpp:32
Index pos
which collocation point.
Definition: ope_eq.hpp:980
Parameter storage.
Definition: param.hpp:30
The class Point is used to store the coordinates of a point.
Definition: point.hpp:30
Class used to describe and solve a system of equations.
This class is intended to describe the manage objects appearing in the equations.
Definition: term_eq.hpp:62