Interfaces for User-Provided Data

class hedge.data.IGivenFunction

Abstract interface for obtaining interpolants of I{time-independent} functions.

boundary_interpolant(discr, tag)

Return the boundary interpolant of this function with respect to the hedge.discretization.Discretization discr at the boundary tagged with tag.

volume_interpolant(discr)

Return the volume interpolant of this function with respect to the hedge.discretization.Discretization discr.

class hedge.data.ITimeDependentGivenFunction

Abstract interface for obtaining interpolants of time-dependent functions.

boundary_interpolant(t, discr, tag)

Return the boundary interpolant of this function with respect to the hedge.discretization.Discretization discr at time t at the boundary tagged with tag.

volume_interpolant(t, discr)

Return the volume interpolant of this function with respect to the hedge.discretization.Discretization discr at time {t}.

class hedge.data.GivenFunction(f)

Bases: hedge.data.IGivenFunction

Adapter for a function f(x) into an IGivenFunction.

__init__(f)

Initialize the caches and store the function f.

Parameters:f – a valid argument to hedge.discretization.Discretization.interpolate_volume_function().
class hedge.data.ConstantGivenFunction(value=0)

Bases: hedge.data.GivenFunction

A GivenFunction that has a constant value on all space.

class hedge.data.GivenVolumeInterpolant(discr, interpolant)

Bases: hedge.data.IGivenFunction

A constant-valued GivenFunction.

class hedge.data.TimeConstantGivenFunction(gf)

Bases: hedge.data.ITimeDependentGivenFunction

Adapts a GivenFunction to have a (formal) time-dependency, being constant over all time.

hedge.data.make_tdep_constant(x)
class hedge.data.TimeHarmonicGivenFunction(gf, omega, phase=0)

Bases: hedge.data.ITimeDependentGivenFunction

Modulates an ITimeDependentGivenFunction by a sine in time.

class hedge.data.TimeIntervalGivenFunction(gf, on_time=0, off_time=1)

Bases: hedge.data.ITimeDependentGivenFunction

Adapts an ITimeDependentGivenFunction to depend on time by “turning it on” for the time interval [\text{on\_time}, \text{off\_time}), and having it be zero the rest of the time.

class hedge.data.TimeDependentGivenFunction(f)

Bases: hedge.data.ITimeDependentGivenFunction

Adapts a function f(x,t) into the GivenFunction framework.