Peano 4
Loading...
Searching...
No Matches
benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG Class Reference

#include <SelfSimilarInfallDG.h>

Inheritance diagram for benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG:
Collaboration diagram for benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG:

Public Member Functions

 SelfSimilarInfallDG ()
 
void addDensity (const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< 3, double > &cellSize, const tarch::la::Vector< 3, int > &index, double density)
 Add mass corresponding to one degree of freedom.
 
void initialCondition (double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h, const tarch::la::Vector< Dimensions, int > &index, bool gridIsConstructed) override
 
virtual void boundaryConditions (const double *__restrict__ Qinside, double *__restrict__ Qoutside, const tarch::la::Vector< Dimensions, double > &x, double t, int normal) override
 
void sourceTerm (const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, double t, double dt, double *__restrict__ S) override
 
virtual double maxEigenvalue (const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, double t, double dt, int normal) override
 Determine max eigenvalue over Jacobian in a given point with solution values (states) Q.
 
virtual void flux (const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, double t, double dt, int normal, double *__restrict__ F) override
 
::exahype2::RefinementCommand refinementCriterion (const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h, double t) override
 Evaluate refinement criterion over cell.
 
void finishTimeStep () override
 According to the docu, I always call the superclass routine.
 
bool cellCanUseStatelessPDETerms (const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchH, double t, double dt) const override
 

Static Public Member Functions

static GPUCallableMethod void sourceTerm (const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, double t, double dt, double *__restrict__ S, Offloadable)
 Manually inlined version of the source term.
 
static GPUCallableMethod void flux (const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, double t, double dt, int normal, double *__restrict__ F, Offloadable)
 Manually inlined.
 

Static Public Attributes

static constexpr double BaseDensity = 0.1
 
static constexpr double Gamma = 5.0/3.0
 
static constexpr double pInitial = 1e-6
 
static constexpr double aInitial = 0.001
 
static constexpr double AdditionalMass = 0.15
 
static constexpr double InitialTopHatRadius = 0.05
 

Private Attributes

::applications::exahype2::euler::sphericalaccretion::MassAccumulator _accumulator
 Use class from application folders.
 

Static Private Attributes

static tarch::logging::Log _log
 
static double TotalMassInPreviousTimeStep = 0.0
 After each time step, we backup the total mass in this static variable.
 

Detailed Description

Definition at line 28 of file SelfSimilarInfallDG.h.

Constructor & Destructor Documentation

◆ SelfSimilarInfallDG()

benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::SelfSimilarInfallDG ( )

Definition at line 15 of file SelfSimilarInfallDG.cpp.

Member Function Documentation

◆ addDensity()

void benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::addDensity ( const tarch::la::Vector< Dimensions, double > & x,
const tarch::la::Vector< 3, double > & cellSize,
const tarch::la::Vector< 3, int > & index,
double density )

Add mass corresponding to one degree of freedom.

This is the value in this dof (as we work with a Lagrangian formulation) times the quadrature weight for this point, i.e. times the integral over the shape function.

Definition at line 20 of file SelfSimilarInfallDG.cpp.

References assertion3, exahype2::dg::getQuadratureWeight(), and tarch::la::norm2().

Here is the call graph for this function:

◆ boundaryConditions()

void benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::boundaryConditions ( const double *__restrict__ Qinside,
double *__restrict__ Qoutside,
const tarch::la::Vector< Dimensions, double > & x,
double t,
int normal )
overridevirtual

Definition at line 122 of file SelfSimilarInfallDG.cpp.

References logTraceInWith3Arguments, and logTraceOut.

◆ cellCanUseStatelessPDETerms()

bool benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::cellCanUseStatelessPDETerms ( const tarch::la::Vector< Dimensions, double > & patchCentre,
const tarch::la::Vector< Dimensions, double > & patchH,
double t,
double dt ) const
override

◆ finishTimeStep()

void benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::finishTimeStep ( )
override

According to the docu, I always call the superclass routine.

After that, I check whether this has been the last sweep of the current time step. If so, we let the mass accummulation know.

◆ flux() [1/2]

virtual void benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::flux ( const double *__restrict__ Q,
const tarch::la::Vector< Dimensions, double > & x,
double t,
double dt,
int normal,
double *__restrict__ F )
overridevirtual

◆ flux() [2/2]

static GPUCallableMethod void benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::flux ( const double *__restrict__ Q,
const tarch::la::Vector< Dimensions, double > & x,
double t,
double dt,
int normal,
double *__restrict__ F,
Offloadable  )
static

Manually inlined.

Otherwise the same as the virtual function without the logging.

Definition at line 189 of file SelfSimilarInfallDG.h.

References applications::exahype2::euler::flux(), and Gamma.

Here is the call graph for this function:

◆ initialCondition()

void benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::initialCondition ( double *__restrict__ Q,
const tarch::la::Vector< Dimensions, double > & x,
const tarch::la::Vector< Dimensions, double > & h,
const tarch::la::Vector< Dimensions, int > & index,
bool gridIsConstructed )
override

◆ maxEigenvalue()

virtual double benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::maxEigenvalue ( const double *__restrict__ Q,
const tarch::la::Vector< Dimensions, double > & x,
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.

◆ refinementCriterion()

exahype2::RefinementCommand benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::refinementCriterion ( const double *__restrict__ Q,
const tarch::la::Vector< Dimensions, double > & x,
const tarch::la::Vector< Dimensions, double > & h,
double t )
override

Evaluate refinement criterion over cell.

Parameters
QVector of unknowns
xCentre of underlying cell
hSize of underlying cell
tTime

Definition at line 39 of file SelfSimilarInfallDG.cpp.

References tarch::la::equals(), h, and tarch::la::norm2().

Here is the call graph for this function:

◆ sourceTerm() [1/2]

void benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::sourceTerm ( const double *__restrict__ Q,
const tarch::la::Vector< Dimensions, double > & x,
double t,
double dt,
double *__restrict__ S )
override

◆ sourceTerm() [2/2]

static GPUCallableMethod void benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::sourceTerm ( const double *__restrict__ Q,
const tarch::la::Vector< Dimensions, double > & x,
double t,
double dt,
double *__restrict__ S,
Offloadable  )
static

Manually inlined version of the source term.

As this variant is only called outside of the area of relevance, we know that the mass acting on the volume is the total mass.

Definition at line 157 of file SelfSimilarInfallDG.h.

References applications::exahype2::euler::sphericalaccretion::addGravitationalSource_AlphaCDM(), aInitial, and TotalMassInPreviousTimeStep.

Here is the call graph for this function:

Field Documentation

◆ _accumulator

::applications::exahype2::euler::sphericalaccretion::MassAccumulator benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::_accumulator
private

Use class from application folders.

Definition at line 35 of file SelfSimilarInfallDG.h.

◆ _log

tarch::logging::Log benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::_log
staticprivate

Definition at line 30 of file SelfSimilarInfallDG.h.

◆ AdditionalMass

constexpr double benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::AdditionalMass = 0.15
staticconstexpr

Definition at line 47 of file SelfSimilarInfallDG.h.

◆ aInitial

constexpr double benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::aInitial = 0.001
staticconstexpr

Definition at line 46 of file SelfSimilarInfallDG.h.

Referenced by sourceTerm().

◆ BaseDensity

constexpr double benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::BaseDensity = 0.1
staticconstexpr

Definition at line 43 of file SelfSimilarInfallDG.h.

◆ Gamma

constexpr double benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::Gamma = 5.0/3.0
staticconstexpr

Definition at line 44 of file SelfSimilarInfallDG.h.

Referenced by flux(), and avalanche.Avalanche::implementation_of_sources().

◆ InitialTopHatRadius

constexpr double benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::InitialTopHatRadius = 0.05
staticconstexpr

Definition at line 48 of file SelfSimilarInfallDG.h.

◆ pInitial

constexpr double benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::pInitial = 1e-6
staticconstexpr

Definition at line 45 of file SelfSimilarInfallDG.h.

◆ TotalMassInPreviousTimeStep

double benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::TotalMassInPreviousTimeStep = 0.0
staticprivate

After each time step, we backup the total mass in this static variable.

It has to be static, as we want to use it in stateless terms later on.

Definition at line 41 of file SelfSimilarInfallDG.h.

Referenced by sourceTerm().


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