20 #include "headcpp.hpp"
22 #include "utilities.hpp"
23 #include "spheric.hpp"
25 #include "tensor_impl.hpp"
32 cerr <<
"The input tensorial basis must be spherical in Domain_shell::change_basis_spher_to_cart" << endl ;
43 for (
int i=0 ; i<val ; i++)
57 Index posother (dimother) ;
65 for (
int conte=0 ; conte<so.
get_valence() ; conte++) {
72 posr.
set(conte) = posother(pos_inother) ;
73 post.
set(conte) = posother(pos_inother) ;
74 posp.
set(conte) = posother(pos_inother) ;
87 while (posother.
inc()) ;
97 cerr <<
"The input tensorial basis must be cartesian in Domain_shell::change_basis_cart_to_spher" << endl ;
107 for (
int i=0 ; i<val ; i++)
117 dimother.
set(i) = 3 ;
122 Index posother (dimother) ;
128 for (
int conte=0 ; conte<so.
get_valence() ; conte++) {
130 posx.
set(conte) = 0 ;
131 posy.
set(conte) = 1 ;
132 posz.
set(conte) = 2 ;
135 posx.
set(conte) = posother(pos_inother) ;
136 posy.
set(conte) = posother(pos_inother) ;
137 posz.
set(conte) = posother(pos_inother) ;
151 while (posother.
inc()) ;
int get_basis(int nd) const
Read only the basis in a given domain.
Class for storing the dimensions of an array.
int & set(int i)
Read/write of the size of a given dimension.
virtual Val_domain mult_cos_theta(const Val_domain &) const
Multiplication by .
virtual Val_domain mult_cos_phi(const Val_domain &) const
Multiplication by .
virtual Val_domain mult_sin_phi(const Val_domain &) const
Multiplication by .
virtual Tensor change_basis_cart_to_spher(int dd, const Tensor &) const
Changes the tensorial basis from Cartsian to spherical in a given domain.
virtual Tensor change_basis_spher_to_cart(int dd, const Tensor &) const
Changes the tensorial basis from spherical to Cartesian in a given domain.
virtual Val_domain mult_sin_theta(const Val_domain &) const
Multiplication by .
Class that gives the position inside a multi-dimensional Array.
int & set(int i)
Read/write of the position in a given dimension.
bool inc(int increm, int var=0)
Increments the position of the Index.
Val_domain & set_domain(int)
Read/write of a particular Val_domain.
void set_name_ind(int dd, char name)
Sets the name of one index ; the names must have been affected first.
void set_name_affected()
Affects the name of the indices.
Scalar & set(const Array< int > &ind)
Returns the value of a component (read/write version).
char const * get_name_ind() const
int get_index_type(int i) const
Gives the type (covariant or contravariant) of a given index.
const Base_tensor & get_basis() const
Returns the vectorial basis (triad) on which the components are defined.
int get_n_comp() const
Returns the number of stored components.
virtual Array< int > indices(int pos) const
Gives the values of the indices corresponding to a location in the array used for storage of the comp...
int get_valence() const
Returns the valence.
bool is_name_affected() const
Check whether the names of the indices have been affected.
const Space & get_space() const
Returns the Space.
int & set_basis(int dd)
Assigns a new tensorial basis in a given domain.
Class for storing the basis of decompositions of a field and its values on both the configuration and...
Val_domain mult_sin_phi() const
Multiplication by .
Val_domain mult_sin_theta() const
Multiplication by .
Val_domain mult_cos_phi() const
Multiplication by .
Val_domain mult_cos_theta() const
Multiplication by .