11#include "AbstractCCZ4.h"
37 const double * __restrict__ Q,
45 double * __restrict__ Q,
48 bool gridIsConstructed
55 const double * __restrict__ Qinside,
56 double * __restrict__ Qoutside,
68 const double * __restrict__ Q,
73 double * __restrict__ S
86 const double * __restrict__ Q,
96 const double * __restrict__ Q,
97 const double * __restrict__ deltaQ,
103 double * __restrict__ BgradQ
120 #if defined(GPUOffloadingOMP)
121 #pragma omp declare target
124 const double * __restrict__ Q,
129 double * __restrict__ S,
132 memset(S, 0, NumberOfUnknowns*
sizeof(
double));
133 exagrype::ccz4::source(S,Q, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4itau, CCZ4eta, CCZ4k1, CCZ4k2, CCZ4k3, CCZ4SO);
135 #if defined(GPUOffloadingOMP)
136 #pragma omp end declare target
153 #if defined(GPUOffloadingOMP)
154 #pragma omp declare target
157 const double * __restrict__ Q,
165 const double np = 1.0;
166 #if defined(CCZ4EINSTEIN)
167 const double qmin = std::min({Q[0],Q[3],Q[5]});
168 const double alpha = std::max({1.0, Q[16]}) * std::max({1.0, pow(Q[54],1.0/np)}) / std::sqrt(qmin);
170 const double alpha = 1.0;
173 constexpr double sqrtwo = 1.4142135623730951;
175 const double tempA = alpha * std::max({sqrtwo, CCZ4e, CCZ4ds, CCZ4GLMc/alpha, CCZ4GLMd/alpha});
176 const double tempB = Q[17+normal];
177 double tem = std::max({1.0, std::abs(-tempA-tempB), std::abs(tempA-tempB)});
182 #if defined(GPUOffloadingOMP)
183 #pragma omp end declare target
200 #if defined(GPUOffloadingOMP)
201 #pragma omp declare target
204 const double * __restrict__ Q,
205 const double * __restrict__ deltaQ,
211 double * __restrict__ BgradQ,
214 #if defined(GPUOffloadingOMP)
215 #pragma omp end declare target
#define GPUCallableMethod
virtual void nonconservativeProduct(const double *__restrict__ Q, const double *__restrict__ deltaQ, const tarch::la::Vector< Dimensions, double > &faceCentre, const tarch::la::Vector< Dimensions, double > &volumeH, double t, double dt, int normal, double *__restrict__ BgradQ) override
void initialCondition(double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &volumeCentre, const tarch::la::Vector< Dimensions, double > &volumeH, bool gridIsConstructed) override
::exahype2::RefinementCommand refinementCriterion(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &volumeCentre, const tarch::la::Vector< Dimensions, double > &volumeH, double t) override
virtual double maxEigenvalue(const double *__restrict__ 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.
static GPUCallableMethod void sourceTerm(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &volumeCentre, const tarch::la::Vector< Dimensions, double > &volumeH, double t, double dt, double *__restrict__ S, ::exahype2::Solver::Offloadable)
To obtain the best performance, I recommend to man inline command to this signature and to copy the i...
static GPUCallableMethod void nonconservativeProduct(const double *__restrict__ Q, const double *__restrict__ deltaQ, const tarch::la::Vector< Dimensions, double > &faceCentre, const tarch::la::Vector< Dimensions, double > &volumeH, double t, double dt, int normal, double *__restrict__ BgradQ, ::exahype2::Solver::Offloadable)
To obtain the best performance, I recommend to man inline command to this signature and to copy the i...
virtual void boundaryConditions(const double *__restrict__ Qinside, double *__restrict__ Qoutside, const tarch::la::Vector< Dimensions, double > &faceCentre, const tarch::la::Vector< Dimensions, double > &volumeH, double t, int normal) override
static GPUCallableMethod double maxEigenvalue(const double *__restrict__ 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 i...
void sourceTerm(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &volumeCentre, const tarch::la::Vector< Dimensions, double > &volumeH, double t, double dt, double *__restrict__ S) override
static tarch::logging::Log _log
Offloadable
This is a "fake" enum, i.e.
This file is part of the ExaHyPE 2 project within Peano 4.