LORENE
excision_hor.C
1 /*
2  * Definition of methods for the class Spheroid and its subclass App_hor
3  *
4  */
5 
6 /*
7  * Copyright (c) 2009 Jose-Luis Jaramillo & Jerome Novak & Nicolas Vasset
8  *
9  * This file is part of LORENE.
10  *
11  * LORENE is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License version
13  * as published by the Free Software Foundation.
14  *
15  * LORENE is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with LORENE; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23  *
24  */
25 
26 
27 
28 /*
29  * $Header: /cvsroot/Lorene/C++/Source/App_hor/excision_hor.C,v 1.6 2018/11/16 14:34:35 j_novak Exp $
30  *
31  */
32 
33 // C headers
34 #include <cmath>
35 #include <cassert>
36 
37 // Lorene headers
38 #include "excision_hor.h"
39 
40 //---------------//
41 // Constructors //
42 //--------------//
43 
44 
45 namespace Lorene {
46 Excision_hor::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):
47  sph(h_in, gij, Kij2),
48  conf_fact(ppsi),
49  lapse(nn),
50  shift(beta),
51  gamij (gij),
52  Kij(Kij2),
53  delta_t(timestep),
54  no_of_steps(int_nos),
55  Tij(Tij2)
56 {
57 
58  set_der_0x0() ;
59 
60 }
61 
62 
63 
64 
65 
66 //Copy constructor//
67 
68 Excision_hor::Excision_hor(const Excision_hor &exc_in) :sph(exc_in.sph),
69  conf_fact(exc_in.conf_fact),
70  lapse(exc_in.lapse),
71  shift(exc_in.shift),
72  gamij (exc_in.gamij),
73  Kij (exc_in.Kij),
74  delta_t(exc_in.delta_t),
75  no_of_steps(exc_in.no_of_steps),
76  Tij(exc_in.Tij)
77 
78 {
79  set_der_0x0() ;
80 
81 }
82 //------------//
83 //Destructor //
84 //-----------//
85 
87 {
88  del_deriv() ;
89 }
90 
91 // -----------------//
92 // Memory management//
93 //------------------//
95 
96  if (p_get_BC_conf_fact != 0x0) delete p_get_BC_conf_fact ;
97  if (p_get_BC_bmN != 0x0) delete p_get_BC_bmN ;
98  if (p_get_BC_bpN != 0x0) delete p_get_BC_bpN ;
99  if (p_get_BC_shift != 0x0) delete p_get_BC_shift ;
100  set_der_0x0() ;
101 }
102 
104  p_get_BC_conf_fact = 0x0 ;
105  p_get_BC_bmN = 0x0 ;
106  p_get_BC_bpN = 0x0 ;
107  p_get_BC_shift = 0x0 ;
108 
109 }
110 
111 
112 
113 //---------//
114 //Accessors//
115 //---------//
116 
117 
118 
119 // Source for the Neumann BC on the conformal factor
121  if (p_get_BC_conf_fact == 0x0){
122  Sym_tensor gamconfcov = gamij.cov()/pow(conf_fact, 4);
123  gamconfcov.std_spectral_base();
124  Metric gamconf(gamconfcov);
125  Vector tilde_s = gamconf.radial_vect();
126  Scalar bound_psi = -((1./conf_fact)*contract((contract(Kij,1,tilde_s,0)),0, tilde_s,0));
127  bound_psi += -conf_fact*tilde_s.divergence(gamconf);
128  bound_psi = 0.25*bound_psi;
129  bound_psi += -contract(conf_fact.derive_cov(gamconf),0,tilde_s,0) + conf_fact.dsdr();
130  bound_psi.std_spectral_base();
131  bound_psi.set_spectral_va().ylm();
132  p_get_BC_conf_fact = new Scalar(bound_psi);
133 
134 }
135  return *p_get_BC_conf_fact ;
136 }
137 
138 
139 
140 // Case 0: Source of Dirichlet BC for (b-N), based on an entropy prescription.
141 // WARNING: the argument value has to be carefully fixed w.r.t initial data for (attempted) continuity.
142 
143 // Case 1: Source of Dirichlet BC for (b-N), from a component of projected Einstein Equations.
144 // Requires a 2d poisson solver for a non-flat metric.
145 
146 
147  const Scalar& Excision_hor::get_BC_bmN(int choice_bmN, double value) const{
148  if (p_get_BC_bmN == 0x0){
149 
150  switch(choice_bmN){
151 
152  case 0 : {
153 
154  Scalar thetaminus = sph.theta_minus();
155  Scalar theta_minus3 (lapse.get_mp());
156 
157  theta_minus3.allocate_all();
158  theta_minus3.std_spectral_base();
159 
160  int nz = (*lapse.get_mp().get_mg()).get_nzone();
161  int nr = (*lapse.get_mp().get_mg()).get_nr(1);
162  int nt = (*lapse.get_mp().get_mg()).get_nt(1);
163  int np = (*lapse.get_mp().get_mg()).get_np(1);
164 
165 
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++) {
170 
171  theta_minus3.set_grid_point(f,k,j,l) = thetaminus.val_grid_point(0,k,j,0);
172 
173  }
174  }
175  if (nz >2){
176  theta_minus3.annule_domain(0);
177  theta_minus3.annule_domain(nz - 1);
178  }
179 
180 
181  Scalar bound_bmN(lapse.get_mp());
182  bound_bmN = - value*theta_minus3; bound_bmN.std_spectral_base();
183  bound_bmN.set_spectral_va().ylm();
184  p_get_BC_bmN = new Scalar(bound_bmN);
185  break ;
186  }
187 
188  case 1 : {
189 
190  Scalar bound_bmN(lapse.get_mp());
191  bound_bmN.allocate_all();
192  bound_bmN.std_spectral_base();
193 
194  // Radial vector for the full 3-metric.
195  Vector sss = gamij.radial_vect();
196  Vector sss_down = sss.up_down(gamij);
197  Scalar bb = contract (shift,0, sss_down,0);
198  Scalar bmN3 = bb - lapse; bmN3.set_spectral_va().ylm();
199  Scalar bpN3 = bb + lapse; bpN3.set_spectral_va().ylm();
200 
201  int nt = (*lapse.get_mp().get_mg()).get_nt(1);
202  int np = (*lapse.get_mp().get_mg()).get_np(1);
203 
204  Scalar bmN(sph.get_hsurf().get_mp());
205  bmN.allocate_all();
206  bmN.std_spectral_base();
207  bmN.set_spectral_va().ylm();
208  Scalar bpN(sph.get_hsurf().get_mp());
209  bpN.allocate_all();
210  bpN.std_spectral_base();
211  bpN.set_spectral_va().ylm();
212 
213  for (int k=0; k<np; k++)
214  for (int j=0; j<nt; j++) {
215 
216  bmN.set_grid_point(0,k,j,0) = bmN3.val_grid_point(1,k,j,0);
217  bpN.set_grid_point(0,k,j,0) = bpN3.val_grid_point(1,k,j,0);
218  }
219 
220  Scalar bmN_new(bmN.get_mp());
221  bmN_new.allocate_all();
222  bmN_new.std_spectral_base();
223 
224  double diff_ent = 1.;
225  double precis = 1.e-9;
226  int mer_max = 200;
227  double relax = 0.;
228  for(int mer=0 ;(diff_ent > precis) && (mer<mer_max) ; mer++) {
229 
230  // Calculation of some source terms.
231 
232  Scalar hsurf = sph.get_hsurf();
233  hsurf.set_spectral_va().ylm();
234  const Metric_flat& fmets = hsurf.get_mp().flat_met_spher() ;
235 
236  Scalar shear_up = sph.shear(); shear_up.up_down(sph.get_qab());
237 
238  Scalar B_source = 0.5*contract(contract(sph.shear(),0, shear_up, 0),0,1)
239  + 4.*M_PI*Tij.trace(sph.get_qab()); // Redo the matter terms.
240  Scalar A_source = 0.5*sph.get_ricci()
241  - contract(sph.derive_cov2d(sph.get_ll()), 0, 1)
242  - contract(sph.get_ll(),0, sph.get_ll().up_down(sph.get_qab()),0)
243  - 8.*M_PI*Tij.trace(sph.get_qab()); // Redo the matter terms.
244 
245  Scalar op_bmN_add = - 2.*contract(sph.derive_cov2d(bmN),0, sph.get_ll(),0)
246  + A_source*bmN;
247 
248  Scalar source_bmN = B_source*bpN - op_bmN_add;
249  source_bmN.set_spectral_va().ylm();
250 
251  Scalar sqrtqh2 = sph.sqrt_q()*hsurf*hsurf;
252  sqrtqh2.set_spectral_va().ylm();
253 
254  source_bmN = sqrtqh2*source_bmN;
255 
256  // Conformal decomposition of the 2-metric
257 
258  Sym_tensor qab_con = sph.get_qab().con();
259  qab_con = qab_con/(hsurf*hsurf); // Renormalization due to the triad still not built-in spheroid class
260  //This is provisory work.
261 
262  // h^ab as q^ab = (f^ab + h^ab) / sqrt_q
263  Sym_tensor hab =(qab_con*sqrtqh2 - fmets.con()) / (hsurf*hsurf) ;
264  // for the sake of clarity
265  hab.set(1,1) = 1. ;
266  hab.set(1,2) = 0. ;
267  hab.set(1,3) = 0. ;
268  hab.std_spectral_base() ;
269  //end
270  // Complete source for the angular laplacian.
271  Scalar d_bmN = sph.derive_cov2dflat(bmN);
272  d_bmN.set_spectral_va().ylm();
273  Scalar d2_bmN = sph.derive_cov2dflat(d_bmN);
274  d2_bmN.set_spectral_va().ylm();
275 
276  Scalar source_add = - hsurf*hsurf*contract(hab, 0,1, d2_bmN, 0,1)
277  + sqrtqh2*contract(contract(qab_con,0,1,sph.delta(),1,2),0,d_bmN,0) ;
278  source_add.set_spectral_va().ylm();
279  source_bmN = source_bmN + source_add;
280  //
281 
282  // System inversion
283  bmN_new = source_bmN.poisson_angu(0.);
284 
285  // Actualisation of the principal variable, convergence parameter.
286  diff_ent = max(maxabs(bmN - bmN_new));
287 
288  bmN = relax*bmN + (1. - relax)*bmN_new;
289 
290  }
291  bound_bmN = bmN;
292  bound_bmN.set_spectral_va().ylm();
293  p_get_BC_bmN = new Scalar(bound_bmN);
294  break ;
295  }
296 
297  }
298  }
299  return *p_get_BC_bmN ;
300 
301  }
302 
303 
304 // Case 0: Arbitrary Dirichlet BC for (b+N), fixed by a parabolic driver towards a constant value.
305 // Case 1: Source of Dirichlet BC for (b+N), from a component of projected Einstein Equations.
306 const Scalar& Excision_hor::get_BC_bpN(int choice_bpN, double c_bpn_lap, double c_bpn_fin, Scalar *bpN_fin) const{
307  if (p_get_BC_bpN == 0x0){
308 
309  switch(choice_bpN) {
310 
311  case 0 : {
312 
313  Vector sss = gamij.radial_vect();
314  Vector sss_down = sss.up_down(gamij);
315  Scalar bb = contract (shift,0, sss_down,0);
316  Scalar bpN = bb + lapse;
317  Scalar ff = lapse*(c_bpn_lap*bpN.lapang() + c_bpn_fin*(bpN- *bpN_fin));
318  ff.std_spectral_base();
319 
320 
321  // Definition of k_1
322  Scalar k_1 =delta_t*ff;
323 
324  // Intermediate value of b-N, for Runge-Kutta 2nd order scheme
325  Scalar bpN_int = bpN + k_1; bpN_int.std_spectral_base();
326 
327  // Recalculation of ff with intermediate values.
328  Scalar ff_int = lapse*(c_bpn_lap*bpN_int.lapang() + c_bpn_fin*bpN_int);
329 
330  // Definition of k_2
331  Scalar k_2 = delta_t*ff_int;
332  k_2.std_spectral_base();
333 
334  // Result of RK2 evolution
335  Scalar bound_bpN = bpN + k_2;
336  bound_bpN.std_spectral_base();
337  bound_bpN.set_spectral_va().ylm();
338 
339  p_get_BC_bpN = new Scalar(bound_bpN);
340 
341  break ;
342  }
343 
344  case 1 : {
345 
346 
347  int nz = (*lapse.get_mp().get_mg()).get_nzone();
348  int nr = (*lapse.get_mp().get_mg()).get_nr(1);
349  int nt = (*lapse.get_mp().get_mg()).get_nt(1);
350  int np = (*lapse.get_mp().get_mg()).get_np(1);
351 
352 
353 
354  Scalar bmN3 = get_BC_bmN(0, 1.); // change the argument.
355 
356  Scalar bmN(sph.get_hsurf().get_mp());
357  bmN.allocate_all();
358  bmN.std_spectral_base();
359  bmN.set_spectral_va().ylm();
360 
361 
362 
363  for (int k=0; k<np; k++)
364  for (int j=0; j<nt; j++) {
365 
366 
367  bmN.set_grid_point(0,k,j,0) = bmN3.val_grid_point(1,k,j,0);
368 
369  }
370 
371 
372  Scalar bound_bpN(lapse.get_mp());
373  bound_bpN.allocate_all();
374  bound_bpN.std_spectral_base();
375 
376  // Definition of source terms in relation (6) of Jaramillo et al. 2007.
377  // All is done on the spheroid of radius r=1.
378 
379  Scalar shear_up = sph.shear(); shear_up.up_down(sph.get_qab());
380 
381  Scalar B_source = 0.5*contract(contract(sph.shear(),0, shear_up, 0),0,1) + 4.*M_PI*Tij.trace(sph.get_qab()); // Redo the matter terms.
382  Scalar A_source = 0.5*sph.get_ricci() - contract(sph.derive_cov2d(sph.get_ll()), 0, 1) - contract(sph.get_ll(),0, sph.get_ll().up_down(sph.get_qab()),0) - 8.*M_PI*Tij.trace(sph.get_qab()); // Redo the matter terms.
383 
384  // Curved 2d Laplacian of (b -N).
385 
386  Sym_tensor interlap = sph.derive_cov2d(sph.derive_cov2d(bmN));
387  interlap.up(0,sph.get_qab());
388  Sym_tensor lap_bmN = contract(interlap,0,1);
389 
390  Scalar op_bmN = lap_bmN - 2.*contract(sph.derive_cov2d(bmN),0, sph.get_ll(),0) + A_source*bmN;
391 
392  Scalar bound_bpN2 = op_bmN/B_source;
393  bound_bpN2.std_spectral_base();
394  bound_bpN2.set_spectral_va().ylm();
395 
396 
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++) {
401 
402  bound_bpN.set_grid_point(f,k,j,l) = bound_bpN2.val_grid_point(0,k,j,0);
403 
404  }
405  }
406  if (nz >2){
407  bound_bpN.annule_domain(0);
408  bound_bpN.annule_domain(nz - 1);
409  }
410 
411 
412 
413  p_get_BC_bpN = new Scalar(bound_bpN);
414 
415  break ;
416  }
417 
418 }
419 }
420  return *p_get_BC_bpN ;
421 }
422 
423 
424 
425 
426 // Source for the Dirichlet BC on the shift
427 // The tangential shift is fixed using a parabolic driver based on the conformal Killing equation in the dynamical case.
428 
429 const Vector& Excision_hor::get_BC_shift( double c_V_lap ) const{
430  if (p_get_BC_shift == 0x0){
431 
432  // Radial vector for the full 3-metric.
433  Vector sss = gamij.radial_vect();
434  Vector sss_down = sss.up_down(gamij);
435 
436 // // Boundary value for the radial part of the shift: parabolic driver for (b-N)
437  // Scalar bound = lapse ;
438  Scalar bb = 0.5*(*p_get_BC_bpN + *p_get_BC_bmN) ; // TO CHANGE: additional function?-> put choice-bb
439 
440 
441  // Tangent part of the shift, with parabolic driver
442 
443 
444  Vector V_par = shift - bb*sss;
445  Sym_tensor q_upup = gamij.con() - sss*sss;
446 
447 
448  // Calculation of the conformal 2d laplacian of V
449  Tensor q_updown = q_upup.down(1, gamij);
450  Tensor dd_V = V_par.derive_con(gamij);
451  dd_V = contract(q_updown, 1, contract(q_updown,1 ,dd_V, 0), 1);
452  Vector lap_V = contract(q_updown, 1, contract(dd_V.derive_cov(gamij),1,2), 0);
453 
454  // 3d interpolation of the Ricci scalar on the surface.
455 
456  Scalar ricci2 = sph.get_ricci();
457 
458  // Start Mapping interpolation
459 
460  Scalar ricci3 (lapse.get_mp());
461 
462  ricci3.allocate_all();
463  ricci3.std_spectral_base();
464 
465  int nz = (*lapse.get_mp().get_mg()).get_nzone();
466  int nr = (*lapse.get_mp().get_mg()).get_nr(1);
467  int nt = (*lapse.get_mp().get_mg()).get_nt(1);
468  int np = (*lapse.get_mp().get_mg()).get_np(1);
469 
470 
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++) {
475 
476  ricci3.set_grid_point(f,k,j,l) = ricci2.val_grid_point(0,k,j,0);
477 
478 
479  }
480  }
481  if (nz >2){
482  ricci3.annule_domain(0);
483  ricci3.annule_domain(nz - 1);
484 
485  }
486  // End Mapping interpolation
487 
488  // Construction of the Ricci COV tensor on the sphere
489 
490  Sym_tensor ricci_t = gamij.cov() - sss_down*sss_down;
491  ricci_t = 0.5*ricci3*ricci_t;
492  ricci_t.std_spectral_base();
493 
494  Tensor ricci_t_updown = contract(q_upup,0, ricci_t,0);
495 
496  // Calculation of ff
497 
498  Vector ffV = c_V_lap*lapse*(lap_V + contract(ricci_t_updown,1, V_par,0));
499  ffV.std_spectral_base();
500 
501 
502  // Definition of k_1
503  Vector k_1V =delta_t*ffV;
504 
505  // Intermediate value of Npsi, for Runge-Kutta 2nd order scheme
506  if (nz >2){
507  k_1V.annule_domain(nz-1);
508  } // Patch to avoid dzpuis problems if existent.
509  Vector V_par_int = V_par + k_1V;// V_par_int.std_spectral_base();
510 
511  // Recalculation of ff with intermediate values.
512 
513  Sym_tensor dd_V_int = V_par_int.derive_con(gamij);
514  dd_V_int = contract(q_updown, 1, contract(q_updown,1 ,dd_V_int, 0), 1);
515  Vector lap_V_int = contract(q_updown, 1, contract(dd_V_int.derive_cov(gamij),1,2), 0);
516 
517  Vector ffV_int = c_V_lap*lapse*(lap_V_int + contract(ricci_t_updown,1, V_par_int,0));
518 
519  // Definition of k_2
520  Vector k_2V = delta_t*ffV_int;
521  // k_2.std_spectral_base();
522 
523  // Result of RK2 evolution
524  if (nz >2){
525  k_2V.annule_domain(nz-1);
526  }
527  Vector bound_V = V_par + k_2V;
528  // bound_V.std_spectral_base();
529 
530  // Construction of the total shift boundary condition
531  Vector bound_shift = bb*sss + bound_V;
532  bound_shift.std_spectral_base();
533  p_get_BC_shift = new Vector(bound_shift);
534 }
535  return *p_get_BC_shift ;
536 }
537 
538 
539 
540  void Excision_hor::sauve(FILE* ) const {
541 
542  cout << "c'est pas fait!" << endl ;
543  return ;
544 
545  }
546 }
virtual void sauve(FILE *) const
Save in a file.
Definition: excision_hor.C:540
const Scalar & get_BC_conf_fact() const
Source of Neumann BC on , derived from the vanishing expansion.
Definition: excision_hor.C:120
void annule_domain(int l)
Sets the Tensor to zero in a given domain.
Definition: tensor.C:675
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.
Definition: excision_hor.C:46
Metric for tensor calculation.
Definition: metric.h:90
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Definition: metric.C:293
const Scalar & sqrt_q() const
Computes the normal vector field to the 2-surface.
Definition: spheroid.C:696
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition: excision_hor.C:103
const Scalar & lapang() const
Returns the angular Laplacian of *this , where .
Definition: scalar_deriv.C:461
virtual void del_deriv() const
Deletes all the derived quantities.
Definition: excision_hor.C:94
Lorene prototypes.
Definition: app_hor.h:67
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.
Definition: valeur_ylm.C:141
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Definition: map.h:777
Flat metric for tensor calculation.
Definition: metric.h:261
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:393
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...
Definition: excision_hor.h:83
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...
Definition: metric.C:365
const Sym_tensor & shear() const
Computes the shear of the 2-surface .
Definition: spheroid.C:928
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
Definition: scalar.C:790
virtual void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
Definition: scalar.C:371
Vector shift
The Shift 3-vector on the slice.
Definition: excision_hor.h:59
Tensor field of valence 1.
Definition: vector.h:188
Scalar poisson_angu(double lambda=0) const
Solves the (generalized) angular Poisson equation with *this as source.
Definition: scalar_pde.C:203
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.
Definition: scalar.h:643
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
Definition: vector.C:322
Scalar * p_get_BC_bmN
Source of Dirichlet BC for (b-N).
Definition: excision_hor.h:81
Surface where boundary conditions for quantities in the bulk will be calculated It relies on geometri...
Definition: excision_hor.h:43
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Definition: metric_flat.C:156
Tensor derive_cov2dflat(const Tensor &uu) const
Computes the round covariant derivative on the spheroid.
Definition: spheroid.C:957
Tensor derive_cov2d(const Tensor &uu) const
Computes the total covariant derivative on the spheroid.
Definition: spheroid.C:1243
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Definition: cmp_math.C:438
const Scalar & divergence(const Metric &) const
The divergence of this with respect to a Metric .
Definition: vector.C:387
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...
Definition: excision_hor.C:429
const Scalar & get_ricci() const
Returns the 2-ricci scalar .
Definition: spheroid.h:229
Cmp pow(const Cmp &, int)
Power .
Definition: cmp_math.C:351
Tensor handling.
Definition: tensor.h:294
Metric gamij
The 3-d metric on the slice.
Definition: excision_hor.h:62
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 .
Definition: tensor.C:1011
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...
Definition: excision_hor.C:306
Scalar * p_get_BC_conf_fact
Source of Neumann BC on , derived from the vanishing expansion.
Definition: excision_hor.h:80
Spheroid sph
The associated Spheroid object.
Definition: excision_hor.h:50
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
Definition: metric.C:283
const Tensor & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of this with respect to some metric , by raising the last inde...
Definition: tensor.C:1023
virtual ~Excision_hor()
Destructor.
Definition: excision_hor.C:86
const Scalar & theta_minus() const
Computes the ingoing null expansion .
Definition: spheroid.C:912
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
Definition: tensor.C:663
Scalar * p_get_BC_bpN
Arbitrary source of Dirichlet BC for (b+N), case 0: based on a parabolic driver towards a constant va...
Definition: excision_hor.h:82
const Vector & get_ll() const
Returns the vector .
Definition: spheroid.h:247
const Metric & get_qab() const
Returns the metric .
Definition: spheroid.h:226
Sym_tensor Kij
The 3-d extrinsic curvature on the slice.
Definition: excision_hor.h:65
Sym_tensor Tij
Value of the impulsion-energy tensor on the spheroid.
Definition: excision_hor.h:74
const Scalar & dsdr() const
Returns of *this .
Definition: scalar_deriv.C:113
Scalar lapse
The lapse defined on the 3 slice.
Definition: excision_hor.h:56
double delta_t
The time step for evolution in parabolic drivers.
Definition: excision_hor.h:68
Valeur & set_spectral_va()
Returns va (read/write version)
Definition: scalar.h:610
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this
Definition: scalar_deriv.C:390
const Map & get_mp() const
Returns the mapping.
Definition: tensor.h:874
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 ...
Definition: excision_hor.C:147
Scalar conf_fact
The value of the conformal factor on the 3-slice.
Definition: excision_hor.h:53
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
Definition: tensor.C:935
const Metric_flat & flat_met_spher() const
Returns the flat metric associated with the spherical coordinates and with components expressed in th...
Definition: map.C:324
Class intended to describe valence-2 symmetric tensors.
Definition: sym_tensor.h:226
const Scalar & get_hsurf() const
Returns the field h_surf.
Definition: spheroid.h:223
Tensor trace(int ind1, int ind2) const
Trace on two different type indices.
const Tensor & delta() const
Computes the delta coefficients for covariant derivative.
Definition: spheroid.C:1206
Tensor down(int ind, const Metric &gam) const
Computes a new tensor by lowering an index of *this.