Peano
benchmarks::exahype2::ccz4::CCZ4 Class Reference

#include <CCZ4.h>

Inheritance diagram for benchmarks::exahype2::ccz4::CCZ4:
Collaboration diagram for benchmarks::exahype2::ccz4::CCZ4:

Public Member Functions

 CCZ4 ()
 
::exahype2::RefinementCommand refinementCriterion (const double *NOALIAS Q, const tarch::la::Vector< DIMENSIONS, double > &volumeCentre, const tarch::la::Vector< DIMENSIONS, double > &volumeH, double t) override
 Refinement criterion. More...
 
void prepare (TP::TwoPunctures *tp)
 
void initialCondition (double *NOALIAS Q, const tarch::la::Vector< DIMENSIONS, double > &volumeCentre, const tarch::la::Vector< DIMENSIONS, double > &volumeH, bool gridIsConstructed) override
 
virtual void boundaryConditions (const double *NOALIAS Qinside, double *NOALIAS Qoutside, const tarch::la::Vector< DIMENSIONS, double > &faceCentre, const tarch::la::Vector< DIMENSIONS, double > &volumeH, double t, int normal) override
 
void sourceTerm (const double *NOALIAS Q, const tarch::la::Vector< DIMENSIONS, double > &volumeCentre, const tarch::la::Vector< DIMENSIONS, double > &volumeH, double t, double dt, double *NOALIAS S) override
 
virtual double maxEigenvalue (const double *NOALIAS Q, const tarch::la::Vector< DIMENSIONS, double > &faceCentre, const tarch::la::Vector< DIMENSIONS, double > &volumeH, double t, double dt, int normal) override
 Determine max eigenvalue over Jacobian in a given point with solution values (states) Q. More...
 
virtual void nonconservativeProduct (const double *NOALIAS Q, const double *NOALIAS deltaQ, const tarch::la::Vector< DIMENSIONS, double > &faceCentre, const tarch::la::Vector< DIMENSIONS, double > &volumeH, double t, double dt, int normal, double *NOALIAS BgradQ) override
 

Static Public Member Functions

static GPU_CALLABLE_METHOD void sourceTerm (const double *NOALIAS Q, const tarch::la::Vector< DIMENSIONS, double > &volumeCentre, const tarch::la::Vector< DIMENSIONS, double > &volumeH, double t, double dt, double *NOALIAS S, ::exahype2::Solver::Offloadable)
 To obtain the best performance, I recommend to man inline command to this signature and to copy the implementation into the header. More...
 
static GPU_CALLABLE_METHOD double maxEigenvalue (const double *NOALIAS Q, const tarch::la::Vector< DIMENSIONS, double > &faceCentre, const tarch::la::Vector< DIMENSIONS, double > &volumeH, double t, double dt, int normal, ::exahype2::Solver::Offloadable)
 To obtain the best performance, I recommend to man inline command to this signature and to copy the implementation into the header. More...
 
static GPU_CALLABLE_METHOD void nonconservativeProduct (const double *NOALIAS Q, const double *NOALIAS deltaQ, const tarch::la::Vector< DIMENSIONS, double > &faceCentre, const tarch::la::Vector< DIMENSIONS, double > &volumeH, double t, double dt, int normal, double *NOALIAS BgradQ, ::exahype2::Solver::Offloadable)
 To obtain the best performance, I recommend to man inline command to this signature and to copy the implementation into the header. More...
 

Static Private Attributes

static tarch::logging::Log _log
 

Detailed Description

Definition at line 30 of file CCZ4.h.

Constructor & Destructor Documentation

◆ CCZ4()

benchmarks::exahype2::ccz4::CCZ4::CCZ4 ( )

Definition at line 114 of file CCZ4.cpp.

References _tp, and convergence-study::name.

Member Function Documentation

◆ boundaryConditions()

void benchmarks::exahype2::ccz4::CCZ4::boundaryConditions ( const double *NOALIAS  Qinside,
double *NOALIAS  Qoutside,
const tarch::la::Vector< DIMENSIONS, double > &  faceCentre,
const tarch::la::Vector< DIMENSIONS, double > &  volumeH,
double  t,
int  normal 
)
overridevirtual

Definition at line 56 of file CCZ4.cpp.

References acoustic::t.

◆ initialCondition()

void benchmarks::exahype2::ccz4::CCZ4::initialCondition ( double *NOALIAS  Q,
const tarch::la::Vector< DIMENSIONS, double > &  volumeCentre,
const tarch::la::Vector< DIMENSIONS, double > &  volumeH,
bool  gridIsConstructed 
)
override

< Amplitude of the wave

Definition at line 17 of file CCZ4.cpp.

References CSVConvert::pi.

◆ maxEigenvalue() [1/2]

double benchmarks::exahype2::ccz4::CCZ4::maxEigenvalue ( const double *NOALIAS  Q,
const tarch::la::Vector< DIMENSIONS, double > &  faceCentre,
const tarch::la::Vector< DIMENSIONS, double > &  volumeH,
double  t,
double  dt,
int  normal 
)
overridevirtual

Determine max eigenvalue over Jacobian in a given point with solution values (states) Q.

All parameters are in.

Returns
Max eigenvalue. Result has to be positive, so we are actually speaking about the maximum absolute eigenvalue.

Definition at line 250 of file CCZ4.cpp.

References CSVConvert::dt, applications::exahype2::ccz4::maxEigenvalue(), and acoustic::t.

Here is the call graph for this function:

◆ maxEigenvalue() [2/2]

static GPU_CALLABLE_METHOD double benchmarks::exahype2::ccz4::CCZ4::maxEigenvalue ( const double *NOALIAS  Q,
const tarch::la::Vector< DIMENSIONS, double > &  faceCentre,
const tarch::la::Vector< DIMENSIONS, double > &  volumeH,
double  t,
double  dt,
int  normal,
::exahype2::Solver::Offloadable   
)
static

To obtain the best performance, I recommend to man inline command to this signature and to copy the implementation into the header.

So it would read

static inline double maxEigenvalue( ... ) { code here }

The GPU offloading requires static functions. As we cannot overload the original (virtual) function with a static alternative, we do the TBB trick and overload by adding an additional enum. It has no semantics but helps the compiler to distinguish the different function variants.

Definition at line 206 of file CCZ4.h.

References TP::min(), and CSVConvert::tem.

Here is the call graph for this function:

◆ nonconservativeProduct() [1/2]

void benchmarks::exahype2::ccz4::CCZ4::nonconservativeProduct ( const double *NOALIAS  Q,
const double *NOALIAS  deltaQ,
const tarch::la::Vector< DIMENSIONS, double > &  faceCentre,
const tarch::la::Vector< DIMENSIONS, double > &  volumeH,
double  t,
double  dt,
int  normal,
double *NOALIAS  BgradQ 
)
overridevirtual

Definition at line 263 of file CCZ4.cpp.

References CSVConvert::dt, and acoustic::t.

◆ nonconservativeProduct() [2/2]

static GPU_CALLABLE_METHOD void benchmarks::exahype2::ccz4::CCZ4::nonconservativeProduct ( const double *NOALIAS  Q,
const double *NOALIAS  deltaQ,
const tarch::la::Vector< DIMENSIONS, double > &  faceCentre,
const tarch::la::Vector< DIMENSIONS, double > &  volumeH,
double  t,
double  dt,
int  normal,
double *NOALIAS  BgradQ,
::exahype2::Solver::Offloadable   
)
static

To obtain the best performance, I recommend to man inline command to this signature and to copy the implementation into the header.

So it would read

static inline void nonconservativeProduct( ... ) { code here }

The GPU offloading requires static functions. As we cannot overload the original (virtual) function with a static alternative, we do the TBB trick and overload by adding an additional enum. It has no semantics but helps the compiler to distinguish the different function variants.

◆ prepare()

◆ refinementCriterion()

exahype2::RefinementCommand benchmarks::exahype2::ccz4::CCZ4::refinementCriterion ( const double *NOALIAS  Q,
const tarch::la::Vector< DIMENSIONS, double > &  volumeCentre,
const tarch::la::Vector< DIMENSIONS, double > &  volumeH,
double  t 
)
override

Refinement criterion.

Single black hole, low refinement (CCZ4ReSwi==2)

Single black hole (CCZ4ReSwi==6)

Single black hole setup with two refinement levels such that the finest volume is the same size as it is in the regular grid tests. We use two level of refinement which arrange around the area of interest. Within the innermost radius of 3.5, we enforce a mesh size of 0.04, while we have a compute cell size of at least 0.15 within the radius of 5. For everything futher away than 5 from the centre, we stick to the maximum mesh size.

We use the setup with

    python3 ccz4.py -impl fd4-rk1-adaptive -s two-punctures -maxh 0.4 -minh 0.04 -ps 6 -plt 0.5 -et 0.5 -exn test --domain_r 9.0 --ReSwi 7 -cfl 0.1 -outdir ./ --KOSigma 8.0

in standard benchmarks.

Alternative settings would have been

   double Radius[NumberOfRefinementLayers] = {5.0, 3.0};
   double MaxH[NumberOfRefinementLayers]   = {0.3, 0.15};
Parameters
QThis is the (current) solution. The data is not set to a valid value throughout grid construction. That is: If t equals 0.0, you cannot assume that Q is properly initialised. Therefore, Q usually is only evaluated by dynamic AMR codes which make the solution follow

Definition at line 70 of file CCZ4.cpp.

◆ sourceTerm() [1/2]

void benchmarks::exahype2::ccz4::CCZ4::sourceTerm ( const double *NOALIAS  Q,
const tarch::la::Vector< DIMENSIONS, double > &  volumeCentre,
const tarch::la::Vector< DIMENSIONS, double > &  volumeH,
double  t,
double  dt,
double *NOALIAS  S 
)
override

Definition at line 180 of file CCZ4.cpp.

References CSVConvert::dt, and acoustic::t.

◆ sourceTerm() [2/2]

static GPU_CALLABLE_METHOD void benchmarks::exahype2::ccz4::CCZ4::sourceTerm ( const double *NOALIAS  Q,
const tarch::la::Vector< DIMENSIONS, double > &  volumeCentre,
const tarch::la::Vector< DIMENSIONS, double > &  volumeH,
double  t,
double  dt,
double *NOALIAS  S,
::exahype2::Solver::Offloadable   
)
static

To obtain the best performance, I recommend to man inline command to this signature and to copy the implementation into the header.

So it would read

static inline void sourceTerm( ... ) { code here }

The GPU offloading requires static functions. As we cannot overload the original (virtual) function with a static alternative, we do the TBB trick and overload by adding an additional enum. It has no semantics but helps the compiler to distinguish the different function variants.

Definition at line 170 of file CCZ4.h.

References applications::exahype2::ccz4::source().

Here is the call graph for this function:

Field Documentation

◆ _log

tarch::logging::Log benchmarks::exahype2::ccz4::CCZ4::_log
staticprivate

Definition at line 32 of file CCZ4.h.


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