00001 /* 00002 * Copyright (c) 2000-2001 Philippe Grandclement 00003 * 00004 * This file is part of LORENE. 00005 * 00006 * LORENE is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * LORENE is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with LORENE; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 00022 00023 char tenseur_inv_pois_vect_C[] = "$Header: /cvsroot/Lorene/C++/Source/Tenseur/tenseur_inv_pois_vect.C,v 1.3 2005/08/29 09:41:45 p_grandclement Exp $" ; 00024 00025 /* 00026 * $Id: tenseur_inv_pois_vect.C,v 1.3 2005/08/29 09:41:45 p_grandclement Exp $ 00027 * $Log: tenseur_inv_pois_vect.C,v $ 00028 * Revision 1.3 2005/08/29 09:41:45 p_grandclement 00029 * Minor modif 00030 * 00031 * Revision 1.2 2002/08/07 16:14:11 j_novak 00032 * class Tenseur can now also handle tensor densities, this should be transparent to older codes 00033 * 00034 * Revision 1.1.1.1 2001/11/20 15:19:30 e_gourgoulhon 00035 * LORENE 00036 * 00037 * Revision 2.0 2000/10/19 09:49:47 phil 00038 * *** empty log message *** 00039 * 00040 * 00041 * $Header: /cvsroot/Lorene/C++/Source/Tenseur/tenseur_inv_pois_vect.C,v 1.3 2005/08/29 09:41:45 p_grandclement Exp $ 00042 * 00043 */ 00044 00045 //Standard 00046 #include <stdlib.h> 00047 00048 //Lorene 00049 #include "tenseur.h" 00050 00051 // Inversion de Poisson vectoriel : 00052 Tenseur Tenseur::inverse_poisson_vect (double lambda) const { 00053 00054 assert (valence == 1) ; 00055 assert (etat != ETATNONDEF) ; 00056 if (etat == ETATZERO) 00057 return (*this) ; 00058 00059 Tenseur inverse (*mp, 1, CON, *get_triad(), metric, poids) ; 00060 Tenseur grad (contract(this->gradient(), 0, 1)) ; 00061 grad.dec2_dzpuis() ; 00062 Tenseur grad_shift (grad.gradient()) ; 00063 grad_shift.inc2_dzpuis() ; 00064 inverse.set_etat_qcq() ; 00065 for (int i=0 ; i<3 ; i++) 00066 inverse.set(i) = (*this)(i).laplacien(4)+lambda*grad_shift(i) ; 00067 00068 return inverse ; 00069 }
1.4.6