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;
158 theta_minus3.std_spectral_base();
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++) {
171 theta_minus3.set_grid_point(f,k,j,l) = thetaminus.
val_grid_point(0,k,j,0);
176 theta_minus3.annule_domain(0);
177 theta_minus3.annule_domain(nz - 1);
183 bound_bmN.set_spectral_va().ylm();
192 bound_bmN.std_spectral_base();
206 bmN.std_spectral_base();
207 bmN.set_spectral_va().ylm();
210 bpN.std_spectral_base();
211 bpN.set_spectral_va().ylm();
213 for (
int k=0; k<np; k++)
214 for (
int j=0; j<nt; j++) {
220 Scalar bmN_new(bmN.get_mp());
222 bmN_new.std_spectral_base();
224 double diff_ent = 1.;
225 double precis = 1.e-9;
228 for(
int mer=0 ;(diff_ent > precis) && (mer<mer_max) ; mer++) {
248 Scalar source_bmN = B_source*bpN - op_bmN_add;
254 source_bmN = sqrtqh2*source_bmN;
259 qab_con = qab_con/(hsurf*hsurf);
263 Sym_tensor hab =(qab_con*sqrtqh2 - fmets.
con()) / (hsurf*hsurf) ;
279 source_bmN = source_bmN + source_add;
288 bmN = relax*bmN + (1. - relax)*bmN_new;
292 bound_bmN.set_spectral_va().ylm();
318 ff.std_spectral_base();
335 Scalar bound_bpN = bpN + k_2;
358 bmN.std_spectral_base();
359 bmN.set_spectral_va().ylm();
363 for (
int k=0; k<np; k++)
364 for (
int j=0; j<nt; j++) {
374 bound_bpN.std_spectral_base();
392 Scalar bound_bpN2 = op_bmN/B_source;
394 bound_bpN2.set_spectral_va().ylm();
397 for (
int f= 0; f<nz; f++)
398 for (
int k=0; k<np; k++)
399 for (
int j=0; j<nt; j++) {
400 for (
int l=0; l<nr; l++) {
402 bound_bpN.set_grid_point(f,k,j,l) = bound_bpN2.val_grid_point(0,k,j,0);
407 bound_bpN.annule_domain(0);
408 bound_bpN.annule_domain(nz - 1);
463 ricci3.std_spectral_base();
471 for (
int f= 0; f<nz; f++)
472 for (
int k=0; k<np; k++)
473 for (
int j=0; j<nt; j++) {
474 for (
int l=0; l<nr; l++) {
482 ricci3.annule_domain(0);
483 ricci3.annule_domain(nz - 1);
491 ricci_t = 0.5*ricci3*ricci_t;
509 Vector V_par_int = V_par + k_1V;
527 Vector bound_V = V_par + k_2V;
531 Vector bound_shift = bb*sss + bound_V;
542 cout <<
"c'est pas fait!" << endl ;
virtual void sauve(FILE *) const
Save in a file.
const Scalar & get_BC_conf_fact() const
Source of Neumann BC on , derived from the vanishing expansion.
void annule_domain(int l)
Sets the Tensor to zero in a given domain.
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.
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.
Metric for tensor calculation.
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
const Scalar & sqrt_q() const
Computes the normal vector field to the 2-surface.
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
const Scalar & lapang() const
Returns the angular Laplacian of *this , where .
virtual void del_deriv() const
Deletes all the derived quantities.
Tensor up(int ind, const Metric &gam) const
Computes a new tensor by raising an index of *this.
void ylm()
Computes the coefficients of *this.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Flat metric for tensor calculation.
Tensor field of valence 0 (or component of a tensorial field).
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...
Tensor up_down(const Metric &gam) const
Computes a new tensor by raising or lowering all the indices of *this .
virtual const Vector & radial_vect() const
Returns the radial vector normal to a spherical slicing and pointing toward spatial infinity...
const Sym_tensor & shear() const
Computes the shear of the 2-surface .
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
virtual void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
Vector shift
The Shift 3-vector on the slice.
Tensor field of valence 1.
Scalar poisson_angu(double lambda=0) const
Solves the (generalized) angular Poisson equation with *this as source.
const Tensor_sym & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
Scalar * p_get_BC_bmN
Source of Dirichlet BC for (b-N).
Surface where boundary conditions for quantities in the bulk will be calculated It relies on geometri...
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Tensor derive_cov2dflat(const Tensor &uu) const
Computes the round covariant derivative on the spheroid.
Tensor derive_cov2d(const Tensor &uu) const
Computes the total covariant derivative on the spheroid.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
const Scalar & divergence(const Metric &) const
The divergence of this with respect to a Metric .
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...
const Scalar & get_ricci() const
Returns the 2-ricci scalar .
Cmp pow(const Cmp &, int)
Power .
Metric gamij
The 3-d metric on the slice.
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
const Tensor & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
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...
Scalar * p_get_BC_conf_fact
Source of Neumann BC on , derived from the vanishing expansion.
Spheroid sph
The associated Spheroid object.
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
const Tensor & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of this with respect to some metric , by raising the last inde...
virtual ~Excision_hor()
Destructor.
const Scalar & theta_minus() const
Computes the ingoing null expansion .
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
Scalar * p_get_BC_bpN
Arbitrary source of Dirichlet BC for (b+N), case 0: based on a parabolic driver towards a constant va...
const Vector & get_ll() const
Returns the vector .
const Metric & get_qab() const
Returns the metric .
Sym_tensor Kij
The 3-d extrinsic curvature on the slice.
Sym_tensor Tij
Value of the impulsion-energy tensor on the spheroid.
const Scalar & dsdr() const
Returns of *this .
Scalar lapse
The lapse defined on the 3 slice.
double delta_t
The time step for evolution in parabolic drivers.
Valeur & set_spectral_va()
Returns va (read/write version)
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this
const Map & get_mp() const
Returns the mapping.
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 ...
Scalar conf_fact
The value of the conformal factor on the 3-slice.
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
const Metric_flat & flat_met_spher() const
Returns the flat metric associated with the spherical coordinates and with components expressed in th...
Class intended to describe valence-2 symmetric tensors.
const Scalar & get_hsurf() const
Returns the field h_surf.
Tensor trace(int ind1, int ind2) const
Trace on two different type indices.
const Tensor & delta() const
Computes the delta coefficients for covariant derivative.
Tensor down(int ind, const Metric &gam) const
Computes a new tensor by lowering an index of *this.