KADATH
Kadath::Space_bin_ns Class Reference

Spacetime intended for binary neutron stars configurations (see constructor for details about the domains used) More...

#include <bin_ns.hpp>

Inheritance diagram for Kadath::Space_bin_ns:
Kadath::Space

Public Member Functions

 Space_bin_ns (int ttype, double dist, double rinstar1, double rstar1, double routstar1, double rinstar2, double rstar2, double routstar2, double rext, int nr)
 Standard constructor ; stars are initial spherical. More...
 
 Space_bin_ns (int ttype, double dist, double rinstar1, double rstar1, double routstar1, double rinstar2, double rstar2, double routstar2, double rext, double rshell, int nr)
 Constructor with an outer shell surrounding the bispheric region; stars are initial spherical. More...
 
 Space_bin_ns (FILE *)
 Constructor from a file. More...
 
virtual ~Space_bin_ns ()
 Destructor. More...
 
virtual void save (FILE *) const
 Saving function. 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_nozec (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_nozec (System_of_eqs &syst, const char *eq, const char *rac, const char *rac_der, const List_comp &used)
 Adds a bulk equation and two matching conditions. More...
 
void add_eq_noshell (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_noshell (System_of_eqs &syst, const char *eq, const char *rac, const char *rac_der, const List_comp &used)
 Adds a bulk equation and two matching conditions. 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 &, int, Array< int > &) 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 > &, int &) const
 Update the vairable domains from a set of values. More...
 
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. More...
 
virtual Array< int > get_indices_matching_non_std (int dom, int bound) const
 Gives the number of the other domains, touching a given boundary. More...
 
void add_eq_int_inf (System_of_eqs &syst, const char *eq)
 Adds an equation being a surface integral at infinity. More...
 
void add_eq_ori_one (System_of_eqs &syst, const char *eq)
 Adds an equation being the value of some field at the origin of the first nucleus. More...
 
void add_eq_ori_two (System_of_eqs &syst, const char *eq)
 Adds an equation being the value of some field at the origin of the first nucleus. 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...
 

Protected Attributes

int nshells
 Number of outer shells. More...
 
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

Spacetime intended for binary neutron stars configurations (see constructor for details about the domains used)

Definition at line 35 of file bin_ns.hpp.

Constructor & Destructor Documentation

◆ Space_bin_ns() [1/3]

Kadath::Space_bin_ns::Space_bin_ns ( int  ttype,
double  dist,
double  rinstar1,
double  rstar1,
double  routstar1,
double  rinstar2,
double  rstar2,
double  routstar2,
double  rext,
int  nr 
)

Standard constructor ; stars are initial spherical.

Parameters
ttype[input] : the type of basis.
dist[input] : distance $ d $ between the centers of the two spheres.
rinstar1[input] : radius the first nucleus (inside the star).
rstar1[input] : radius the first shell with variable outer surface (inside the star).
routstar1[input] : radius the first shell with variable inner surface (outide the star).
rinstar2[input] : radius the second nucleus (inside the star).
rstar2[input] : radius the second shell with variable outer surface (inside the star).
routstar2[input] : radius the second shell with variable inner surface (outide the star).
rext[input] : radius $ R $ of the outer boundary of the bispherical part.
nr[input] : number of points in each dimension

The various domains are then :

Definition at line 44 of file space_bin_ns.cpp.

References Kadath::Param::add_double(), Kadath::Space::domains, Kadath::Space::nbr_domains, Kadath::Space::ndim, nshells, Kadath::Dim_array::set(), Kadath::Point::set(), Kadath::Space::type_base, Kadath::Domain_shell_inner_adapted::update(), Kadath::Domain_shell_outer_adapted::update(), Kadath::Domain_shell_inner_adapted::vars_to_terms(), and Kadath::Domain_shell_outer_adapted::vars_to_terms().

◆ Space_bin_ns() [2/3]

Kadath::Space_bin_ns::Space_bin_ns ( int  ttype,
double  dist,
double  rinstar1,
double  rstar1,
double  routstar1,
double  rinstar2,
double  rstar2,
double  routstar2,
double  rext,
double  rshell,
int  nr 
)

Constructor with an outer shell surrounding the bispheric region; stars are initial spherical.

Parameters
ttype[input] : the type of basis.
dist[input] : distance $ d $ between the centers of the two spheres.
rinstar1[input] : radius the first nucleus (inside the star).
rstar1[input] : radius the first shell with variable outer surface (inside the star).
routstar1[input] : radius the first shell with variable inner surface (outide the star).
rinstar2[input] : radius the second nucleus (inside the star).
rstar2[input] : radius the second shell with variable outer surface (inside the star).
routstar2[input] : radius the second shell with variable inner surface (outide the star).
rext[input] : outer radius the bispherical part.
rshell[input] : outer radius the outer shell.
nr[input] : number of points in each dimension

The various domains are then :

Definition at line 118 of file space_bin_ns.cpp.

References Kadath::Param::add_double(), Kadath::Space::domains, Kadath::Space::nbr_domains, Kadath::Space::ndim, nshells, Kadath::Dim_array::set(), Kadath::Point::set(), Kadath::Space::type_base, Kadath::Domain_shell_inner_adapted::update(), Kadath::Domain_shell_outer_adapted::update(), Kadath::Domain_shell_inner_adapted::vars_to_terms(), and Kadath::Domain_shell_outer_adapted::vars_to_terms().

◆ Space_bin_ns() [3/3]

◆ ~Space_bin_ns()

Kadath::Space_bin_ns::~Space_bin_ns ( )
virtual

Member Function Documentation

◆ add_eq()

void Kadath::Space_bin_ns::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 30 of file bin_ns_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_inside(), Kadath::System_of_eqs::add_eq_matching(), and Kadath::System_of_eqs::add_eq_matching_import().

◆ add_eq_int_inf()

void Kadath::Space_bin_ns::add_eq_int_inf ( System_of_eqs syst,
const char *  eq 
)

Adds an equation being a surface integral at infinity.

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

Definition at line 230 of file bin_ns_add_eq.cpp.

References Kadath::Space::domains, 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_noshell() [1/2]

void Kadath::Space_bin_ns::add_eq_noshell ( System_of_eqs syst,
const char *  eq,
const char *  rac,
const char *  rac_der,
const List_comp used 
)

Adds a bulk equation and two matching conditions.

The outer shells are excluded from the computational space.

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.
used: list of components used

Definition at line 226 of file bin_ns_add_eq.cpp.

References add_eq_noshell(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_noshell() [2/2]

void Kadath::Space_bin_ns::add_eq_noshell ( 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.

The outer shells are excluded from the computational space.

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 170 of file bin_ns_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_inside(), Kadath::System_of_eqs::add_eq_matching(), and Kadath::System_of_eqs::add_eq_matching_import().

◆ add_eq_nozec() [1/2]

void Kadath::Space_bin_ns::add_eq_nozec ( System_of_eqs syst,
const char *  eq,
const char *  rac,
const char *  rac_der,
const List_comp used 
)

Adds a bulk equation and two matching conditions.

The compactified domain is excluded from the computational space.

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.
used: list of components used

Definition at line 166 of file bin_ns_add_eq.cpp.

References add_eq_nozec(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_nozec() [2/2]

void Kadath::Space_bin_ns::add_eq_nozec ( 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.

The compactified domain is excluded from the computational space.

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 95 of file bin_ns_add_eq.cpp.

References Kadath::System_of_eqs::add_eq_inside(), Kadath::System_of_eqs::add_eq_matching(), Kadath::System_of_eqs::add_eq_matching_import(), and nshells.

◆ add_eq_ori_one()

void Kadath::Space_bin_ns::add_eq_ori_one ( System_of_eqs syst,
const char *  eq 
)

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

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

Definition at line 268 of file bin_ns_add_eq.cpp.

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

◆ add_eq_ori_two()

void Kadath::Space_bin_ns::add_eq_ori_two ( System_of_eqs syst,
const char *  eq 
)

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

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

Definition at line 276 of file bin_ns_add_eq.cpp.

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

◆ affecte_coef_to_variable_domains()

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

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 from Kadath::Space.

Definition at line 265 of file space_bin_ns.cpp.

References Kadath::Domain::affecte_coef(), Kadath::Space::domains, and Kadath::Array< T >::set().

◆ 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_bin_ns::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 381 of file space_bin_ns.cpp.

References 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.

◆ nbr_unknowns_from_variable_domains()

int Kadath::Space_bin_ns::nbr_unknowns_from_variable_domains ( ) const
virtual

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

Reimplemented from Kadath::Space.

Definition at line 260 of file space_bin_ns.cpp.

References Kadath::Space::domains.

◆ save()

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

Saving function.

Reimplemented from Kadath::Space.

Definition at line 252 of file space_bin_ns.cpp.

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

◆ xx_to_ders_variable_domains()

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

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 from Kadath::Space.

Definition at line 298 of file space_bin_ns.cpp.

References Kadath::Space::domains, and Kadath::Domain::xx_to_ders_from_adapted().

◆ xx_to_vars_variable_domains()

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

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 from Kadath::Space.

Definition at line 312 of file space_bin_ns.cpp.

References Kadath::System_of_eqs::cst, Kadath::System_of_eqs::dom_max, Kadath::System_of_eqs::dom_min, Kadath::Space::domains, Kadath::System_of_eqs::ncst, Kadath::System_of_eqs::nvar, Kadath::Scalar::set_domain(), Kadath::Domain::update_constante(), Kadath::Domain::update_mapping(), Kadath::Domain::update_variable(), Kadath::System_of_eqs::var, and Kadath::Domain::xx_to_vars_from_adapted().

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.

◆ nshells

int Kadath::Space_bin_ns::nshells
protected

Number of outer shells.

Definition at line 38 of file bin_ns.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: