excision_surf.h
/*
* Definition of Lorene class Excision_surf, friend class of Spheroid.
*
*/
/*
* Copyright (c) 2008 Jose-Luis Jaramillo & Nicolas Vasset
*
* 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 __EXCISIONSURF_H_
#define __EXCISIONSURF_H_
/*
* $Header: /cvsroot/Lorene/C++/Include/excision_surf.h,v 1.7 2014/10/13 08:52:34 j_novak Exp $
*
*/
#include "metric.h"
#include "spheroid.h"
namespace Lorene {
class Excision_surf {
// Data :
// -----
protected:
Spheroid sph ;
Scalar conf_fact ;
Scalar lapse ;
Vector shift ;
Metric gamij ;
Sym_tensor Kij ;
double delta_t;
double no_of_steps;
Scalar expa;
Scalar dt_expa;
// Derived data :
// ------------
protected:
mutable Scalar* p_get_BC_conf_fact_1 ;
mutable Scalar* p_get_BC_lapse_1 ;
mutable Vector* p_get_BC_shift_1 ;
mutable Scalar* p_get_BC_Npsi_1 ;
mutable Scalar* p_get_BC_conf_fact_2 ;
mutable Scalar* p_get_BC_conf_fact_3 ;
mutable Scalar* p_get_BC_conf_fact_4 ;
mutable Scalar* p_get_BC_lapse_2 ;
mutable Scalar* p_get_BC_lapse_3 ;
mutable Scalar* p_get_BC_lapse_4 ;
mutable Scalar* p_derive_t_expa ;
mutable Vector* p_get_BC_shift_2 ;
mutable Vector* p_get_BC_shift_3 ;
mutable Vector* p_get_BC_shift_4 ;
mutable Scalar* p_get_BC_Npsi_2 ;
mutable Scalar* p_get_BC_Npsi_3 ;
mutable Scalar* p_get_BC_Npsi_4 ;
mutable Scalar* p_get_BC_Npsi_5 ;
// Constructors - Destructor
// -------------------------
public:
Excision_surf(const Scalar& h_in, const Metric& gij, const Sym_tensor& Kij2, const Scalar& ppsi, const Scalar& nn, const Vector& beta, double timestep, int int_nos) ;
Excision_surf(const Excision_surf& ) ;
Excision_surf(FILE* ) ;
virtual ~Excision_surf() ;
// Memory management
// -----------------
protected:
virtual void del_deriv() const ;
void set_der_0x0() const ;
// Mutators / assignment
// ---------------------
public:
void operator=(const Excision_surf&) ;
// Functions/Accessors
//---------------------
void get_evol_params_from_ID(double alpha, double beta, double gamma, Scalar& Ee, Vector& Jj, Sym_tensor& Ss) ;
void set_expa_parab(double c_theta_lap, double c_theta_fin, Scalar& expa_fin) ;
void set_expa_hyperb(double alph0, double beta0, double gamma0) ;
// Accessors
// ---------
public:
const Spheroid& get_sph() const {return sph; };
const Scalar& get_conf_fact() const {return conf_fact; } ;
const Scalar& get_lapse() const {return lapse ; } ;
const Vector& get_shift() const {return shift ; } ;
const Metric& get_gamij() const {return gamij ; } ;
const Sym_tensor& get_Kij() const {return Kij ; } ;
double get_delta_t() const {return delta_t ;};
double get_no_of_steps() const {return no_of_steps ;};
const Scalar & get_expa() const {return expa; };
const Scalar& get_dt_expa() const {return dt_expa;} ;
Spheroid& set_sph() {del_deriv() ; return sph ;};
Scalar& set_conf_fact() {del_deriv() ; return conf_fact ; } ;
Scalar& set_lapse() {del_deriv() ; return lapse ; } ;
Vector& set_shift() {del_deriv() ; return shift ; } ;
Metric& set_gamij() {del_deriv() ; return gamij ; } ;
Sym_tensor& set_Kij() {del_deriv() ; return Kij ; } ;
double set_delta_t() {del_deriv() ; return delta_t ; } ;
double set_no_of_steps() {del_deriv() ; return no_of_steps ; } ;
Scalar& set_expa() {del_deriv(); return expa;};
Scalar& set_dt_expa() {del_deriv(); return dt_expa;};
// Computational functions
// -----------------------
public:
const Scalar& get_BC_conf_fact_1(bool isMOTS = false) const ;
// Source for an arbitrary Dirichlet BC on the lapse
const Scalar& get_BC_lapse_1(double value) const ;
// Source for a global Dirichlet BC on the shift, imposing a conformal Killing symmetry on \f$ \varphi \f$.
const Vector& get_BC_shift_1(double Omega) const ;
// Source for a Dirichlet arbitrary BC on (N*Psi1)
const Scalar& get_BC_Npsi_1(double value) const ;
const Scalar& get_BC_conf_fact_2(double c_psi_lap, double c_psi_fin, Scalar& expa_fin) const ;
const Scalar& get_BC_conf_fact_3(double c_theta_lap, double c_theta_fin, Scalar& expa_fin) const ;
const Scalar& get_BC_conf_fact_4() const ;
const Scalar& get_BC_lapse_2(double lapse_fin, double c_lapse_lap, double c_lapse_fi) const ;
const Scalar& get_BC_lapse_3(Scalar& dttheta, Scalar& Ee, Vector& Jj, Sym_tensor& Sij, bool sph_sym = true) const ;
const Scalar& get_BC_lapse_4 (Scalar& old_nn, Vector& beta_point, Sym_tensor& strain_tens) const ;
const Scalar& derive_t_expa(Scalar& Ee, Vector& Jj, Sym_tensor& Sij) const;
const Vector& get_BC_shift_2(double c_bb_lap, double c_bb_fin, double c_V_lap, double epsilon) const ;
const Vector& get_BC_shift_3(Scalar& dtpsi, double c_V_lap, double epsilon) const ;
const Vector & get_BC_shift_4(Scalar& dttheta, Scalar& Ee, Vector& Jj, Sym_tensor& Sij, double c_V_lap, double epsilon, bool sph_sym= true) const ;
const Scalar& get_BC_Npsi_2(double value, double c_npsi_lap, double c_npsi_fin) const ;
const Scalar& get_BC_Npsi_3(double n_0, double beta) const ;
const Scalar& get_BC_Npsi_4(double Kappa) const ;
const Scalar& get_BC_Npsi_5(double Kappa) const ;
// Outputs
// -------
public:
virtual void sauve(FILE *) const ;
friend ostream& operator<<(ostream& , const Spheroid& ) ;
};
ostream& operator<<(ostream& , const Spheroid& ) ;
}
#endif
Lorene::Excision_surf::p_get_BC_Npsi_5
Scalar * p_get_BC_Npsi_5
Source of Neumann boundary condition on .
Definition excision_surf.h:101
Lorene::Excision_surf::p_get_BC_lapse_3
Scalar * p_get_BC_lapse_3
Source of Dirichlet condtion on , based on einstein equations.
Definition excision_surf.h:92
Lorene::Excision_surf::p_get_BC_Npsi_3
Scalar * p_get_BC_Npsi_3
Source of Dirichlet boundary condition on .
Definition excision_surf.h:99
Lorene::Excision_surf::Kij
Sym_tensor Kij
The 3-d extrinsic curvature on the slice.
Definition excision_surf.h:65
Lorene::Excision_surf::p_get_BC_Npsi_4
Scalar * p_get_BC_Npsi_4
Source of Dirichlet boundary condition on .
Definition excision_surf.h:100
Lorene::Excision_surf::operator=
void operator=(const Excision_surf &)
Assignment to another Excision_surf.
Definition excision_surf.C:110
Lorene::Excision_surf::set_expa
Scalar & set_expa()
Sets the expansion function on the surface at time t (considering to protect this function).
Definition excision_surf.h:220
Lorene::Excision_surf::get_BC_shift_3
const Vector & get_BC_shift_3(Scalar &dtpsi, double c_V_lap, double epsilon) const
Source for a Dirichlet BC on the shift, based on a Parabolic driver; Radial part is dealt with using ...
Definition excision_surf.C:1127
Lorene::Excision_surf::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition excision_surf.C:1851
Lorene::Excision_surf::get_BC_conf_fact_2
const Scalar & get_BC_conf_fact_2(double c_psi_lap, double c_psi_fin, Scalar &expa_fin) const
Source for the Dirichlet BC on the conformal factor, based on a parabolic driver for the conformal fa...
Definition excision_surf.C:364
Lorene::Excision_surf::p_get_BC_lapse_1
Scalar * p_get_BC_lapse_1
Source of Dirichlet boundary condition of .
Definition excision_surf.h:85
Lorene::Excision_surf::p_get_BC_conf_fact_1
Scalar * p_get_BC_conf_fact_1
Source of Neumann boundary condition on ,.
Definition excision_surf.h:84
Lorene::Excision_surf::get_BC_lapse_4
const Scalar & get_BC_lapse_4(Scalar &old_nn, Vector &beta_point, Sym_tensor &strain_tens) const
Source for Dirichlet BC on the lapse, based on einstein equations (conservation of isotropic gauge).
Definition excision_lapse_4.C:15
Lorene::Excision_surf::get_BC_shift_2
const Vector & get_BC_shift_2(double c_bb_lap, double c_bb_fin, double c_V_lap, double epsilon) const
Source for a Dirichlet BC on the shift, based on a Parabolic driver; no assumptions are made except a...
Definition excision_surf.C:888
Lorene::Excision_surf::lapse
Scalar lapse
The lapse defined on the 3 slice.
Definition excision_surf.h:56
Lorene::Excision_surf::get_dt_expa
const Scalar & get_dt_expa() const
Returns the assumed time derivative of the expansion at t, evolved by functions of this class;.
Definition excision_surf.h:194
Lorene::Excision_surf::p_get_BC_lapse_4
Scalar * p_get_BC_lapse_4
Source of Dirichlet condtion on , based on einstein equations (conservation of isotropic gauge).
Definition excision_surf.h:93
Lorene::Excision_surf::shift
Vector shift
The Shift 3-vector on the slice.
Definition excision_surf.h:59
Lorene::Excision_surf::get_gamij
const Metric & get_gamij() const
Returns the symmetric tensor .
Definition excision_surf.h:179
Lorene::Excision_surf::get_conf_fact
const Scalar & get_conf_fact() const
Returns the conformal factor associated with the surface.
Definition excision_surf.h:170
Lorene::Excision_surf::get_sph
const Spheroid & get_sph() const
Returns the spheroid.
Definition excision_surf.h:167
Lorene::Excision_surf::get_BC_lapse_3
const Scalar & get_BC_lapse_3(Scalar &dttheta, Scalar &Ee, Vector &Jj, Sym_tensor &Sij, bool sph_sym=true) const
Source for Dirichlet BC on the lapse, based on einstein equations.
Definition excision_surf.C:647
Lorene::Excision_surf::set_conf_fact
Scalar & set_conf_fact()
Sets the value of the conformal factor.
Definition excision_surf.h:200
Lorene::Excision_surf::get_evol_params_from_ID
void get_evol_params_from_ID(double alpha, double beta, double gamma, Scalar &Ee, Vector &Jj, Sym_tensor &Ss)
Computes the parameters for the hyperbolic evolution in set_expa_hyperb(), so that the expansion has ...
Definition excision_surf.C:195
Lorene::Excision_surf::get_BC_shift_4
const Vector & get_BC_shift_4(Scalar &dttheta, Scalar &Ee, Vector &Jj, Sym_tensor &Sij, double c_V_lap, double epsilon, bool sph_sym=true) const
Source for a Dirichlet BC on the shift, based on a Parabolic driver; Radial part is dealt with using ...
Definition excision_surf.C:1361
Lorene::Excision_surf::~Excision_surf
virtual ~Excision_surf()
Destructor.
Definition excision_surf.C:131
Lorene::Excision_surf::set_shift
Vector & set_shift()
Sets the shift vector field.
Definition excision_surf.h:206
Lorene::Excision_surf::get_BC_conf_fact_1
const Scalar & get_BC_conf_fact_1(bool isMOTS=false) const
Source for a Neumann BC on the conformal factor. If boolean isMOTS is false, it is based on expansion...
Definition excision_surf.C:280
Lorene::Excision_surf::operator<<
friend ostream & operator<<(ostream &, const Spheroid &)
Display.
Lorene::Excision_surf::set_gamij
Metric & set_gamij()
Sets the 3d metric of the TimeSlice.
Definition excision_surf.h:209
Lorene::Excision_surf::p_get_BC_conf_fact_3
Scalar * p_get_BC_conf_fact_3
Source of Neumann boundary condition on ,.
Definition excision_surf.h:89
Lorene::Excision_surf::p_get_BC_Npsi_2
Scalar * p_get_BC_Npsi_2
Source of Dirichlet boundary condition on .
Definition excision_surf.h:98
Lorene::Excision_surf::get_BC_conf_fact_4
const Scalar & get_BC_conf_fact_4() const
Source for the Dirchlet BC on the conformal factor, based on the consistency condition derived from t...
Definition excision_surf.C:533
Lorene::Excision_surf::set_der_0x0
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition excision_surf.C:161
Lorene::Excision_surf::p_get_BC_conf_fact_2
Scalar * p_get_BC_conf_fact_2
Source of Neumann boundary condition on ,.
Definition excision_surf.h:88
Lorene::Excision_surf::set_dt_expa
Scalar & set_dt_expa()
Sets the time derivative of the expansion function on the surface at time t (considering to protect t...
Definition excision_surf.h:224
Lorene::Excision_surf::set_Kij
Sym_tensor & set_Kij()
Sets the extrinsic curvature.
Definition excision_surf.h:212
Lorene::Excision_surf::get_shift
const Vector & get_shift() const
Returns the shift vector field.
Definition excision_surf.h:176
Lorene::Excision_surf::p_get_BC_shift_4
Vector * p_get_BC_shift_4
Source of Dirichlet BC for the shift vector , partly from projection of Einstein Equations.
Definition excision_surf.h:97
Lorene::Excision_surf::set_expa_parab
void set_expa_parab(double c_theta_lap, double c_theta_fin, Scalar &expa_fin)
Sets a new value for expansion rescaled over lapse (and its derivative), obtained by parabolic evolut...
Definition set_expa_evol.C:20
Lorene::Excision_surf::set_lapse
Scalar & set_lapse()
Sets the lapse function.
Definition excision_surf.h:203
Lorene::Excision_surf::get_BC_conf_fact_3
const Scalar & get_BC_conf_fact_3(double c_theta_lap, double c_theta_fin, Scalar &expa_fin) const
Source for the Neumann BC on the conformal factor, based on a parabolic driver for the expansio.
Definition excision_surf.C:452
Lorene::Excision_surf::Excision_surf
Excision_surf(FILE *)
Constructor from a file (see sauve(FILE*) ).
Lorene::Excision_surf::get_BC_Npsi_5
const Scalar & get_BC_Npsi_5(double Kappa) const
Source for a Neumann BC on (N*Psi1), fixing a constant surface gravity in space and time.
Definition excision_surf.C:1825
Lorene::Excision_surf::p_get_BC_lapse_2
Scalar * p_get_BC_lapse_2
Source of Dirichlet boundary condition of .
Definition excision_surf.h:91
Lorene::Excision_surf::derive_t_expa
const Scalar & derive_t_expa(Scalar &Ee, Vector &Jj, Sym_tensor &Sij) const
Forms the prospective time derivative for the expansion using projected Einstein equations....
Definition excision_surf.C:783
Lorene::Excision_surf::sph
Spheroid sph
The associated Spheroid object.
Definition excision_surf.h:50
Lorene::Excision_surf::p_get_BC_shift_2
Vector * p_get_BC_shift_2
Source of Dirichlet BC for the shift vector .
Definition excision_surf.h:95
Lorene::Excision_surf::get_BC_Npsi_3
const Scalar & get_BC_Npsi_3(double n_0, double beta) const
Source for the Dirichlet BC on (N*Psi1), with Kerr_Schild-like form for the lapse boundary.
Definition excision_surf.C:1757
Lorene::Excision_surf::p_get_BC_shift_3
Vector * p_get_BC_shift_3
Source of Dirichlet BC for the shift vector , partly derived from kinematical relation.
Definition excision_surf.h:96
Lorene::Excision_surf::del_deriv
virtual void del_deriv() const
Deletes all the derived quantities.
Definition excision_surf.C:139
Lorene::Excision_surf::set_sph
Spheroid & set_sph()
Sets a new spheroid from data.
Definition excision_surf.h:197
Lorene::Excision_surf::get_BC_Npsi_4
const Scalar & get_BC_Npsi_4(double Kappa) const
Source for a Dirichlet BC on (N*Psi1), fixing a constant surface gravity in space and time.
Definition excision_surf.C:1804
Lorene::Excision_surf::p_get_BC_Npsi_1
Scalar * p_get_BC_Npsi_1
Source of Neumann boundary condition on .
Definition excision_surf.h:87
Lorene::Excision_surf::get_Kij
const Sym_tensor & get_Kij() const
returns the 3-d extrinsic curvature
Definition excision_surf.h:182
Lorene::Excision_surf::conf_fact
Scalar conf_fact
The value of the conformal factor on the 3-slice.
Definition excision_surf.h:53
Lorene::Excision_surf::no_of_steps
double no_of_steps
The internal number of timesteps for one iteration.
Definition excision_surf.h:71
Lorene::Excision_surf::gamij
Metric gamij
The 3-d metric on the slice.
Definition excision_surf.h:62
Lorene::Excision_surf::p_derive_t_expa
Scalar * p_derive_t_expa
Computation of an updated expansion scalar.
Definition excision_surf.h:94
Lorene::Excision_surf::Excision_surf
Excision_surf(const Scalar &h_in, const Metric &gij, const Sym_tensor &Kij2, const Scalar &ppsi, const Scalar &nn, const Vector &beta, double timestep, int int_nos)
Constructor of an excision surface embedded in a 3-slice (Time_slice ) of 3+1 formalism.
Definition excision_surf.C:64
Lorene::Excision_surf::get_no_of_steps
double get_no_of_steps() const
Returns the internal number of timesteps for one iteration.
Definition excision_surf.h:188
Lorene::Excision_surf::get_BC_Npsi_2
const Scalar & get_BC_Npsi_2(double value, double c_npsi_lap, double c_npsi_fin) const
Source for the Dirichlet BC on (N*Psi1), based on a parabolic driver.
Definition excision_surf.C:1717
Lorene::Excision_surf::get_BC_lapse_2
const Scalar & get_BC_lapse_2(double lapse_fin, double c_lapse_lap, double c_lapse_fi) const
Source for Dirichlet BC on the lapse, based on a parabolic driver towards arbitrary constant value.
Definition excision_surf.C:603
Lorene::Excision_surf::delta_t
double delta_t
The time step for evolution in parabolic drivers.
Definition excision_surf.h:68
Lorene::Excision_surf::expa
Scalar expa
The 2d expansion, directly evolved from the initial excision with Einstein Equations.
Definition excision_surf.h:74
Lorene::Excision_surf::get_lapse
const Scalar & get_lapse() const
Returns the lapse function.
Definition excision_surf.h:173
Lorene::Excision_surf::p_get_BC_shift_1
Vector * p_get_BC_shift_1
Source of Dirichlet BC for the shift vector .
Definition excision_surf.h:86
Lorene::Excision_surf::p_get_BC_conf_fact_4
Scalar * p_get_BC_conf_fact_4
Source of Birichlet boundary condition on ,.
Definition excision_surf.h:90
Lorene::Excision_surf::dt_expa
Scalar dt_expa
The time derivative of the expansion, derived from Einstein equations and arbitrary evolution.
Definition excision_surf.h:77
Lorene::Excision_surf::set_expa_hyperb
void set_expa_hyperb(double alph0, double beta0, double gamma0)
Sets a new value for expansion rescaled over lapse (and its derivative), obtained by hyperbolic evolu...
Definition set_expa_evol.C:99
Lorene::Excision_surf::get_delta_t
double get_delta_t() const
Returns the timestep used for evolution.
Definition excision_surf.h:185
Lorene::Excision_surf::get_expa
const Scalar & get_expa() const
Returns the assumed expansion associated to the excised surface at t.
Definition excision_surf.h:191
Lorene::Metric
Metric for tensor calculation.
Definition metric.h:90
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::Sym_tensor
Class intended to describe valence-2 symmetric tensors.
Definition sym_tensor.h:223
Lorene::Vector
Tensor field of valence 1.
Definition vector.h:188
Lorene
Lorene prototypes.
Definition app_hor.h:64