spheroid.h
/*
* Definition of Lorene class Spheroid
*
*/
/*
* Copyright (c) 2006 Nicolas Vasset, Jerome Novak & Jose-Luis Jaramillo
*
* 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
*
*/
#ifndef __SPHEROID_H_
#define __SPHEROID_H_
/*
* $Id: spheroid.h,v 1.13 2014/10/13 08:52:36 j_novak Exp $
* $Log: spheroid.h,v $
* Revision 1.13 2014/10/13 08:52:36 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.12 2008/12/10 13:53:56 jl_jaramillo
* versions developed at Meudon in Novemver 2008
*
* Revision 1.11 2008/11/12 15:18:32 n_vasset
* New definition for the computation of Ricci scalar (instead of Ricci
* tensor previously)
*
* Revision 1.10 2008/07/09 08:48:23 n_vasset
* protected member zeta added.
*
* Revision 1.9 2008/06/04 12:31:56 n_vasset
* new functions multipole_mass and multipole_angu.
*
* Revision 1.8 2008/06/03 14:32:23 n_vasset
* dzpuis corrections (provisory). New function mass implemented.
*
* Revision 1.7 2006/09/07 08:39:43 j_novak
* Minor changes.
*
* Revision 1.6 2006/07/03 10:12:51 n_vasset
* adding of flag isphere
*
* Revision 1.5 2006/06/13 08:07:55 n_vasset
* Addition of 2 members
*
* Revision 1.4 2006/06/08 09:50:49 n_vasset
* corrected version for coordinates transformation
*
* Revision 1.3 2006/06/07 14:32:24 n_vasset
* modified constructor for 3d projector (Sym_tensor to Tensor)
*
* Revision 1.2 2006/05/26 13:25:42 j_novak
* Removed a 'const'
*
* Revision 1.1 2006/05/26 13:20:42 j_novak
* New class spheroid.
*
*
*
* $Header: /cvsroot/Lorene/C++/Include/spheroid.h,v 1.13 2014/10/13 08:52:36 j_novak Exp $
*
*/
#include "metric.h"
namespace Lorene {
class Spheroid {
// Data :
// -----
protected:
Scalar h_surf ;
Tensor jac2d ;
Tensor proj ;
Sym_tensor qq ;
Vector ss ;
Vector ephi;
Metric qab ;
Scalar ricci;
Sym_tensor hh ;
Scalar trk ;
Vector ll ;
Sym_tensor jj ;
Scalar fff;
Scalar ggg;
/*** */
Scalar zeta;
bool issphere ;
// Derived data :
// ------------
protected:
mutable Scalar* p_sqrt_q ;
mutable double* p_area ;
mutable double* p_angu_mom ;
mutable double* p_mass ;
mutable double* p_multipole_mass ;
mutable double* p_multipole_angu ;
mutable double* p_epsilon_A_minus_one ;
mutable double* p_epsilon_P_minus_one ;
mutable Scalar* p_theta_plus ;
mutable Scalar* p_theta_minus ;
mutable Sym_tensor* p_shear ;
mutable Tensor* p_delta ;
// Constructors - Destructor
// -------------------------
public:
Spheroid(const Map_af& map, double radius) ;
Spheroid(const Scalar& h_in, const Metric& gamij, const Sym_tensor& Kij) ;
Spheroid(const Spheroid& ) ;
Spheroid(FILE* ) ;
virtual ~Spheroid() ;
// Memory management
// -----------------
protected:
virtual void del_deriv() const ;
void set_der_0x0() const ;
// Mutators / assignment
// ---------------------
public:
void operator=(const Spheroid&) ;
void set_ephi(const Scalar&) ;
// Accessors
// ---------
public:
const Scalar& get_hsurf() const {return h_surf ; } ;
const Metric& get_qab() const {return qab ; } ;
const Scalar& get_ricci() const {return ricci ; } ;
const Sym_tensor& get_hh() const {return hh ; } ;
const Sym_tensor& get_qq() const {return qq ; } ;
const Tensor& get_proj() const {return proj ; } ;
const Tensor& get_jac2d() const {return jac2d ; } ;
const Scalar& get_trk() const {return trk; } ;
const Vector& get_ll() const {return ll;} ;
const Vector& get_ss() const {return ss;} ;
const Vector& get_ephi() const {return ephi;};
const Sym_tensor& get_jj() const {return jj;} ;
const Scalar& get_fff() const {return fff;} ;
const Scalar& get_ggg() const {return ggg;} ;
bool get_issphere() const{return issphere;};
Scalar& set_hsurf() {del_deriv() ; return h_surf ; } ;
Metric& set_qab() {del_deriv() ; return qab ; } ;
Scalar& set_ricci() {del_deriv() ; return ricci ; } ;
Sym_tensor& set_qq() {del_deriv() ; return qq ; } ;
Tensor& set_proj() {del_deriv() ; return proj ; } ;
Sym_tensor& set_hh() {del_deriv() ; return hh ; } ;
Scalar& set_trk() {del_deriv() ; return trk; } ;
Vector& set_ll() {del_deriv() ; return ll;} ;
Vector& set_ss() {del_deriv() ; return ss;} ;
Sym_tensor& set_jj() {del_deriv() ; return jj;} ;
Scalar& set_fff() {del_deriv() ; return fff;} ;
Scalar& set_ggg() {del_deriv() ; return ggg;} ;
bool set_issphere() {del_deriv() ; return issphere; };
void update_from_tslice(const Metric& gamij, const Sym_tensor& Kij) ;
// Computational functions
// -----------------------
public:
// Vector compute_normal(const Metric& gamij) ;
const Scalar& sqrt_q() const ;
double area() const ;
double angu_mom() const ;
double mass() const;
double multipole_mass(const int order) const;
double multipole_angu(const int order) const;
double epsilon_A_minus_one() const;
double epsilon_P_minus_one() const;
const Scalar& theta_plus() const ;
const Scalar& theta_minus() const ;
const Sym_tensor& shear () const ;
Tensor derive_cov2dflat(const Tensor& uu) const ;
const Tensor& delta() const;
Tensor derive_cov2d(const Tensor& uu) const ;
// Outputs
// -------
public:
virtual void sauve(FILE *) const ;
friend ostream& operator<<(ostream& , const Spheroid& ) ;
};
ostream& operator<<(ostream& , const Spheroid& ) ;
//------------------
// Class App_hor
//------------------
class App_hor : public Spheroid {
// Constructors - Destructor
// -------------------------
public:
App_hor(const Mg3d& grid_angu, double radius) ;
App_hor(const Scalar& h_in, const Metric& gamij, const Sym_tensor& Kij) ;
App_hor(const App_hor& ) ;
App_hor(FILE* ) ;
virtual ~App_hor() ;
// Mutators / assignment
// ---------------------
public:
void operator=(const App_hor&) ;
bool check_expansion(double thres = 1.e-7) const ;
const Sym_tensor& lie_derive_shear(const Scalar& bb, const Scalar& lapse) ;
const Sym_tensor& lie_derive_theta_plus(const Scalar& bb, const Scalar& lapse);
const Sym_tensor& lie_derive_theta_minus(const Scalar& bb, const Scalar& lapse);
const Sym_tensor& lie_derive_q_ab(const Scalar& bb, const Scalar& lapse) ;
const Scalar& l_non_affinity(const Scalar& bb, const Scalar& lapse) ;
} ;
}
#endif
Lorene::App_hor::App_hor
App_hor(const Scalar &h_in, const Metric &gamij, const Sym_tensor &Kij)
Constructor of an apparent horizon embedded in a 3-slice (Time_slice ) of 3+1 formalism.
Lorene::App_hor::l_non_affinity
const Scalar & l_non_affinity(const Scalar &bb, const Scalar &lapse)
non-affinity (or surface gravity) with respect to the outgoing null vector field
Lorene::App_hor::App_hor
App_hor(const Mg3d &grid_angu, double radius)
Standard constructor.
Lorene::App_hor::lie_derive_theta_plus
const Sym_tensor & lie_derive_theta_plus(const Scalar &bb, const Scalar &lapse)
Lie derivative of the null outgoing expansion rate with respect to the evolution vector field.
Lorene::App_hor::operator=
void operator=(const App_hor &)
Assignment to another App_hor.
Lorene::App_hor::lie_derive_q_ab
const Sym_tensor & lie_derive_q_ab(const Scalar &bb, const Scalar &lapse)
Lie derivative of 2-metric with respect to the evolution vector field.
Lorene::App_hor::lie_derive_theta_minus
const Sym_tensor & lie_derive_theta_minus(const Scalar &bb, const Scalar &lapse)
Lie derivative of the null ingoing expansion rate with respect to the evolution vector field.
Lorene::App_hor::App_hor
App_hor(const App_hor &)
Copy constructor.
Lorene::App_hor::lie_derive_shear
const Sym_tensor & lie_derive_shear(const Scalar &bb, const Scalar &lapse)
Lie derivative of shear tensor with respect to the evolution vector field.
Lorene::App_hor::~App_hor
virtual ~App_hor()
Destructor.
Lorene::App_hor::App_hor
App_hor(FILE *)
Constructor from a file (see sauve(FILE*) ).
Lorene::Map_af
Affine radial mapping.
Definition map.h:2027
Lorene::Metric
Metric for tensor calculation.
Definition metric.h:90
Lorene::Mg3d
Multi-domain grid.
Definition grilles.h:273
Lorene::Scalar
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
Lorene::Spheroid
Spheroidal 2-surfaces embedded in a time-slice of the 3+1 formalism.
Definition spheroid.h:84
Lorene::Spheroid::set_hh
Sym_tensor & set_hh()
Sets the symmetric tensor .
Definition spheroid.h:283
Lorene::Spheroid::derive_cov2dflat
Tensor derive_cov2dflat(const Tensor &uu) const
Computes the round covariant derivative on the spheroid.
Definition spheroid.C:954
Lorene::Spheroid::~Spheroid
virtual ~Spheroid()
Destructor.
Definition spheroid.C:642
Lorene::Spheroid::sqrt_q
const Scalar & sqrt_q() const
Computes the normal vector field to the 2-surface.
Definition spheroid.C:693
Lorene::Spheroid::proj
Tensor proj
The 3-d projector on the 2-surface (contravariant-covariant form).
Definition spheroid.h:100
Lorene::Spheroid::set_qab
Metric & set_qab()
Sets the modified metric (non degenerated) .
Definition spheroid.h:271
Lorene::Spheroid::qq
Sym_tensor qq
The 3-d covariant degenerated 2-metric on the surface.
Definition spheroid.h:104
Lorene::Spheroid::theta_minus
const Scalar & theta_minus() const
Computes the ingoing null expansion .
Definition spheroid.C:909
Lorene::Spheroid::get_proj
const Tensor & get_proj() const
returns the 3-d projector on 2-surface
Definition spheroid.h:238
Lorene::Spheroid::get_ggg
const Scalar & get_ggg() const
Returns the normalization scalar G.
Definition spheroid.h:262
Lorene::Spheroid::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition spheroid.C:1186
Lorene::Spheroid::get_qab
const Metric & get_qab() const
Returns the metric .
Definition spheroid.h:226
Lorene::Spheroid::set_ll
Vector & set_ll()
Sets the vector .
Definition spheroid.h:289
Lorene::Spheroid::ll
Vector ll
Normal-tangent component of the extrinsic curvature of the 3-slice.
Definition spheroid.h:129
Lorene::Spheroid::set_ggg
Scalar & set_ggg()
Sets the normalization factor G.
Definition spheroid.h:301
Lorene::Spheroid::p_multipole_angu
double * p_multipole_angu
Angular momentum multipole for the spheroid.
Definition spheroid.h:162
Lorene::Spheroid::get_jac2d
const Tensor & get_jac2d() const
returns the 2-d jacobian of coordinate transformation
Definition spheroid.h:241
Lorene::Spheroid::p_mass
double * p_mass
Mass defined from angular momentum.
Definition spheroid.h:160
Lorene::Spheroid::trk
Scalar trk
Trace K of the extrinsic curvature of the 3-slice.
Definition spheroid.h:124
Lorene::Spheroid::p_theta_plus
Scalar * p_theta_plus
Classical Penrose parameter, difference wrt one.
Definition spheroid.h:165
Lorene::Spheroid::ggg
Scalar ggg
Normalization function for the ingoing null vector k.
Definition spheroid.h:143
Lorene::Spheroid::operator=
void operator=(const Spheroid &)
Assignment to another Spheroid.
Definition spheroid.C:614
Lorene::Spheroid::set_hsurf
Scalar & set_hsurf()
Sets the field h_surf.
Definition spheroid.h:268
Lorene::Spheroid::epsilon_A_minus_one
double epsilon_A_minus_one() const
Computation of the refined Penrose parameter for axisymmetric spacetimes, and its difference wrt one.
Definition spheroid.C:864
Lorene::Spheroid::set_der_0x0
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition spheroid.C:666
Lorene::Spheroid::Spheroid
Spheroid(const Map_af &map, double radius)
The delta tensorial fields linked to Christoffel symbols.
Definition spheroid.C:94
Lorene::Spheroid::set_fff
Scalar & set_fff()
Sets the normalization factor F.
Definition spheroid.h:298
Lorene::Spheroid::delta
const Tensor & delta() const
Computes the delta coefficients for covariant derivative.
Definition spheroid.C:1203
Lorene::Spheroid::multipole_angu
double multipole_angu(const int order) const
Computes the angular multipole of a given order for the spheroid, assumed to be spherical.
Definition spheroid.C:801
Lorene::Spheroid::issphere
bool issphere
Flag to know whether the horizon is geometrically round or distorted.
Definition spheroid.h:151
Lorene::Spheroid::jac2d
Tensor jac2d
The jacobian of the adaptation of coordinates (contravariant/covariant representation).
Definition spheroid.h:96
Lorene::Spheroid::get_ll
const Vector & get_ll() const
Returns the vector .
Definition spheroid.h:247
Lorene::Spheroid::set_trk
Scalar & set_trk()
Sets the trace K on the 2-surface.
Definition spheroid.h:286
Lorene::Spheroid::operator<<
friend ostream & operator<<(ostream &, const Spheroid &)
Display.
Lorene::Spheroid::mass
double mass() const
Computes the mass as defined from the calculus of angular momentum, done with respect to a divergence...
Definition spheroid.C:736
Lorene::Spheroid::jj
Sym_tensor jj
Tangent components of the extrinsic curvature of the 3-slice.
Definition spheroid.h:134
Lorene::Spheroid::p_area
double * p_area
The area of the 2-surface.
Definition spheroid.h:158
Lorene::Spheroid::get_fff
const Scalar & get_fff() const
Returns the normalization scalar F.
Definition spheroid.h:259
Lorene::Spheroid::fff
Scalar fff
Normalization function for the outgoing null vector l.
Definition spheroid.h:138
Lorene::Spheroid::area
double area() const
Computes the area of the 2-surface.
Definition spheroid.C:708
Lorene::Spheroid::set_qq
Sym_tensor & set_qq()
Sets the degenerated metric .
Definition spheroid.h:277
Lorene::Spheroid::multipole_mass
double multipole_mass(const int order) const
Computes the mass multipole of a given order for the spheroid, assumed to be spherical.
Definition spheroid.C:748
Lorene::Spheroid::get_jj
const Sym_tensor & get_jj() const
Returns the symmetric tensor .
Definition spheroid.h:256
Lorene::Spheroid::h_surf
Scalar h_surf
The location of the 2-surface as r = h_surf .
Definition spheroid.h:91
Lorene::Spheroid::set_ss
Vector & set_ss()
Sets the vector .
Definition spheroid.h:292
Lorene::Spheroid::hh
Sym_tensor hh
The ricci scalar on the 2-surface.
Definition spheroid.h:122
Lorene::Spheroid::get_trk
const Scalar & get_trk() const
Returns the trace K on the 2-surface.
Definition spheroid.h:244
Lorene::Spheroid::p_epsilon_P_minus_one
double * p_epsilon_P_minus_one
Refined Penrose parameter, difference wrt one.
Definition spheroid.h:164
Lorene::Spheroid::get_ss
const Vector & get_ss() const
Returns the vector .
Definition spheroid.h:250
Lorene::Spheroid::Spheroid
Spheroid(FILE *)
Constructor from a file (see sauve(FILE*) ).
Lorene::Spheroid::p_sqrt_q
Scalar * p_sqrt_q
Surface element .
Definition spheroid.h:157
Lorene::Spheroid::ss
Vector ss
The adapted normal vector field to spheroid in the 3-slice.
Definition spheroid.h:108
Lorene::Spheroid::get_hsurf
const Scalar & get_hsurf() const
Returns the field h_surf.
Definition spheroid.h:223
Lorene::Spheroid::set_ricci
Scalar & set_ricci()
Sets the 2-Ricci scalar .
Definition spheroid.h:274
Lorene::Spheroid::get_hh
const Sym_tensor & get_hh() const
Returns the symmetric tensor .
Definition spheroid.h:232
Lorene::Spheroid::update_from_tslice
void update_from_tslice(const Metric &gamij, const Sym_tensor &Kij)
Updates from the 3-slice data.
Lorene::Spheroid::del_deriv
virtual void del_deriv() const
Deletes all the derived quantities.
Definition spheroid.C:650
Lorene::Spheroid::get_ricci
const Scalar & get_ricci() const
Returns the 2-ricci scalar .
Definition spheroid.h:229
Lorene::Spheroid::set_proj
Tensor & set_proj()
Sets the projector .
Definition spheroid.h:280
Lorene::Spheroid::shear
const Sym_tensor & shear() const
Computes the shear of the 2-surface .
Definition spheroid.C:925
Lorene::Spheroid::p_theta_minus
Scalar * p_theta_minus
Null ingoing expansion.
Definition spheroid.h:166
Lorene::Spheroid::angu_mom
double angu_mom() const
Computes the angular momentum with respect to a divergence-free vector field tangent to the 2-surface...
Definition spheroid.C:721
Lorene::Spheroid::set_jj
Sym_tensor & set_jj()
Sets the symmetric tensor .
Definition spheroid.h:295
Lorene::Spheroid::get_qq
const Sym_tensor & get_qq() const
returns the 3-d degenerate 2-metric
Definition spheroid.h:235
Lorene::Spheroid::ephi
Vector ephi
The conformal Killing vector field on the 2-surface (set to by default to the axial vector associated...
Definition spheroid.h:113
Lorene::Spheroid::get_ephi
const Vector & get_ephi() const
Returns the conformal Killing symmetry vector on the 2-surface.
Definition spheroid.h:253
Lorene::Spheroid::p_multipole_mass
double * p_multipole_mass
Mass multipole for the spheroid.
Definition spheroid.h:161
Lorene::Spheroid::set_ephi
void set_ephi(const Scalar &)
Assigns the conformal Killing vector field to phi.
Lorene::Spheroid::p_angu_mom
double * p_angu_mom
The angular momentum.
Definition spheroid.h:159
Lorene::Spheroid::derive_cov2d
Tensor derive_cov2d(const Tensor &uu) const
Computes the total covariant derivative on the spheroid.
Definition spheroid.C:1240
Lorene::Spheroid::ricci
Scalar ricci
Induced metric on the 2-surface .
Definition spheroid.h:117
Lorene::Spheroid::get_issphere
bool get_issphere() const
Returns the flag saying whether or not the horizon is geometrically round.
Definition spheroid.h:265
Lorene::Spheroid::p_shear
Sym_tensor * p_shear
The shear tensor.
Definition spheroid.h:167
Lorene::Spheroid::epsilon_P_minus_one
double epsilon_P_minus_one() const
Computation of the classical Penrose parameter, and its difference wrt one.
Definition spheroid.C:876
Lorene::Spheroid::theta_plus
const Scalar & theta_plus() const
Computes the outgoing null expansion .
Definition spheroid.C:889
Lorene::Spheroid::set_issphere
bool set_issphere()
Sets the boolean linked to geometrical shape of the horizon.
Definition spheroid.h:304
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
Lorene prototypes.
Definition app_hor.h:64