|
KADATH
|
#include <tensor.hpp>
Public Member Functions | |
| Tensor (const Space &sp, int val, const Array< int > &tipe, const Base_tensor &ba) | |
| Constructor. More... | |
| Tensor (const Space &sp, int val, int tipe, const Base_tensor &ba) | |
| Constructor where all the indices are of the same type. More... | |
| Tensor (const Space &sp, int val, const Array< int > &tipe, const Base_tensor &ba, int dim) | |
| Constructor assuming the dimension of the space and the tensor is different (for dealing with symmetries) More... | |
| Tensor (const Space &sp, int val, int tipe, const Base_tensor &ba, int dim) | |
| Constructor where all the indices are of the same type. More... | |
| Tensor (const Tensor &so, bool copie=true) | |
| Constructor by copy. More... | |
| Tensor (const Space &sp, FILE *) | |
| Constructor from a file. More... | |
| Tensor (const Space &sp, int dim, FILE *) | |
| Constructor from a file with explicit passing of the dimension. More... | |
| void | swap (Tensor &) noexcept |
| Swap method. More... | |
| virtual | ~Tensor () |
| Destructor. More... | |
| virtual void | save (FILE *) const |
| Saving operator. More... | |
| const Param_tensor & | get_parameters () const |
| Returns a pointer on the possible additional parameter. More... | |
| Param_tensor & | set_parameters () |
| Read/write of the parameters. More... | |
| void | affect_parameters () |
The function affect_parameters is deprecated and actually does nothing since the parameters are now always stored in order to lower usage of the memory heap. More... | |
| bool | is_m_order_affected () const |
| Checks whether the additional parameter order is affected (not very used). More... | |
| bool | is_m_quant_affected () const |
| Checks whether the additional parameter | |
| int & | set_basis (int dd) |
| Assigns a new tensorial basis in a given domain. More... | |
| virtual Tensor & | operator= (const Tensor &) |
Assignment to a Tensor. More... | |
| virtual Tensor & | operator= (double xx) |
| Assignment to a double (the same value for all the components at all the collocation points). More... | |
| virtual void | annule_hard () |
Sets the Tensor to zero (hard version ; no logical state used). More... | |
| Scalar & | set (const Array< int > &ind) |
| Returns the value of a component (read/write version). More... | |
| Scalar & | set (const Index &ind) |
| Returns the value of a component (read/write version). More... | |
| Scalar & | set () |
Read/write for a Scalar. More... | |
| Scalar & | set (int i) |
| Returns the value of a component for a tensor of valence 1 (read/write version). More... | |
| Scalar & | set (int i1, int i2) |
| Returns the value of a component for a tensor of valence 2 (read/write version). More... | |
| Scalar & | set (int i1, int i2, int i3) |
| Returns the value of a component for a tensor of valence 3 (read/write version). More... | |
| Scalar & | set (int i1, int i2, int i3, int i4) |
| Returns the value of a component for a tensor of valence 4 (read/write version). More... | |
| void | set_name_ind (int dd, char name) |
| Sets the name of one index ; the names must have been affected first. More... | |
| char const * | get_name_ind () const |
| bool | is_name_affected () const |
| Check whether the names of the indices have been affected. More... | |
| void | set_name_affected () |
| Affects the name of the indices. More... | |
| Tensor | do_summation () const |
Does the inner contraction of the Tensor. More... | |
| Tensor | do_summation_one_dom (int dd) const |
Does the inner contraction of the Tensor in a given domain. More... | |
| Tensor | grad () const |
| Computes the flat gradient, in Cartesian coordinates. More... | |
| virtual void | std_base () |
| Sets the standard spectal bases of decomposition for each component. More... | |
| virtual int | position (const Array< int > &idx) const |
Gives the location of a given component in the array used for storage (Array version). More... | |
| virtual int | position (const Index &idx) const |
Gives the location of a given component in the array used for storage (Index version). More... | |
| 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 components. More... | |
| const Space & | get_space () const |
Returns the Space. More... | |
| const Base_tensor & | get_basis () const |
| Returns the vectorial basis (triad) on which the components are defined. More... | |
| int | get_valence () const |
| Returns the valence. More... | |
| int | get_n_comp () const |
| Returns the number of stored components. More... | |
| int | get_ndim () const |
| Returns the number dimension. More... | |
| int | get_index_type (int i) const |
| Gives the type (covariant or contravariant) of a given index. More... | |
| Array< int > | get_index_type () const |
| int & | set_index_type (int i) |
| Sets the type of the index number. More... | |
| Array< int > & | set_index_type () |
| Sets the types of all the indices. More... | |
| const Scalar & | operator() (const Array< int > &ind) const |
| Returns the value of a component (read only version). More... | |
| const Scalar & | operator() (const Index &ind) const |
| Returns the value of a component (read only version). More... | |
| const Scalar & | operator() () const |
Read only for a Scalar. More... | |
| const Scalar & | operator() (int i) const |
| Returns the value of a component for a tensor of valence 1 (read only version). More... | |
| const Scalar & | operator() (int i1, int i2) const |
| Returns the value of a component for a tensor of valence 2 (read only version). More... | |
| const Scalar & | at (int i1, int i2) const |
| Sylvain' stuff. More... | |
| const Scalar & | operator() (int i1, int i2, int i3) const |
| Returns the value of a component for a tensor of valence 3 (read only version). More... | |
| const Scalar & | operator() (int i1, int i2, int i3, int i4) const |
| Returns the value of a component for a tensor of valence 4 (read only version). More... | |
| void | change_basis_spher_to_cart () |
| Changes the tensorial basis from orthonormal spherical to Cartesian. More... | |
| void | change_basis_cart_to_spher () |
| Changes the tensorial basis from Cartesian to orthonormal spherical. More... | |
| void | filter (double tre) |
| Sets all the coefficients below a given treshold, to zero (maintaining regularity). More... | |
| void | coef () const |
| Computes the coefficients. More... | |
| void | coef_i () const |
| Computes the values in the configuration space. More... | |
| void | operator+= (const Tensor &) |
| += Tensor More... | |
| void | operator-= (const Tensor &) |
| -= Tensor More... | |
| void | filter_phi (int dom, int ncf) |
Sets to zero all the coefficients above a given order, for the Domain. More... | |
Protected Member Functions | |
| Tensor (const Space &sp) | |
Constructor for a scalar field: to be used only by the derived class Scalar . More... | |
| Tensor (const Space &sp, int val, const Array< int > &tipe, int n_compi, const Base_tensor &ba) | |
| Constructor where the number of components is prescribed. More... | |
| Tensor (const Space &sp, int val, int tipe, int n_compi, const Base_tensor &ba) | |
| Constructor where the number of components is prescribed (all the indices are of the same type). More... | |
| Tensor (const Space &sp, int val, const Array< int > &tipe, int n_compi, const Base_tensor &ba, int dim) | |
| Constructor where the number of components is prescribed. More... | |
| Tensor (const Space &sp, int val, int tipe, int n_compi, const Base_tensor &ba, int dim) | |
| Constructor where the number of components is prescribed (all the indices are of the same type). More... | |
Protected Attributes | |
| const Space & | espace |
The Space. More... | |
| int | ndom |
The number of Domain. More... | |
| int | ndim |
| The dimension/. More... | |
| int | valence |
| Valence of the tensor (0 = scalar, 1 = vector, etc...) More... | |
| Base_tensor | basis |
| Tensorial basis with respect to which the tensor components are defined. More... | |
| Array< int > | type_indice |
1D array of integers of size valence containing the type of each index: COV for a covariant one and CON for a contravariant one. More... | |
| bool | name_affected |
| Indicator that states if the indices have been given names. More... | |
| Memory_mapped_array< char > | name_indice |
| If the indices haves names they are stored here. More... | |
| int | n_comp |
| Number of stored components, depending on the symmetry. More... | |
| Memory_mapped_array< Scalar * > | cmp |
Array of size n_comp of pointers onto the components. More... | |
| Param_tensor | parameters |
Possible additional parameters relevant for the current Tensor. More... | |
| int(* | give_place_array )(const Array< int > &, int) |
Pointer on the function that gives the storage location corresponding to a set of indices values. (Array version) More... | |
| int(* | give_place_index )(const Index &, int) |
Pointer on the function that gives the storage location corresponding to a set of indices values. (Index version) More... | |
| Array< int >(* | give_indices )(int, int, int) |
| Pointer on the function that gives the indices corresponding to a give storage location. More... | |
Private Member Functions | |
| bool | find_indices (const Tensor &tt, Array< int > &output_ind) const |
Checks whether the current Tensor and tt have compatible indices (i.e. More... | |
Friends | |
| class | Index |
| class | Domain |
| class | Scalar |
| class | Vector |
| class | System_of_eqs |
| class | Eq_matching_non_std |
| class | Ope_id |
| class | Metric_tensor |
| class | Space_spheric_adapted |
| class | Space_polar_adapted |
| class | Space_bin_ns |
| class | Space_bin_bh |
| class | Space_polar_periodic |
| class | Space_adapted_bh |
| class | Space_bbh |
| class | Domain_nucleus |
| class | Domain_shell |
| class | Domain_bispheric_chi_first |
| class | Domain_bispheric_rect |
| class | Domain_bispheric_eta_first |
| class | Domain_shell_outer_adapted |
| class | Domain_shell_inner_adapted |
| class | Domain_polar_shell_outer_adapted |
| class | Domain_polar_shell_inner_adapted |
| class | Domain_compact |
| class | Domain_polar_periodic_nucleus |
| class | Domain_polar_periodic_shell |
| ostream & | operator<< (ostream &, const Tensor &) |
| Display. More... | |
| Tensor | operator+ (const Tensor &) |
| Operator + (unitary version) More... | |
| Tensor | operator- (const Tensor &) |
| Operator -. More... | |
| Tensor | operator+ (const Tensor &, const Tensor &) |
| Operator +. More... | |
| Scalar | operator+ (const Tensor &, const Scalar &) |
| Operator +. More... | |
| Scalar | operator+ (const Scalar &, const Tensor &) |
| Operator +. More... | |
| Tensor | operator+ (const Tensor &, double) |
| Operator +. More... | |
| Tensor | operator+ (double, const Tensor &) |
| Operator +. More... | |
| Tensor | operator- (const Tensor &, const Tensor &) |
| Operator -. More... | |
| Scalar | operator- (const Tensor &, const Scalar &) |
| Operator -. More... | |
| Scalar | operator- (const Scalar &, const Tensor &) |
| Operator -. More... | |
| Tensor | operator- (const Tensor &, double) |
| Operator -. More... | |
| Tensor | operator- (double, const Tensor &) |
| Operator -. More... | |
| Tensor | operator* (const Scalar &, const Tensor &) |
| Operator *. More... | |
| Tensor | operator* (const Tensor &, const Scalar &) |
| Operator *. More... | |
| Tensor | operator* (double, const Tensor &) |
| Operator *. More... | |
| Tensor | operator* (const Tensor &, double) |
| Operator *. More... | |
| Tensor | operator* (int, const Tensor &) |
| Operator *. More... | |
| Tensor | operator* (const Tensor &, int) |
| Operator *. More... | |
| Tensor | operator* (const Tensor &, const Tensor &) |
| Tensor multiplication ; if need be contractions are performed. More... | |
| Tensor | operator/ (const Tensor &, const Scalar &) |
| Operator /. More... | |
| Tensor | operator/ (const Tensor &, double) |
| Operator /. More... | |
| Tensor | operator/ (const Tensor &, int) |
| Operator /. More... | |
| double | maxval (const Tensor &) |
| Gives the maximum value amongst all the components, at all the collocation points. More... | |
| double | minval (const Tensor &) |
| Gives the minimum value amongst all the components, at all the collocation points. More... | |
| void | affecte_one_dom (int dom, Tensor *out, const Tensor *so) |
| Affectation in one domain only. More... | |
| Tensor | add_one_dom (int, const Tensor &, const Tensor &) |
| Addition (one domain version) More... | |
| Tensor | add_one_dom (int, const Tensor &, double) |
| Addition (one domain version) More... | |
| Tensor | add_one_dom (int, double, const Tensor &) |
| Addition (one domain version) More... | |
| Tensor | sub_one_dom (int, const Tensor &, const Tensor &) |
| Difference (one domain version) More... | |
| Tensor | sub_one_dom (int, const Tensor &, double) |
| Difference (one domain version) More... | |
| Tensor | sub_one_dom (int, double, const Tensor &) |
| Difference (one domain version) More... | |
| Tensor | mult_one_dom (int, const Tensor &, const Tensor &) |
| Multiplication (one domain version) More... | |
| Tensor | mult_one_dom (int, const Tensor &, double) |
| Multiplication (one domain version) More... | |
| Tensor | mult_one_dom (int, double, const Tensor &) |
| Multiplication (one domain version) More... | |
| Tensor | mult_one_dom (int, const Tensor &, int) |
| Multiplication (one domain version) More... | |
| Tensor | mult_one_dom (int, int, const Tensor &) |
| Multiplication (one domain version) More... | |
| Tensor | div_one_dom (int, const Tensor &, const Tensor &) |
| Division (one domain version) More... | |
| Tensor | div_one_dom (int, const Tensor &, double) |
| Division (one domain version) More... | |
| Tensor | div_one_dom (int, double, const Tensor &) |
| Division (one domain version) More... | |
| Tensor | scal_one_dom (int, const Tensor &, const Tensor &) |
| Scalar product (one domain version) More... | |
| Tensor | partial_one_dom (int, char, const Tensor &) |
| Partial derivative (one domain version) More... | |
| Tensor | sqrt_one_dom (int, const Tensor &) |
| Square root (one domain version) More... | |
Tensor handling.
It consists mainly of an array of Scalar and some informations about the tensor (valence, type and name of indices, tensorial basis of decomposition). The indices range from 1 to ndim (the dimension) (i.e. they do NOT start from 0).
Definition at line 149 of file tensor.hpp.
| Kadath::Tensor::Tensor | ( | const Space & | sp, |
| int | val, | ||
| const Array< int > & | tipe, | ||
| const Base_tensor & | ba | ||
| ) |
Constructor.
| sp | : the Space. |
| val | : valence. |
| tipe | : Array containing the types of each index (COV vs CON). |
| ba | : the tensorial basis used. |
Definition at line 77 of file tensor.cpp.
References cmp, espace, Kadath::Array< T >::get_ndim(), Kadath::Array< T >::get_size(), give_indices, give_place_array, give_place_index, n_comp, and valence.
| Kadath::Tensor::Tensor | ( | const Space & | sp, |
| int | val, | ||
| int | tipe, | ||
| const Base_tensor & | ba | ||
| ) |
Constructor where all the indices are of the same type.
| sp | : the Space. |
| val | : valence. |
| tipe | : the type of all the indices (COV vs CON). |
| ba | : the tensorial basis used. |
Definition at line 97 of file tensor.cpp.
References cmp, espace, give_indices, give_place_array, give_place_index, n_comp, type_indice, and valence.
| Kadath::Tensor::Tensor | ( | const Space & | sp, |
| int | val, | ||
| const Array< int > & | tipe, | ||
| const Base_tensor & | ba, | ||
| int | dim | ||
| ) |
Constructor assuming the dimension of the space and the tensor is different (for dealing with symmetries)
| sp | : the Space. |
| val | : valence. |
| tipe | : Array containing the types of each index (COV vs CON). |
| ba | : the tensorial basis used. |
| dim | : dimension of the tensor. |
Definition at line 113 of file tensor.cpp.
References cmp, espace, Kadath::Array< T >::get_ndim(), Kadath::Array< T >::get_size(), give_indices, give_place_array, give_place_index, n_comp, and valence.
| Kadath::Tensor::Tensor | ( | const Space & | sp, |
| int | val, | ||
| int | tipe, | ||
| const Base_tensor & | ba, | ||
| int | dim | ||
| ) |
Constructor where all the indices are of the same type.
The dimension of the space and the tensor is different (for dealing with symmetries)
| sp | : the Space. |
| val | : valence. |
| tipe | : the type of all the indices (COV vs CON). |
| ba | : the tensorial basis used. |
| dim | : dimension of the tensor. |
Definition at line 133 of file tensor.cpp.
References cmp, espace, give_indices, give_place_array, give_place_index, n_comp, type_indice, and valence.
| Kadath::Tensor::Tensor | ( | const Tensor & | so, |
| bool | copie = true |
||
| ) |
Constructor by copy.
| so | : the input Tensor. |
| copie | : if false only the property of the tensor are copied (valence etc...) not the values of the field that are left undefined. |
Definition at line 153 of file tensor.cpp.
References cmp, give_indices, give_place_array, give_place_index, n_comp, name_affected, name_indice, and valence.
| Kadath::Tensor::Tensor | ( | const Space & | sp, |
| FILE * | fd | ||
| ) |
Constructor from a file.
Definition at line 240 of file tensor.cpp.
References cmp, espace, Kadath::Array< T >::get_size(), give_indices, give_place_array, give_place_index, n_comp, type_indice, and valence.
| Kadath::Tensor::Tensor | ( | const Space & | sp, |
| int | dim, | ||
| FILE * | fd | ||
| ) |
Constructor from a file with explicit passing of the dimension.
Definition at line 255 of file tensor.cpp.
References cmp, espace, Kadath::Array< T >::get_size(), give_indices, give_place_array, give_place_index, n_comp, type_indice, and valence.
|
explicitprotected |
Constructor for a scalar field: to be used only by the derived class Scalar .
| sp | : the only parameter the Space. |
Definition at line 173 of file tensor.cpp.
References cmp, give_indices, give_place_array, and give_place_index.
|
protected |
Constructor where the number of components is prescribed.
| sp | : the Space. |
| val | : valence. |
| tipe | : Array containing the types of each index (COV vs CON). |
| n_compi | : number of components. |
| ba | : the tensorial basis used. |
Definition at line 196 of file tensor.cpp.
References cmp, espace, Kadath::Array< T >::get_ndim(), Kadath::Array< T >::get_size(), n_comp, and valence.
|
protected |
Constructor where the number of components is prescribed (all the indices are of the same type).
| sp | : the Space. |
| val | : valence. |
| tipe | : the type of all the indices (COV vs CON). |
| n_compi | : number of components. |
| ba | : the tensorial basis used. |
Definition at line 185 of file tensor.cpp.
References cmp, espace, n_comp, type_indice, and valence.
|
protected |
Constructor where the number of components is prescribed.
The dimension of space and the tensor can be different (to deal with symmetries)
| sp | : the Space. |
| val | : valence. |
| tipe | : Array containing the types of each index (COV vs CON). |
| n_compi | : number of components. |
| ba | : the tensorial basis used. |
| dim | : dimension of the tensor |
Definition at line 223 of file tensor.cpp.
References cmp, espace, Kadath::Array< T >::get_ndim(), Kadath::Array< T >::get_size(), n_comp, and valence.
|
protected |
Constructor where the number of components is prescribed (all the indices are of the same type).
The dimension of space and the tensor can be different (to deal with symmetries)
| sp | : the Space. |
| val | : valence. |
| tipe | : the type of all the indices (COV vs CON). |
| n_compi | : number of components. |
| ba | : the tensorial basis used. |
| dim | : the dimension of the tensor |
Definition at line 212 of file tensor.cpp.
References cmp, espace, n_comp, type_indice, and valence.
|
virtual |
|
inline |
The function affect_parameters is deprecated and actually does nothing since the parameters are now always stored in order to lower usage of the memory heap.
Definition at line 320 of file tensor.hpp.
|
inlinevirtual |
Sets the Tensor to zero (hard version ; no logical state used).
Reimplemented in Kadath::Vector, and Kadath::Scalar.
Definition at line 23 of file tensor_impl.hpp.
|
inline |
| void Kadath::Tensor::change_basis_cart_to_spher | ( | ) |
Changes the tensorial basis from Cartesian to orthonormal spherical.
Definition at line 489 of file tensor.cpp.
References Kadath::Domain::change_basis_cart_to_spher(), espace, get_basis(), Kadath::Space::get_domain(), get_index_type(), Kadath::Space::get_nbr_domains(), get_valence(), Kadath::Index::inc(), set(), set_basis(), and Kadath::Scalar::set_domain().
| void Kadath::Tensor::change_basis_spher_to_cart | ( | ) |
Changes the tensorial basis from orthonormal spherical to Cartesian.
Definition at line 474 of file tensor.cpp.
References Kadath::Domain::change_basis_spher_to_cart(), espace, get_basis(), Kadath::Space::get_domain(), get_index_type(), Kadath::Space::get_nbr_domains(), get_valence(), Kadath::Index::inc(), set(), set_basis(), and Kadath::Scalar::set_domain().
|
inline |
Computes the coefficients.
Definition at line 193 of file tensor_impl.hpp.
References Kadath::Index::inc().
|
inline |
Computes the values in the configuration space.
Definition at line 202 of file tensor_impl.hpp.
References Kadath::Index::inc().
| Tensor Kadath::Tensor::do_summation | ( | ) | const |
Does the inner contraction of the Tensor.
It assumes exactly two indices of different types have the same name.
Tensor (with valence -2). Definition at line 24 of file tensor_calculus.cpp.
References basis, espace, get_n_comp(), Kadath::Space::get_nbr_domains(), Kadath::Index::inc(), name_affected, name_indice, position(), set(), Kadath::Array< T >::set(), Kadath::Base_spectral::set(), Kadath::Index::set(), Kadath::Val_domain::set_base(), Kadath::Scalar::set_domain(), type_indice, and valence.
| Tensor Kadath::Tensor::do_summation_one_dom | ( | int | dd | ) | const |
Does the inner contraction of the Tensor in a given domain.
The values in the other domains are undefined. It assumes exactly two indices of different types have the same name.
| dd | : the Domain where the contraction is performed. |
Tensor (with valence -2). Definition at line 590 of file tensor_math_one_dom.cpp.
References basis, espace, get_n_comp(), Kadath::Index::inc(), name_affected, name_indice, position(), set(), Kadath::Array< T >::set(), Kadath::Val_domain::set_base(), Kadath::Scalar::set_domain(), type_indice, and valence.
|
inline |
Sets all the coefficients below a given treshold, to zero (maintaining regularity).
| tre | : the threshold. |
Definition at line 221 of file tensor_impl.hpp.
References espace, Kadath::Domain::filter(), Kadath::Space::get_domain(), and Kadath::Space::get_nbr_domains().
|
inline |
Sets to zero all the coefficients above a given order, for the
coefficients, in a gicen Domain.
Takes into account the various Galerkin basis to maintain regularity.
| dom | : the Domain where the filter is applied. |
| ncf | : the coefficients which index is above this are set to zero. |
Definition at line 211 of file tensor_impl.hpp.
References Kadath::Scalar::filter_phi(), Kadath::Index::inc(), and set().
Checks whether the current Tensor and tt have compatible indices (i.e.
same names and types, possibly in a different order).
| tt | : the Tensor used for the comparison. |
| output_ind | : if the indices are compatible, it contains the permutation of the indices. |
Definition at line 445 of file tensor.cpp.
References name_affected, name_indice, Kadath::Array< T >::set(), type_indice, and valence.
|
inline |
Returns the vectorial basis (triad) on which the components are defined.
Definition at line 504 of file tensor.hpp.
References basis.
|
inline |
Definition at line 531 of file tensor.hpp.
References type_indice.
|
inline |
Gives the type (covariant or contravariant) of a given index.
| i | : the index number (>=1) |
Definition at line 526 of file tensor.hpp.
References type_indice.
|
inline |
Returns the number of stored components.
Definition at line 514 of file tensor.hpp.
References n_comp.
|
inline |
Definition at line 424 of file tensor.hpp.
References name_indice.
|
inline |
|
inline |
Returns a pointer on the possible additional parameter.
Definition at line 311 of file tensor.hpp.
References parameters.
|
inline |
|
inline |
| Tensor Kadath::Tensor::grad | ( | ) | const |
Computes the flat gradient, in Cartesian coordinates.
Definition at line 133 of file tensor_calculus.cpp.
References basis, Kadath::Scalar::der_abs(), espace, Kadath::Base_tensor::get_basis(), indices(), n_comp, ndim, ndom, operator()(), set(), Kadath::Array< T >::set(), type_indice, and valence.
|
inlinevirtual |
Gives the values of the indices corresponding to a location in the array used for storage of the components.
| pos | : the storage location. |
Reimplemented in Kadath::Vector.
Definition at line 484 of file tensor.hpp.
References give_indices, ndim, and valence.
|
inline |
Checks whether the additional parameter order is affected (not very used).
Definition at line 323 of file tensor.hpp.
References Kadath::Param_tensor::m_order_affected, and parameters.
|
inline |
Checks whether the additional parameter
is affected (used for boson stars for instance).
Definition at line 326 of file tensor.hpp.
References Kadath::Param_tensor::m_quant_affected, and parameters.
|
inline |
Check whether the names of the indices have been affected.
Definition at line 429 of file tensor.hpp.
References name_affected.
|
inline |
Read only for a Scalar.
Definition at line 110 of file tensor_impl.hpp.
Returns the value of a component (read only version).
| ind | Array of size valence containing the values of each index specifing the component, with the following storage convention:
|
ind Definition at line 169 of file tensor_impl.hpp.
References cmp, Kadath::Array< T >::get_ndim(), Kadath::Array< T >::get_size(), position(), and valence.
Returns the value of a component (read only version).
| ind | Index of size valence containing the values of each index specifing the component, with the following storage convention:
|
ind Definition at line 177 of file tensor_impl.hpp.
References operator()(), Kadath::Array< T >::set(), and valence.
|
inline |
Returns the value of a component for a tensor of valence 1 (read only version).
| i | value of the first index |
(i1) Definition at line 118 of file tensor_impl.hpp.
References cmp, position(), Kadath::Array< T >::set(), and valence.
|
inline |
Returns the value of a component for a tensor of valence 2 (read only version).
| i1 | value of the first index |
| i2 | value of the second index |
(i1,i2) Definition at line 128 of file tensor_impl.hpp.
References cmp, position(), Kadath::Array< T >::set(), and valence.
|
inline |
Returns the value of a component for a tensor of valence 3 (read only version).
| i1 | value of the first index |
| i2 | value of the second index |
| i3 | value of the third index |
(i1,i2,i3) Definition at line 139 of file tensor_impl.hpp.
References cmp, position(), Kadath::Array< T >::set(), and valence.
|
inline |
Returns the value of a component for a tensor of valence 4 (read only version).
| i1 | value of the first index |
| i2 | value of the second index |
| i3 | value of the third index |
| i4 | value of the fourth index |
(i1,i2,i3,i4) Definition at line 151 of file tensor_impl.hpp.
References cmp, position(), Kadath::Array< T >::set(), and valence.
| void Kadath::Tensor::operator+= | ( | const Tensor & | t | ) |
+= Tensor
Definition at line 69 of file tensor_math.cpp.
References basis, cmp, espace, find_indices(), indices(), n_comp, name_affected, position(), set(), Kadath::Array< T >::set(), type_indice, and valence.
| void Kadath::Tensor::operator-= | ( | const Tensor & | t | ) |
-= Tensor
Definition at line 105 of file tensor_math.cpp.
References basis, cmp, espace, find_indices(), indices(), n_comp, name_affected, position(), set(), Kadath::Array< T >::set(), type_indice, and valence.
Assignment to a Tensor.
Reimplemented in Kadath::Metric_tensor, Kadath::Vector, and Kadath::Scalar.
Definition at line 27 of file tensor_math.cpp.
References basis, cmp, espace, find_indices(), indices(), n_comp, name_affected, position(), set(), Kadath::Array< T >::set(), type_indice, and valence.
|
virtual |
Assignment to a double (the same value for all the components at all the collocation points).
Reimplemented in Kadath::Vector, Kadath::Scalar, and Kadath::Metric_tensor.
Definition at line 64 of file tensor_math.cpp.
|
inlinevirtual |
Gives the location of a given component in the array used for storage (Array version).
| idx | : values of the indices. |
Reimplemented in Kadath::Vector.
Definition at line 470 of file tensor.hpp.
References give_place_array, and ndim.
|
inlinevirtual |
Gives the location of a given component in the array used for storage (Index version).
| idx | : values of the indices. |
Reimplemented in Kadath::Vector.
Definition at line 477 of file tensor.hpp.
References give_place_index, and ndim.
|
virtual |
Saving operator.
Reimplemented in Kadath::Scalar.
Definition at line 327 of file tensor.cpp.
References basis, cmp, Kadath::Array< T >::get_size(), n_comp, Kadath::Base_tensor::save(), Kadath::Array< T >::save(), type_indice, and valence.
|
inline |
Returns the value of a component (read/write version).
| ind | Array of size valence containing the values of each index specifing the component, with the following storage convention:
|
ind Definition at line 91 of file tensor_impl.hpp.
References cmp, Kadath::Array< T >::get_ndim(), Kadath::Array< T >::get_size(), position(), and valence.
Returns the value of a component (read/write version).
| ind | 1-D Index of size valence containing the values of each index specifing the component, with the following storage convention:
|
ind Definition at line 101 of file tensor_impl.hpp.
References set(), Kadath::Array< T >::set(), and valence.
|
inline |
Returns the value of a component for a tensor of valence 1 (read/write version).
| i | value of the first index |
(i1) Definition at line 33 of file tensor_impl.hpp.
References cmp, position(), Kadath::Array< T >::set(), and valence.
|
inline |
Returns the value of a component for a tensor of valence 2 (read/write version).
| i1 | value of the first index |
| i2 | value of the second index |
(i1,i2) Definition at line 46 of file tensor_impl.hpp.
References cmp, position(), Kadath::Array< T >::set(), and valence.
|
inline |
Returns the value of a component for a tensor of valence 3 (read/write version).
| i1 | value of the first index |
| i2 | value of the second index |
| i3 | value of the third index |
(i1,i2,i3) Definition at line 60 of file tensor_impl.hpp.
References cmp, position(), Kadath::Array< T >::set(), and valence.
|
inline |
Returns the value of a component for a tensor of valence 4 (read/write version).
| i1 | value of the first index |
| i2 | value of the second index |
| i3 | value of the third index |
| i4 | value of the fourth index |
(i1,i2,i3,i4) Definition at line 75 of file tensor_impl.hpp.
References cmp, position(), Kadath::Array< T >::set(), and valence.
|
inline |
Assigns a new tensorial basis in a given domain.
| dd | : the index of the Domain. |
Definition at line 331 of file tensor.hpp.
References basis, and Kadath::Base_tensor::set_basis().
|
inline |
Sets the types of all the indices.
Definition at line 545 of file tensor.hpp.
References type_indice.
|
inline |
Sets the type of the index number.
| i | : the index number (>=1) |
Definition at line 538 of file tensor.hpp.
References Kadath::Array< T >::set(), and type_indice.
|
inline |
Affects the name of the indices.
They have to be given values afterwards.
Definition at line 435 of file tensor.hpp.
References name_affected.
|
inline |
Sets the name of one index ; the names must have been affected first.
| dd | : which index ? |
| name | : the name. |
Definition at line 186 of file tensor_impl.hpp.
References name_affected, name_indice, and valence.
|
inline |
|
virtual |
Sets the standard spectal bases of decomposition for each component.
To be used only with valence lower than or equal 2.
Reimplemented in Kadath::Scalar.
Definition at line 385 of file tensor.cpp.
References basis, cmp, espace, Kadath::Base_tensor::get_basis(), Kadath::Space::get_domain(), Kadath::Param_tensor::get_m_quant(), indices(), is_m_quant_affected(), Kadath::Domain::mult(), n_comp, ndom, parameters, std_base(), and valence.
|
noexcept |
Swap method.
Definition at line 270 of file tensor.cpp.
Addition (one domain version)
Definition at line 55 of file tensor_math_one_dom.cpp.
Addition (one domain version)
Definition at line 126 of file tensor_math_one_dom.cpp.
Addition (one domain version)
Definition at line 140 of file tensor_math_one_dom.cpp.
Affectation in one domain only.
| dom | [input] : the domain index. |
| out | [output] : pointer on the result |
| so | [input] : pointer on the input Tensor |
Definition at line 24 of file tensor_math_one_dom.cpp.
Division (one domain version)
Definition at line 512 of file tensor_math_one_dom.cpp.
Division (one domain version)
Definition at line 555 of file tensor_math_one_dom.cpp.
Division (one domain version)
Definition at line 538 of file tensor_math_one_dom.cpp.
|
friend |
Gives the maximum value amongst all the components, at all the collocation points.
Definition at line 548 of file tensor_math.cpp.
|
friend |
Gives the minimum value amongst all the components, at all the collocation points.
Definition at line 580 of file tensor_math.cpp.
Multiplication (one domain version)
Definition at line 249 of file tensor_math_one_dom.cpp.
Multiplication (one domain version)
Definition at line 444 of file tensor_math_one_dom.cpp.
Multiplication (one domain version)
Definition at line 478 of file tensor_math_one_dom.cpp.
Multiplication (one domain version)
Definition at line 461 of file tensor_math_one_dom.cpp.
Multiplication (one domain version)
Definition at line 495 of file tensor_math_one_dom.cpp.
Operator *.
Definition at line 263 of file tensor_math.cpp.
Operator *.
Definition at line 275 of file tensor_math.cpp.
Tensor multiplication ; if need be contractions are performed.
Definition at line 316 of file tensor_math.cpp.
Operator *.
Definition at line 295 of file tensor_math.cpp.
Operator *.
Definition at line 311 of file tensor_math.cpp.
Operator *.
Definition at line 281 of file tensor_math.cpp.
Operator *.
Definition at line 299 of file tensor_math.cpp.
Operator +.
Definition at line 187 of file tensor_math.cpp.
Operator + (unitary version)
Definition at line 144 of file tensor_math.cpp.
Operator +.
Definition at line 180 of file tensor_math.cpp.
Operator +.
Definition at line 172 of file tensor_math.cpp.
Operator +.
Definition at line 194 of file tensor_math.cpp.
Operator +.
Definition at line 203 of file tensor_math.cpp.
Operator -.
Definition at line 231 of file tensor_math.cpp.
Operator -.
Definition at line 150 of file tensor_math.cpp.
Operator -.
Definition at line 224 of file tensor_math.cpp.
Operator -.
Definition at line 217 of file tensor_math.cpp.
Operator -.
Definition at line 239 of file tensor_math.cpp.
Operator -.
Definition at line 248 of file tensor_math.cpp.
Operator /.
Definition at line 506 of file tensor_math.cpp.
Operator /.
Definition at line 521 of file tensor_math.cpp.
Operator /.
Definition at line 541 of file tensor_math.cpp.
|
friend |
Display.
Definition at line 339 of file tensor.cpp.
Partial derivative (one domain version)
Definition at line 703 of file tensor_math_one_dom.cpp.
Scalar product (one domain version)
Definition at line 573 of file tensor_math_one_dom.cpp.
Square root (one domain version)
Definition at line 747 of file tensor_math_one_dom.cpp.
Difference (one domain version)
Definition at line 154 of file tensor_math_one_dom.cpp.
Difference (one domain version)
Definition at line 224 of file tensor_math_one_dom.cpp.
Difference (one domain version)
Definition at line 237 of file tensor_math_one_dom.cpp.
|
protected |
Tensorial basis with respect to which the tensor components are defined.
Definition at line 163 of file tensor.hpp.
|
protected |
Array of size n_comp of pointers onto the components.
Definition at line 179 of file tensor.hpp.
|
protected |
The Space.
Definition at line 154 of file tensor.hpp.
|
protected |
Pointer on the function that gives the indices corresponding to a give storage location.
Definition at line 185 of file tensor.hpp.
|
protected |
Pointer on the function that gives the storage location corresponding to a set of indices values. (Array version)
Definition at line 184 of file tensor.hpp.
|
protected |
Pointer on the function that gives the storage location corresponding to a set of indices values. (Index version)
Definition at line 185 of file tensor.hpp.
|
protected |
Number of stored components, depending on the symmetry.
Definition at line 178 of file tensor.hpp.
|
protected |
Indicator that states if the indices have been given names.
Definition at line 172 of file tensor.hpp.
|
protected |
If the indices haves names they are stored here.
Each index is associated with a character.
Definition at line 176 of file tensor.hpp.
|
protected |
The dimension/.
Definition at line 156 of file tensor.hpp.
|
protected |
The number of Domain.
Definition at line 155 of file tensor.hpp.
|
protected |
Possible additional parameters relevant for the current Tensor.
Definition at line 181 of file tensor.hpp.
|
protected |
1D array of integers of size valence containing the type of each index: COV for a covariant one and CON for a contravariant one.
Definition at line 170 of file tensor.hpp.
|
protected |
Valence of the tensor (0 = scalar, 1 = vector, etc...)
Definition at line 157 of file tensor.hpp.