LORENE
tenseur_inv_pois_vect.C
1/*
2 * Copyright (c) 2000-2001 Philippe Grandclement
3 *
4 * This file is part of LORENE.
5 *
6 * LORENE 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 2 of the License, or
9 * (at your option) any later version.
10 *
11 * LORENE 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 LORENE; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 */
21
22
23char tenseur_inv_pois_vect_C[] = "$Header: /cvsroot/Lorene/C++/Source/Tenseur/tenseur_inv_pois_vect.C,v 1.5 2014/10/13 08:53:42 j_novak Exp $" ;
24
25/*
26 * $Id: tenseur_inv_pois_vect.C,v 1.5 2014/10/13 08:53:42 j_novak Exp $
27 * $Log: tenseur_inv_pois_vect.C,v $
28 * Revision 1.5 2014/10/13 08:53:42 j_novak
29 * Lorene classes and functions now belong to the namespace Lorene.
30 *
31 * Revision 1.4 2014/10/06 15:13:18 j_novak
32 * Modified #include directives to use c++ syntax.
33 *
34 * Revision 1.3 2005/08/29 09:41:45 p_grandclement
35 * Minor modif
36 *
37 * Revision 1.2 2002/08/07 16:14:11 j_novak
38 * class Tenseur can now also handle tensor densities, this should be transparent to older codes
39 *
40 * Revision 1.1.1.1 2001/11/20 15:19:30 e_gourgoulhon
41 * LORENE
42 *
43 * Revision 2.0 2000/10/19 09:49:47 phil
44 * *** empty log message ***
45 *
46 *
47 * $Header: /cvsroot/Lorene/C++/Source/Tenseur/tenseur_inv_pois_vect.C,v 1.5 2014/10/13 08:53:42 j_novak Exp $
48 *
49 */
50
51//Standard
52#include <cstdlib>
53
54//Lorene
55#include "tenseur.h"
56
57// Inversion de Poisson vectoriel :
58namespace Lorene {
60
61 assert (valence == 1) ;
62 assert (etat != ETATNONDEF) ;
63 if (etat == ETATZERO)
64 return (*this) ;
65
66 Tenseur inverse (*mp, 1, CON, *get_triad(), metric, poids) ;
67 Tenseur grad (contract(this->gradient(), 0, 1)) ;
68 grad.dec2_dzpuis() ;
69 Tenseur grad_shift (grad.gradient()) ;
70 grad_shift.inc2_dzpuis() ;
71 inverse.set_etat_qcq() ;
72 for (int i=0 ; i<3 ; i++)
73 inverse.set(i) = (*this)(i).laplacien(4)+lambda*grad_shift(i) ;
74
75 return inverse ;
76}
77}
Time evolution with partial storage (*** under development ***).
Definition evolution.h:371
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition tenseur.h:301
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
Definition tenseur.h:704
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Definition tenseur.C:824
const Metrique * metric
For tensor densities: the metric defining the conformal factor.
Definition tenseur.h:325
const Map *const mp
Reference mapping.
Definition tenseur.h:306
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition tenseur.C:636
void dec2_dzpuis()
dzpuis -= 2 ;
Definition tenseur.C:1130
friend Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
Definition tenseur.C:1542
int valence
Valence.
Definition tenseur.h:307
int etat
Logical state ETATZERO , ETATQCQ or ETATNONDEF.
Definition tenseur.h:321
double poids
For tensor densities: the weight.
Definition tenseur.h:323
Tenseur inverse_poisson_vect(double lambda) const
Compute of *this , *this being of valence 1.
Lorene prototypes.
Definition app_hor.h:64