Peano 4
Loading...
Searching...
No Matches
applications::exahype2::euler::sphericalaccretion::SSInfall Class Reference

#include <SSInfall.h>

Inheritance diagram for applications::exahype2::euler::sphericalaccretion::SSInfall:
Collaboration diagram for applications::exahype2::euler::sphericalaccretion::SSInfall:

Public Member Functions

void startTimeStep (double globalMinTimeStamp, double globalMaxTimeStamp, double globalMinTimeStepSize, double globalMaxTimeStepSize) override
 
void finishTimeStep () 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
 
void initialCondition (double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &volumeCentre, const tarch::la::Vector< Dimensions, double > &volumeH, bool gridIsConstructed) override
 
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
 There are two variants 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
 
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
 See flux() for a description why there are two maxEigenvalue() versions.
 
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
 The flux in the SSInfall does not depend on any variable of the solver.
 
void add_mass (const double r_coor, const double rho, const double size)
 
double mass_interpolate (const double r_coor, const int MassCal)
 
virtual bool patchCanUseStatelessPDETerms (const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchH, double t, double dt) const
 Within the mass accumulation radius, I return false.
 
bool isOutsideOfLargestRadius (const tarch::la::Vector< Dimensions, double > &patchCentre, const tarch::la::Vector< Dimensions, double > &patchH) const
 This is a very conservative routine.
 

Static Public Member Functions

static 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)
 This is the variation that's used on the GPU.
 
static 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)
 
static 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)
 

Static Public Attributes

static const tarch::la::Vector< Dimensions, double > OverDensityCentre = {0.0, 0.0, 0.0}
 

Private Member Functions

std::string plotGlobalMTot (bool plotCopy) const
 
std::string plotRs () const
 
double getInitialMIn (double r_coord) const
 Returns m_in for time t=0.
 

Static Private Member Functions

static double getForceDensityNorm (double r_coord, double m_in, double t, double density, double a_input)
 

Static Private Attributes

static tarch::logging::Log _log
 
static double _rMax
 This is a straight 1:1 copy of r_s[sample_number-1].
 
static double _rhoMax
 This is a straight 1:1 copy of rho_x[sample_number-1].
 
static double _mTotMax
 From m_tot_copy[sample_number-1].
 

Detailed Description

Definition at line 13 of file SSInfall.h.

Member Function Documentation

◆ add_mass()

void applications::exahype2::euler::sphericalaccretion::SSInfall::add_mass ( const double r_coor,
const double rho,
const double size )

Definition at line 743 of file SSInfall.cpp.

◆ boundaryConditions()

void applications::exahype2::euler::sphericalaccretion::SSInfall::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 )
overridevirtual

◆ finishTimeStep()

void applications::exahype2::euler::sphericalaccretion::SSInfall::finishTimeStep ( )
override

◆ flux() [1/2]

void applications::exahype2::euler::sphericalaccretion::SSInfall::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 )
overridevirtual

The flux in the SSInfall does not depend on any variable of the solver.

Therefore, we wrote a second variant of the flux() function which is static. This version basically invokes its static counterpart subject to some additional assertions and logging.

The static version fits to the GPU (see guidebook).

Definition at line 668 of file SSInfall.cpp.

References assertion4, applications::exahype2::euler::flux(), logTraceInWith4Arguments, and logTraceOutWith4Arguments.

Here is the call graph for this function:

◆ flux() [2/2]

void applications::exahype2::euler::sphericalaccretion::SSInfall::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  )
static

Definition at line 711 of file SSInfall.cpp.

◆ getForceDensityNorm()

double applications::exahype2::euler::sphericalaccretion::SSInfall::getForceDensityNorm ( double r_coord,
double m_in,
double t,
double density,
double a_input )
staticprivate
Returns
force density norm
Parameters
m_inTypically the result of getInitialMIn()
tTimestamp
densityTypically Q[0]

Definition at line 342 of file SSInfall.cpp.

References tarch::la::equals(), and tarch::la::PI.

Here is the call graph for this function:

◆ getInitialMIn()

double applications::exahype2::euler::sphericalaccretion::SSInfall::getInitialMIn ( double r_coord) const
private

Returns m_in for time t=0.

Definition at line 320 of file SSInfall.cpp.

References tarch::la::PI.

◆ initialCondition()

void applications::exahype2::euler::sphericalaccretion::SSInfall::initialCondition ( double *__restrict__ Q,
const tarch::la::Vector< Dimensions, double > & volumeCentre,
const tarch::la::Vector< Dimensions, double > & volumeH,
bool gridIsConstructed )
override

Definition at line 237 of file SSInfall.cpp.

References assertion5, logDebug, nonCriticalAssertion6, and tarch::triggerNonCriticalAssertion().

Here is the call graph for this function:

◆ isOutsideOfLargestRadius()

bool applications::exahype2::euler::sphericalaccretion::SSInfall::isOutsideOfLargestRadius ( const tarch::la::Vector< Dimensions, double > & patchCentre,
const tarch::la::Vector< Dimensions, double > & patchH ) const

This is a very conservative routine.

It takes the difference to centre, computes the L2 norm, adds a safety distance of \( \sqrt{3} h/2 \) and return true if an only if this holds.

If a patch is definitely outside of the largest radius, there's a couple of very natural consequences:

  • The interpolation is way easier than int eh general case: It will always be the fallback/generic version only using the static fields to interpolate.
  • A patch outside of the largest radius will definitely not contribute at all to the global mass, density, ...

Definition at line 482 of file SSInfall.cpp.

References tarch::la::max(), and tarch::la::norm2().

Here is the call graph for this function:

◆ mass_interpolate()

double applications::exahype2::euler::sphericalaccretion::SSInfall::mass_interpolate ( const double r_coor,
const int MassCal )

Definition at line 773 of file SSInfall.cpp.

References assertion10, assertion11, assertion14, assertion9, tarch::la::greater(), tarch::la::PI, and tarch::la::smallerEquals().

Here is the call graph for this function:

◆ maxEigenvalue() [1/2]

double applications::exahype2::euler::sphericalaccretion::SSInfall::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 )
overridevirtual

See flux() for a description why there are two maxEigenvalue() versions.

Definition at line 591 of file SSInfall.cpp.

References assertion, assertion4, applications::exahype2::euler::maxEigenvalue(), and nonCriticalAssertion10.

Here is the call graph for this function:

◆ maxEigenvalue() [2/2]

double applications::exahype2::euler::sphericalaccretion::SSInfall::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  )
static

Definition at line 631 of file SSInfall.cpp.

◆ patchCanUseStatelessPDETerms()

bool applications::exahype2::euler::sphericalaccretion::SSInfall::patchCanUseStatelessPDETerms ( const tarch::la::Vector< Dimensions, double > & patchCentre,
const tarch::la::Vector< Dimensions, double > & patchH,
double t,
double dt ) const
virtual

Within the mass accumulation radius, I return false.

Outside, I return true. In the initial step, we do not allow anything to be offloaded to an accelerator.

Definition at line 492 of file SSInfall.cpp.

References tarch::la::greater().

Here is the call graph for this function:

◆ plotGlobalMTot()

std::string applications::exahype2::euler::sphericalaccretion::SSInfall::plotGlobalMTot ( bool plotCopy) const
private

Definition at line 126 of file SSInfall.cpp.

◆ plotRs()

std::string applications::exahype2::euler::sphericalaccretion::SSInfall::plotRs ( ) const
private

Definition at line 114 of file SSInfall.cpp.

◆ refinementCriterion()

exahype2::RefinementCommand applications::exahype2::euler::sphericalaccretion::SSInfall::refinementCriterion ( const double *__restrict__ Q,
const tarch::la::Vector< Dimensions, double > & volumeCentre,
const tarch::la::Vector< Dimensions, double > & volumeH,
double t )
override

Definition at line 148 of file SSInfall.cpp.

References exahype2::Erase, exahype2::Keep, tarch::la::max(), and exahype2::Refine.

Here is the call graph for this function:

◆ sourceTerm() [1/2]

void applications::exahype2::euler::sphericalaccretion::SSInfall::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

There are two variants of the source term.

This one is the modified gravity variant with an inhomogeneous source term.

Definition at line 361 of file SSInfall.cpp.

References assertion3, assertion4, tarch::la::equals(), logTraceInWith4Arguments, logTraceOut, nonCriticalAssertion4, and tarch::la::PI.

Here is the call graph for this function:

◆ sourceTerm() [2/2]

void applications::exahype2::euler::sphericalaccretion::SSInfall::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  )
static

This is the variation that's used on the GPU.

It works with a homogeneous source term, i.e. zeroes on the right-hand side.

Definition at line 444 of file SSInfall.cpp.

References tarch::la::norm2(), and tarch::la::PI.

Here is the call graph for this function:

◆ startTimeStep()

void applications::exahype2::euler::sphericalaccretion::SSInfall::startTimeStep ( double globalMinTimeStamp,
double globalMaxTimeStamp,
double globalMinTimeStepSize,
double globalMaxTimeStepSize )
override

Definition at line 27 of file SSInfall.cpp.

References _minTimeStamp(), tarch::la::equals(), j, and tarch::la::smallerEquals().

Here is the call graph for this function:

Field Documentation

◆ _log

tarch::logging::Log applications::exahype2::euler::sphericalaccretion::SSInfall::_log
staticprivate

Definition at line 15 of file SSInfall.h.

◆ _mTotMax

double applications::exahype2::euler::sphericalaccretion::SSInfall::_mTotMax
staticprivate

From m_tot_copy[sample_number-1].

Definition at line 38 of file SSInfall.h.

◆ _rhoMax

double applications::exahype2::euler::sphericalaccretion::SSInfall::_rhoMax
staticprivate

This is a straight 1:1 copy of rho_x[sample_number-1].

We need a scalar here, as this one goes to the GPU.

Definition at line 33 of file SSInfall.h.

◆ _rMax

double applications::exahype2::euler::sphericalaccretion::SSInfall::_rMax
staticprivate

This is a straight 1:1 copy of r_s[sample_number-1].

We need a scalar here, as this one goes to to the GPU.

Definition at line 27 of file SSInfall.h.

◆ OverDensityCentre

const tarch::la::Vector< Dimensions, double > applications::exahype2::euler::sphericalaccretion::SSInfall::OverDensityCentre = {0.0, 0.0, 0.0}
static

Definition at line 13 of file SSInfall.h.


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