Base classes for operators.
A base class for Discontinuous Galerkin operators.
You may derive your own operators from this class, but, at present this class provides no functionality. Its function is merely as documentation, to group related classes together in an inheritance tree.
A base class for time-dependent Discontinuous Galerkin operators.
You may derive your own operators from this class, but, at present this class provides no functionality. Its function is merely as documentation, to group related classes together in an inheritance tree.
Bases: hedge.models.TimeDependentOperator
A class for space- and time-dependent DG-advection operators.
advec_v is a callable expecting two arguments (x, t) representing space and time, and returning an n-dimensional vector representing the velocity at x. bc_u_f is a callable expecting (x, t) representing space and time, and returning an 1-dimensional vector representing the state on the boundary. Both advec_v and bc_u_f conform to the hedge.data.ITimeDependentGivenFunction interface.
-dimensional Calculus¶Bases: hedge.models.Operator
Bases: hedge.models.Operator
This operator discretizes the wave equation
.
To be precise, we discretize the hyperbolic system

The sign of
determines whether we discretize the forward or the
backward wave equation.
is assumed to be constant across all space.
This operator discretizes the wave equation
.
To be precise, we discretize the hyperbolic system

c is assumed to be positive and conforms to the hedge.data.ITimeDependentGivenFunction interface.
source also conforms to the hedge.data.ITimeDependentGivenFunction interface.
Bases: hedge.models.TimeDependentOperator
A 3D Maxwell operator.
Field order is [Ex Ey Ez Hx Hy Hz].
| Parameter: | flux_type – can be in [0,1] for anything between central and upwind, or “lf” for Lax-Friedrichs. |
|---|
Bases: hedge.models.em.MaxwellOperator
A 2D TM Maxwell operator with PEC boundaries.
Field order is [Ez Hx Hy].
Bases: hedge.models.em.MaxwellOperator
A 2D TE Maxwell operator.
Field order is [Ex Ey Hz].
Bases: hedge.models.em.MaxwellOperator
A 1D TE Maxwell operator.
Field order is [Ex Ey Hz].
Bases: hedge.models.em.MaxwellOperator
A 1D TE Maxwell operator.
Field order is [Ey Hz].
Bases: hedge.models.em.MaxwellOperator
Implements a PML as in
[1] S. Abarbanel and D. Gottlieb, “On the construction and analysis of absorbing layers in CEM,” Applied Numerical Mathematics, vol. 27, 1998, S. 331-340. (eq 3.7-3.11)
[2] E. Turkel and A. Yefet, “Absorbing PML boundary layers for wave-like equations,” Applied Numerical Mathematics, vol. 27, 1998, S. 533-557. (eq. 4.10)
[3] Abarbanel, D. Gottlieb, and J.S. Hesthaven, “Long Time Behavior of the Perfectly Matched Layer Equations in Computational Electromagnetics,” Journal of Scientific Computing, vol. 17, Dez. 2002, S. 405-422.
Generalized to 3D in doc/maxima/abarbanel-pml.mac.
Bases: hedge.models.TimeDependentOperator
Bases: hedge.models.Operator
Implements the Local Discontinuous Galerkin (LDG) Method for elliptic operators.
See P. Castillo et al., Local discontinuous Galerkin methods for elliptic problems”, Communications in Numerical Methods in Engineering 18, no. 1 (2002): 69-75.
Initialize the weak Poisson operator.
| Parameter: | flux – Either “ip” or “ldg” to indicate which type of flux is to be used. IP tends to be faster, and is therefore the default. |
|---|
Returned by WeakPoissonOperator.bind().
Compute the divergence of v using an LDG operator.
The divergence computation is unaffected by the scaling effected by the diffusion tensor.
| Parameter: | apply_minv – bool specifying whether to compute a complete
divergence operator. If False, the final application of the inverse
mass operator is skipped. This is used in op() in order to reduce
the scheme to , so that the mass operator
only needs to be applied once, when preparing the right hand side
in prepare_rhs(). |
|---|
Prepare the right-hand side for the linear system op(u)=rhs(f).
In matrix form, LDG looks like this:

where v is the auxiliary vector, u is the argument of the operator, f is the result of the grad operator, g and h are inhom boundary data, and A,B,C are some operator+lifting matrices.

so the linear system looks like

So the right hand side we’re putting together here is really

Finally, note that the operator application above implements the equation (*) left-multiplied by Minv, so that the right-hand-side becomes
