23 #include "term_eq.hpp"
32 class Ope_eq :
public Memory_mapped {
63 syst{zesys}, dom{dd}, n_ope{nn}, parts{n_ope,initialize}
Class that gives the position inside a multi-dimensional Array.
~Ope_add() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_add(const System_of_eqs *syst, Ope_eq *aa, Ope_eq *bb)
Constructor.
Operator inverse hyperbolic tangent (only defined for a scalar field or a double)
Ope_atanh(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_atanh() override
Destructor.
Operator changin the tensorial basis of a field.
Ope_change_basis(const System_of_eqs *syst, int target, Ope_eq *so)
Constructor.
int target_basis
The desired tensorial basis.
~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).
Ope_conjug(const System_of_eqs *syst, Ope_eq *so)
Constructor.
~Ope_conjug() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Operator cosine (only defined for a scalar field or a double)
Ope_cos(const System_of_eqs *syst, Ope_eq *so)
Constructor.
~Ope_cos() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Operator hyperbolic cosine (only defined for a scalar field or a double)
~Ope_cosh() override
Destructor.
Ope_cosh(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.
The operator second derivative wrt .
~Ope_ddp() override
Destructor.
Ope_ddp(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.
The operator second radial derivative.
Ope_ddr(const System_of_eqs *syst, Ope_eq *so)
Constructor.
~Ope_ddr() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
The operator second derivative wrt .
Ope_ddt(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_ddt() override
Destructor.
Second time derivative Computes the second time derivative.
~Ope_ddtime() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_ddtime(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Operator for a global definition (i.e.
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).
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).
void compute_res()
Forces the computation of the result (when things have changed).
Term_eq * res
Result of the current definition.
Ope_def(const System_of_eqs *syst, Ope_eq *so, int val, char *name, Array< int > *ttype)
Constructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Term_eq * get_res()
Returns the result.
The operator covariant derivative with respect to the background metric.
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.
int type_der
Type of derivative (CON or COV)
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.
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.
int type_der
Type of derivative (CON or COV)
The operator covariant derivative.
Ope_der(const System_of_eqs *syst, int typeder, char indder, Ope_eq *so)
Constructor.
char ind_der
Name of the index of the derivative.
int type_der
Type of derivative (CON or COV)
~Ope_der() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
The operator determinant.
~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).
~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 .
~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 .
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 .
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_div_r() override
Destructor.
Ope_div_r(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator division by .
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 .
Term_eq action() const override
Destructor
Ope_div_sint(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator division by .
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.
~Ope_div() override
Destructor.
Ope_div(const System_of_eqs *syst, Ope_eq *aa, Ope_eq *bb)
Constructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
The operator normal derivative Computes the derivative in the direction normal to a given boundary.
~Ope_dn() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_dn(const System_of_eqs *syst, int bb, Ope_eq *so)
Constructor.
The operator first radial derivative.
Ope_dr(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_dr() override
Destructor.
The operator first derivative wrt .
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_dt() override
Destructor.
Ope_dt(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator time derivative.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_dtime() override
Destructor.
Ope_dtime(const System_of_eqs *syst, Ope_eq *so)
Constructor.
Abstract class that describes the various operators that can appear in the equations.
const System_of_eqs * syst
The associated System_of_eqs.
virtual ~Ope_eq()
Destructor.
Ope_eq(const Ope_eq &)=delete
Copy constructor.
MMPtr_array< Ope_eq > parts
Pointers of the various parts of the current operator.
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...)
int dom
Index of the Domain where the operator is defined.
Ope_eq(const System_of_eqs *syst, int dom, int np=0)
Constructor.
Operator exponential (only defined for a scalar field or a double)
Ope_exp(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_exp() override
Destructor.
Operator that fits a field to outgoing waves (highly specialized stuff)
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.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_grad() override
Destructor.
Ope_grad(const System_of_eqs *syst, Ope_eq *so)
Constructor.
int valence
Valence of the result.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_id(const System_of_eqs *syst, const Term_eq *so, int valence, char *names, Array< int > *ttype)
Constructor.
const Term_eq * target
The input Term_eq.
char * name_ind
The names of the various indices (if a Tensor of valence >0)
Array< int > * type_ind
The type of the indices.
bool need_sum
True if an inner contraction is needed to compute the result.
~Ope_id() override
Destructor.
Operator importing the values of a field from a neighborig Domain.
Array< int > others
2d array containing.
~Ope_import() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
int bound
The boundary where the field is imported.
Ope_import(const System_of_eqs *syst, int dd, int bb, const char *field)
Constructor.
The operator volume integral (in a given Domain)
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.
int bound
Boundary where the integral is computed.
~Ope_int() override
Destructor.
Ope_int(const System_of_eqs *syst, int bb, Ope_eq *so)
Constructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
The operator inverse (of a Metric_tensor ; i.e.
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.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_inverse(const System_of_eqs *syst, Ope_eq *so)
Constructor.
~Ope_inverse() override
Destructor.
The operator Laplacian 2D.
~Ope_lap2() override
Destructor.
Ope_lap2(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.
The operator Laplacian 3D.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_lap(const System_of_eqs *syst, Ope_eq *so)
Constructor.
~Ope_lap() override
Destructor.
Operator logarithm (only defined for a scalar field or a double)
Ope_log(const System_of_eqs *syst, Ope_eq *so)
Constructor.
~Ope_log() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_minus() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_minus(const System_of_eqs *syst, Ope_eq *so)
Constructor.
This operator gives the value of one coefficient of a field, on a given boundary.
double value
The result is the coefficient minus value.
Ope_mode(const System_of_eqs *syst, int bb, 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.
Index pos_cf
The desired coefficient.
int bound
The boundary where the coefficients are read.
~Ope_mode() override
Destructor.
The operator multiplication by (for AADS spacetimes).
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 .
~Ope_mult_r() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_mult_r(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator multiplication by .
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 .
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).
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_mult_x() override
Destructor.
Ope_mult_x(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator Multiplication.
~Ope_mult() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_mult(const System_of_eqs *syst, Ope_eq *aa, Ope_eq *bb)
Constructor.
The operator partial derivative wrt one variable (same thing as Ope_partial ??)
int which_var
Index of the variable wrt which the derivative is taken.
~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.
char ind_der
name of the index
Ope_partial(const System_of_eqs *syst, char name, Ope_eq *so)
Constructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_partial() override
Destructor.
This operator gives the value of a field at a point (arbitrary not necesseraly a collocation one)
~Ope_point() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Point num
Absolute coordinates of the point.
Ope_point(const System_of_eqs *syst, const Point &pp, Ope_eq *so)
Constructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_pow(const System_of_eqs *syst, int pow, Ope_eq *so)
Constructor.
int power
The exponent (an integer, possibly negative).
~Ope_pow() override
Destructor.
The operator flat scalar product Intended for systems where no metric has been defined.
~Ope_scal() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Ope_scal(const System_of_eqs *syst, Ope_eq *aa, Ope_eq *bb)
Constructor.
Operator sine (only defined for a scalar field or a double)
~Ope_sin() override
Destructor.
Ope_sin(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 hyperbolic sine (only defined for a scalar field or a double)
Ope_sinh(const System_of_eqs *syst, Ope_eq *so)
Constructor.
~Ope_sinh() override
Destructor.
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).
~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).
~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)
Ope_sqrt(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_sqrt() override
Destructor.
The operator multiplication by .
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
~Ope_srdr() override
Destructor.
Ope_srdr(const System_of_eqs *syst, Ope_eq *so)
Constructor.
The operator substraction.
Ope_sub(const System_of_eqs *syst, Ope_eq *aa, Ope_eq *bb)
Constructor.
~Ope_sub() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Operator defined by the user in the System_of_eqs This version is intended to work with two arguments...
Param * par
Parameters required by the function.
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.
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.
~Ope_user() override
Destructor.
Param * par
Parameters required by the function.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Term_eq(* pope)(const Term_eq &, Param *)
The function that implements the action of the operator.
Ope_user(const System_of_eqs *syst, Term_eq(*zeope)(const Term_eq &, Param *), Param *par, Ope_eq *so)
Constructor.
This operator gives the value of one coefficient of a field.
double value
The result is the coefficient minus value.
Index pos_cf
The desired coefficient.
~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.
~Ope_val_ori() override
Destructor.
Ope_val_ori(const System_of_eqs *syst, int dd, 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 a given collocation point.
Ope_val(const System_of_eqs *syst, const Index &ind, Ope_eq *so)
Constructor.
~Ope_val() override
Destructor.
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Index pos
which collocation point.
The class Point is used to store the coordinates of a point.
Class used to describe and solve a system of equations.
This class is intended to describe the manage objects appearing in the equations.