20 #ifndef __SPHERIC_PERIODIC_HPP_
21 #define __SPHERIC_PERIODIC_HPP_
26 #define TO_PI_OVER_2 1
83 virtual void save (FILE*)
const ;
98 virtual bool is_in(
const Point&xx,
double prec=1e-13)
const ;
186 virtual ostream&
print (ostream& o)
const ;
244 virtual void save (FILE*)
const ;
259 virtual bool is_in(
const Point& xx,
double prec=1e-13)
const ;
415 virtual ostream&
print (ostream& o)
const ;
472 virtual void save(FILE*)
const ;
493 virtual bool is_in(
const Point& xx,
double prec=1e-13)
const ;
584 virtual ostream&
print (ostream& o)
const ;
609 virtual void save(FILE*)
const ;
Class for storing the basis of decompositions of a field.
Class for storing the dimensions of an array.
Class for a 2-dimensional compactified spherical domain and a symetry with respect to the plane .
virtual Val_domain laplacian(const Val_domain &, int) const
Computes the ordinary flat Laplacian for a scalar field with an harmonic index m.
virtual void affecte_tau_one_coef(Tensor &, int, int, int &) const
Sets at most one coefficient of a Tensor to 1.
virtual void set_anti_cheb_base(Base_spectral &) const
Gives the base using Chebyshev polynomials, for functions antisymetric with respect to .
virtual void set_anti_legendre_base(Base_spectral &) const
Gives the base using Legendre polynomials, for functions antisymetric with respect to .
virtual void affecte_tau(Tensor &, int, const Array< double > &, int &) const
Affects some coefficients to a Tensor.
virtual void do_radius() const
Computes the generalized radius.
virtual void do_absol() const
Computes the absolute coordinates.
virtual void do_der_abs_from_der_var(const Val_domain *const *const der_var, Val_domain **const der_abs) const
Computes the derivative with respect to the absolute Cartesian coordinates from the derivative with r...
virtual void save(FILE *) const
Saving function.
virtual void set_val_inf(Val_domain &so, double xx) const
Sets the value at infinity of a Val_domain : not implemented for this type of Domain.
virtual Val_domain div_r(const Val_domain &) const
Division by .
double ome
Relates the numerical time to the physical one.
virtual void find_other_dom(int, int, int &, int &) const
Gives the informations corresponding the a touching neighboring domain.
virtual Val_domain dtime(const Val_domain &) const
Computes the time derivative of a field.
virtual Base_spectral mult(const Base_spectral &, const Base_spectral &) const
Method for the multiplication of two Base_spectral.
Domain_spheric_periodic_compact(int num, int ttype, int typet, double r_int, double ome, const Dim_array &nbr)
Standard constructor :
void export_tau_val_domain(const Val_domain &eq, int order, Array< double > &res, int &pos_res, int ncond) const
Exports a residual equation in the bulk.
int nbr_conditions_val_domain(const Val_domain &so, int order) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
virtual int nbr_unknowns(const Tensor &, int) const
Computes the number of true unknowns of a Tensor, in a given domain.
virtual void set_legendre_base(Base_spectral &) const
Gives the standard base for Legendre polynomials.
virtual void do_coloc()
Computes the colocation points.
int type_time
Gives the type of time periodicity.
virtual Val_domain ddtime(const Val_domain &) const
Computes the second time derivative of a field.
virtual Array< int > nbr_conditions(const Tensor &, int, int, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
virtual Array< int > nbr_conditions_boundary(const Tensor &, int, int, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Computes number of discretized equations associated with a given tensorial equation on a boundary.
void affecte_tau_one_coef_val_domain(Val_domain &so, int cc, int &pos_cf) const
Sets at most one coefficient of a Val_domain to 1.
virtual const Point absol_to_num(const Point &) const
Computes the numerical coordinates from the physical ones.
void affecte_tau_val_domain(Val_domain &so, const Array< double > &cf, int &pos_cf) const
Affects some coefficients to a Val_domain.
virtual void export_tau_boundary(const Tensor &, int, int, Array< double > &, int &, const Array< int > &, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to a tensorial one on a given boundary It makes use ...
virtual void set_cheb_base_odd(Base_spectral &) const
Gives the base using odd Chebyshev polynomials$.
virtual Val_domain mult_xm1(const Val_domain &) const
Multiplication by .
virtual Val_domain der_normal(const Val_domain &, int) const
Normal derivative with respect to a given surface.
virtual Val_domain div_xm1(const Val_domain &) const
Division by .
double alpha
Relates the numerical radius to the physical one.
virtual ostream & print(ostream &o) const
Delegate function to virtualize the << operator.
virtual void set_legendre_base_odd(Base_spectral &) const
Gives the base using odd Legendre polynomials$.
virtual void set_cheb_base(Base_spectral &) const
Gives the standard base for Chebyshev polynomials.
int nbr_unknowns_val_domain(const Val_domain &so) const
Computes the number of true unknowns of a Val_domain.
virtual void export_tau(const Tensor &, int, int, Array< double > &, int &, const Array< int > &, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to a tensorial one in the bulk.
double maxt
Upper bound of which is or .
virtual bool is_in(const Point &xx, double prec=1e-13) const
Check whether a point lies inside Domain.
virtual Val_domain der_r(const Val_domain &) const
Compute the radial derivative of a scalar field.
int nbr_conditions_val_domain_boundary(const Val_domain &eq) const
Computes number of discretized equations associated with a given equation on a boundary.
virtual double val_boundary(int, const Val_domain &, const Index &) const
Computes the value of a field at a boundary.
void export_tau_val_domain_boundary(const Val_domain &eq, int bound, Array< double > &res, int &pos_res, int ncond) const
Exports all the residual equations corresponding to a tensorial one on a given boundary It makes use ...
virtual Val_domain mult_r(const Val_domain &) const
Multiplication by .
Class for a 2-dimensional spherical domain containing the origin and a symetry with respect to the pl...
virtual void export_tau_boundary(const Tensor &, int, int, Array< double > &, int &, const Array< int > &, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to a tensorial one on a given boundary It makes use ...
virtual Array< int > nbr_conditions(const Tensor &, int, int, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
double maxt
Upper bound of which is or .
virtual void affecte_tau_one_coef(Tensor &, int, int, int &) const
Sets at most one coefficient of a Tensor to 1.
void affecte_tau_one_coef_val_domain(Val_domain &so, int cc, int &pos_cf) const
Sets at most one coefficient of a Val_domain to 1.
virtual void do_coloc()
Computes the colocation points.
virtual void set_cheb_base(Base_spectral &) const
Gives the standard base for Chebyshev polynomials.
virtual Val_domain srdr(const Val_domain &) const
Compute the of a scalar field .
virtual Val_domain div_x(const Val_domain &) const
Division by .
int nbr_unknowns_val_domain(const Val_domain &so) const
Computes the number of true unknowns of a Val_domain.
double ome
Relates the numerical time to the physical one.
virtual ostream & print(ostream &o) const
Delegate function to virtualize the << operator.
double alpha
Relates the numerical radius to the physical one.
virtual void set_legendre_base_odd(Base_spectral &) const
Gives the base using odd Legendre polynomials$.
virtual void export_tau(const Tensor &, int, int, Array< double > &, int &, const Array< int > &, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to a tensorial one in the bulk.
virtual double val_boundary(int, const Val_domain &, const Index &) const
Computes the value of a field at a boundary.
virtual Val_domain der_r(const Val_domain &) const
Compute the radial derivative of a scalar field.
virtual Val_domain mult_r(const Val_domain &) const
Multiplication by .
Domain_spheric_periodic_nucleus(int num, int ttype, int typet, double radius, double ome, const Dim_array &nbr)
Standard constructor :
virtual void set_anti_legendre_base(Base_spectral &) const
Gives the base using Legendre polynomials, for functions antisymetric with respect to .
virtual Val_domain ddtime(const Val_domain &) const
Computes the second time derivative of a field.
virtual Val_domain laplacian(const Val_domain &, int) const
Computes the ordinary flat Laplacian for a scalar field with an harmonic index m.
virtual Base_spectral mult(const Base_spectral &, const Base_spectral &) const
Method for the multiplication of two Base_spectral.
virtual Array< int > nbr_conditions_boundary(const Tensor &, int, int, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Computes number of discretized equations associated with a given tensorial equation on a boundary.
virtual void set_anti_cheb_base(Base_spectral &) const
Gives the base using Chebyshev polynomials, for functions antisymetric with respect to .
virtual const Point absol_to_num(const Point &) const
Computes the numerical coordinates from the physical ones.
virtual Val_domain div_r(const Val_domain &) const
Division by .
int nbr_conditions_val_domain(const Val_domain &so, int order) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
virtual void do_der_abs_from_der_var(const Val_domain *const *const der_var, Val_domain **const der_abs) const
Computes the derivative with respect to the absolute Cartesian coordinates from the derivative with r...
void export_tau_val_domain(const Val_domain &eq, int order, Array< double > &res, int &pos_res, int ncond) const
Exports a residual equation in the bulk.
virtual void find_other_dom(int, int, int &, int &) const
Gives the informations corresponding the a touching neighboring domain.
int type_time
Gives the type of time periodicity.
virtual Val_domain dtime(const Val_domain &) const
Computes the time derivative of a field.
virtual Val_domain der_normal(const Val_domain &, int) const
Normal derivative with respect to a given surface.
virtual void set_legendre_base(Base_spectral &) const
Gives the standard base for Legendre polynomials.
virtual void set_cheb_base_odd(Base_spectral &) const
Gives the base using odd Chebyshev polynomials$.
void export_tau_val_domain_boundary(const Val_domain &eq, int bound, Array< double > &res, int &pos_res, int ncond) const
Exports all the residual equations corresponding to a tensorial one on a given boundary It makes use ...
virtual int nbr_unknowns(const Tensor &, int) const
Computes the number of true unknowns of a Tensor, in a given domain.
void affecte_tau_val_domain(Val_domain &so, const Array< double > &cf, int &pos_cf) const
Affects some coefficients to a Val_domain.
virtual void do_absol() const
Computes the absolute coordinates.
virtual void do_radius() const
Computes the generalized radius.
virtual void save(FILE *) const
Saving function.
virtual void affecte_tau(Tensor &, int, const Array< double > &, int &) const
Affects some coefficients to a Tensor.
virtual bool is_in(const Point &xx, double prec=1e-13) const
Check whether a point lies inside Domain.
int nbr_conditions_val_domain_boundary(const Val_domain &eq) const
Computes number of discretized equations associated with a given equation on a boundary.
Class for a 2-dimensional spherical domain bounded between two fixed radii and a symetry with respect...
double maxt
Upper bound of which is or .
virtual void set_anti_cheb_base(Base_spectral &) const
Gives the base using Chebyshev polynomials, for functions antisymetric with respect to .
virtual void do_absol() const
Computes the absolute coordinates.
virtual void find_other_dom(int, int, int &, int &) const
Gives the informations corresponding the a touching neighboring domain.
virtual void export_tau(const Tensor &, int, int, Array< double > &, int &, const Array< int > &, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to a tensorial one in the bulk.
virtual Base_spectral mult(const Base_spectral &, const Base_spectral &) const
Method for the multiplication of two Base_spectral.
virtual void do_der_abs_from_der_var(const Val_domain *const *const der_var, Val_domain **const der_abs) const
Computes the derivative with respect to the absolute Cartesian coordinates from the derivative with r...
virtual void set_anti_legendre_base(Base_spectral &) const
Gives the base using Legendre polynomials, for functions antisymetric with respect to .
virtual void save(FILE *) const
Saving function.
virtual void set_cheb_base(Base_spectral &) const
Gives the standard base for Chebyshev polynomials.
virtual Val_domain div_xm1(const Val_domain &) const
Division by .
virtual void do_radius() const
Computes the generalized radius.
virtual void affecte_tau(Tensor &, int, const Array< double > &, int &) const
Affects some coefficients to a Tensor.
Val_domain fitschwarz(const Val_domain &, int) const
Fit some field with a decay (Val_domain version).
virtual void set_legendre_base_odd(Base_spectral &) const
Gives the base using odd Legendre polynomials$.
double give_harmonique_nonflat(const Val_domain &so, double mass, int nn, double phase, int dim, double fact) const
Computes the coefficient of a given outgoing wave harmonique inside some field, at the outer boundary...
virtual Val_domain ddtime(const Val_domain &) const
Computes the second time derivative of a field.
virtual Val_domain laplacian(const Val_domain &, int) const
Computes the ordinary flat Laplacian for a scalar field with an harmonic index m.
virtual Val_domain dtime(const Val_domain &) const
Computes the time derivative of a field.
double alpha
Relates the numerical to the physical radii.
virtual void do_coloc()
Computes the colocation points.
Val_domain fitwaves(const Val_domain &so, const Array< double > &phases, int dim, double fact) const
Fit some field with homogenous solutions of the wave equation (Val_domain version).
void affecte_tau_one_coef_val_domain(Val_domain &so, int cc, int &pos_cf) const
Sets at most one coefficient of a Val_domain to 1.
void affecte_tau_val_domain(Val_domain &so, const Array< double > &cf, int &pos_cf) const
Affects some coefficients to a Val_domain.
int nbr_conditions_val_domain_boundary(const Val_domain &eq) const
Computes number of discretized equations associated with a given equation on a boundary.
Term_eq fitwaves_nonflat(const Term_eq &so, const Term_eq &field, const Array< double > &phases, int dim, double factor) const
Fit some field with homogenous solutions of the wave equation (Term_eq version).
virtual void affecte_tau_one_coef(Tensor &, int, int, int &) const
Sets at most one coefficient of a Tensor to 1.
virtual void export_tau_boundary(const Tensor &, int, int, Array< double > &, int &, const Array< int > &, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to a tensorial one on a given boundary It makes use ...
double ome
Relates the numerical time to the physical one.
virtual Array< int > nbr_conditions_boundary(const Tensor &, int, int, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Computes number of discretized equations associated with a given tensorial equation on a boundary.
virtual Val_domain der_r(const Val_domain &) const
Compute the radial derivative of a scalar field.
void export_tau_val_domain(const Val_domain &eq, int order, Array< double > &res, int &pos_res, int ncond) const
Exports a residual equation in the bulk.
virtual void set_legendre_base(Base_spectral &) const
Gives the standard base for Legendre polynomials.
int nbr_unknowns_val_domain(const Val_domain &so) const
Computes the number of true unknowns of a Val_domain.
double give_harmonique(const Val_domain &so, int nn, double phase, int dim, double fact) const
Computes the coefficient of a given outgoing wave harmonique inside some field, at the outer boundary...
virtual int nbr_unknowns(const Tensor &, int) const
Computes the number of true unknowns of a Tensor, in a given domain.
double beta
Relates the numerical to the physical radii.
virtual bool is_in(const Point &xx, double prec=1e-13) const
Check whether a point lies inside Domain.
int type_time
Gives the type of time periodicity.
virtual double val_boundary(int, const Val_domain &, const Index &) const
Computes the value of a field at a boundary.
virtual const Point absol_to_num(const Point &) const
Computes the numerical coordinates from the physical ones.
virtual Val_domain div_r(const Val_domain &) const
Division by .
void export_tau_val_domain_boundary(const Val_domain &eq, int bound, Array< double > &res, int &pos_res, int ncond) const
Exports all the residual equations corresponding to a tensorial one on a given boundary It makes use ...
virtual Val_domain mult_r(const Val_domain &) const
Multiplication by .
virtual void set_cheb_base_odd(Base_spectral &) const
Gives the base using odd Chebyshev polynomials$.
virtual ostream & print(ostream &o) const
Delegate function to virtualize the << operator.
Domain_spheric_periodic_shell(int num, int ttype, int typet, double r_int, double r_ext, double ome, const Dim_array &nbr)
Standard constructor :
virtual Array< int > nbr_conditions(const Tensor &, int, int, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
int nbr_conditions_val_domain(const Val_domain &so, int order) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
virtual Val_domain der_normal(const Val_domain &, int) const
Normal derivative with respect to a given surface.
Abstract class that implements the fonctionnalities common to all the type of domains.
Val_domain * radius
The generalized radius.
Class that gives the position inside a multi-dimensional Array.
The class Point is used to store the coordinates of a point.
The Space_oned class fills the space with 2-dimensioanl domains : spherically symmetric and time peri...
void add_eq_ori(System_of_eqs &syst, const char *eq)
Adds an equation being the value of some field at the origin.
double omega
The pulsation of the space.
void add_matching(System_of_eqs &syst, const char *eq, int nused=-1, Array< int > **pused=0x0)
Adds a matching condition, at all the interface present in a given system.
void add_eq_inverted(System_of_eqs &syst, const char *eq, const char *rac, const char *rac_der, int nused=-1, Array< int > **pused=0x0)
Adds a bulk equation and two matching conditions (from outer domains to inner ones)
void add_eq_full(System_of_eqs &syst, const char *eq, int nused=-1, Array< int > **pused=0x0)
Adds a bulk equation in all the domains of a given system (equation is assumed to be 0th order)
void add_eq(System_of_eqs &syst, const char *eq, int nused=-1, Array< int > **pused=0x0)
Adds a bulk equation in all the domains of a given system (equation is assumed to be second order)
virtual void save(FILE *) const
Saving function.
void add_outer_bc(System_of_eqs &syst, const char *eq, int nused=-1, Array< int > **pused=0x0)
Sets a boundary condition at the outer radius of the compactified domain.
Space_spheric_periodic(int ttype, int typet, const Dim_array &nbr, const Array< double > &bounds, double ome)
Standard constructor.
The Space class is an ensemble of domains describing the whole space of the computation.
Class used to describe and solve a system of equations.
This class is intended to describe the manage objects appearing in the equations.
Class for storing the basis of decompositions of a field and its values on both the configuration and...