sources_hor.C
/*
* Methods of class Iso_hor to compute sources for Psi, N y beta
*
* (see file hor_isol.h for documentation).
*
*/
/*
* Copyright (c) 2004-2005 Jose Luis Jaramillo
* Francois Limousin
*
* This file is part of LORENE.
*
* LORENE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* LORENE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LORENE; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
char source_hor_C[] = "$Header: /cvsroot/Lorene/C++/Source/Isol_hor/sources_hor.C,v 1.16 2014/10/13 08:53:01 j_novak Exp $" ;
/*
* $Id: sources_hor.C,v 1.16 2014/10/13 08:53:01 j_novak Exp $
* $Log: sources_hor.C,v $
* Revision 1.16 2014/10/13 08:53:01 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.15 2014/10/06 15:13:11 j_novak
* Modified #include directives to use c++ syntax.
*
* Revision 1.14 2005/06/09 08:05:32 f_limousin
* Implement a new function sol_elliptic_boundary() and
* Vector::poisson_boundary(...) which solve the vectorial poisson
* equation (method 6) with an inner boundary condition.
*
* Revision 1.13 2005/04/02 15:49:21 f_limousin
* New choice (Lichnerowicz) for aaquad. New member data nz.
*
* Revision 1.12 2005/03/28 19:42:39 f_limousin
* Implement the metric and A^{ij}A_{ij} of Sergio for pertubations
* of Kerr black holes.
*
* Revision 1.11 2005/03/22 13:25:36 f_limousin
* Small changes. The angular velocity and A^{ij} are computed
* with a differnet sign.
*
* Revision 1.10 2005/03/03 10:11:57 f_limousin
* The function source_psi(), source_nn() and source_beta() are
* now const and return an object const.
*
* Revision 1.9 2005/02/07 10:37:21 f_limousin
* Minor changes.
*
* Revision 1.8 2004/12/31 15:35:18 f_limousin
* Modifications to avoid warnings.
*
* Revision 1.7 2004/12/22 18:16:43 f_limousin
* Many different changes.
*
* Revision 1.6 2004/11/05 10:59:07 f_limousin
* Delete ener_dens, mom_dens and trace stress in functions
* source_nn, source_psi and source_beta.
* And some modification to avoid warnings (source_nn change to source...).
*
* Revision 1.5 2004/11/03 17:16:44 f_limousin
* Delete argument trk_point for source_nn()
*
* Revision 1.4 2004/10/29 15:45:08 jl_jaramillo
* Change name of functions
*
* Revision 1.3 2004/09/28 16:08:26 f_limousin
* Minor modifs.
*
* Revision 1.2 2004/09/09 16:55:08 f_limousin
* Add the 2 lines $Id: sources_hor.C,v 1.16 2014/10/13 08:53:01 j_novak Exp $Log: for CVS
*
*
* $Header: /cvsroot/Lorene/C++/Source/Isol_hor/sources_hor.C,v 1.16 2014/10/13 08:53:01 j_novak Exp $
*
*/
// C++ headers
#include "headcpp.h"
// C headers
#include <cstdlib>
#include <cassert>
// Lorene headers
#include "time_slice.h"
#include "isol_hor.h"
#include "metric.h"
#include "evolution.h"
#include "unites.h"
#include "graphique.h"
#include "utilitaires.h"
namespace Lorene {
const Scalar Isol_hor::source_psi() const{
using namespace Unites ;
// Initialisations
// ---------------
const Base_vect& triad = *(ff.get_triad()) ;
Scalar tmp(mp) ;
Scalar tmp_scal(mp) ;
Sym_tensor tmp_sym(mp, CON, triad) ;
Scalar source(mp) ;
//===============================================
// Computations of the source for Psi
//===============================================
const Vector& d_psi = psi().derive_cov(ff) ; // D_i Psi
// Source for Psi
// --------------
tmp = 0.125* psi() * met_gamt.ricci_scal()
- contract(hh(), 0, 1, d_psi.derive_cov(ff), 0, 1 ) ;
tmp.inc_dzpuis() ; // dzpuis : 3 -> 4
tmp -= contract(hdirac(), 0, d_psi, 0) ;
source = tmp - 0.125* aa_quad() / psi4() / psi()/ psi()/ psi()
+ psi()*psi4() * 8.33333333333333e-2* trK*trK ; //##
source.annule_domain(0) ;
return source ;
}
const Scalar Isol_hor::source_nn() const{
using namespace Unites ;
// Initialisations
// ---------------
const Base_vect& triad = *(ff.get_triad()) ;
Scalar tmp(mp) ;
Scalar tmp_scal(mp) ;
Sym_tensor tmp_sym(mp, CON, triad) ;
Scalar source(mp) ;
//===============================================
// Computations of the source for NN
//===============================================
const Vector& dln_psi = ln_psi().derive_cov(ff) ; // D_i ln(Psi)
const Vector& dnnn = nn().derive_cov(ff) ; // D_i N
// Source for N
// ------------
source = aa_quad() / psi4() / psi4() * nn() +
psi4()*( nn()* 0.3333333333333333* trK*trK - trK_point )
- 2.* contract(dln_psi, 0, nn().derive_con(met_gamt), 0)
- contract(hdirac(), 0, dnnn, 0) ;
tmp = psi4()* contract(beta(), 0, trK.derive_cov(ff), 0)
- contract( hh(), 0, 1, dnnn.derive_cov(ff), 0, 1 ) ;
tmp.inc_dzpuis() ; // dzpuis: 3 -> 4
source += tmp ;
source.annule_domain(0) ;
return source ;
}
const Vector Isol_hor::source_beta() const {
using namespace Unites ;
// Initialisations
// ---------------
const Base_vect& triad = *(ff.get_triad()) ;
Scalar tmp(mp) ;
Scalar tmp_scal(mp) ;
Sym_tensor tmp_sym(mp, CON, triad) ;
Vector tmp_vect(mp, CON, triad) ;
Vector source(mp, CON, triad) ;
//===============================================
// Computations of the source for beta
//===============================================
const Vector& dln_psi = ln_psi().derive_cov(ff) ; // D_i ln(Psi)
const Vector& dnnn = nn().derive_cov(ff) ; // D_i N
// Source for beta (dzpuis = 4)
// ----------------------------
source = 2.* contract(aa(), 1,
dnnn - 6.*nn() * dln_psi, 0) ;
tmp_vect = 0.66666666666666666* trK.derive_con(met_gamt) ;
tmp_vect.inc_dzpuis() ;
source += 2.* nn() * ( tmp_vect
- contract(met_gamt.connect().get_delta(), 1, 2,
aa(), 0, 1) ) ;
Vector vtmp = contract(hh(), 0, 1,
beta().derive_cov(ff).derive_cov(ff), 1, 2)
+ 0.3333333333333333*
contract(hh(), 1, beta().divergence(ff).derive_cov(ff), 0)
- hdirac().derive_lie(beta())
+ gamt_point.divergence(ff) ; // zero in the Dirac gauge
vtmp.inc_dzpuis() ; // dzpuis: 3 -> 4
source -= vtmp ;
source += 0.66666666666666666* beta().divergence(ff) * hdirac() ;
source.annule_domain(0) ;
/*
// Source for beta (dzpuis = 3)
// ----------------------------
source = 2.* contract(aa(), 1,
dnnn - 6.*nn() * dln_psi, 0) ;
source.dec_dzpuis() ;
tmp_vect = 0.66666666666666666* trK.derive_con(met_gamt) ;
Vector tmp_vect2 (- contract(met_gamt.connect().get_delta(), 1, 2,
aa(), 0, 1)) ;
tmp_vect2.dec_dzpuis() ;
source += 2.* nn() * ( tmp_vect + tmp_vect2 ) ;
Vector vtmp = contract(hh(), 0, 1,
beta().derive_cov(ff).derive_cov(ff), 1, 2)
+ 0.3333333333333333*
contract(hh(), 1, beta().divergence(ff).derive_cov(ff), 0)
- hdirac().derive_lie(beta())
+ gamt_point.divergence(ff) ; // zero in the Dirac gauge
source -= vtmp ;
tmp_vect = 0.66666666666666666* beta().divergence(ff) * hdirac() ;
tmp_vect.dec_dzpuis() ;
source += tmp_vect ;
source.annule_domain(0) ;
*/
return source ;
}
}
Lorene::Base_vect
Vectorial bases (triads) with respect to which the tensorial components are defined.
Definition base_vect.h:105
Lorene::Isol_hor::aa_quad
virtual const Scalar & aa_quad() const
Conformal representation .
Definition isol_hor.C:884
Lorene::Isol_hor::gamt_point
Sym_tensor gamt_point
Time derivative of the 3-metric tilde.
Definition isol_hor.h:329
Lorene::Isol_hor::source_beta
const Vector source_beta() const
Source for .
Definition sources_hor.C:190
Lorene::Isol_hor::trK
Scalar trK
Trace of the extrinsic curvature.
Definition isol_hor.h:332
Lorene::Isol_hor::met_gamt
Metric met_gamt
3 metric tilde
Definition isol_hor.h:326
Lorene::Isol_hor::source_psi
const Scalar source_psi() const
Source for .
Definition sources_hor.C:108
Lorene::Isol_hor::trK_point
Scalar trK_point
Time derivative of the trace of the extrinsic curvature.
Definition isol_hor.h:335
Lorene::Isol_hor::mp
Map_af & mp
Affine mapping.
Definition isol_hor.h:260
Lorene::Isol_hor::source_nn
const Scalar source_nn() const
Source for N.
Definition sources_hor.C:145
Lorene::Scalar
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
Lorene::Scalar::derive_cov
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this.
Definition scalar_deriv.C:390
Lorene::Scalar::inc_dzpuis
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values of the Scalar in the co...
Definition scalar_r_manip.C:470
Lorene::Sym_tensor
Class intended to describe valence-2 symmetric tensors.
Definition sym_tensor.h:223
Lorene::Time_slice_conf::hh
virtual const Sym_tensor & hh(Param *=0x0, Param *=0x0) const
Deviation of the conformal metric from the flat metric : .
Definition time_slice_conf.C:758
Lorene::Time_slice_conf::nn
virtual const Scalar & nn() const
Lapse function N at the current time step (jtime ).
Definition time_slice_conf.C:591
Lorene::Time_slice_conf::ln_psi
const Scalar & ln_psi() const
Logarithm of at the current time step (jtime ).
Definition time_slice_conf.C:719
Lorene::Time_slice_conf::hdirac
virtual const Vector & hdirac() const
Vector which vanishes in Dirac gauge.
Definition time_slice_conf.C:815
Lorene::Time_slice_conf::psi
virtual const Scalar & psi() const
Conformal factor relating the physical metric to the conformal one: .
Definition time_slice_conf.C:693
Lorene::Time_slice_conf::aa
virtual Sym_tensor aa() const
Conformal representation of the traceless part of the extrinsic curvature: .
Definition time_slice_conf.C:765
Lorene::Time_slice_conf::psi4
const Scalar & psi4() const
Factor at the current time step (jtime ).
Definition time_slice_conf.C:707
Lorene::Time_slice_conf::ff
const Metric_flat & ff
Pointer on the flat metric with respect to which the conformal decomposition is performed.
Definition time_slice.h:507
Lorene::Time_slice::beta
virtual const Vector & beta() const
shift vector at the current time step (jtime )
Definition time_slice_access.C:87
Lorene::Vector
Tensor field of valence 1.
Definition vector.h:188
Lorene::Vector::divergence
const Scalar & divergence(const Metric &) const
The divergence of this with respect to a Metric .
Definition vector.C:381
Lorene::Vector::derive_lie
Vector derive_lie(const Vector &v) const
Computes the Lie derivative of this with respect to some vector field v.
Definition vector.C:392
Lorene::Tensor::inc_dzpuis
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values in the compactified ext...
Definition tensor.C:816
Lorene::Tensor::annule_domain
void annule_domain(int l)
Sets the Tensor to zero in a given domain.
Definition tensor.C:666
Lorene::Tensor::derive_cov
const Tensor & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
Definition tensor.C:1002
Lorene::contract
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Definition tenseur_operateur.C:279
Lorene
Lorene prototypes.
Definition app_hor.h:64
Unites
Standard units of space, time and mass.