Symbolic Operator Representation¶
Based on pymbolic
.
Basic Objects¶
DOF description¶
-
class
grudge.sym.
DTAG_SCALAR
¶
-
class
grudge.sym.
DTAG_VOLUME_ALL
¶
-
class
grudge.sym.
DTAG_BOUNDARY
(tag)¶
-
class
grudge.sym.
QTAG_NONE
¶
-
class
grudge.sym.
DOFDesc
(domain_tag, quadrature_tag=None)¶ Describes the meaning of degrees of freedom.
-
domain_tag
¶
-
quadrature_tag
¶
-
is_scalar
()¶
-
is_discretized
()¶
-
is_volume
()¶
-
is_boundary_or_partition_interface
()¶
-
is_trace
()¶
-
uses_quadrature
()¶
-
with_qtag
(qtag)¶
-
with_dtag
(dtag)¶
-
__eq__
(other)¶ Return self==value.
-
__ne__
(other)¶ Return self!=value.
-
__hash__
()¶ Return hash(self).
-
-
grudge.sym.
as_dofdesc
(dd)¶
-
grudge.sym.
DD_SCALAR
¶
-
grudge.sym.
DD_VOLUME
¶
Symbols¶
-
class
grudge.sym.
ScalarVariable
(name)¶
-
grudge.sym.
make_sym_array
(name, shape, dd=None)¶
-
grudge.sym.
make_sym_mv
(name, dim, var_factory=None)¶
-
grudge.sym.
fabs
(arg)¶
-
grudge.sym.
sqrt
(arg)¶
-
grudge.sym.
exp
(arg)¶
-
grudge.sym.
sin
(arg)¶
-
grudge.sym.
cos
(arg)¶
-
grudge.sym.
besesl_j
(n, arg)¶
-
grudge.sym.
besesl_y
(n, arg)¶
Helpers¶
-
class
grudge.sym.
OperatorBinding
(op, field)¶
-
class
grudge.sym.
PrioritizedSubexpression
(child, priority=0)¶ When the optemplate-to-code transformation is performed, prioritized subexpressions work like common subexpression in that they are assigned their own separate identifier/register location. In addition to this behavior, prioritized subexpressions are evaluated with a settable priority, allowing the user to expedite or delay the evaluation of the subexpression.
-
class
grudge.sym.
Ones
(*args, **kwargs)¶
Geometry data¶
-
class
grudge.sym.
NodeCoordinateComponent
(axis, dd=None)¶
-
grudge.sym.
nodes
(ambient_dim, dd=None)¶
-
grudge.sym.
mv_nodes
(ambient_dim, dd=None)¶
-
grudge.sym.
forward_metric_derivative
(xyz_axis, rst_axis, dd=None)¶ Pointwise metric derivatives representing
\[\frac{\partial x_{\mathrm{xyz\_axis}} }{\partial r_{\mathrm{rst\_axis}}}\]
-
grudge.sym.
inverse_metric_derivative
(rst_axis, xyz_axis, ambient_dim, dim=None, dd=None)¶
-
grudge.sym.
forward_metric_derivative_mat
(ambient_dim, dim=None, dd=None)¶
-
grudge.sym.
inverse_metric_derivative_mat
(ambient_dim, dim=None, dd=None)¶
-
grudge.sym.
first_fundamental_form
(ambient_dim, dim=None, dd=None)¶
-
grudge.sym.
inverse_first_fundamental_form
(ambient_dim, dim=None, dd=None)¶
-
grudge.sym.
inverse_surface_metric_derivative
(rst_axis, xyz_axis, ambient_dim, dim=None, dd=None)¶
-
grudge.sym.
second_fundamental_form
(ambient_dim, dim=None, dd=None)¶
-
grudge.sym.
shape_operator
(ambient_dim, dim=None, dd=None)¶
-
grudge.sym.
pseudoscalar
(ambient_dim, dim=None, dd=None)¶
-
grudge.sym.
area_element
(ambient_dim, dim=None, dd=None)¶
-
grudge.sym.
mv_normal
(dd, ambient_dim, dim=None)¶ Exterior unit normal as a
MultiVector
.
-
grudge.sym.
normal
(dd, ambient_dim, dim=None)¶
-
grudge.sym.
surface_normal
(ambient_dim, dim=None, dd=None)¶
-
grudge.sym.
summed_curvature
(ambient_dim, dim=None, dd=None)¶ Sum of the principal curvatures
-
grudge.sym.
mean_curvature
(ambient_dim, dim=None, dd=None)¶ Averaged (by dimension) sum of the principal curvatures.
Trace Pair¶
-
class
grudge.sym.
TracePair
(dd, *, interior, exterior)¶ -
dd
¶ an instance of
grudge.sym.DOFDesc
describing the discretization on whichinterior
andexterior
live.
-
interior
¶ a value (symbolic expression or
DOFArray
or object array of either) representing the interior value to be used for the flux.
-
exterior
¶ a value (symbolic expression or
DOFArray
or object array of either) representing the exterior value to be used for the flux.
Note
TracePair
is used both by the symbolic and the eager interface, with symbolic information or concrete data.-
-
grudge.sym.
int_tpair
(expression, qtag=None, from_dd=None)¶
-
grudge.sym.
bv_tpair
(dd, interior, exterior)¶ - Parameters
interior – an expression that lives in the volume and will be restricted to the boundary identified by tag before use.
exterior – an expression that already lives on the boundary representing the exterior value to be used for the flux.
-
grudge.sym.
bdry_tpair
(dd, interior, exterior)¶ - Parameters
interior – an expression that already lives on the boundary representing the interior value to be used for the flux.
exterior – an expression that already lives on the boundary representing the exterior value to be used for the flux.
Operators¶
Building blocks and mappers for operator expression trees.
Basic Operators¶
-
grudge.symbolic.operators.
project
¶
Reductions¶
-
class
grudge.symbolic.operators.
ElementwiseSumOperator
(dd)[source]¶ Returns a vector of DOFs with all entries on each element set to the sum of DOFs on that element.
-
class
grudge.symbolic.operators.
ElementwiseMinOperator
(dd)[source]¶ Returns a vector of DOFs with all entries on each element set to the minimum of DOFs on that element.
Differentiation¶
-
class
grudge.symbolic.operators.
StrongFormDiffOperatorBase
(xyz_axis, dd_in=None, dd_out=None)[source]¶