strot_dirac_solveshift.C

00001 /*
00002  *  Solution of the shift equation for rotating stars 
00003  *  in Dirac gauge.
00004  *
00005  *    (see file star_rot_dirac.h for documentation).
00006  *
00007  */
00008 
00009 /*
00010  *   Copyright (c) 2005 Lap-Ming Lin & Jerome Novak
00011  *
00012  *   This file is part of LORENE.
00013  *
00014  *   LORENE is free software; you can redistribute it and/or modify
00015  *   it under the terms of the GNU General Public License version 2
00016  *   as published by the Free Software Foundation.
00017  *
00018  *   LORENE is distributed in the hope that it will be useful,
00019  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  *   GNU General Public License for more details.
00022  *
00023  *   You should have received a copy of the GNU General Public License
00024  *   along with LORENE; if not, write to the Free Software
00025  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026  *
00027  */
00028 
00029 char strot_dirac_solveshift_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_solveshift.C,v 1.2 2005/02/17 17:31:12 f_limousin Exp $" ;
00030 
00031 /*
00032  * $Id: strot_dirac_solveshift.C,v 1.2 2005/02/17 17:31:12 f_limousin Exp $
00033  * $Log: strot_dirac_solveshift.C,v $
00034  * Revision 1.2  2005/02/17 17:31:12  f_limousin
00035  * Change the name of some quantities to be consistent with other classes
00036  * (for instance nnn is changed to nn, shift to beta, beta to lnq...)
00037  *
00038  * Revision 1.1  2005/01/31 08:51:48  j_novak
00039  * New files for rotating stars in Dirac gauge (still under developement).
00040  *
00041  *
00042  * $Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_solveshift.C,v 1.2 2005/02/17 17:31:12 f_limousin Exp $
00043  *
00044  */
00045 
00046 // Lorene headers
00047 #include "star_rot_dirac.h"
00048 #include "unites.h"
00049 
00050 void Star_rot_Dirac::solve_shift(Vector& beta_new) const {
00051 
00052     using namespace Unites ;
00053     
00054     const Metric_flat& mets = mp.flat_met_spher() ;
00055     
00056     const Vector& dln_psi = ln_psi.derive_cov(mets) ; // D_i ln(Psi)
00057     const Vector& dnn = nn.derive_cov(mets) ;         // D_i N
00058 
00059     Vector source_beta = 2.* contract(aa, 1, 
00060                                    dnn - 6.*nn * dln_psi, 0) ;
00061 
00062     source_beta += 2.* nn * ( 2.*qpig* psi4 * j_euler 
00063                         - contract(tgamma.connect().get_delta(), 1, 2, 
00064                                    aa, 0, 1) ) ;
00065             
00066     Vector vtmp = contract(hh, 0, 1, 
00067                            beta.derive_cov(mets).derive_cov(mets), 1, 2)
00068                 + 0.3333333333333333*
00069                   contract(hh, 1, beta.divergence(mets).derive_cov(mets), 0) ; 
00070     vtmp.inc_dzpuis() ; // dzpuis: 3 -> 4
00071                     
00072     source_beta -= vtmp ; 
00073     source_beta.set(1).set_dzpuis(4) ; //## these components are null
00074     source_beta.set(2).set_dzpuis(4) ; //## in axial symmetry
00075 
00076     Vector_divfree sou_beta_df = source_beta.div_free(mets) ;
00077 
00078     beta_new = sou_beta_df.poisson() ;
00079     beta_new.set(1) = 0 ; //## these components are null
00080     
00081     beta_new.set(2) = 0 ; //## in axial symmetry
00082 
00083 
00084 
00085 }

Generated on Tue Feb 7 01:35:20 2012 for LORENE by  doxygen 1.4.6