DG Discretizations and related services

class hedge.discretization.Discretization
Discretization.close()
Discretization.add_instrumentation(mgr)
Discretization.is_boundary_tag_nonempty(tag)
Discretization.all_debug_flags()
classmethod Discretization.noninteractive_debug_flags()

Return all debug flags that do not entail user interaction (such as key presses or console output).

Vector Kinds

When computing on GPU hardware, the Discretization operates on fields that are not represented by numpy arrays. Vector kinds make this explicit. Every discretization is guaranteed to support converting its preferred vector kind, given by Discretization.compute_kind, to the kind “numpy”.

Discretization.compute_kind

The array kind that this discretization can evaluate operators on.

Discretization.convert_volume(field, kind)
Discretization.convert_boundary(field, tag, kind)

Vector Creation

Discretization.volume_empty(shape=(), dtype=None, kind=None)
Discretization.volume_zeros(shape=(), dtype=None, kind=None)
Discretization.interpolate_volume_function(f, dtype=None, kind=None)
Discretization.boundary_empty(tag, shape=(), dtype=None, kind=None)
Discretization.boundary_zeros(tag, shape=(), dtype=None, kind=None)
Discretization.interpolate_boundary_function(f, tag, dtype=None, kind=None)
Discretization.boundary_normals(tag, dtype=None, kind=None)

Vector Conversion

Discretization.volumize_boundary_field(bfield, tag, kind=None)
Discretization.boundarize_boundary_field(bfield, tag, kind=None)

Vector Reductions

Discretization.nodewise_dot_product(a, b)
Discretization.mesh_volume()
Discretization.integral(volume_vector)
Discretization.norm(volume_vector, p=2)
Discretization.inner_product(a, b)

Miscellanea

Discretization.dt_factor(max_system_ev, stepper_class, *stepper_args)
Discretization.get_point_evaluator(point)

Compilation of operator templates

Discretization.compile(optemplate, post_bind_mapper=lambda x: x)
Discretization.add_function(name, func)

Projection between Discretization instances

class hedge.discretization.Projector(from_discr, to_discr)
__call__(self, from_vec)

Filtering

class hedge.discretization.ExponentialFilterResponseFunction(min_amplification=0.1, order=6)

A typical exponential-falloff mode response filter function.

See description in Section 5.6.1 of Hesthaven/Warburton.

__init__(min_amplification=0.1, order=6)

Construct the filter function.

The amplification factor of the lowest-order (constant) mode is always 1.

Parameters:
  • min_amplification – The amplification factor applied to the highest mode.
  • order – The order of the filter. This controls how fast (or slowly) the min_amplification is reached.
class hedge.discretization.Filter
__init__(discr, mode_response_func)