00001 /* 00002 * Methods to impose the Dirac gauge: divergence-free condition. 00003 * 00004 * (see file sym_tensor.h for documentation). 00005 * 00006 */ 00007 00008 /* 00009 * Copyright (c) 2006 Jerome Novak 00010 * 00011 * This file is part of LORENE. 00012 * 00013 * LORENE is free software; you can redistribute it and/or modify 00014 * it under the terms of the GNU General Public License version 2 00015 * as published by the Free Software Foundation. 00016 * 00017 * LORENE is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with LORENE; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 * 00026 */ 00027 00028 char sol_Dirac_A_poisson_C[] = "$Header: /cvsroot/Lorene/C++/Source/Tensor/vector_divfree_A_poisson.C,v 1.2 2009/10/23 13:18:46 j_novak Exp $" ; 00029 00030 /* 00031 * $Id: vector_divfree_A_poisson.C,v 1.2 2009/10/23 13:18:46 j_novak Exp $ 00032 * $Log: vector_divfree_A_poisson.C,v $ 00033 * Revision 1.2 2009/10/23 13:18:46 j_novak 00034 * Minor modifications 00035 * 00036 * Revision 1.1 2008/08/27 09:01:27 jl_cornou 00037 * Methods for solving Dirac systems for divergence free vectors 00038 * 00039 * $Header: /cvsroot/Lorene/C++/Source/Tensor/vector_divfree_A_poisson.C,v 1.2 2009/10/23 13:18:46 j_novak Exp $ 00040 * 00041 */ 00042 00043 00044 // C headers 00045 #include <stdlib.h> 00046 #include <assert.h> 00047 #include <math.h> 00048 00049 // Lorene headers 00050 #include "metric.h" 00051 #include "diff.h" 00052 #include "proto.h" 00053 #include "param.h" 00054 00055 //---------------------------------------------------------------------------------- 00056 // 00057 // sol_Dirac_A 00058 // 00059 //---------------------------------------------------------------------------------- 00060 00061 void Vector_divfree::sol_Dirac_A_poisson(const Scalar& aaa, Scalar& tilde_vr, Scalar& tilde_eta, 00062 const Param* ) const { 00063 00064 00065 Scalar source1 = -aaa.lapang(); 00066 Scalar rvr = source1.poisson_tau(); 00067 //rvr = rvr - rvr.val_grid_point(0,0,0,0); 00068 Scalar source2 = aaa.dsdr(); 00069 source2.mult_r_dzpuis(2); 00070 source2 += 3*aaa; 00071 Scalar reta = source2.poisson_tau(); 00072 //reta = reta - reta.val_grid_point(0,0,0,0); 00073 rvr.div_r(); 00074 tilde_vr = rvr ; 00075 reta.div_r(); 00076 tilde_eta = reta ; 00077 00078 00079 }
1.4.6