26char excision_hor_C[] =
"$Header: /cvsroot/Lorene/C++/Source/App_hor/excision_hor.C,v 1.4 2014/10/13 08:52:38 j_novak Exp $" ;
38#include "excision_hor.h"
69 conf_fact(exc_in.conf_fact),
74 delta_t(exc_in.delta_t),
75 no_of_steps(exc_in.no_of_steps),
124 Metric gamconf(gamconfcov);
128 bound_psi = 0.25*bound_psi;
166 for (
int f= 0; f<nz; f++)
167 for (
int k=0; k<np; k++)
168 for (
int j=0; j<nt; j++) {
169 for (
int l=0; l<nr; l++) {
212 for (
int k=0; k<np; k++)
213 for (
int j=0; j<nt; j++) {
223 double diff_ent = 1.;
224 double precis = 1.e-9;
227 for(
int mer=0 ;(diff_ent > precis) && (mer<mer_max) ; mer++) {
242 Scalar source_bmN = B_source*bpN - op_bmN_add;
248 source_bmN = sqrtqh2*source_bmN;
253 qab_con = qab_con/(hsurf*hsurf);
257 Sym_tensor hab =(qab_con*sqrtqh2 - fmets.
con()) / (hsurf*hsurf) ;
270 Scalar source_add = - hsurf*hsurf*
contract(hab, 0,1, d2_bmN, 0,1) + sqrtqh2*
contract(
contract(qab_con,0,1,
sph.
delta(),1,2),0,d_bmN,0) ;
272 source_bmN = source_bmN + source_add;
281 bmN = relax*bmN + (1. - relax)*bmN_new;
310 ff.std_spectral_base();
327 Scalar bound_bpN = bpN + k_2;
355 for (
int k=0; k<np; k++)
356 for (
int j=0; j<nt; j++) {
384 Scalar bound_bpN2 = op_bmN/B_source;
389 for (
int f= 0; f<nz; f++)
390 for (
int k=0; k<np; k++)
391 for (
int j=0; j<nt; j++) {
392 for (
int l=0; l<nr; l++) {
463 for (
int f= 0; f<nz; f++)
464 for (
int k=0; k<np; k++)
465 for (
int j=0; j<nt; j++) {
466 for (
int l=0; l<nr; l++) {
483 ricci_t = 0.5*ricci3*ricci_t;
501 Vector V_par_int = V_par + k_1V;
519 Vector bound_V = V_par + k_2V;
523 Vector bound_shift = bb*sss + bound_V;
534 cout <<
"c'est pas fait!" << endl ;
Surface where boundary conditions for quantities in the bulk will be calculated It relies on geometri...
const Vector & get_BC_shift(double c_V_lap) const
Source of Dirichlet BC for the shift, issued from BC on bpN and a gauge condition on the tangential s...
Vector shift
The Shift 3-vector on the slice.
Excision_hor(const Scalar &h_in, const Metric &gij, const Sym_tensor &Kij2, const Scalar &ppsi, const Scalar &nn, const Vector &beta, const Sym_tensor &Tij2, double timestep, int int_nos=1)
Constructor of an excision surface embedded in a 3-slice (Time_slice ) of 3+1 formalism.
Sym_tensor Tij
Value of the impulsion-energy tensor on the spheroid.
Scalar * p_get_BC_conf_fact
Source of Neumann BC on , derived from the vanishing expansion.
Vector * p_get_BC_shift
Source of Dirichlet BC for the shift, issued from BC on bpN and a gauge condition on the tangential s...
Scalar * p_get_BC_bpN
Arbitrary source of Dirichlet BC for (b+N), case 0: based on a parabolic driver towards a constant va...
Metric gamij
The 3-d metric on the slice.
Sym_tensor Kij
The 3-d extrinsic curvature on the slice.
virtual ~Excision_hor()
Destructor.
const Scalar & get_BC_bpN(int choice_bpN, double c_bpn_lap=1., double c_bpn_fin=1., Scalar *bpN_fin=0x0) const
Case 0: Arbitrary source of Dirichlet BC for (b+N), based on a parabolic driver towards a constant va...
virtual void sauve(FILE *) const
Save in a file.
Spheroid sph
The associated Spheroid object.
Scalar * p_get_BC_bmN
Source of Dirichlet BC for (b-N).
Scalar lapse
The lapse defined on the 3 slice.
Scalar conf_fact
The value of the conformal factor on the 3-slice.
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
const Scalar & get_BC_conf_fact() const
Source of Neumann BC on , derived from the vanishing expansion.
double delta_t
The time step for evolution in parabolic drivers.
const Scalar & get_BC_bmN(int choice_bmN, double value=1.) const
Source of Dirichlet BC for (b-N): case 0: based on an entropy prescription, case 1: from a component ...
virtual void del_deriv() const
Deletes all the derived quantities.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
const Metric_flat & flat_met_spher() const
Returns the flat metric associated with the spherical coordinates and with components expressed in th...
Flat metric for tensor calculation.
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Metric for tensor calculation.
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
virtual const Vector & radial_vect() const
Returns the radial vector normal to a spherical slicing and pointing toward spatial infinity.
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
Tensor field of valence 0 (or component of a tensorial field).
const Scalar & lapang() const
Returns the angular Laplacian of *this , where .
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this
Scalar poisson_angu(double lambda=0) const
Solves the (generalized) angular Poisson equation with *this as source.
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field.
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
const Scalar & dsdr() const
Returns of *this .
Valeur & set_spectral_va()
Returns va (read/write version)
virtual void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
double & set_grid_point(int l, int k, int j, int i)
Setting the value of the field at a given grid point.
Tensor derive_cov2dflat(const Tensor &uu) const
Computes the round covariant derivative on the spheroid.
const Scalar & sqrt_q() const
Computes the normal vector field to the 2-surface.
const Scalar & theta_minus() const
Computes the ingoing null expansion .
const Metric & get_qab() const
Returns the metric .
const Tensor & delta() const
Computes the delta coefficients for covariant derivative.
const Vector & get_ll() const
Returns the vector .
const Scalar & get_hsurf() const
Returns the field h_surf.
const Scalar & get_ricci() const
Returns the 2-ricci scalar .
const Sym_tensor & shear() const
Computes the shear of the 2-surface .
Tensor derive_cov2d(const Tensor &uu) const
Computes the total covariant derivative on the spheroid.
Class intended to describe valence-2 symmetric tensors.
void ylm()
Computes the coefficients of *this.
Tensor field of valence 1.
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
const Scalar & divergence(const Metric &) const
The divergence of this with respect to a Metric .
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Cmp pow(const Cmp &, int)
Power .
const Map & get_mp() const
Returns the mapping.
const Tensor_sym & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
Tensor up_down(const Metric &gam) const
Computes a new tensor by raising or lowering all the indices of *this .
const Tensor & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of this with respect to some metric , by raising the last inde...
Tensor down(int ind, const Metric &gam) const
Computes a new tensor by lowering an index of *this.
void annule_domain(int l)
Sets the Tensor to zero in a given domain.
const Tensor & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
Tensor up(int ind, const Metric &gam) const
Computes a new tensor by raising an index of *this.
Tensor trace(int ind1, int ind2) const
Trace on two different type indices.
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Tbl maxabs(const Tensor &aa, const char *comment=0x0, ostream &ost=cout, bool verb=true)
Maxima in each domain of the absolute values of the tensor components.