100 #include "connection.h" 141 cout <<
"Connection_fcart::operator= : not implemented yet !" << endl ;
161 int valence1 = valence0 + 1 ;
162 int valence1m1 = valence1 - 1 ;
181 Itbl tipe(valence1) ;
183 for (
int id = 0;
id<valence0;
id++) {
184 tipe.
set(
id) = tipeuu(
id) ;
186 tipe.
set(valence1m1) = COV ;
203 Itbl ind1(valence1) ;
204 Itbl ind0(valence0) ;
208 for (
int ic=0; ic<ncomp1; ic++) {
217 for (
int id = 0;
id < valence0;
id++) {
218 ind0.
set(
id) = ind1(
id) ;
222 int k = ind1(valence1m1) ;
226 cresu = (uu(ind0)).deriv(k) ;
247 int valence1 = valence0 - 1 ;
251 assert (valence0 >= 1) ;
267 Itbl tipe(valence1) ;
269 for (
int id = 0;
id<valence1;
id++) {
270 tipe.
set(
id) = tipeuu(
id) ;
306 int ncomp1 = resu->get_n_comp() ;
308 Itbl ind0(valence0) ;
310 Itbl ind1(valence1) ;
313 for (
int ic=0; ic<ncomp1; ic++) {
315 ind1 = resu->indices(ic) ;
319 for (
int k=1; k<=3; k++) {
322 for (
int id = 0;
id < valence1;
id++) {
323 ind0.
set(
id) = ind1(
id) ;
325 ind0.
set(valence0-1) = k ;
327 cresu += uu(ind0).deriv(k) ;
int & set(int i)
Read/write of a particular element (index i ) (1D case)
const Map *const mp
Reference mapping.
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
int sym_index1() const
Number of the first symmetric index (0<= id_sym1 < valence )
virtual Tensor * p_divergence(const Tensor &tens) const
Computes the divergence of a tensor (with respect to the current connection).
virtual Tensor * p_derive_cov(const Tensor &tens) const
Computes the covariant derivative of a tensor (with respect to the current connection).
Tensor field of valence 0 (or component of a tensorial field).
Base class for coordinate mappings.
int get_n_comp() const
Returns the number of stored components.
int sym_index2() const
Number of the second symmetric index (id_sym1 < id_sym2 < valence )
Basic integer array class.
Tensor field of valence 1.
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
int get_index_type(int i) const
Gives the type (covariant or contravariant) of the index number i .
void operator=(const Connection_fcart &)
Assignment to another Connection_fcart.
int get_valence() const
Returns the valence.
Cartesian vectorial bases (triads).
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
Connection_fcart(const Map &, const Base_vect_cart &)
Contructor from a Cartesian flat-metric-orthonormal basis.
Symmetric tensors (with respect to two of their arguments).
const Base_vect *const triad
Triad with respect to which the connection coefficients are defined.
Class intended to describe valence-2 symmetric tensors.
virtual Itbl indices(int pos) const
Returns the indices of a component given by its position in the array cmp .
virtual ~Connection_fcart()
destructor