|
Peano
|
Gradient-based refinement criterion: given a one-sided difference quotient of the solution along one coordinate axis, decide whether the mesh around this point should be refined, erased (coarsened) or kept. More...


Data Structures | |
| class | Generator |
| GradientRefinement-specific code generation. More... | |
Public Member Functions | |
| __init__ (self, str implementation=None, bool stateless=False) | |
Public Member Functions inherited from exahype2.api.PDETerm.PDETerm | |
| str | __repr__ (self) |
| str | __str__ (self) |
| "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 = "refineEraseWithGradient" |
Static Public Attributes inherited from exahype2.api.PDETerm.PDETerm | |
| str | NAME |
| str | SIGNATURE |
Additional Inherited Members | |
Data Fields inherited from exahype2.api.PDETerm.PDETerm | |
| name | |
| implementation | |
| stateless | |
Gradient-based refinement criterion: given a one-sided difference quotient of the solution along one coordinate axis, decide whether the mesh around this point should be refined, erased (coarsened) or kept.
The action set which evaluates the criterion calls the term 2*Dimensions times per volume: For each coordinate axis normal, it passes the left difference quotient \( (Q_j - Q_{j-1})/h \) and the right one \( (Q_{j+1} - Q_j)/h \). Each call starts from Keep. The volume asks for a refinement if any of the calls says Refine, and it may be erased only if all of the calls say Erase.
Volumes at the patch boundary have no neighbour on one side. For them, the difference quotient towards the patch's interior is passed in both calls (exahype2::fv::computeOneSidedGradient()).
gradient holds unknowns+auxiliary_variables entries. The output semantics are those of every adaptivity criterion (exahype2.api.AdaptivityCriterion).
Definition at line 8 of file GradientRefinement.py.
| exahype2.api.GradientRefinement.GradientRefinement.__init__ | ( | self, | |
| str | implementation = None, |
||
| bool | stateless = False |
||
| ) |
| implementation | str A C++ snippet that becomes refineEraseWithGradient()'s body, or None (the default) to leave refineEraseWithGradient() pure virtual for you to implement by hand. The empty string is a valid body: it leaves *refinementCommand untouched, i.e. at Keep. |
| stateless | bool Generate a static, GPU-offloadable method instead of a virtual one. Requires an implementation. |
Reimplemented from exahype2.api.AdaptivityCriterion.AdaptivityCriterion.
Definition at line 48 of file GradientRefinement.py.
References exahype2.api.GradientRefinement.GradientRefinement.__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, exahype2.api.PDETerm.PDETerm.NAME, exahype2.api.PointSource.PointSource.NAME, exahype2.api.RefineErasePointwisely.RefineErasePointwisely.NAME, and exahype2.api.VolumetricSource.VolumetricSource.NAME.
Referenced by exahype2.api.GradientRefinement.GradientRefinement.__init__().


|
static |
Definition at line 46 of file GradientRefinement.py.
Referenced by exahype2.api.blockstructured.DirichletBoundaryConditions.DirichletBoundaryConditions.__init__(), exahype2.api.Flux.Flux.__init__(), exahype2.api.GradientRefinement.GradientRefinement.__init__(), exahype2.api.InitPointWisely.InitPointWisely.__init__(), exahype2.api.MassMatrix.MassMatrix.__init__(), exahype2.api.MaxEigenvalue.MaxEigenvalue.__init__(), exahype2.api.NonconservativeProduct.NonconservativeProduct.__init__(), exahype2.api.PointSource.PointSource.__init__(), exahype2.api.RefineErasePointwisely.RefineErasePointwisely.__init__(), exahype2.api.VolumetricSource.VolumetricSource.__init__(), and exahype2.api.blockstructured.SommerfeldBoundaryConditions.SommerfeldBoundaryConditions.__init__().
|
static |
Definition at line 40 of file GradientRefinement.py.