20 #include "headcpp.hpp"
21 #include "adapted.hpp"
22 #include "utilities.hpp"
25 #include "tensor_impl.hpp"
26 #include "system_of_eqs.hpp"
27 #include "name_tools.hpp"
59 fread_be (&
ndim,
sizeof(
int), 1, fd) ;
60 fread_be (&
type_base,
sizeof(
int), 1, fd) ;
87 fwrite_be (&
ndim,
sizeof(
int), 1, fd) ;
88 fwrite_be (&
type_base,
sizeof(
int), 1, fd) ;
100 bool found_outer = false ;
104 bool found_inner = false ;
106 assert (found_outer == found_inner) ;
119 int old_conte = conte ;
136 for (
int i=0 ; i<sys->
nvar ; i++) {
137 for (
int n=0 ; n<sys->
var[i]->get_n_comp() ; n++) {
142 sys->
var[i]->cmp[n]->set_domain(1) = res(1) ;
143 sys->
var[i]->cmp[n]->set_domain(2) = res(2) ;
149 for (
int i=0 ; i<sys->
ncst ; i++)
151 for (
int n=0 ; n<sys->
cst[i*(sys->
dom_max-sys->
dom_min+1)]->val_t->get_n_comp() ; n++) {
155 for (
int d=1 ; d<=2 ; d++)
180 res.
set(0,0) = dom+1 ;
181 res.
set(1,0) = INNER_BC ;
184 res.
set(0,0) = dom-1 ;
185 res.
set(1,0) = OUTER_BC ;
188 cerr <<
"Unknown boundary in " << endl ;
189 cerr << *
this << endl ;
199 trim_spaces (auxi, name) ;
reference set(const Index &pos)
Read/write of an element.
int get_ndim() const
Returns the number of dimensions.
int get_size(int i) const
Returns the size of a given dimension.
Class for storing the dimensions of an array.
Class for a spherical compactified domain and a symmetry with respect to the plane .
Class for a spherical domain containing the origin and a symmetry with respect to the plane .
Class for a spherical-like domain, having a symmetry with respect to the plane .
void del_deriv() override
Destroys the derivated members (like coloc, cart and radius), when changing the type of colocation po...
virtual void vars_to_terms() const
The Term_eq describing the variable shape of the Domain are updated.
Class for a spherical-like domain, having a symmetry with respect to the plane .
void del_deriv() override
Destroys the derivated members (like coloc, cart and radius), when changing the type of colocation po...
virtual void vars_to_terms() const
The Term_eq describing the variable shape of the Domain are updated.
Class for a spherical shell and a symmetry with respect to the plane .
Abstract class that implements the fonctionnalities common to all the type of domains.
virtual void xx_to_ders_from_adapted(const Array< double > &xx, int &conte) const
Affects the derivative part of variable a Domain from a set of values.
virtual int nbr_unknowns_from_adapted() const
Gives the number of unknowns coming from the variable shape of the domain.
virtual void affecte_coef(int &conte, int cc, bool &found) const
The variation of the functions describing the shape of the Domain are affected from the unknowns of t...
virtual void update_variable(const Val_domain &shape, const Scalar &oldval, Scalar &newval) const
Update the value of a scalar, after the shape of the Domain has been changed by the system.
virtual void xx_to_vars_from_adapted(Val_domain &shape, const Array< double > &xx, int &conte) const
Computes the new boundary of a Domain from a set of values.
virtual void update_mapping(const Val_domain &shape)
Updates the variables parts of the Domain.
virtual void update_constante(const Val_domain &shape, const Scalar &oldval, Scalar &newval) const
Update the value of a scalar, after the shape of the Domain has been changed by the system.
Class that gives the position inside a multi-dimensional Array.
The class Point is used to store the coordinates of a point.
The class Scalar does not really implements scalars in the mathematical sense but rather tensorial co...
Val_domain & set_domain(int)
Read/write of a particular Val_domain.
void add_eq_ori(System_of_eqs &syst, const char *eq)
Adds an equation being the value of some field at the origin.
virtual void xx_to_ders_variable_domains(const Array< double > &, int &) const
Update the vairable domains from a set of values.
virtual ~Space_spheric_adapted()
Destructor
virtual void affecte_coef_to_variable_domains(int &, int, Array< int > &) const
The variation of the functions describing the shape of the Domain are affected from the unknowns of t...
virtual Array< int > get_indices_matching_non_std(int, int) const
Gives the number of the other domains, touching a given boundary.
virtual void save(FILE *) const
Saving function.
Space_spheric_adapted(int ttyp, const Point &cr, const Dim_array &nbr, const Array< double > &bounds)
virtual int nbr_unknowns_from_variable_domains() const
Gives the number of unknowns coming from the variable shape of the domain.
virtual void xx_to_vars_variable_domains(System_of_eqs *, const Array< double > &, int &) const
Update the variables of a system, from the variation of the shape of the domains.
int type_base
Type of basis used (i.e. using either Chebyshev or Legendre polynomials).
int ndim
Number of dimensions (should be the same for all the Domains).
Domain ** domains
Pointers on the various Domains.
int nbr_domains
Number od Domains.
Class used to describe and solve a system of equations.
MMPtr_array< Tensor > var
Pointer on the unknown fields.
MMPtr_array< Term_eq > cst
Pointers on the Term_eq coming from the constants passed by the user.
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.
int dom_max
Highest domain number.
int ncst
Number of constants passed by the user.
int dom_min
Smallest domain number.
int nvar
Number of unknown fields.
Class for storing the basis of decompositions of a field and its values on both the configuration and...