Peano
TP::TwoPunctures Class Reference

#include <TwoPunctures.h>

Inheritance diagram for TP::TwoPunctures:
Collaboration diagram for TP::TwoPunctures:

Public Member Functions

double *_d0contig __attribute__ ((aligned(32)))
 
double *_d0contig_low __attribute__ ((aligned(32)))
 
 TwoPunctures ()
 
void set_initial_guess (derivs v)
 
double TestSolution (double A, double B, double X, double R, double phi)
 
void TestVector_w (double *par, int nvar, int n1, int n2, int n3, double *w)
 
void Run ()
 
void Interpolate (const double *const pos, double *Q, bool low_res=false)
 Interpolation function for an external caller. More...
 
int Index (int ivar, int i, int j, int k, int nvar, int n1, int n2, int n3)
 
void allocate_derivs (derivs *v, int n)
 
void free_derivs (derivs *v, int n)
 
void Derivatives_AB3 (int nvar, int n1, int n2, int n3, derivs v)
 
void F_of_v (int nvar, int n1, int n2, int n3, derivs v, double *F, derivs u)
 
void J_times_dv (int nvar, int n1, int n2, int n3, derivs dv, double *Jdv, derivs u)
 
void JFD_times_dv (int i, int j, int k, int nvar, int n1, int n2, int n3, derivs dv, derivs u, double *values)
 
void SetMatrix_JFD (int nvar, int n1, int n2, int n3, derivs u, int *ncols, int **cols, double **Matrix)
 
double PunctEvalAtArbitPosition (double *v, int ivar, double A, double B, double phi, int nvar, int n1, int n2, int n3)
 
void calculate_derivs (int i, int j, int k, int ivar, int nvar, int n1, int n2, int n3, derivs v, derivs vv)
 
double interpol (double a, double b, double c, derivs v)
 
double PunctTaylorExpandAtArbitPosition (int ivar, int nvar, int n1, int n2, int n3, derivs v, double x, double y, double z)
 
double PunctIntPolAtArbitPosition (int ivar, int nvar, int n1, int n2, int n3, derivs v, double x, double y, double z)
 
void SpecCoef (int n1, int n2, int n3, int ivar, double *v, double *cf)
 
double PunctEvalAtArbitPositionFast (double *v, int ivar, double A, double B, double phi, int nvar, int n1, int n2, int n3)
 Fast Spectral Interpolation Routine Stuff. More...
 
double PunctEvalAtArbitPositionFaster (double A, double B, double phi)
 
double PunctEvalAtArbitPositionFasterLowRes (double A, double B, double phi)
 
double PunctIntPolAtArbitPositionFast (derivs v, double x, double y, double z, bool low_res=false)
 
void AB_To_XR (int nvar, double A, double B, double *X, double *R, derivs U)
 
void C_To_c (int nvar, double X, double R, double *x, double *r, derivs U)
 
void rx3_To_xyz (int nvar, double x, double r, double phi, double *y, double *z, derivs U)
 
double BY_KKofxyz (double x, double y, double z)
 
void BY_Aijofxyz (double x, double y, double z, double Aij[3][3])
 
void NonLinEquations (double rho_adm, double A, double B, double X, double R, double x, double r, double phi, double y, double z, derivs U, double *values)
 
void LinEquations (double A, double B, double X, double R, double x, double r, double phi, double y, double z, derivs dU, derivs U, double *values)
 
void TestRelax (int nvar, int n1, int n2, int n3, derivs v, double *dv)
 
void Newton (int nvar, int n1, int n2, int n3, derivs v, double tol, int itmax)
 
int bicgstab (int const nvar, int const n1, int const n2, int const n3, derivs v, derivs dv, int const output, int const itmax, double const tol, double *TP_RESTRICT const normres)
 
double norm_inf (double const *TP_RESTRICT const F, int const ntotal)
 
void relax (double *TP_RESTRICT const dv, int const nvar, int const n1, int const n2, int const n3, double const *TP_RESTRICT const rhs, int const *TP_RESTRICT const ncols, int const *TP_RESTRICT const *TP_RESTRICT const cols, double const *TP_RESTRICT const *TP_RESTRICT const JFD)
 
void resid (double *TP_RESTRICT const res, int const ntotal, double const *TP_RESTRICT const dv, double const *TP_RESTRICT const rhs, int const *TP_RESTRICT const ncols, int const *TP_RESTRICT const *TP_RESTRICT const cols, double const *TP_RESTRICT const *TP_RESTRICT const JFD)
 
void LineRelax_al (double *TP_RESTRICT const dv, int const j, int const k, int const nvar, int const n1, int const n2, int const n3, double const *TP_RESTRICT const rhs, int const *TP_RESTRICT const ncols, int const *TP_RESTRICT const *TP_RESTRICT const cols, double const *TP_RESTRICT const *TP_RESTRICT const JFD)
 
void LineRelax_be (double *TP_RESTRICT const dv, int const i, int const k, int const nvar, int const n1, int const n2, int const n3, double const *TP_RESTRICT const rhs, int const *TP_RESTRICT const ncols, int const *TP_RESTRICT const *TP_RESTRICT const cols, double const *TP_RESTRICT const *TP_RESTRICT const JFD)
 
- Public Member Functions inherited from TP::Parameters
 Parameters ()
 
void PrintParameters ()
 
- Public Member Functions inherited from TP::LoggingAdapter
void TP_LOG (const char *fmt,...)
 
void TP_ERROR (const char *fmt,...)
 
void TP_INFO (const char *fmt,...)
 
void TP_WARN (const char *fmt,...)
 
 LoggingAdapter ()
 

Data Fields

GRID_SETUP_METHOD gsm
 
int nvar
 
int n1
 
int n2
 
int n3
 
int _n1_low
 
int _n2_low
 
int _n3_low
 
derivs u
 
derivs v
 
derivs cf_v
 
int antisymmetric_lapse
 
int averaged_lapse
 
int pmn_lapse
 
int brownsville_lapse
 
bool runned
 an internal check More...
 
- Data Fields inherited from TP::Parameters
bool verbose
 
bool keep_u_around
 
bool give_bare_mass
 
double adm_tol
 
std::string grid_setup_method
 
std::string initial_lapse
 
double Newton_tol
 
int Newton_maxit
 
double TP_epsilon
 
double TP_Tiny
 
double TP_Extend_Radius
 
double par_b
 
double par_bv
 
double par_m_plus
 
double par_m_minus
 
double target_M_plus
 
double target_M_minus
 
double par_P_plus [3]
 
double par_P_minus [3]
 
double par_S_plus [3]
 
double par_S_minus [3]
 
double center_offset [3]
 
double initial_lapse_psi_exponent
 
bool swap_xz
 
bool use_sources
 
bool rescale_sources
 
bool use_external_initial_guess
 
bool do_residuum_debug_output
 
bool do_initial_debug_output
 
bool multiply_old_lapse
 
bool schedule_in_ADMBase_InitialData
 
bool solve_momentum_constraint
 
std::string metric_type
 
std::string conformal_storage
 
int conformal_state
 
double J1
 
double J2
 
double J3
 
double mp
 
double mm
 
double mp_adm
 
double mm_adm
 
- Data Fields inherited from TP::LoggingAdapter
loggerlog
 

Additional Inherited Members

- Static Public Attributes inherited from TP::Parameters
static constexpr int npoints_A = 30
 
static constexpr int npoints_B = 30
 
static constexpr int npoints_phi = 16
 
static constexpr int npoints_A_low = 3
 
static constexpr int npoints_B_low = 3
 
static constexpr int npoints_phi_low = 4
 

Detailed Description

Definition at line 47 of file TwoPunctures.h.

Constructor & Destructor Documentation

◆ TwoPunctures()

TP::TwoPunctures::TwoPunctures ( )

Definition at line 65 of file TwoPunctures.h.

References n1, n2, n3, nvar, and runned.

Member Function Documentation

◆ __attribute__() [1/2]

double* _d0contig TP::TwoPunctures::__attribute__ ( (aligned(32))  )

◆ __attribute__() [2/2]

double* _d0contig_low TP::TwoPunctures::__attribute__ ( (aligned(32))  )

◆ AB_To_XR()

void TP::TwoPunctures::AB_To_XR ( int  nvar,
double  A,
double  B,
double *  X,
double *  R,
derivs  U 
)

◆ allocate_derivs()

void TP::TwoPunctures::allocate_derivs ( derivs v,
int  n 
)

Definition at line 52 of file FuncAndJacobian.cpp.

References TP::Utilities::dvector().

Here is the call graph for this function:

◆ bicgstab()

int TP::TwoPunctures::bicgstab ( int const  nvar,
int const  n1,
int const  n2,
int const  n3,
derivs  v,
derivs  dv,
int const  output,
int const  itmax,
double const  tol,
double *TP_RESTRICT const  normres 
)

◆ BY_Aijofxyz()

void TP::TwoPunctures::BY_Aijofxyz ( double  x,
double  y,
double  z,
double  Aij[3][3] 
)

Definition at line 83 of file Equations.cpp.

References euler::j, ModeCalc::x, and csv_to_plot::y.

◆ BY_KKofxyz()

double TP::TwoPunctures::BY_KKofxyz ( double  x,
double  y,
double  z 
)

Definition at line 25 of file Equations.cpp.

References euler::j, ModeCalc::x, and csv_to_plot::y.

◆ C_To_c()

void TP::TwoPunctures::C_To_c ( int  nvar,
double  X,
double  R,
double *  x,
double *  r,
derivs  U 
)

◆ calculate_derivs()

void TP::TwoPunctures::calculate_derivs ( int  i,
int  j,
int  k,
int  ivar,
int  nvar,
int  n1,
int  n2,
int  n3,
derivs  v,
derivs  vv 
)

◆ Derivatives_AB3()

◆ F_of_v()

void TP::TwoPunctures::F_of_v ( int  nvar,
int  n1,
int  n2,
int  n3,
derivs  v,
double *  F,
derivs  u 
)

◆ free_derivs()

void TP::TwoPunctures::free_derivs ( derivs v,
int  n 
)

Definition at line 69 of file FuncAndJacobian.cpp.

References TP::Utilities::free_dvector().

Here is the call graph for this function:

◆ Index()

int TP::TwoPunctures::Index ( int  ivar,
int  i,
int  j,
int  k,
int  nvar,
int  n1,
int  n2,
int  n3 
)

Definition at line 28 of file FuncAndJacobian.cpp.

References euler::j.

◆ interpol()

double TP::TwoPunctures::interpol ( double  a,
double  b,
double  c,
derivs  v 
)

Definition at line 751 of file FuncAndJacobian.cpp.

References swe::b, acoustic::c, and acoustic::v.

◆ Interpolate()

void TP::TwoPunctures::Interpolate ( const double *const  pos,
double *  Q,
bool  low_res = false 
)

Interpolation function for an external caller.

psi[ind] = static_psi;

psix[ind] = px / static_psi; psiy[ind] = py / static_psi; psiz[ind] = pz / static_psi;

psixx[ind] = pxx / static_psi; psixy[ind] = pxy / static_psi; psixz[ind] = pxz / static_psi; psiyy[ind] = pyy / static_psi; psiyz[ind] = pyz / static_psi; psizz[ind] = pzz / static_psi;

puncture_u[ind] = U; /// @TODO: Also no storage for this

SWAP (psix[ind], psiz[ind]);

SWAP (psixx[ind], psizz[ind]); SWAP (psixy[ind], psiyz[ind]);

Definition at line 421 of file TwoPunctures.cpp.

References TP::Utilities::free_dvector(), TP::Z4VectorShortcuts::g11, TP::Z4VectorShortcuts::g12, TP::Z4VectorShortcuts::g13, TP::Z4VectorShortcuts::g22, TP::Z4VectorShortcuts::g23, TP::Z4VectorShortcuts::g33, TP::GSM_evaluation, TP::GSM_Taylor_expansion, TP::Z4VectorShortcuts::K11, TP::Z4VectorShortcuts::K12, TP::Z4VectorShortcuts::K13, TP::Z4VectorShortcuts::K22, TP::Z4VectorShortcuts::K23, TP::Z4VectorShortcuts::K33, TP::Z4VectorShortcuts::lapse, acoustic::p, TP::Z4VectorShortcuts::Qlen, euler::u, acoustic::v, ModeCalc::x, and csv_to_plot::y.

Referenced by applications::exahype2::ccz4::ApplyTwoPunctures(), and TP_bindding::GradientCal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ J_times_dv()

void TP::TwoPunctures::J_times_dv ( int  nvar,
int  n1,
int  n2,
int  n3,
derivs  dv,
double *  Jdv,
derivs  u 
)

◆ JFD_times_dv()

void TP::TwoPunctures::JFD_times_dv ( int  i,
int  j,
int  k,
int  nvar,
int  n1,
int  n2,
int  n3,
derivs  dv,
derivs  u,
double *  values 
)

◆ LinEquations()

void TP::TwoPunctures::LinEquations ( double  A,
double  B,
double  X,
double  R,
double  x,
double  r,
double  phi,
double  y,
double  z,
derivs  dU,
derivs  U,
double *  values 
)

◆ LineRelax_al()

void TP::TwoPunctures::LineRelax_al ( double *TP_RESTRICT const  dv,
int const  j,
int const  k,
int const  nvar,
int const  n1,
int const  n2,
int const  n3,
double const *TP_RESTRICT const  rhs,
int const *TP_RESTRICT const  ncols,
int const *TP_RESTRICT const *TP_RESTRICT const  cols,
double const *TP_RESTRICT const *TP_RESTRICT const  JFD 
)

Definition at line 57 of file Newton.cpp.

References swe::b, fuseADERSolvers::f, euler::j, and ModeCalc::x.

◆ LineRelax_be()

void TP::TwoPunctures::LineRelax_be ( double *TP_RESTRICT const  dv,
int const  i,
int const  k,
int const  nvar,
int const  n1,
int const  n2,
int const  n3,
double const *TP_RESTRICT const  rhs,
int const *TP_RESTRICT const  ncols,
int const *TP_RESTRICT const *TP_RESTRICT const  cols,
double const *TP_RESTRICT const *TP_RESTRICT const  JFD 
)

Definition at line 117 of file Newton.cpp.

References swe::b, fuseADERSolvers::f, euler::j, and ModeCalc::x.

◆ Newton()

void TP::TwoPunctures::Newton ( int  nvar,
int  n1,
int  n2,
int  n3,
derivs  v,
double  tol,
int  itmax 
)

Definition at line 452 of file Newton.cpp.

References TP::DERIVS::d0, TP::Utilities::dvector(), TP::Utilities::free_dvector(), euler::j, euler::u, and acoustic::v.

Here is the call graph for this function:

◆ NonLinEquations()

void TP::TwoPunctures::NonLinEquations ( double  rho_adm,
double  A,
double  B,
double  X,
double  R,
double  x,
double  r,
double  phi,
double  y,
double  z,
derivs  U,
double *  values 
)

◆ norm_inf()

double TP::TwoPunctures::norm_inf ( double const *TP_RESTRICT const  F,
int const  ntotal 
)

Definition at line 22 of file Newton.cpp.

References euler::j.

◆ PunctEvalAtArbitPosition()

double TP::TwoPunctures::PunctEvalAtArbitPosition ( double *  v,
int  ivar,
double  A,
double  B,
double  phi,
int  nvar,
int  n1,
int  n2,
int  n3 
)

◆ PunctEvalAtArbitPositionFast()

double TP::TwoPunctures::PunctEvalAtArbitPositionFast ( double *  v,
int  ivar,
double  A,
double  B,
double  phi,
int  nvar,
int  n1,
int  n2,
int  n3 
)

◆ PunctEvalAtArbitPositionFaster()

double TP::TwoPunctures::PunctEvalAtArbitPositionFaster ( double  A,
double  B,
double  phi 
)

Definition at line 921 of file FuncAndJacobian.cpp.

References TP::chebev_wrec(), TP::Utilities::fourev(), euler::j, acoustic::p, and TP::recurrence().

Here is the call graph for this function:

◆ PunctEvalAtArbitPositionFasterLowRes()

double TP::TwoPunctures::PunctEvalAtArbitPositionFasterLowRes ( double  A,
double  B,
double  phi 
)

Definition at line 966 of file FuncAndJacobian.cpp.

References TP::chebev_wrec(), TP::Utilities::fourev(), euler::j, acoustic::p, and TP::recurrence().

Here is the call graph for this function:

◆ PunctIntPolAtArbitPosition()

double TP::TwoPunctures::PunctIntPolAtArbitPosition ( int  ivar,
int  nvar,
int  n1,
int  n2,
int  n3,
derivs  v,
double  x,
double  y,
double  z 
)

Definition at line 813 of file FuncAndJacobian.cpp.

References TP::min(), acoustic::v, ModeCalc::x, TestEllipsoidProjection::X, csv_to_plot::y, and ModeCalc::zs.

Here is the call graph for this function:

◆ PunctIntPolAtArbitPositionFast()

double TP::TwoPunctures::PunctIntPolAtArbitPositionFast ( derivs  v,
double  x,
double  y,
double  z,
bool  low_res = false 
)

Definition at line 1027 of file FuncAndJacobian.cpp.

References TP::min(), ModeCalc::x, TestEllipsoidProjection::X, csv_to_plot::y, and ModeCalc::zs.

Here is the call graph for this function:

◆ PunctTaylorExpandAtArbitPosition()

double TP::TwoPunctures::PunctTaylorExpandAtArbitPosition ( int  ivar,
int  nvar,
int  n1,
int  n2,
int  n3,
derivs  v,
double  x,
double  y,
double  z 
)

Definition at line 762 of file FuncAndJacobian.cpp.

References swe::b, acoustic::c, euler::j, TP::min(), acoustic::v, ModeCalc::x, TestEllipsoidProjection::X, csv_to_plot::y, and ModeCalc::zs.

Here is the call graph for this function:

◆ relax()

void TP::TwoPunctures::relax ( double *TP_RESTRICT const  dv,
int const  nvar,
int const  n1,
int const  n2,
int const  n3,
double const *TP_RESTRICT const  rhs,
int const *TP_RESTRICT const  ncols,
int const *TP_RESTRICT const *TP_RESTRICT const  cols,
double const *TP_RESTRICT const *TP_RESTRICT const  JFD 
)

Definition at line 176 of file Newton.cpp.

References euler::j, and TP::N_PlaneRelax.

◆ resid()

void TP::TwoPunctures::resid ( double *TP_RESTRICT const  res,
int const  ntotal,
double const *TP_RESTRICT const  dv,
double const *TP_RESTRICT const  rhs,
int const *TP_RESTRICT const  ncols,
int const *TP_RESTRICT const *TP_RESTRICT const  cols,
double const *TP_RESTRICT const *TP_RESTRICT const  JFD 
)

Definition at line 38 of file Newton.cpp.

◆ Run()

void TP::TwoPunctures::Run ( )

Definition at line 189 of file TwoPunctures.cpp.

References TP::Utilities::dvector(), TP::GSM_evaluation, TP::GSM_Taylor_expansion, euler::j, euler::u, and acoustic::v.

Referenced by applications::exahype2::ccz4::CCZ4::prepare(), benchmarks::exahype2::ccz4::CCZ4::prepare(), and benchmarks::exahype2::ccz4::prepareTwoPunctures().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rx3_To_xyz()

void TP::TwoPunctures::rx3_To_xyz ( int  nvar,
double  x,
double  r,
double  phi,
double *  y,
double *  z,
derivs  U 
)

◆ set_initial_guess()

void TP::TwoPunctures::set_initial_guess ( derivs  v)

◆ SetMatrix_JFD()

void TP::TwoPunctures::SetMatrix_JFD ( int  nvar,
int  n1,
int  n2,
int  n3,
derivs  u,
int *  ncols,
int **  cols,
double **  Matrix 
)

◆ SpecCoef()

void TP::TwoPunctures::SpecCoef ( int  n1,
int  n2,
int  n3,
int  ivar,
double *  v,
double *  cf 
)

◆ TestRelax()

void TP::TwoPunctures::TestRelax ( int  nvar,
int  n1,
int  n2,
int  n3,
derivs  v,
double *  dv 
)

◆ TestSolution()

double TP::TwoPunctures::TestSolution ( double  A,
double  B,
double  X,
double  R,
double  phi 
)

◆ TestVector_w()

void TP::TwoPunctures::TestVector_w ( double *  par,
int  nvar,
int  n1,
int  n2,
int  n3,
double *  w 
)

Field Documentation

◆ _n1_low

int TP::TwoPunctures::_n1_low

Definition at line 56 of file TwoPunctures.h.

◆ _n2_low

int TP::TwoPunctures::_n2_low

Definition at line 56 of file TwoPunctures.h.

◆ _n3_low

int TP::TwoPunctures::_n3_low

Definition at line 56 of file TwoPunctures.h.

◆ antisymmetric_lapse

int TP::TwoPunctures::antisymmetric_lapse

Definition at line 58 of file TwoPunctures.h.

◆ averaged_lapse

int TP::TwoPunctures::averaged_lapse

Definition at line 58 of file TwoPunctures.h.

◆ brownsville_lapse

int TP::TwoPunctures::brownsville_lapse

Definition at line 58 of file TwoPunctures.h.

◆ cf_v

derivs TP::TwoPunctures::cf_v

Definition at line 57 of file TwoPunctures.h.

◆ gsm

GRID_SETUP_METHOD TP::TwoPunctures::gsm

Definition at line 54 of file TwoPunctures.h.

◆ n1

int TP::TwoPunctures::n1

Definition at line 55 of file TwoPunctures.h.

Referenced by TwoPunctures().

◆ n2

int TP::TwoPunctures::n2

Definition at line 55 of file TwoPunctures.h.

Referenced by TwoPunctures().

◆ n3

int TP::TwoPunctures::n3

Definition at line 55 of file TwoPunctures.h.

Referenced by TwoPunctures().

◆ nvar

int TP::TwoPunctures::nvar

Definition at line 55 of file TwoPunctures.h.

Referenced by TwoPunctures().

◆ pmn_lapse

int TP::TwoPunctures::pmn_lapse

Definition at line 58 of file TwoPunctures.h.

◆ runned

bool TP::TwoPunctures::runned

an internal check

Definition at line 61 of file TwoPunctures.h.

Referenced by TwoPunctures().

◆ u

derivs TP::TwoPunctures::u

Definition at line 57 of file TwoPunctures.h.

◆ v

derivs TP::TwoPunctures::v

Definition at line 57 of file TwoPunctures.h.


The documentation for this class was generated from the following files: