KADATH
Kadath::Space_spheric Class Reference

The Space_spheric class fills the space with one nucleus, several shells and a compactified domain, all centered on the same point. More...

#include <spheric.hpp>

Inheritance diagram for Kadath::Space_spheric:
Kadath::Space

Public Member Functions

 Space_spheric (int ttype, const Point &cr, const Dim_array &nbr, const Array< double > &bounds, bool withzec=true)
 Standard constructor. More...
 
 Space_spheric (int ttype, const Point &cr, Dim_array **nbr, const Array< double > &bounds)
 Constructor with different resolution in each domain. More...
 
 Space_spheric (int ttype, const Point &cr, const Dim_array &nbr, const Array< double > &bounds, const Array< int > &type_shells)
 Standard constructor that allows some shells to be of diffent type (Domain_shell_log or Domain_shell_surr) More...
 
 Space_spheric (FILE *, bool withzec=true)
 Constructor from a file. More...
 
virtual ~Space_spheric ()
 Destructor
More...
 
virtual void save (FILE *) const
 Saving function. More...
 
void add_inner_bc (System_of_eqs &syst, const char *eq, int nused=-1, Array< int > **pused=0x0)
 Sets a boundary condition at the inner radius of the innermost shell. More...
 
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. More...
 
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) More...
 
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. More...
 
void add_eq (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. More...
 
void add_eq_one_side (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 first order) More...
 
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) More...
 
void add_eq_one_side (System_of_eqs &syst, const char *eq, const char *rac, int nused=-1, Array< int > **pused=0x0)
 Adds a bulk equation in all the domains of a given system (equation is assumed to be first order) It also adds a matching condition at each interface. More...
 
void add_eq_int_volume (System_of_eqs &syst, const char *eq)
 Adds an equation being a volume integral in the whole computational space. More...
 
void add_eq_ori (System_of_eqs &syst, const char *eq)
 Adds an equation being the value of some field at the origin. More...
 
void add_eq_mode_mid (System_of_eqs &syst, const char *f, int itarget, int jtarget, int ktarget)
 Adds an equation saying that one coefficient of a field is zero (in the first shell) More...
 
double int_inf (const Scalar &) const
 Computes the surface integral at infinity. More...
 
void add_eq_point (System_of_eqs &syst, const Point &pp, const char *eq)
 Adds an equation being the value of some field at a given point. More...
 
virtual Array< int > get_indices_matching_non_std (int, int) const
 Gives the number of the other domains, touching a given boundary. More...
 
int get_ndim () const
 Returns the number of dimensions. More...
 
int get_nbr_domains () const
 Returns the number of Domains. More...
 
int get_type_base () const
 Returns the type of basis. More...
 
const Domainget_domain (int i) const
 returns a pointer on the domain. More...
 
virtual int nbr_unknowns_from_variable_domains () const
 Gives the number of unknowns coming from the variable shape of the domain. More...
 
virtual void affecte_coef_to_variable_domains (int &conte, int cc, Array< int > &doms) const
 The variation of the functions describing the shape of the Domain are affected from the unknowns of the system. More...
 
virtual void xx_to_ders_variable_domains (const Array< double > &xx, int &conte) const
 Update the vairable domains from a set of values. More...
 
virtual void xx_to_vars_variable_domains (System_of_eqs *syst, const Array< double > &xx, int &conte) const
 Update the variables of a system, from the variation of the shape of the domains. More...
 

Protected Attributes

int nbr_domains
 Number od Domains. More...
 
int ndim
 Number of dimensions (should be the same for all the Domains). More...
 
int type_base
 Type of basis used (i.e. using either Chebyshev or Legendre polynomials). More...
 
Domain ** domains
 Pointers on the various Domains. More...
 

Detailed Description

The Space_spheric class fills the space with one nucleus, several shells and a compactified domain, all centered on the same point.

Definition at line 1350 of file spheric.hpp.

Constructor & Destructor Documentation

◆ Space_spheric() [1/4]

Kadath::Space_spheric::Space_spheric ( int  ttype,
const Point cr,
const Dim_array nbr,
const Array< double > &  bounds,
bool  withzec = true 
)

Standard constructor.

Parameters
ttype[input] : the type of basis.
cr[input] : absolute coordinates of the center.
nbr[input] : number of points in each domain.
bounds[input] : radii of the various shells (and also determines the total number of domains).
withzec[input] : use a compactified domain or not

Definition at line 26 of file space_spheric.cpp.

References Kadath::Space::domains, Kadath::Array< T >::get_ndim(), Kadath::Array< T >::get_size(), Kadath::Space::nbr_domains, Kadath::Space::ndim, and Kadath::Space::type_base.

◆ Space_spheric() [2/4]

Kadath::Space_spheric::Space_spheric ( int  ttype,
const Point cr,
Dim_array **  nbr,
const Array< double > &  bounds 
)

Constructor with different resolution in each domain.

Parameters
ttype[input] : the type of basis.
cr[input] : absolute coordinates of the center.
nbr[input] : number of points in each domain.
bounds[input] : radii of the various shells (and also determines the total number of domains).

Definition at line 50 of file space_spheric.cpp.

References Kadath::Space::domains, Kadath::Array< T >::get_ndim(), Kadath::Array< T >::get_size(), Kadath::Space::nbr_domains, Kadath::Space::ndim, and Kadath::Space::type_base.

◆ Space_spheric() [3/4]

Kadath::Space_spheric::Space_spheric ( int  ttype,
const Point cr,
const Dim_array nbr,
const Array< double > &  bounds,
const Array< int > &  type_shells 
)

Standard constructor that allows some shells to be of diffent type (Domain_shell_log or Domain_shell_surr)

Parameters
ttype[input] : the type of basis.
cr[input] : absolute coordinates of the center.
nbr[input] : number of points in each domain.
bounds[input] : radii of the various shells (and also determines the total number of domains).
type_shells: type of the shells (STD, LOG, SURR)

Definition at line 68 of file space_spheric.cpp.

References Kadath::Space::domains, Kadath::Array< T >::get_ndim(), Kadath::Array< T >::get_size(), Kadath::Space::nbr_domains, Kadath::Space::ndim, and Kadath::Space::type_base.

◆ Space_spheric() [4/4]

Kadath::Space_spheric::Space_spheric ( FILE *  fd,
bool  withzec = true 
)

Constructor from a file.

Definition at line 100 of file space_spheric.cpp.

References Kadath::Space::domains, Kadath::Space::nbr_domains, Kadath::Space::ndim, and Kadath::Space::type_base.

◆ ~Space_spheric()

Kadath::Space_spheric::~Space_spheric ( )
virtual

Destructor

Definition at line 122 of file space_spheric.cpp.

Member Function Documentation

◆ add_eq() [1/2]

void Kadath::Space_spheric::add_eq ( 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.

Parameters
syst: the System_of_eqs.
eq: the string describing the bulk equation.
rac: the string describing the first matching condition.
rac_der: the string describing the second matching condition.
nused: number of components of eq to be considered. All the components are used of it is -1.
pused: pointer on the indexes of the components to be considered. Not used of nused = -1 .

Definition at line 45 of file spheric_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_inside(), Kadath::System_of_eqs::add_eq_matching(), Kadath::System_of_eqs::get_dom_max(), and Kadath::System_of_eqs::get_dom_min().

◆ add_eq() [2/2]

void Kadath::Space_spheric::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)

Parameters
syst: the System_of_eqs.
eq: the string describing the equation.
nused: number of components of eq to be considered. All the components are used of it is -1.
pused: pointer on the indexes of the components to be considered. Not used of nused = -1 .

Definition at line 35 of file spheric_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_inside(), Kadath::System_of_eqs::get_dom_max(), and Kadath::System_of_eqs::get_dom_min().

◆ add_eq_full()

void Kadath::Space_spheric::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)

Parameters
syst: the System_of_eqs.
eq: the string describing the equations.
nused: number of components of eq to be considered. All the components are used of it is -1.
pused: pointer on the indexes of the components to be considered. Not used of nused = -1 .

Definition at line 54 of file spheric_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_full(), Kadath::System_of_eqs::get_dom_max(), and Kadath::System_of_eqs::get_dom_min().

◆ add_eq_int_volume()

void Kadath::Space_spheric::add_eq_int_volume ( System_of_eqs syst,
const char *  eq 
)

Adds an equation being a volume integral in the whole computational space.

Parameters
syst: the System_of_eqs.
eq: the string describing the equation (should contain something like integvolume(f)=b)

Definition at line 81 of file spheric_add_eq.cpp.

References Kadath::System_of_eqs::eq_int, Kadath::System_of_eqs::give_ope(), Kadath::System_of_eqs::is_ope_bin(), Kadath::System_of_eqs::nbr_conditions, Kadath::Space::nbr_domains, and Kadath::System_of_eqs::neq_int.

◆ add_eq_mode_mid()

void Kadath::Space_spheric::add_eq_mode_mid ( System_of_eqs syst,
const char *  f,
int  itarget,
int  jtarget,
int  ktarget 
)

Adds an equation saying that one coefficient of a field is zero (in the first shell)

Parameters
syst: the System_of_eqs.
f: the field
itarget: the index $r$ of the mode that must vanish.
jtarget: the index $\theta$ of the mode that must vanish.
ktarget: the index $\varphi$ of the mode that must vanish.

Definition at line 106 of file spheric_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_val_mode(), Kadath::Space::domains, and Kadath::Index::set().

◆ add_eq_one_side() [1/2]

void Kadath::Space_spheric::add_eq_one_side ( System_of_eqs syst,
const char *  eq,
const char *  rac,
int  nused = -1,
Array< int > **  pused = 0x0 
)

Adds a bulk equation in all the domains of a given system (equation is assumed to be first order) It also adds a matching condition at each interface.

Parameters
syst: the System_of_eqs.
eq: the string describing the equation.
rac: the string describing the matching condition.
nused: number of components of eq to be considered. All the components are used of it is -1.
pused: pointer on the indexes of the components to be considered. Not used of nused = -1 .

Definition at line 59 of file spheric_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_matching(), Kadath::System_of_eqs::add_eq_one_side(), Kadath::System_of_eqs::get_dom_max(), and Kadath::System_of_eqs::get_dom_min().

◆ add_eq_one_side() [2/2]

void Kadath::Space_spheric::add_eq_one_side ( 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 first order)

Parameters
syst: the System_of_eqs.
eq: the string describing the equation.
nused: number of components of eq to be considered. All the components are used of it is -1.
pused: pointer on the indexes of the components to be considered. Not used of nused = -1 .

Definition at line 67 of file spheric_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_one_side(), Kadath::System_of_eqs::get_dom_max(), and Kadath::System_of_eqs::get_dom_min().

◆ add_eq_ori()

void Kadath::Space_spheric::add_eq_ori ( System_of_eqs syst,
const char *  eq 
)

Adds an equation being the value of some field at the origin.

Parameters
syst: the System_of_eqs.
eq: the string describing the quantity that must be zero at the origin

Definition at line 73 of file spheric_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_val(), and Kadath::Space::domains.

◆ add_eq_point()

void Kadath::Space_spheric::add_eq_point ( System_of_eqs syst,
const Point pp,
const char *  eq 
)

Adds an equation being the value of some field at a given point.

Parameters
syst: the System_of_eqs.
pp: the point
eq: the string describing the quantity that must be zero at the pp

Definition at line 118 of file spheric_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_point(), Kadath::Space::get_domain(), Kadath::Domain::is_in(), and Kadath::Space::nbr_domains.

◆ add_inner_bc()

void Kadath::Space_spheric::add_inner_bc ( System_of_eqs syst,
const char *  eq,
int  nused = -1,
Array< int > **  pused = 0x0 
)

Sets a boundary condition at the inner radius of the innermost shell.

Intended for systems where the nucleus is not used.

Parameters
syst: the System_of_eqs.
eq: the string describing the boundary condition.
nused: number of components of eq to be considered. All the components are used of it is -1.
pused: pointer on the indexes of the components to be considered. Not used of nused = -1 .

Definition at line 26 of file spheric_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_bc(), and Kadath::System_of_eqs::get_dom_min().

◆ add_matching()

void Kadath::Space_spheric::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.

Parameters
syst: the System_of_eqs.
eq: the string describing the matching condition.
nused: number of components of eq to be considered. All the components are used of it is -1.
pused: pointer on the indexes of the components to be considered. Not used of nused = -1 .

Definition at line 40 of file spheric_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_matching(), Kadath::System_of_eqs::get_dom_max(), and Kadath::System_of_eqs::get_dom_min().

◆ add_outer_bc()

void Kadath::Space_spheric::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.

Parameters
syst: the System_of_eqs.
eq: the string describing the boundary condition.
nused: number of components of eq to be considered. All the components are used of it is -1.
pused: pointer on the indexes of the components to be considered. Not used of nused = -1 .

Definition at line 31 of file spheric_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_bc(), and Kadath::System_of_eqs::get_dom_max().

◆ affecte_coef_to_variable_domains()

virtual void Kadath::Space::affecte_coef_to_variable_domains ( int &  conte,
int  cc,
Array< int > &  doms 
) const
inlinevirtualinherited

The variation of the functions describing the shape of the Domain are affected from the unknowns of the system.

Parameters
conte: current position if the unknowns.
cc: position of the unknown to be set.
doms: Array containing the index of the variable domains present in this space.

Reimplemented in Kadath::Space_bin_ns, Kadath::Space_bin_bh, Kadath::Space_bbh, Kadath::Space_polar_adapted, Kadath::Space_adapted_bh, and Kadath::Space_spheric_adapted.

Definition at line 1401 of file space.hpp.

◆ get_domain()

const Domain* Kadath::Space::get_domain ( int  i) const
inlineinherited

returns a pointer on the domain.

Parameters
i[input] : the index of the domain.

Definition at line 1385 of file space.hpp.

References Kadath::Space::domains, and Kadath::Space::nbr_domains.

◆ get_indices_matching_non_std()

Array< int > Kadath::Space_spheric::get_indices_matching_non_std ( int  dom,
int  bound 
) const
virtual

Gives the number of the other domains, touching a given boundary.

It also gives the name of the boundary, as seen by the other domain.

Parameters
dom: the domain considered.
bound: the boundary.
Returns
a 2d-array containing the numbers of the other domains (stored in (0,i)) and the names of the boundary (stored in (1,i)).

Reimplemented from Kadath::Space.

Definition at line 133 of file space_spheric.cpp.

References Kadath::Space::nbr_domains, and Kadath::Array< T >::set().

◆ get_nbr_domains()

int Kadath::Space::get_nbr_domains ( ) const
inlineinherited

Returns the number of Domains.

Definition at line 1375 of file space.hpp.

References Kadath::Space::nbr_domains.

◆ get_ndim()

int Kadath::Space::get_ndim ( ) const
inlineinherited

Returns the number of dimensions.

Definition at line 1373 of file space.hpp.

References Kadath::Space::ndim.

◆ get_type_base()

int Kadath::Space::get_type_base ( ) const
inlineinherited

Returns the type of basis.

Definition at line 1377 of file space.hpp.

References Kadath::Space::type_base.

◆ int_inf()

double Kadath::Space_spheric::int_inf ( const Scalar so) const

Computes the surface integral at infinity.

Parameters
so: the field to be integrated.  
Returns
the surface integral.

Definition at line 154 of file space_spheric.cpp.

References Kadath::Space::domains, Kadath::Domain_compact::integ(), and Kadath::Space::nbr_domains.

◆ nbr_unknowns_from_variable_domains()

virtual int Kadath::Space::nbr_unknowns_from_variable_domains ( ) const
inlinevirtualinherited

Gives the number of unknowns coming from the variable shape of the domain.

Reimplemented in Kadath::Space_bin_ns, Kadath::Space_bin_bh, Kadath::Space_bbh, Kadath::Space_polar_adapted, Kadath::Space_adapted_bh, and Kadath::Space_spheric_adapted.

Definition at line 1394 of file space.hpp.

◆ save()

void Kadath::Space_spheric::save ( FILE *  ) const
virtual

Saving function.

Reimplemented from Kadath::Space.

Definition at line 125 of file space_spheric.cpp.

References Kadath::Space::domains, Kadath::Space::nbr_domains, Kadath::Space::ndim, and Kadath::Space::type_base.

◆ xx_to_ders_variable_domains()

virtual void Kadath::Space::xx_to_ders_variable_domains ( const Array< double > &  xx,
int &  conte 
) const
inlinevirtualinherited

Update the vairable domains from a set of values.

Parameters
xx: set of values used by the affectation
conte: current position in the values vector.

Reimplemented in Kadath::Space_bin_ns, Kadath::Space_bin_bh, Kadath::Space_bbh, Kadath::Space_polar_adapted, Kadath::Space_adapted_bh, and Kadath::Space_spheric_adapted.

Definition at line 1407 of file space.hpp.

◆ xx_to_vars_variable_domains()

virtual void Kadath::Space::xx_to_vars_variable_domains ( System_of_eqs syst,
const Array< double > &  xx,
int &  conte 
) const
inlinevirtualinherited

Update the variables of a system, from the variation of the shape of the domains.

Parameters
syst: the System_of_eqs considered.
xx: set of values used by the affectation
conte: current position in the values vector.

Reimplemented in Kadath::Space_bin_ns, Kadath::Space_bin_bh, Kadath::Space_bbh, Kadath::Space_polar_adapted, Kadath::Space_adapted_bh, and Kadath::Space_spheric_adapted.

Definition at line 1414 of file space.hpp.

Member Data Documentation

◆ domains

Domain** Kadath::Space::domains
protectedinherited

Pointers on the various Domains.

Definition at line 1368 of file space.hpp.

◆ nbr_domains

int Kadath::Space::nbr_domains
protectedinherited

Number od Domains.

Definition at line 1365 of file space.hpp.

◆ ndim

int Kadath::Space::ndim
protectedinherited

Number of dimensions (should be the same for all the Domains).

Definition at line 1366 of file space.hpp.

◆ type_base

int Kadath::Space::type_base
protectedinherited

Type of basis used (i.e. using either Chebyshev or Legendre polynomials).

Definition at line 1367 of file space.hpp.


The documentation for this class was generated from the following files: