20 #include "system_of_eqs.hpp"
22 #include "name_tools.hpp"
23 #include "list_comp.hpp"
32 cerr <<
"= needed for equations" << endl ;
37 indic = ((p2[0]==
'0') && (p2[1]==
' ') && (p2[2]==
'\0')) ?
62 cerr <<
"= needed for equations" << endl ;
67 indic = ((p2[0]==
'0') && (p2[1]==
' ') && (p2[2]==
'\0')) ?
90 bool indic2 =
is_ope_bin(const_part, p3, p4,
'=') ;
93 if ((!indic1) || (!indic2)) {
94 cerr <<
"= needed for equations" << endl ;
99 indic1 = ((p2[0]==
'0') && (p2[1]==
' ') && (p2[2]==
'\0')) ?
102 indic2 = ((p4[0]==
'0') && (p4[1]==
' ') && (p4[2]==
'\0')) ?
106 if ((indic1) && (indic2))
109 if ((!indic1) && (indic2))
112 if ((indic1) && (!indic2))
115 if ((!indic1) && (!indic2))
116 eq[
neq] =
new Eq_vel_pot(
espace.
get_domain(dom), dom, order,
new Ope_sub(
this,
give_ope(dom, p1),
give_ope(dom, p2)),
new Ope_sub(
this,
give_ope(dom, p3),
give_ope(dom, p4))) ;
131 bool indic2 =
is_ope_bin(const_part, p3, p4,
'=') ;
134 if ((!indic1) || (!indic2)) {
135 cerr <<
"= needed for equations" << endl ;
140 indic1 = ((p2[0]==
'0') && (p2[1]==
' ') && (p2[2]==
'\0')) ?
143 indic2 = ((p4[0]==
'0') && (p4[1]==
' ') && (p4[2]==
'\0')) ?
147 if ((indic1) && (indic2))
150 if ((!indic1) && (indic2))
153 if ((indic1) && (!indic2))
156 if ((!indic1) && (!indic2))
157 eq[
neq] =
new Eq_bc_exception(
espace.
get_domain(dom), dom, bound,
new Ope_sub(
this,
give_ope(dom, p1),
give_ope(dom, p2)),
new Ope_sub(
this,
give_ope(dom, p3),
give_ope(dom, p4))) ;
174 cerr <<
"= needed for boundary conditions" << endl ;
179 indic = ((p2[0]==
'0') && (p2[1]==
' ') && (p2[2]==
'\0')) ?
212 trim_spaces(auxi, nom) ;
215 give_ope(dom, auxi, bound),
give_ope(other_dom, auxi, other_bound), n_cmp, p_cmp) ;
221 give_ope(dom, p1, bound),
give_ope(other_dom, p2, other_bound), n_cmp, p_cmp) ;
245 trim_spaces(auxi, nom) ;
247 char auxi_exception[LMAX] ;
248 trim_spaces(auxi_exception, nom_exception) ;
251 give_ope(dom, auxi, bound),
give_ope(other_dom, auxi, other_bound), par,
give_ope(dom, auxi_exception, bound), n_cmp, p_cmp) ;
255 char auxi_exception[LMAX] ;
256 trim_spaces(auxi_exception, nom_exception) ;
260 give_ope(dom, p1, bound),
give_ope(other_dom, p2, other_bound), par,
give_ope(dom, auxi_exception, bound) , n_cmp, p_cmp) ;
284 trim_spaces(auxi, nom) ;
287 give_ope(dom, auxi, bound),
give_ope(other_dom, auxi, other_bound), n_cmp, p_cmp) ;
293 give_ope(dom, p1, bound),
give_ope(other_dom, p2, other_bound), n_cmp, p_cmp) ;
320 trim_spaces(auxi, nom) ;
324 for (
int i=0 ; i<
eq[
neq]->n_ope-1 ; i++)
325 eq[
neq]->parts[i+1] =
give_ope (other_props(0,i), auxi, other_props(1,i)) ;
332 for (
int i=0 ; i<
eq[
neq]->n_ope-1 ; i++)
333 eq[
neq]->parts[i+1] =
give_ope (other_props(0,i), p2, other_props(1,i)) ;
356 trim_spaces(auxi, nom) ;
359 new Ope_import(
this, dom, bound, auxi)) , others, n_cmp, p_cmp) ;
364 eq[
neq] =
new Eq_matching_import (
espace.
get_domain(dom), dom, bound,
new Ope_sub (
this,
give_ope(dom, p1, bound),
give_ope(dom, p2, bound)), others, n_cmp, p_cmp) ;
381 cerr <<
"= needed for equations" << endl ;
386 indic = ((p2[0]==
'0') && (p2[1]==
' ') && (p2[2]==
'\0')) ?
414 cerr <<
"= needed for equations" << endl ;
419 indic = ((p2[0]==
'0') && (p2[1]==
' ') && (p2[2]==
'\0')) ?
441 trim_spaces(auxi, nom) ;
453 trim_spaces(auxi, nom) ;
465 trim_spaces(auxi, nom) ;
476 trim_spaces(auxi, nom) ;
491 cerr <<
"= needed for equations" << endl ;
496 indic = ((p2[0]==
'0') && (p2[1]==
' ') && (p2[2]==
'\0')) ?
521 cerr <<
"= needed for boundary conditions" << endl ;
526 indic = ((p2[0]==
'0') && (p2[1]==
' ') && (p2[2]==
'\0')) ?
534 bound, order,
new Ope_sub(
this,
give_ope(dom, p1, bound),
give_ope(dom, p2, bound)), n_cmp, p_cmp) ;
559 trim_spaces(auxi, nom) ;
562 give_ope(dom, auxi, bound),
give_ope(other_dom, auxi, other_bound), n_cmp, p_cmp) ;
568 give_ope(dom, p1, bound),
give_ope(other_dom, p2, other_bound), n_cmp, p_cmp) ;
virtual void find_other_dom(int dom, int bound, int &otherdom, int &otherbound) const
Gives the informations corresponding the a touching neighboring domain.
Class for enforcing boundary condition.
Class for a boundary condition.
Class for an equation representing a boundary condition on some surface.
Equation for describing a first integral equation (i.e.
Class for a zeroth order equation in a Domain.
Class for bulk equations that are solved stricly inside a given domain.
Class implementing an integral equation.
Equation for a matching condition, except for one coefficient where an alternative condition is enfor...
Class for an equation representing the matching of quantities accross a boundary using the "import" r...
Class for an equation representing the matching of quantities accross a boundary.
Class for an equation representing the matching of quantities accross a boundary.
Class for a matching condition.
Class for an equation representing the matching of quantities accross a boundary.
Class for a first order equation in a Domain.
Class for an equation in a Domain which order is passed, for each variable.
Class for bulk equation which order is passed as a parameter.
Class for the velocity potential in irrotational binray neutron stars.
Class that gives the position inside a multi-dimensional Array.
Class for storing a list of tensorial components.
int get_ncomp() const
Returns the number of components.
Array< int > ** get_pcomp() const
Returns a pointer of the liste.
Operator importing the values of a field from a neighborig Domain.
This operator gives the value of one coefficient of a field, on a given boundary.
This operator gives the value of a field at a point (arbitrary not necesseraly a collocation one)
The operator substraction.
This operator gives the value of one coefficient of a field.
This operator gives the value of a field at a given collocation point.
The class Point is used to store the coordinates of a point.
virtual Array< int > get_indices_matching_non_std(int dom, int bound) const
Gives the number of the other domains, touching a given boundary.
const Domain * get_domain(int i) const
returns a pointer on the domain.
virtual void add_eq_inside(int dom, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
Addition of an equation to be solved inside a domain (assumed to be second order).
virtual void add_eq_full(int dom, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
Addition of an equation to be solved inside a domain (assumed to be zeroth order i....
virtual void add_eq_order(int dom, int order, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
Addition of an equation to be solved inside a domain (of arbitrary order).
void add_eq_bc_exception(int dom, int bound, const char *eq, const char *const_part)
Addition of an boundary equation with an exception for .
virtual void add_eq_matching_import(int dom, int bb, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
Addition of an equation describing a matching condition between domains using the ("import" setting) ...
virtual void add_eq_mode(int dom, int bb, const char *eq, const Index &pos_cf, double val)
Addition of an equation prescribing the value of one coefficient of a scalar field,...
virtual void add_eq_matching(int dom, int bb, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
Addition of an equation describing a matching condition between two domains (standard setting)
int neq_int
Number of integral equations (i.e. which are doubles)
virtual void add_eq_bc(int dom, int bb, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
Addition of an equation describing a boundary condition.
MMPtr_array< Equation > eq
Pointers onto the field equations.
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".
virtual void add_eq_point(int dom, const char *eq, const Point &MM)
Addition of an equation saying that the value of a field must be zero at one point (arbitrary).
virtual void add_eq_matching_one_side(int dom, int bb, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
Addition of an equation describing a matching condition between two domains (specialized function for...
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.
virtual void add_eq_val(int dom, const char *eq, const Index &pos)
Addition of an equation saying that the value of a field must be zero at one collocation point.
virtual void add_eq_vel_pot(int dom, int order, const char *eq, const char *const_part)
Addition of an equation for the velocity potential of irrotational binaries.
virtual void add_eq_matching_exception(int dom, int bb, const char *eq, const Param &par, const char *eq_exception, int n_cmp=-1, Array< int > **p_cmp=nullptr)
Addition of a matching condition, except for one coefficient where an alternative condition is enforc...
int nbr_conditions
Total number of conditions (the number of coefficients of all the equations, once regularities are ta...
int neq
Number of field equations.
int dom_max
Highest domain number.
const Space & espace
Associated Space.
virtual void add_eq_one_side(int dom, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
Addition of an equation to be solved inside a domain (assumed to be first order).
MMPtr_array< Eq_int > eq_int
Pointers onto the integral equations.
int dom_min
Smallest domain number.
virtual void add_eq_val_mode(int dom, const char *eq, const Index &pos_cf, double val)
Addition of an equation prescribing the value of one coefficient of a scalar field.
virtual void add_eq_matching_non_std(int dom, int bb, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
Addition of an equation describing a matching condition between domains.
virtual void add_eq_first_integral(int dom_min, int dom_max, const char *integ_part, const char *const_part)
Addition of an equation representing a first integral.