Peano
Loading...
Searching...
No Matches
exahype2.api.PointSource.PointSource Class Reference

A source term that contributes only at isolated points (e.g. More...

Inheritance diagram for exahype2.api.PointSource.PointSource:
Collaboration diagram for exahype2.api.PointSource.PointSource:

Data Structures

class  Generator
 PointSource-specific code generation. More...

Public Member Functions

 __init__ (self, str implementation=None, bool stateless=False)
 implementation: str A C++ snippet that becomes pointSource()'s body (the empty string is a valid, generated no-op body), or None (the default) to leave pointSource() pure virtual for you to implement by hand.
Public Member Functions inherited from exahype2.api.PDETerm.PDETerm
 __init__ (self, str name, str implementation=None, bool stateless=False)
 name: str The C++ method name, e.g.
str __repr__ (self)
str __str__ (self)
"PDETerm.Generator" generator_for (self, solver)
 Code generator for this term within a solver, i.e.
"PDETerm.Generator" generator (self)
 Code generator for this term: an instance of this term's own (possibly subclass-specific) Generator.

Static Public Attributes

tuple SIGNATURE
str NAME = "pointSource"

Additional Inherited Members

Data Fields inherited from exahype2.api.PDETerm.PDETerm
 name = name
 implementation = implementation
 stateless = stateless

Detailed Description

A source term that contributes only at isolated points (e.g.

a seismic point source), as opposed to VolumetricSource, which is distributed over the whole domain.

See python/exahype2/solvers/aderdg/AbstractSolverDeclarations.py's pointSource(), which additionally takes t, dt and an index n selecting which of possibly several point sources is being evaluated - dropped here the same way h/t/dt are dropped from Flux, and n returns once PDE terms are tied to real C code snippets with proper signatures:

virtual void pointSource(
const double* __restrict__ Q, // Q[{{NUMBER_OF_UNKNOWNS}}+{{NUMBER_OF_AUXILIARY_VARIABLES}}]
const tarch::la::Vector<Dimensions, double>& x,
double* __restrict__ forceVector // forceVector[{{NUMBER_OF_UNKNOWNS}}]
);

Definition at line 8 of file PointSource.py.

Constructor & Destructor Documentation

◆ __init__()

exahype2.api.PointSource.PointSource.__init__ ( self,
str implementation = None,
bool stateless = False )

implementation: str A C++ snippet that becomes pointSource()'s body (the empty string is a valid, generated no-op body), or None (the default) to leave pointSource() pure virtual for you to implement by hand.

Don't add this term to a solver at all if the PDE has no point source contribution.

Definition at line 39 of file PointSource.py.

References __init__(), exahype2.api.blockstructured.DirichletBoundaryConditions.DirichletBoundaryConditions.NAME, exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions.NAME, exahype2.api.Flux.Flux.NAME, exahype2.api.GradientRefinement.GradientRefinement.NAME, exahype2.api.InitPointWisely.InitPointWisely.NAME, exahype2.api.MassMatrix.MassMatrix.NAME, exahype2.api.MaxEigenvalue.MaxEigenvalue.NAME, exahype2.api.NonconservativeProduct.NonconservativeProduct.NAME, and NAME.

Referenced by __init__().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ NAME

str exahype2.api.PointSource.PointSource.NAME = "pointSource"
static

◆ SIGNATURE

tuple exahype2.api.PointSource.PointSource.SIGNATURE
static
Initial value:
= (
"const double* __restrict__ Q, "
"const tarch::la::Vector<Dimensions, double>& x, "
"double* __restrict__ forceVector"
)

Definition at line 31 of file PointSource.py.


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