11#include "../../../../applications/exahype2/euler/EulerKernels.h"
12#include "AbstractSelfSimilarInfallFV.h"
15#include "spherical-accretion/MassAccumulator.h"
16#include "spherical-accretion/GravityModel.h"
23 namespace sphericalaccretionupscaling {
24 class SelfSimilarInfallFV;
47 static constexpr double Gamma = 5.0/3.0;
76 double * __restrict__ Q,
79 bool gridIsConstructed
90 const double * __restrict__ Qinside,
91 double * __restrict__ Qoutside,
114 const double * __restrict__ Q,
119 double * __restrict__ S
133 const double * __restrict__ Q,
147 const double * __restrict__ Q,
153 double * __restrict__ F
158 const double * __restrict__ Q,
178 #if defined(GPUOffloadingOMP)
179 #pragma omp declare target
182 const double * __restrict__ Q,
187 double * __restrict__ S,
190 for (
int i=0; i<NumberOfUnknowns; i++) {
203 #if defined(GPUOffloadingOMP)
204 #pragma omp end declare target
212 #if defined(GPUOffloadingOMP)
213 #pragma omp declare target
216 const double * __restrict__ Q,
224 return ::applications::exahype2::euler::maxEigenvalue(
232 NumberOfAuxiliaryVariables,
236 #if defined(GPUOffloadingOMP)
237 #pragma omp end declare target
247 #if defined(GPUOffloadingOMP)
248 #pragma omp declare target
251 const double * __restrict__ Q,
257 double * __restrict__ F,
268 NumberOfAuxiliaryVariables,
273 #if defined(GPUOffloadingOMP)
274 #pragma omp end declare target
#define GPUCallableMethod
Simple spherical mass accumulator.
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, Offloadable)
Manually inlined.
static constexpr double InitialTopHatRadius
void addDensity(const tarch::la::Vector< Dimensions, double > &volumeCentre, const tarch::la::Vector< Dimensions, double > &volumeH, double density)
Add density of one voxel to global bookkeeping.
static constexpr double pInitial
static double TotalMassInPreviousTimeStep
After each time step, we backup the total mass in this static variable.
void initialCondition(double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &volumeCentre, const tarch::la::Vector< Dimensions, double > &volumeH, bool gridIsConstructed) override
We start with a top hat overdensity.
void finishTimeStep() override
According to the docu, I always call the superclass routine.
static constexpr double Gamma
bool patchCanUseStatelessPDETerms(const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchH, double t, double dt) const override
Outside of the critical area, we can use the stateless PDE terms.
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, Offloadable)
Manually inlined version of the source term.
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
Apply Neumann boundary conditions.
::exahype2::RefinementCommand refinementCriterion(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &volumeCentre, const tarch::la::Vector< Dimensions, double > &volumeH, double t) override
static constexpr double BaseDensity
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
Fake source term.
virtual void flux(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &faceCentre, const tarch::la::Vector< Dimensions, double > &volumeH, double t, double dt, int normal, double *__restrict__ F) override
Same story again: This is the standard Euler flux which is independent of any modification of the rig...
::applications::exahype2::euler::sphericalaccretion::MassAccumulator _accumulator
Use class from application folders.
static GPUCallableMethod void flux(const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &faceCentre, const tarch::la::Vector< Dimensions, double > &volumeH, double t, double dt, int normal, double *__restrict__ F, Offloadable)
Manually inlined.
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 tarch::logging::Log _log
static constexpr double aInitial
static constexpr double AdditionalMass
void addGravitationalSource_AlphaCDM(double *__restrict__ S, const tarch::la::Vector< Dimensions, double > &x, const double *__restrict__ Q, double mass, double aInitial, double t)
static GPUCallableInlineMethod void flux(const double *const __restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h, const double t, const double dt, const int normal, double *const __restrict__ F) InlineMethod
This file is part of the ExaHyPE 2 project within Peano 4.