KADATH
bin_ns.hpp
1 /*
2  Copyright 2017 Philippe Grandclement
3 
4  This file is part of Kadath.
5 
6  Kadath is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Kadath is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Kadath. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef __BIN_NS_HPP_
21 #define __BIN_NS_HPP_
22 
23 #include "space.hpp"
24 #include "spheric.hpp"
25 #include "adapted.hpp"
26 #include "list_comp.hpp"
27 #include "bispheric.hpp"
28 
29 namespace Kadath {
35 class Space_bin_ns : public Space {
36 
37  protected :
38  int nshells ;
39 
40  public:
68  Space_bin_ns (int ttype, double dist, double rinstar1, double rstar1, double routstar1,
69  double rinstar2, double rstar2, double routstar2, double rext, int nr) ;
99  Space_bin_ns (int ttype, double dist, double rinstar1, double rstar1, double routstar1,
100  double rinstar2, double rstar2, double routstar2, double rext, double rshell, int nr) ;
101  Space_bin_ns (FILE*) ;
102 
103  virtual ~Space_bin_ns() ;
104  virtual void save(FILE*) const ;
105 
115  void add_eq (System_of_eqs& syst, const char* eq, const char* rac, const char* rac_der, int nused=-1, Array<int>** pused=0x0) ;
125  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) ;
126 
135  void add_eq_nozec (System_of_eqs& syst, const char* eq, const char* rac, const char* rac_der, const List_comp& used) ;
136 
146  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) ;
147 
148 
157  void add_eq_noshell (System_of_eqs& syst, const char* eq, const char* rac, const char* rac_der, const List_comp& used) ;
158 
159 
160  virtual int nbr_unknowns_from_variable_domains() const ;
161  virtual void affecte_coef_to_variable_domains(int& , int, Array<int>&) const ;
162  virtual void xx_to_ders_variable_domains(const Array<double>&, int&) const ;
163  virtual void xx_to_vars_variable_domains(System_of_eqs*, const Array<double>&, int&) const ;
164  virtual Array<int> get_indices_matching_non_std(int dom, int bound) const ;
165 
171  void add_eq_int_inf (System_of_eqs& syst, const char* eq) ;
177  void add_eq_ori_one (System_of_eqs& syst, const char* eq) ;
183  void add_eq_ori_two (System_of_eqs& syst, const char* eq) ;
184 } ;
185 }
186 #endif
Class for storing a list of tensorial components.
Definition: list_comp.hpp:33
Spacetime intended for binary neutron stars configurations (see constructor for details about the dom...
Definition: bin_ns.hpp:35
virtual void save(FILE *) const
Saving function.
virtual int nbr_unknowns_from_variable_domains() const
Gives the number of unknowns coming from the variable shape of the domain.
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.
virtual void xx_to_ders_variable_domains(const Array< double > &, int &) const
Update the vairable domains from a set of values.
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.
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.
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.
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...
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.
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.
int nshells
Number of outer shells.
Definition: bin_ns.hpp:38
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.
void add_eq_int_inf(System_of_eqs &syst, const char *eq)
Adds an equation being a surface integral at infinity.
virtual ~Space_bin_ns()
Destructor.
virtual Array< int > get_indices_matching_non_std(int dom, int bound) const
Gives the number of the other domains, touching a given boundary.
The Space class is an ensemble of domains describing the whole space of the computation.
Definition: space.hpp:1362
Class used to describe and solve a system of equations.