|
Peano
|
Base class of all the PDE terms which decide where to refine or coarsen the mesh. More...


Public Member Functions | |
| __init__ (self, str name, 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. | |
Additional Inherited Members | |
Data Fields inherited from exahype2.api.PDETerm.PDETerm | |
| name | |
| implementation | |
| stateless | |
Static Public Attributes inherited from exahype2.api.PDETerm.PDETerm | |
| str | NAME |
| str | SIGNATURE |
Base class of all the PDE terms which decide where to refine or coarsen the mesh.
An adaptivity criterion is a PDE term which writes its decision into the output argument refinementCommand. It points to one exahype2::RefinementCommand, i.e. Keep, Refine or Erase (see exahype2/RefinementControl.h). The caller initialises it with Keep before the call, so an implementation only has to set it if it wants to refine or erase. In particular, the empty string as implementation yields a criterion which always keeps the mesh.
The subclasses differ in what they are handed:
Only if a solver has an adaptivity criterion do the numerical schemes and the setup evaluate it, i.e. add the action sets which collect refine and erase requests (exahype2.api.blockstructured.create_dynamic_mesh_refinement_action_set.create_dynamic_mesh_refinement_action_set()). A solver may have at most one adaptivity criterion.
The class itself defines no signature, i.e. you always add one of its subclasses to a solver.
Definition at line 8 of file AdaptivityCriterion.py.
| exahype2.api.AdaptivityCriterion.AdaptivityCriterion.__init__ | ( | self, | |
| str | name, | ||
| str | implementation = None, |
||
| bool | stateless = False |
||
| ) |
| name | str The C++ method name of the criterion. |
| implementation | str A C++ snippet that becomes the method's body, or None (the default) to leave the method 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.PDETerm.PDETerm.
Reimplemented in exahype2.api.GradientRefinement.GradientRefinement, and exahype2.api.RefineErasePointwisely.RefineErasePointwisely.
Definition at line 39 of file AdaptivityCriterion.py.
References exahype2.api.AdaptivityCriterion.AdaptivityCriterion.__init__().
Referenced by exahype2.api.AdaptivityCriterion.AdaptivityCriterion.__init__().

