KADATH
give_ope.cpp
1 /*
2  Copyright 2017 Philippe Grandclement
3 
4  This file is part of Kadath.
5 
6  Kadath is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Kadath is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Kadath. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #include "system_of_eqs.hpp"
21 #include "name_tools.hpp"
22 #include "term_eq.hpp"
23 #include "base_tensor.hpp"
24 namespace Kadath {
25 bool System_of_eqs::isvar_double (const char* name, int& which) const {
26  bool res = false ;
27  char auxi[LMAX] ;
28  trim_spaces (auxi, name) ;
29  for (int i=0 ; i<nvar_double ; i++) {
30  if (!res)
31  if (strcmp(auxi, names_var_double[i])==0) {
32  res = true ;
33  which = i ;
34  }
35  }
36  return res ;
37 }
38 
39 bool System_of_eqs::isvar (const char* name, int& which, int& valence, char*& name_ind, Array<int>*& type_ind) const {
40  bool res = false ;
41  for (int i=0 ; i<nvar ; i++) {
42  if (name_ind !=0x0) {
43  delete [] name_ind ;
44  name_ind = 0x0 ;
45  }
46  if (type_ind !=0x0) {
47  delete type_ind ;
48  type_ind = 0x0 ;
49  }
50  res = is_tensor(name, names_var[i], valence, name_ind, type_ind) ;
51  if (res) {
52  which = i ;
53  if (valence != var[which]->get_valence()) {
54  cerr << "Bad valence for " << name << endl ;
55  abort() ;
56  }
57  break ;
58  }
59  }
60  return res ;
61 }
62 
63 bool System_of_eqs::iscst (const char* name, int& which, int& valence, char*& name_ind, Array<int>*& type_ind) const {
64  bool res = false ;
65  for (int i=0 ; i<ncst ; i++) {
66 
67  // Type of constant
68  int ind = i*ndom ;
69  int type_cst = cst[ind]->get_type_data() ;
70 
71  switch (type_cst) {
72  case TERM_T :
73  if (name_ind !=0x0) {
74  delete [] name_ind ;
75  name_ind = 0x0 ;
76  }
77  if (type_ind !=0x0) {
78  delete type_ind ;
79  type_ind = 0x0 ;
80  }
81  res = is_tensor(name, names_cst[i], valence, name_ind, type_ind) ;
82  if (res) {
83  which = i ;
84  if (valence != cst[ind]->get_val_t().get_valence()) {
85  cerr << "Bad valence for " << name << endl ;
86  abort() ;
87  }
88  }
89  break ;
90  case TERM_D :
91  if (strcmp(names_cst[i], name)==0) {
92  res = true ;
93  which = i ;
94  }
95  break ;
96  default :
97  cerr << "Unknown type of data in System_of_eqs::iscst" << endl ;
98  abort() ;
99  }
100  if (res)
101  break ;
102  }
103  return res ;
104 }
105 
106 bool System_of_eqs::isdef (int dd, const char* name, int& which, int& valence, char*& name_ind, Array<int>*& type_ind) const {
107  bool res = false ;
108  for (int i=0 ; i<ndef ; i++) {
109  if (name_ind !=0x0) {
110  delete [] name_ind ;
111  name_ind = 0x0 ;
112  }
113  if (type_ind !=0x0) {
114  delete type_ind ;
115  type_ind = 0x0 ;
116  }
117  res = is_tensor(name, names_def[i], valence, name_ind, type_ind) ;
118  if ((res) && (def[i]->get_dom()==dd)) {
119  which = i ;
120  break ;
121  }
122  res = false ;
123  }
124  return res ;
125 }
126 
127 bool System_of_eqs::isdef_glob (int dd, const char* name, int& which) const {
128  bool res = false ;
129  for (int i=0 ; i<ndef_glob ; i++) {
130  if ((strcmp(names_def_glob[i], name)==0) && (def_glob[i]->get_dom()==dd)) {
131  res = true ;
132  which = i ;
133  break ;
134  }
135  }
136  return res ;
137 }
138 
139 
140 bool System_of_eqs::isdouble (const char*name, double& val) const {
141  char* error ;
142  val = strtod (name, &error);
143  bool res = ((*error != ' ') || (strlen(error)>1)) ? false : true ;
144  return res ;
145 }
146 
147 bool System_of_eqs::ismet (const char* name, char*& name_ind, int& type_indice) const {
148  if (met==0x0)
149  return false ;
150  int valence ;
151  Array<int>* type_ind = 0x0 ;
152  bool res = is_tensor(name, name_met, valence, name_ind, type_ind) ;
153  if (res) {
154  if (valence !=2) {
155  cerr << "Bad valence for the metric " << name_met << " in " << name << endl ;
156  abort() ;
157  }
158 
159  if ((*type_ind)(0)!=(*type_ind)(1)) {
160  cerr << "Indices of the metric must be of the same type" << endl ;
161  abort() ;
162  }
163 
164  type_indice = (*type_ind)(0) ;
165  delete type_ind ;
166  }
167  return res ;
168 }
169 
170 bool System_of_eqs::ismet (const char* name) const {
171 
172  char auxi[LMAX] ;
173  trim_spaces(auxi, name) ;
174 
175  if (met==0x0)
176  return false ;
177  int same = strcmp(auxi, name_met) ;
178 
179  if (same!=0)
180  return false;
181  else
182  return true ;
183 }
184 
185 bool System_of_eqs::ischristo (const char* name, char*& name_ind, Array<int>*& type_ind) const {
186 
187  if (met==0x0)
188  return false ;
189  int valence ;
190  bool res = is_tensor(name, "Gam ", valence, name_ind, type_ind) ;
191  if (res) {
192  if (valence != 3) {
193  cerr << "Bad valence for Christoffel symbol in " << name << endl ;
194  abort() ;
195  }
196 
197  if (((*type_ind)(0)!=COV) || ((*type_ind)(1)!=COV) || ((*type_ind)(2)!=CON)) {
198  cerr << "Indices of the wrong type in " << name << endl ;
199  abort() ;
200  }
201  }
202  return res ;
203 }
204 
205 bool System_of_eqs::isriemann (const char* name, char*& name_ind, Array<int>*& type_ind) const {
206 
207  if (met==0x0)
208  return false ;
209  int valence ;
210  bool res = is_tensor(name, "R ", valence, name_ind, type_ind) ;
211  if (res)
212  if (valence !=4)
213  res = false ;
214  if (res) {
215 
216  if (((*type_ind)(0)!=CON) || ((*type_ind)(1)!=COV) || ((*type_ind)(2)!=COV) || ((*type_ind)(3)!=COV)) {
217  delete [] name_ind ;
218  delete type_ind ;
219  res = false ;
220  }
221  }
222 
223  if (!res) {
224  if (name_ind !=0x0)
225  delete [] name_ind ;
226  if (type_ind !=0x0)
227  delete type_ind ;
228  }
229  return res ;
230 }
231 
232 
233 bool System_of_eqs::isricci_tensor (const char* name, char*& name_ind, Array<int>*& type_ind) const {
234 
235  if (met==0x0)
236  return false ;
237  int valence ;
238  bool res = is_tensor(name, "R ", valence, name_ind, type_ind) ;
239  if ((res) && (valence != 2)) {
240  delete [] name_ind ;
241  delete type_ind ;
242  res = false ;
243  }
244 
245  if (!res) {
246  if (name_ind !=0x0)
247  delete [] name_ind ;
248  if (type_ind !=0x0)
249  delete type_ind ;
250  }
251  return res ;
252 }
253 
254 bool System_of_eqs::isricci_scalar (const char* name, char*& name_ind, Array<int>*& type_ind) const {
255 
256  if (met==0x0)
257  return false ;
258  int valence ;
259  bool res = is_tensor(name, "R ", valence, name_ind, type_ind) ;
260  if ((res) && (valence != 0)) {
261  delete [] name_ind ;
262  delete type_ind ;
263  res = false ;
264  }
265 
266  if (!res) {
267  if (name_ind !=0x0)
268  delete [] name_ind ;
269  if (type_ind !=0x0)
270  delete type_ind ;
271  }
272  return res ;
273 }
274 
275 
276 bool System_of_eqs::is_ope_bin (const char* name, char* part1, char* part2, char cible) const {
277  assert ((cible=='+') || (cible=='-') || (cible=='*') || (cible=='/') || (cible=='=')) ;
278 
279  bool res = false ;
280  int nbr_cible = nbr_char(name, cible) ;
281  int conte = 0 ;
282 
283  while ((!res) && (conte<nbr_cible)) {
284  get_parts(name, part1, part2, cible, conte) ;
285  if ((part1[0] !='\0') && (part2[0]!='\0'))
286  if ((nbr_char(part1, '(')==nbr_char(part1, ')')) && (nbr_char(part2, '(')==nbr_char(part2, ')')))
287  res = true ;
288  conte ++ ;
289  }
290  return res ;
291 }
292 
293 bool System_of_eqs::is_ope_minus (const char* name, char* part) const {
294 
295  // Check the beginning
296  char auxi[LMAX] ;
297  trim_spaces(auxi, name) ;
298  int len = static_cast<int>(strlen(auxi)) ;
299 
300  bool res = true ;
301  if (auxi[0] != '-')
302  res = false ;
303  if (res) {
304  char occi[LMAX] ;
305  for (int i=1 ; i<len-1 ; i++)
306  occi[i-1] = auxi[i] ;
307  occi[len-2] = ' ' ;
308  occi[len-1] = '\0' ;
309  trim_spaces(part, occi) ;
310  }
311  return res ;
312 }
313 
314 bool System_of_eqs::is_ope_uni (const char* name, char* part, const char* zeope) const {
315 
316  // Check the beginning
317  char auxi[LMAX] ;
318  trim_spaces(auxi, zeope) ;
319  int len = static_cast<int>(strlen(auxi)) ;
320 
321  bool res = true ;
322  for (int i=0 ; i<len-1 ; i++)
323  if (name[i]!=auxi[i]) {
324  res = false ;
325  break ;
326  }
327 
328  if (res)
329  if (name[len-1]!='(')
330  res = false ;
331 
332  // check the end
333  if (res) {
334  int lentot = static_cast<int>(strlen(name)) ;
335  assert (name[lentot-1]==' ') ;
336  if (name[lentot-2]!=')')
337  res = false ;
338 
339  for (int i=len ; i<lentot-2 ; i++)
340  part[i-len] = name[i] ;
341 
342  part[lentot-len-2] = ' ' ;
343  part[lentot-len-1] = '\0' ;
344  }
345 
346  return res ;
347 }
348 
349 bool System_of_eqs::is_ope_uni (const char* name, char* p1, char* p2, const char* zeope) const {
350 
351  // Check the beginning
352  char auxi[LMAX] ;
353  trim_spaces(auxi, zeope) ;
354  int len = static_cast<int>(strlen(auxi)) ;
355  bool res = true ;
356  for (int i=0 ; i<len-2 ; i++)
357  if (name[i]!=auxi[i]) {
358  res = false ;
359  break ;
360  }
361  if (res)
362  if (name[len-1]!='(')
363  res = false ;
364 
365  // check the end
366  if (res) {
367 
368  char part[LMAX] ;
369  int lentot = static_cast<int>(strlen(name)) ;
370  assert (name[lentot-1]==' ') ;
371  if (name[lentot-2]!=')')
372  res = false ;
373 
374  for (int i=len ; i<lentot-2 ; i++)
375  part[i-len] = name[i] ;
376 
377  part[lentot-len-2] = ' ' ;
378  part[lentot-len-1] = '\0' ;
379 
380  get_parts(part, p1, p2, ',') ;
381  }
382  return res ;
383 }
384 
385 bool System_of_eqs::is_ope_deriv (const char* nn, char* part, int& type_der, char& name_ind) const {
386  char name[LMAX] ;
387  trim_spaces(name, nn) ;
388  bool res = true ;
389  int len = static_cast<int>(strlen(name)) ;
390  // Check first char and last
391  if (name[0]!='D')
392  res = false ;
393  // Check type of derivative
394  if (res) {
395  if (name[1]=='_')
396  type_der = COV ;
397  else {
398  if (name[1]=='^')
399  type_der = CON ;
400  else
401  res = false ;
402  }
403  }
404 
405  if (res) {
406  // Get the indice :
407  name_ind = name[2] ;
408 
409  // Get the rest :
410  char auxi[LMAX] ;
411  for (int i=3 ; i<len ; i++)
412  auxi[i-3] = name[i] ;
413  auxi[len-3] = '\0' ;
414  trim_spaces(part, auxi) ;
415  }
416  return res ;
417 }
418 
419 bool System_of_eqs::is_ope_deriv_flat (const char* nn, char* part, int& type_der, char& name_ind) const {
420  char name[LMAX] ;
421  trim_spaces(name, nn) ;
422  bool res = true ;
423  int len = static_cast<int>(strlen(name)) ;
424  // Check first char and last
425  if (name[0]!='D')
426  res = false ;
427  if (name[1]!='F')
428  res = false ;
429  // Check type of derivative
430  if (res) {
431  if (name[2]=='_')
432  type_der = COV ;
433  else {
434  if (name[2]=='^')
435  type_der = CON ;
436  else
437  res = false ;
438  }
439  }
440 
441  if (res) {
442  // Get the indice :
443  name_ind = name[3] ;
444 
445  // Get the rest :
446  char auxi[LMAX] ;
447  for (int i=4 ; i<len ; i++)
448  auxi[i-4] = name[i] ;
449  auxi[len-4] = '\0' ;
450  trim_spaces(part, auxi) ;
451  }
452  return res ;
453 }
454 
455 bool System_of_eqs::is_ope_deriv_background (const char* nn, char* part, int& type_der, char& name_ind) const {
456  char name[LMAX] ;
457  trim_spaces(name, nn) ;
458  bool res = true ;
459  int len = static_cast<int>(strlen(name)) ;
460  // Check first char and last
461  if (name[0]!='D')
462  res = false ;
463  if (name[1]!='B')
464  res = false ;
465  // Check type of derivative
466  if (res) {
467  if (name[2]=='_')
468  type_der = COV ;
469  else {
470  if (name[2]=='^')
471  type_der = CON ;
472  else
473  res = false ;
474  }
475  }
476 
477  if (res) {
478  // Get the indice :
479  name_ind = name[3] ;
480 
481  // Get the rest :
482  char auxi[LMAX] ;
483  for (int i=4 ; i<len ; i++)
484  auxi[i-4] = name[i] ;
485  auxi[len-4] = '\0' ;
486  trim_spaces(part, auxi) ;
487  }
488  return res ;
489 }
490 
491 bool System_of_eqs::is_ope_partial (const char* nn, char* part, char& name_ind) const {
492  char name[LMAX] ;
493  trim_spaces(name, nn) ;
494  bool res = true ;
495  int len = static_cast<int>(strlen(name)) ;
496 
497  // Check name
498  if (strncmp(name,"partial", 7) != 0)
499  res = false ;
500  // Check type of derivative
501  if (res)
502  if (name[7]!='_')
503  res = false ;
504 
505  if (res) {
506  // Get the indice :
507  name_ind = name[8] ;
508 
509  // Get the rest :
510  char auxi[LMAX] ;
511  for (int i=9 ; i<len ; i++)
512  auxi[i-9] = name[i] ;
513  auxi[len-9] = '\0' ;
514  trim_spaces(part, auxi) ;
515  }
516  return res ;
517 }
518 
519 bool System_of_eqs::is_ope_pow (const char* name, char* part, int& expo) const {
520  char auxi[LMAX] ;
521  trim_spaces(auxi, name) ;
522 
523  bool res = (nbr_char(auxi, '^')>=1) ? true : false ;
524 
525  if (res) {
526 
527  char p2[LMAX] ;
528  get_parts(auxi, part, p2, '^') ;
529 
530  // Is p2 an integer ?
531  char* error ;
532  expo = static_cast<int>(strtol (p2, &error, 0));
533  res = ((*error != ' ') || (strlen(error)>1)) ? false : true ;
534  }
535 
536  return res ;
537 }
538 
539 bool System_of_eqs::is_ope_der_var (int dd, const char*name, char*part, int& numvar) const {
540 
541  char auxi[LMAX] ;
542  trim_spaces(auxi, name) ;
543 
544  bool res = (nbr_char(name, ',')==1) ? true : false ;
545  if (res) {
546  char p2[LMAX] ;
547  get_parts(auxi, part, p2, ',') ;
548 
549  // Check if p2 is the name of a variable
550  int isitvar = espace.get_domain(dd)->give_place_var (p2) ;
551  if (isitvar==-1)
552  res = false ;
553  else
554  numvar = isitvar ;
555  }
556  return res ;
557 }
558 
559 Ope_eq* System_of_eqs::give_ope (int dd, const char* name, int bound) const {
560  Ope_eq* p_ope = 0x0 ;
561  bool indic ;
562  int which = -1 ;
563  char p1[LMAX] ;
564  char p2[LMAX] ;
565 
566  // Check if addition :
567  indic = is_ope_bin(name, p1, p2, '+') ;
568  if (indic) {
569  p_ope = new Ope_add(this, give_ope(dd,p1, bound), give_ope(dd,p2, bound)) ;
570  return p_ope ;
571  }
572 
573  // Check if substraction :
574  indic = is_ope_bin(name, p1, p2, '-') ;
575  if (indic) {
576  p_ope = new Ope_sub(this, give_ope(dd,p1,bound), give_ope(dd,p2, bound)) ;
577  return p_ope ;
578  }
579 
580  // Check if minus
581  indic = is_ope_minus(name, p1) ;
582  if (indic) {
583  p_ope = new Ope_minus (this, give_ope(dd,p1, bound)) ;
584  return p_ope ;
585  }
586 
587  // Check if multiplication :
588  indic = is_ope_bin(name, p1, p2, '*') ;
589  if (indic) {
590  p_ope = new Ope_mult(this, give_ope(dd,p1, bound), give_ope(dd,p2, bound)) ;
591  return p_ope ;
592  }
593 
594  // Check if division :
595  indic = is_ope_bin(name, p1, p2, '/') ;
596  if (indic) {
597  p_ope = new Ope_div(this, give_ope(dd,p1, bound), give_ope(dd,p2, bound)) ;
598  return p_ope ;
599  }
600 
601  // Check if laplacian :
602  indic = is_ope_uni(name, p1, "Lap") ;
603  if (indic) {
604  p_ope = new Ope_lap(this, give_ope(dd,p1, bound)) ;
605  return p_ope ;
606  }
607 
608  indic = is_ope_uni(name, p1, "lap") ;
609  if (indic) {
610  p_ope = new Ope_lap(this, give_ope(dd,p1, bound)) ;
611  return p_ope ;
612  }
613 
614  indic = is_ope_uni(name, p1, "Lap2") ;
615  if (indic) {
616  p_ope = new Ope_lap2(this, give_ope(dd,p1, bound)) ;
617  return p_ope ;
618  }
619 
620  indic = is_ope_uni(name, p1, "lap2") ;
621  if (indic) {
622  p_ope = new Ope_lap2(this, give_ope(dd,p1, bound)) ;
623  return p_ope ;
624  }
625  // Check if dn :
626  indic = is_ope_uni(name, p1, "dn") ;
627  if (indic) {
628  p_ope = new Ope_dn(this, bound, give_ope(dd,p1, bound)) ;
629  return p_ope ;
630  }
631 
632  // Check if mult by x :
633  indic = is_ope_uni(name, p1, "multx") ;
634  if (indic) {
635  p_ope = new Ope_mult_x(this, give_ope(dd,p1, bound)) ;
636  return p_ope ;
637  }
638 
639  // Check if mult by r :
640  indic = is_ope_uni(name, p1, "multr") ;
641  if (indic) {
642  p_ope = new Ope_mult_r(this, give_ope(dd,p1, bound)) ;
643  return p_ope ;
644  }
645 
646  // Check if mult by 1 - r/L :
647  indic = is_ope_uni(name, p1, "mult1mrsL") ;
648  if (indic) {
649  p_ope = new Ope_mult_1mrsL(this, give_ope(dd,p1, bound)) ;
650  return p_ope ;
651  }
652 
653  // Check if div by 1 - r/L :
654  indic = is_ope_uni(name, p1, "div1mrsL") ;
655  if (indic) {
656  p_ope = new Ope_div_1mrsL(this, give_ope(dd,p1, bound)) ;
657  return p_ope ;
658  }
659 
660  indic = is_ope_uni(name, p1, "valori") ;
661  if (indic) {
662  p_ope = new Ope_val_ori(this, dd, give_ope(0,p1, bound)) ;
663  return p_ope ;
664  }
665 
666  // Check if srdr :
667  indic = is_ope_uni(name, p1, "srdr") ;
668  if (indic) {
669  p_ope = new Ope_srdr(this, give_ope(dd,p1, bound)) ;
670  return p_ope ;
671  }
672 
673  // Check if ddp :
674  indic = is_ope_uni(name, p1, "ddp") ;
675  if (indic) {
676  p_ope = new Ope_ddp(this, give_ope(dd,p1, bound)) ;
677  return p_ope ;
678  }
679 
680  // Check if ddt :
681  indic = is_ope_uni(name, p1, "ddt") ;
682  if (indic) {
683  p_ope = new Ope_ddt(this, give_ope(dd,p1, bound)) ;
684  return p_ope ;
685  }
686 
687  // Check if dt :
688  indic = is_ope_uni(name, p1, "dt") ;
689  if (indic) {
690  p_ope = new Ope_dt(this, give_ope(dd,p1, bound)) ;
691  return p_ope ;
692  }
693 
694  // Check if dt :
695  indic = is_ope_uni(name, p1, "dtime") ;
696  if (indic) {
697  p_ope = new Ope_dtime(this, give_ope(dd,p1, bound)) ;
698  return p_ope ;
699  }
700 
701  // Check if ddt
702  indic = is_ope_uni(name, p1, "ddtime") ;
703  if (indic) {
704  p_ope = new Ope_ddtime (this, give_ope(dd, p1, bound)) ;
705  return p_ope ;
706  }
707 
708 
709  // Check if ddr :
710  indic = is_ope_uni(name, p1, "ddr") ;
711  if (indic) {
712  p_ope = new Ope_ddr(this, give_ope(dd,p1, bound)) ;
713  return p_ope ;
714  }
715 
716  // Check if dr :
717  indic = is_ope_uni(name, p1, "dr") ;
718  if (indic) {
719  p_ope = new Ope_dr(this, give_ope(dd,p1, bound)) ;
720  return p_ope ;
721  }
722 
723  // Check if division by r:
724  indic = is_ope_uni(name, p1, "divr") ;
725  if (indic) {
726  p_ope = new Ope_div_r(this, give_ope(dd,p1, bound)) ;
727  return p_ope ;
728  }
729 
730  // Check if multiplication by r sint:
731  indic = is_ope_uni(name, p1, "multrsint") ;
732  if (indic) {
733  p_ope = new Ope_mult_rsint(this, give_ope(dd,p1, bound)) ;
734  return p_ope ;
735  }
736 
737  // Check if division by r sint:
738  indic = is_ope_uni(name, p1, "divrsint") ;
739  if (indic) {
740  p_ope = new Ope_div_rsint(this, give_ope(dd,p1, bound)) ;
741  return p_ope ;
742  }
743 
744  // Check if division by sint:
745  indic = is_ope_uni(name, p1, "divsint") ;
746  if (indic) {
747  p_ope = new Ope_div_sint(this, give_ope(dd,p1, bound)) ;
748  return p_ope ;
749  }
750 
751  // Check if division by cost:
752  indic = is_ope_uni(name, p1, "divcost") ;
753  if (indic) {
754  p_ope = new Ope_div_cost(this, give_ope(dd,p1, bound)) ;
755  return p_ope ;
756  }
757 
758  // Check if multiplication by sint:
759  indic = is_ope_uni(name, p1, "multsint") ;
760  if (indic) {
761  p_ope = new Ope_mult_sint(this, give_ope(dd,p1, bound)) ;
762  return p_ope ;
763  }
764 
765  // Check if division by xpone:
766  indic = is_ope_uni(name, p1, "divxpone") ;
767  if (indic) {
768  p_ope = new Ope_div_xpone(this, give_ope(dd,p1, bound)) ;
769  return p_ope ;
770  }
771 
772  // Check if division by xpone:
773  indic = is_ope_uni(name, p1, "div1mx2") ;
774  if (indic) {
775  p_ope = new Ope_div_1mx2(this, give_ope(dd,p1, bound)) ;
776  return p_ope ;
777  }
778 
779  // Check if integ :
780  indic = is_ope_uni(name, p1, "integ") ;
781  if (indic) {
782  p_ope = new Ope_int(this, bound, give_ope(dd,p1,bound)) ;
783  return p_ope ;
784  }
785 
786  // Check if integ :
787  indic = is_ope_uni(name, p1, "integvolume") ;
788  if (indic) {
789  p_ope = new Ope_int_volume(this, give_ope(dd,p1, bound)) ;
790  return p_ope ;
791  }
792 
793  // Check if grad :
794  indic = is_ope_uni(name, p1, "grad") ;
795  if (indic) {
796  p_ope = new Ope_grad(this, give_ope(dd,p1, bound)) ;
797  return p_ope ;
798  }
799 
800  // Check if sqrt :
801  indic = is_ope_uni(name, p1, "sqrt") ;
802  if (indic) {
803  p_ope = new Ope_sqrt(this, give_ope(dd,p1, bound)) ;
804  return p_ope ;
805  }
806 
807  // Check if sqrt rho basis :
808  indic = is_ope_uni(name, p1, "sqrtrho") ;
809  if (indic) {
810  p_ope = new Ope_sqrt_nonstd(this, give_ope(dd,p1, bound)) ;
811  return p_ope ;
812  }
813 
814  // Check if sqrt anti basis :
815  indic = is_ope_uni(name, p1, "sqrtanti") ;
816  if (indic) {
817  p_ope = new Ope_sqrt_anti(this, give_ope(dd,p1, bound)) ;
818  return p_ope ;
819  }
820 
821 
822  // Check if exp :
823  indic = is_ope_uni(name, p1, "exp") ;
824  if (indic) {
825  p_ope = new Ope_exp(this, give_ope(dd,p1, bound)) ;
826  return p_ope ;
827  }
828 
829  // Check if log :
830  indic = is_ope_uni(name, p1, "log") ;
831  if (indic) {
832  p_ope = new Ope_log(this, give_ope(dd,p1, bound)) ;
833  return p_ope ;
834  }
835 
836  // Check if atanh :
837  indic = is_ope_uni(name, p1, "atanh") ;
838  if (indic) {
839  p_ope = new Ope_atanh(this, give_ope(dd,p1, bound)) ;
840  return p_ope ;
841  }
842 
843  // Check if cos :
844  indic = is_ope_uni(name, p1, "cos") ;
845  if (indic) {
846  p_ope = new Ope_cos(this, give_ope(dd,p1, bound)) ;
847  return p_ope ;
848  }
849 
850  // Check if sin :
851  indic = is_ope_uni(name, p1, "sin") ;
852  if (indic) {
853  p_ope = new Ope_sin(this, give_ope(dd,p1, bound)) ;
854  return p_ope ;
855  }
856 
857  // Check if cosh :
858  indic = is_ope_uni(name, p1, "cosh") ;
859  if (indic) {
860  p_ope = new Ope_cosh(this, give_ope(dd,p1, bound)) ;
861  return p_ope ;
862  }
863 
864  // Check if sinh :
865  indic = is_ope_uni(name, p1, "sinh") ;
866  if (indic) {
867  p_ope = new Ope_sinh(this, give_ope(dd,p1, bound)) ;
868  return p_ope ;
869  }
870 
871  // Check if scalar product :
872  indic = is_ope_uni(name, p1, p2, "scal") ;
873  if (indic) {
874  p_ope = new Ope_scal(this, give_ope(dd,p1, bound), give_ope(dd,p2, bound)) ;
875  return p_ope ;
876  }
877 
878  // Check if complex conjugate
879  indic = is_ope_uni(name, p1, "conjug") ;
880  if (indic) {
881  p_ope = new Ope_conjug(this, give_ope(dd,p1, bound)) ;
882  return p_ope ;
883  }
884 
885  // Check if determinant :
886  indic = is_ope_uni(name, p1, "determinant") ;
887  if (indic) {
888  p_ope = new Ope_determinant(this, give_ope(dd,p1, bound)) ;
889  return p_ope ;
890  }
891 
892  // Check if inverse :
893  indic = is_ope_uni(name, p1, "inverse") ;
894  if (indic) {
895  p_ope = new Ope_inverse(this, give_ope(dd,p1, bound)) ;
896  return p_ope ;
897  }
898 
899  // Check if inversenodet :
900  indic = is_ope_uni(name, p1, "inversenodet") ;
901  if (indic) {
902  p_ope = new Ope_inverse_nodet(this, give_ope(dd,p1, bound)) ;
903  return p_ope ;
904  }
905 
906  // Check if fit waves
907  indic = is_ope_uni(name, p1, p2, "fitwaves") ;
908  if (indic) {
909  p_ope = new Ope_fit_waves(this, give_ope(dd,p1, bound), give_ope(dd,p2, bound)) ;
910  return p_ope ;
911  }
912 
913  // Check if import
914  indic = is_ope_uni(name, p1, "import") ;
915  if (indic) {
916  p_ope = new Ope_import(this, dd, bound, p1) ;
917  return p_ope ;
918  }
919 
920  // Check if to spherical tensorial basis
921  indic = is_ope_uni(name, p1, "tospherical") ;
922  if (indic) {
923  p_ope = new Ope_change_basis(this, SPHERICAL_BASIS , give_ope(dd, p1, bound)) ;
924  return p_ope ;
925  }
926 
927  // Check if to cartesian tensorial basis
928  indic = is_ope_uni(name, p1, "tocartesian") ;
929  if (indic) {
930  p_ope = new Ope_change_basis(this, CARTESIAN_BASIS , give_ope(dd, p1, bound)) ;
931  return p_ope ;
932  }
933 
934  // Check if derivative :
935  int type_der ;
936  char ind_der ;
937  indic = is_ope_deriv(name, p1, type_der, ind_der) ;
938  if (indic) {
939  p_ope = new Ope_der (this, type_der, ind_der, give_ope(dd,p1, bound)) ;
940  return p_ope ;
941  }
942 
943  // Check if flat derivative :
944  indic = is_ope_deriv_flat(name, p1, type_der, ind_der) ;
945  if (indic) {
946  p_ope = new Ope_der_flat (this, type_der, ind_der, give_ope(dd,p1, bound)) ;
947  return p_ope ;
948  }
949 
950  // Check if background derivative :
951  indic = is_ope_deriv_background(name, p1, type_der, ind_der) ;
952  if (indic) {
953  p_ope = new Ope_der_background (this, type_der, ind_der, give_ope(dd,p1, bound)) ;
954  return p_ope ;
955  }
956 
957 
958  // Check if partial :
959  indic = is_ope_partial(name, p1, ind_der) ;
960  if (indic) {
961  p_ope = new Ope_partial (this, ind_der, give_ope(dd,p1, bound)) ;
962  return p_ope ;
963  }
964 
965  // Check if partial derivative with respect to one particular variable :
966  int ind_var ;
967  indic = is_ope_der_var (dd, name, p1, ind_var) ;
968  if (indic) {
969  p_ope = new Ope_partial_var (this, ind_var, give_ope(dd, p1, bound)) ;
970  return p_ope ;
971  }
972 
973  // Check if exponent :
974  int val_exp ;
975  indic = is_ope_pow (name, p1, val_exp) ;
976  if (indic) {
977  p_ope = new Ope_pow(this, val_exp, give_ope(dd, p1, bound)) ;
978  return p_ope ;
979  }
980 
981  // Check if double variable :
982  indic = isvar_double (name, which) ;
983  if (indic) {
984  p_ope = new Ope_id (this, give_term_double(which, dd)) ;
985  return p_ope ;
986  }
987 
988  // Check if variable :
989  int valence ;
990  char* name_ind = 0x0 ;
991  Array<int>* type_ind = 0x0 ;
992  indic = isvar (name, which, valence, name_ind, type_ind) ;
993  if (indic) {
994  p_ope = new Ope_id (this, give_term(which, dd), valence, name_ind, type_ind) ;
995  return p_ope ;
996  }
997 
998 
999  // Check if metric
1000  name_ind = 0x0 ;
1001  int type_indice ;
1002  indic = ismet (name, name_ind, type_indice) ;
1003  if (indic) {
1004  type_ind = new Array<int> (2) ;
1005  type_ind->set(0) = type_indice ; type_ind->set(1) = type_indice ;
1006  p_ope = new Ope_id (this, met->give_term (dd, type_indice), 2, name_ind, type_ind) ;
1007  return p_ope ;
1008  }
1009 
1010  // Check if Christoffel :
1011  name_ind = 0x0 ;
1012  type_ind = 0x0 ;
1013  indic = ischristo (name, name_ind, type_ind) ;
1014  if (indic) {
1015  p_ope = new Ope_id (this, met->give_christo (dd), 3, name_ind, type_ind) ;
1016  return p_ope ;
1017  }
1018 
1019  // Check if Riemann :
1020  name_ind = 0x0 ;
1021  type_ind = 0x0 ;
1022  indic = isriemann (name, name_ind, type_ind) ;
1023  if (indic) {
1024  p_ope = new Ope_id (this, met->give_riemann (dd), 4, name_ind, type_ind) ;
1025  return p_ope ;
1026  }
1027 
1028  // Check if Ricci tensor :
1029  name_ind = 0x0 ;
1030  type_ind = 0x0 ;
1031  indic = isricci_tensor (name, name_ind, type_ind) ;
1032  if (indic) {
1033  p_ope = new Ope_id (this, met->give_ricci_tensor (dd), 2, name_ind, type_ind) ;
1034  return p_ope ;
1035  }
1036 
1037  // Check if Ricci scalar :
1038  name_ind = 0x0 ;
1039  type_ind = 0x0 ;
1040  indic = isricci_scalar (name, name_ind, type_ind) ;
1041  if (indic) {
1042  p_ope = new Ope_id (this, met->give_ricci_scalar (dd)) ;
1043  return p_ope ;
1044  }
1045 
1046  // Check if Dirac :
1047  name_ind = 0x0 ;
1048  type_ind = 0x0 ;
1049  indic = is_tensor(name, "dirac ", valence, name_ind, type_ind) ;
1050  if (indic) {
1051  if (valence != 1) {
1052  cerr << "Dirac operator must be of valence one" << endl ;
1053  abort() ;
1054  }
1055  p_ope = new Ope_id (this, met->give_dirac(dd), valence, name_ind, type_ind) ;
1056  return p_ope ;
1057  }
1058 
1059  // Check if normal vector :
1060  name_ind = 0x0 ;
1061  type_ind = 0x0 ;
1062  indic = is_tensor(name, "normal ", valence, name_ind, type_ind) ;
1063  if (indic) {
1064  if (valence != 1) {
1065  cerr << "Normal vector operator must be of valence one" << endl ;
1066  abort() ;
1067  }
1068  if (met==0x0) {
1069  cerr << "Metric must be passed to call normal" << endl ;
1070  abort() ;
1071  }
1072  int typebase = met->give_type(dd) ;
1073  p_ope = new Ope_id (this, espace.get_domain(dd)->give_normal(bound, typebase), valence, name_ind, type_ind) ;
1074  return p_ope ;
1075  }
1076 
1077  // Check if passed cst :
1078  name_ind = 0x0 ;
1079  type_ind = 0x0 ;
1080  indic = iscst (name, which, valence, name_ind, type_ind) ;
1081  if (indic) {
1082  if (name_ind==0x0)
1083  p_ope = new Ope_id (this, give_cst(which, dd)) ;
1084  else
1085  p_ope = new Ope_id (this, give_cst(which, dd), valence, name_ind, type_ind) ;
1086  return p_ope ;
1087  }
1088 
1089  // Check if cst passed in hard (i.e. a double)
1090  double val = 0. ;
1091  indic = isdouble (name, val) ;
1092  if (indic) {
1093  valence = 0 ;
1094  p_ope = new Ope_id (this, give_cst_hard(val, dd)) ;
1095  return p_ope ;
1096  }
1097 
1098  // Check if definition :
1099  name_ind = 0x0 ;
1100  type_ind = 0x0 ;
1101  indic = isdef (dd, name, which, valence, name_ind, type_ind) ;
1102  if (indic) {
1103  p_ope = new Ope_id (this, give_def(which)->get_res(), valence, name_ind, type_ind) ;
1104  return p_ope ;
1105  }
1106 
1107  // Check if global definition :;
1108  indic = isdef_glob (dd, name, which) ;
1109  if (indic) {
1110  p_ope = new Ope_id (this, give_def_glob(which)->get_res()) ;
1111  return p_ope ;
1112  }
1113 
1114  // Check if user defined operator
1115  for (int i=0 ; i<nopeuser ; i++) {
1116  indic = is_ope_uni (name, p1, names_opeuser[i]) ;
1117  if (indic) {
1118  p_ope = new Ope_user (this, opeuser[i], paruser[i], give_ope(dd,p1, bound)) ;
1119  return p_ope ;
1120  }
1121  }
1122 
1123  // Check if user defined operator
1124  for (int i=0 ; i<nopeuser_bin ; i++) {
1125  indic = is_ope_uni (name, p1, p2, names_opeuser_bin[i]) ;
1126  if (indic) {
1127  p_ope = new Ope_user_bin (this, opeuser_bin[i], paruser_bin[i], give_ope(dd,p1, bound), give_ope(dd, p2, bound)) ;
1128  return p_ope ;
1129  }
1130  }
1131 
1132  assert (p_ope==0x0) ;
1133  cerr << "Unknown operator " << name << endl ;
1134  abort() ;
1135 }
1136 }
reference set(const Index &pos)
Read/write of an element.
Definition: array.hpp:186
virtual const Term_eq * give_normal(int bound, int tipe) const
Returns the vector normal to a surface.
Definition: domain.cpp:1715
virtual int give_place_var(char *name) const
Translates a name of a coordinate into its corresponding numerical name.
Definition: domain.cpp:1739
const Term_eq * give_riemann(int dd) const
Gives the Riemann tensor, in a Domain.
Definition: metric.cpp:131
const Term_eq * give_christo(int dd) const
Gives the Christoffel symbols, in a Domain.
Definition: metric.cpp:124
const Term_eq * give_term(int typemet, int dd) const
Gives one representation of the metric, in a Domain.
Definition: metric.cpp:103
const Term_eq * give_dirac(int dd) const
Gives the potential of the Dirac gauge, in a Domain.
Definition: metric.cpp:152
const Term_eq * give_ricci_scalar(int dd) const
Gives the Ricci scalar, in a Domain.
Definition: metric.cpp:145
const Term_eq * give_ricci_tensor(int dd) const
Gives the Ricci tensor, in a Domain.
Definition: metric.cpp:138
virtual int give_type(int) const
Returns the type of tensorial basis of the covariant representation, in a given Domain.
Definition: metric.cpp:118
The operator addition.
Definition: ope_eq.hpp:146
Operator inverse hyperbolic tangent (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1168
Operator changin the tensorial basis of a field.
Definition: ope_eq.hpp:1317
Complex conjugate (only changes the m_quant parameter so far).
Definition: ope_eq.hpp:1363
Operator cosine (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1186
Operator hyperbolic cosine (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1131
The operator second derivative wrt .
Definition: ope_eq.hpp:595
The operator second radial derivative.
Definition: ope_eq.hpp:559
The operator second derivative wrt .
Definition: ope_eq.hpp:631
Second time derivative Computes the second time derivative.
Definition: ope_eq.hpp:264
The operator covariant derivative with respect to the background metric.
Definition: ope_eq.hpp:414
The operator covariant derivative with respect to the flat metric.
Definition: ope_eq.hpp:389
The operator covariant derivative.
Definition: ope_eq.hpp:364
The operator determinant.
Definition: ope_eq.hpp:852
The operator division by (for AADS spacetimes).
Definition: ope_eq.hpp:759
The operator division by .
Definition: ope_eq.hpp:741
The operator division by .
Definition: ope_eq.hpp:703
The operator division by .
Definition: ope_eq.hpp:649
The operator division by .
Definition: ope_eq.hpp:667
The operator division by .
Definition: ope_eq.hpp:813
The operator division by .
Definition: ope_eq.hpp:723
The operator Division.
Definition: ope_eq.hpp:205
The operator normal derivative Computes the derivative in the direction normal to a given boundary.
Definition: ope_eq.hpp:302
The operator first radial derivative.
Definition: ope_eq.hpp:577
The operator first derivative wrt .
Definition: ope_eq.hpp:613
The operator time derivative.
Definition: ope_eq.hpp:244
Abstract class that describes the various operators that can appear in the equations.
Definition: ope_eq.hpp:32
Operator exponential (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1095
Operator that fits a field to outgoing waves (highly specialized stuff)
Definition: ope_eq.hpp:1222
The operator flat gradient Intended for systems where no metric has been defined.
Definition: ope_eq.hpp:325
The operator identity.
Definition: ope_eq.hpp:72
Operator importing the values of a field from a neighborig Domain.
Definition: ope_eq.hpp:1288
The operator volume integral (in a given Domain)
Definition: ope_eq.hpp:460
The operator surface integral.
Definition: ope_eq.hpp:438
The operator inverse (of a Metric_tensor ; i.e.
Definition: ope_eq.hpp:887
The operator inverse (of a Metric_tensor ; i.e.
Definition: ope_eq.hpp:869
The operator Laplacian 2D.
Definition: ope_eq.hpp:283
The operator Laplacian 3D.
Definition: ope_eq.hpp:225
Operator logarithm (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1113
The operator minus.
Definition: ope_eq.hpp:128
The operator multiplication by (for AADS spacetimes).
Definition: ope_eq.hpp:777
The operator multiplication by .
Definition: ope_eq.hpp:503
The operator multiplication by .
Definition: ope_eq.hpp:685
The operator multiplication by .
Definition: ope_eq.hpp:795
The operator multiplication by (what it means depend on the Space considered).
Definition: ope_eq.hpp:521
The operator Multiplication.
Definition: ope_eq.hpp:185
The operator partial derivative wrt one variable (same thing as Ope_partial ??)
Definition: ope_eq.hpp:904
The operator partial derivative.
Definition: ope_eq.hpp:832
The operator power-law.
Definition: ope_eq.hpp:107
The operator flat scalar product Intended for systems where no metric has been defined.
Definition: ope_eq.hpp:344
Operator sine (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1204
Operator hyperbolic sine (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1149
Operator square-root (only defined for a scalar field or a double).
Definition: ope_eq.hpp:1058
Operator square-root (only defined for a scalar field or a double).
Definition: ope_eq.hpp:1077
Operator square-root (only defined for a scalar field or a double)
Definition: ope_eq.hpp:1039
The operator multiplication by .
Definition: ope_eq.hpp:539
The operator substraction.
Definition: ope_eq.hpp:165
Operator defined by the user in the System_of_eqs This version is intended to work with two arguments...
Definition: ope_eq.hpp:1264
Operator defined by the user in the System_of_eqs This version is intended to work with one argument.
Definition: ope_eq.hpp:1241
This operator gives the value of a field at the origin.
Definition: ope_eq.hpp:1020
const Domain * get_domain(int i) const
returns a pointer on the domain.
Definition: space.hpp:1385
MMPtr_array< Ope_def > def
Pointers on the definition (i.e. on the Ope_def that is needed to compute the result).
bool isvar(const char *target, int &which, int &valence, char *&name_ind, Array< int > *&type_ind) const
Check if a string is an unknown field.
Definition: give_ope.cpp:39
MMPtr_array< Param > paruser
Parameters used by the user defined operators (single argument).
int nvar_double
Number of unknowns that are numbers (i.e. not fields)
int nopeuser_bin
Number of operators defined by the user (with two arguments).
bool isvar_double(const char *target, int &which) const
Check if a string is an unknown (number).
Definition: give_ope.cpp:25
Term_eq * give_term_double(int which, int dd) const
Returns a pointer on a Term_eq corresponding to an unknown number.
bool is_ope_der_var(int dd, const char *input, char *p1, int &which) const
Checks if a string represents the derivative wrt a numerical coordinate of a given Domain (like "a,...
Definition: give_ope.cpp:539
bool isricci_tensor(const char *input, char *&name_ind, Array< int > *&type_ind) const
Checks if a string represents the Ricci tensor.
Definition: give_ope.cpp:233
MMPtr_array< Ope_def_global > def_glob
Pointers on the global definitions.
MMPtr_array< char > names_def_glob
Names of the global definitions.
bool is_ope_minus(const char *input, char *output) const
Checks if a string contains the operator minus.
Definition: give_ope.cpp:293
MMPtr_array< char > names_var
Names of the unknown fields.
bool is_ope_uni(const char *input, char *p1, const char *nameope) const
Checks if a string represents an operator of the type "ope(a)".
Definition: give_ope.cpp:314
Term_eq * give_cst_hard(double xx, int dd) const
Returns a pointer on a Term_eq corresponding to a constant generated on the fly.
bool is_ope_deriv_background(const char *input, char *p1, int &typeder, char &nameind) const
Checks if a string represents the covariant derivative wrt a background metric.
Definition: give_ope.cpp:455
Term_eq * give_term(int which, int dd) const
Returns a pointer on a Term_eq corresponding to an unknown field.
Ope_def * give_def(int i) const
Returns a pointer on a definition (better to use give_val_def if one wants to access the result of so...
bool isdouble(const char *input, double &output) const
Checks if a string is a double.
Definition: give_ope.cpp:140
bool ischristo(const char *input, char *&name_ind, Array< int > *&type_ind) const
Checks if a string represents the Christoffel symbols.
Definition: give_ope.cpp:185
MMPtr_array< char > names_opeuser_bin
Names of the user defined operators (with two arguments).
int ndom
Number of domains used.
int ndef_glob
Number of global definitions (the one that require the knowledge of the whole space to give the resul...
bool isriemann(const char *input, char *&name_ind, Array< int > *&type_ind) const
Checks if a string represents the Riemann tensor.
Definition: give_ope.cpp:205
Ope_def_global * give_def_glob(int i) const
Returns a pointer on a global definition.
bool is_ope_pow(const char *input, char *p1, int &expo) const
Checks if a string represents the power of something (like "a^2").
Definition: give_ope.cpp:519
bool iscst(const char *target, int &which, int &valence, char *&name_ind, Array< int > *&type_ind) const
Check if a string is a constant (can required indices manipulation and/or inner contraction).
Definition: give_ope.cpp:63
MMPtr_array< char > names_opeuser
Names of the user defined operators (single argument).
bool is_ope_partial(const char *input, char *p1, char &nameind) const
Checks if a string represents the partial derivative (like "partial_i a")
Definition: give_ope.cpp:491
bool is_ope_bin(const char *input, char *p1, char *p2, char symb) const
Checks if a string represents an operator of the type "a + b".
Definition: give_ope.cpp:276
bool ismet(const char *input, char *&name_ind, int &type_ind) const
Checks if a string is a metric.
Definition: give_ope.cpp:147
int nopeuser
Number of operators defined by the user (single argument).
MMPtr_array< Param > paruser_bin
Parameters used by the user defined operators (with two arguments).
MMPtr_array< Tensor > var
Pointer on the unknown fields.
bool isdef_glob(int dd, const char *target, int &which) const
Check if a string is a global definition.
Definition: give_ope.cpp:127
MMPtr_array< Term_eq > cst
Pointers on the Term_eq coming from the constants passed by the user.
Ope_eq * give_ope(int dom, const char *name, int bb=0) const
Function that reads a string and returns a pointer on the generated Ope_eq.
Definition: give_ope.cpp:559
MMPtr_array< char > names_cst
Names of the constants passed by the user.
bool isricci_scalar(const char *input, char *&name_ind, Array< int > *&type_ind) const
Checks if a string represents the Ricci scalar.
Definition: give_ope.cpp:254
int ndef
Number of definitions.
MMPtr_array< char > names_var_double
Names of the unknowns that are numbers (i.e. not fields)
char * name_met
Name by which the metric is recognized.
bool is_ope_deriv(const char *input, char *p1, int &typeder, char &nameind) const
Checks if a string represents the covariant derivative.
Definition: give_ope.cpp:385
bool isdef(int dd, const char *target, int &which, int &valence, char *&name_ind, Array< int > *&type_ind) const
Check if a string is a definition (can required indices manipulation and/or inner contraction).
Definition: give_ope.cpp:106
const Space & espace
Associated Space.
MMPtr_array< char > names_def
Names of the definitions.
int ncst
Number of constants passed by the user.
Term_eq * give_cst(int which, int dd) const
Returns a pointer on a Term_eq corresponding to a constant.
bool is_ope_deriv_flat(const char *input, char *p1, int &typeder, char &nameind) const
Checks if a string represents the flat covariant derivative.
Definition: give_ope.cpp:419
Metric * met
Pointer on the associated Metric, if defined.
int nvar
Number of unknown fields.
Term_eq(* opeuser_bin[VARMAX])(const Term_eq &, const Term_eq &, Param *)
Pointers on the functions used by the user defined operators (with two arguments).
Term_eq(* opeuser[VARMAX])(const Term_eq &, Param *)
Pointers on the functions used by the user defined operators (single argument).