star_bin_upmetr_der_xcts.C
/*
* Methods Star_bin_xcts::update_metric_der_comp
* (see file star.h for documentation)
*/
/*
* Copyright (c) 2010 Michal Bejger
*
* 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 star_bin_upmetr_der_xcts_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star/star_bin_upmetr_der_xcts.C,v 1.6 2014/10/13 08:53:38 j_novak Exp $" ;
/*
* $Id: star_bin_upmetr_der_xcts.C,v 1.6 2014/10/13 08:53:38 j_novak Exp $
* $Log: star_bin_upmetr_der_xcts.C,v $
* Revision 1.6 2014/10/13 08:53:38 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.5 2014/10/06 15:13:17 j_novak
* Modified #include directives to use c++ syntax.
*
* Revision 1.4 2010/12/09 10:44:42 m_bejger
* Cosmetic changes
*
* Revision 1.3 2010/06/15 14:58:19 m_bejger
* Companion D^j beta^i computed in companion frame and imported
*
* Revision 1.2 2010/06/15 08:09:43 m_bejger
* *** empty log message ***
*
* Revision 1.1 2010/05/04 07:51:05 m_bejger
* Initial version
*
* $Header: /cvsroot/Lorene/C++/Source/Star/star_bin_upmetr_der_xcts.C,v 1.6 2014/10/13 08:53:38 j_novak Exp $
*
*/
// C headers
#include <cmath>
// Headers Lorene
#include "star.h"
#include "utilitaires.h"
#include "graphique.h"
namespace Lorene {
void Star_bin_xcts::update_metric_der_comp(const Star_bin_xcts& comp) {
// Derivatives of metric coefficients
// ----------------------------------
// Computation of dcov_Psi
Vector temp = (comp.Psi_auto).derive_cov(comp.flat) ;
temp.dec_dzpuis(2) ;
temp.change_triad(mp.get_bvect_cart()) ;
assert ( *(temp.get_triad()) == *(dcov_Psi.get_triad())) ;
for(int i=1; i<=3; i++) {
dcov_Psi.set(i).import(temp(i)) ;
dcov_Psi.set(i).set_spectral_va().set_base(temp(i).get_spectral_va().get_base()) ;
}
dcov_Psi.inc_dzpuis(2) ;
dcov_Psi += Psi_auto.derive_cov(flat) ;
// Computation of dcov_chi
temp = (comp.chi_auto).derive_cov(comp.flat) ;
temp.dec_dzpuis(2) ;
temp.change_triad(mp.get_bvect_cart()) ;
assert ( *(temp.get_triad()) == *(dcov_chi.get_triad())) ;
for(int i=1; i<=3; i++) {
dcov_chi.set(i).import(temp(i)) ;
dcov_chi.set(i).set_spectral_va().set_base(temp(i).get_spectral_va().get_base()) ;
}
dcov_chi.inc_dzpuis(2) ;
dcov_chi += chi_auto.derive_cov(flat) ;
// Computation of \hat{A}^{ij}_{comp}
// ----------------------------------
// D^j beta^i
Tensor temp_beta = (comp.beta_auto).derive_con(comp.flat) ;
temp_beta.dec_dzpuis(2) ;
temp_beta.change_triad(mp.get_bvect_cart()) ;
Tensor dbeta_comp(mp, 2, CON, mp.get_bvect_cart()) ;
assert ( *(temp_beta.get_triad()) == *(dbeta_comp.get_triad()) ) ;
for(int i=1; i<=3; i++)
for(int j=1; j<=3; j++) {
// importing
(dbeta_comp.set(i,j)).import( (temp_beta)(i,j) );
// setting appropriate bases
(dbeta_comp.set(i,j)).set_spectral_va().set_base(temp_beta(i,j).get_spectral_va().get_base()) ;
}
dbeta_comp.inc_dzpuis(2) ;
// Trace of D_j beta^i :
Scalar divbeta_comp = beta_comp.divergence(flat) ;
for (int i=1; i<=3; i++)
for (int j=1; j<=i; j++) {
//##
// for (int j=i; j<=3; j++) {
haij_comp.set(i, j) = dbeta_comp(i, j) + dbeta_comp(j, i)
- double(2) /double(3) * divbeta_comp * (flat.con())(i,j) ;
}
// Computation of (\hat{A}_{ij}\hat{A}^{ij})_{comp}
// ------------------------------------------------
Sym_tensor haij_auto_cov = haij_auto.up_down(flat) ;
haij_comp = 0.5 * pow(Psi, 7.) / chi * haij_comp ;
//## for comparison: old formulation
//haij_comp = 0.5 * haij_comp / nn ;
haij_comp.std_spectral_base() ;
hacar_comp = contract(haij_auto_cov, 0, 1, haij_comp, 0, 1, true) ;
// The derived quantities are obsolete
// -----------------------------------
del_deriv() ;
}
}
Lorene::Scalar
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
Lorene::Star_bin_xcts::Psi
Scalar Psi
Total conformal factor .
Definition star.h:1152
Lorene::Star_bin_xcts::haij_auto
Sym_tensor haij_auto
Part of the extrinsic curvature tensor generated by beta_auto.
Definition star.h:1193
Lorene::Star_bin_xcts::flat
Metric_flat flat
Flat metric defined on the mapping (Spherical components with respect to the mapping of the star) .
Definition star.h:1177
Lorene::Star_bin_xcts::Star_bin_xcts
Star_bin_xcts(Map &mp_i, int nzet_i, const Eos &eos_i, bool irrot)
Standard constructor.
Definition star_bin_xcts.C:81
Lorene::Star_bin_xcts::dcov_Psi
Vector dcov_Psi
Covariant derivative of the conformal factor .
Definition star.h:1171
Lorene::Star_bin_xcts::beta_comp
Vector beta_comp
Part of the shift vector generated principally by the star (Spherical components with respect to the ...
Definition star.h:1187
Lorene::Star_bin_xcts::beta_auto
Vector beta_auto
Part of the shift vector generated principally by the star (Spherical components with respect to the ...
Definition star.h:1182
Lorene::Star_bin_xcts::Psi_auto
Scalar Psi_auto
Scalar field generated principally by the star.
Definition star.h:1144
Lorene::Star_bin_xcts::hacar_comp
Scalar hacar_comp
Part of the scalar generated by beta_auto and beta_comp, i.e.
Definition star.h:1211
Lorene::Star_bin_xcts::chi
Scalar chi
Total function .
Definition star.h:1155
Lorene::Star_bin_xcts::update_metric_der_comp
void update_metric_der_comp(const Star_bin_xcts &comp)
Computes the derivative of metric functions related to the companion star.
Definition star_bin_upmetr_der_xcts.C:62
Lorene::Star_bin_xcts::haij_comp
Sym_tensor haij_comp
Part of the extrinsic curvature tensor generated by beta_comp.
Definition star.h:1199
Lorene::Star_bin_xcts::dcov_chi
Vector dcov_chi
Covariant derivative of the function .
Definition star.h:1174
Lorene::Star_bin_xcts::chi_auto
Scalar chi_auto
Scalar field generated principally by the star.
Definition star.h:1134
Lorene::Star_bin_xcts::del_deriv
virtual void del_deriv() const
Deletes all the derived quantities.
Definition star_bin_xcts.C:304
Lorene::Star::mp
Map & mp
Mapping associated with the star.
Definition star.h:180
Lorene::Sym_tensor
Class intended to describe valence-2 symmetric tensors.
Definition sym_tensor.h:223
Lorene::Tensor
Tensor handling.
Definition tensor.h:288
Lorene::Vector
Tensor field of valence 1.
Definition vector.h:188
Lorene::Vector::change_triad
virtual void change_triad(const Base_vect &)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Definition vector_change_triad.C:75
Lorene::pow
Cmp pow(const Cmp &, int)
Power .
Definition cmp_math.C:348
Lorene::Tensor::dec_dzpuis
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values in the compactified ext...
Definition tensor.C:808
Lorene::Tensor::change_triad
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Definition tensor_change_triad.C:77
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::get_triad
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
Definition tensor.h:866
Lorene::Tensor::set
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
Definition tensor.C:654
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