Skip to content
Snippets Groups Projects
Commit 0026dc97 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Remove some dead 'FluxOperator' code left over from hedge

parent de026c68
No related branches found
No related tags found
No related merge requests found
......@@ -564,51 +564,6 @@ class OperatorSpecializer(CSECachingMapperMixin, IdentityMapper):
raise TypeError("RestrictToBoundary cannot be applied to "
"quadrature-based operands--use QuadUpsample(Boundarize(...))")
# {{{ flux operator specialization
elif isinstance(expr.op, op.FluxOperatorBase):
from pytools.obj_array import with_object_array_or_scalar
repr_tag_cell = [None]
def process_flux_arg(flux_arg):
arg_repr_tag = self.typedict[flux_arg].repr_tag
if repr_tag_cell[0] is None:
repr_tag_cell[0] = arg_repr_tag
else:
# An error for this condition is generated by
# the type inference pass.
assert arg_repr_tag == repr_tag_cell[0]
is_boundary = isinstance(expr.field, BoundaryPair)
if is_boundary:
bpair = expr.field
with_object_array_or_scalar(process_flux_arg, bpair.field)
with_object_array_or_scalar(process_flux_arg, bpair.bfield)
else:
with_object_array_or_scalar(process_flux_arg, expr.field)
is_quad = isinstance(repr_tag_cell[0], QuadratureRepresentation)
if is_quad:
assert not expr.op.is_lift
quad_tag = repr_tag_cell[0].quadrature_tag
new_fld = self.rec(expr.field)
flux = expr.op.flux
if is_boundary:
if is_quad:
return op.QuadratureBoundaryFluxOperator(
flux, quad_tag, bpair.tag)(new_fld)
else:
return op.BoundaryFluxOperator(flux, bpair.tag)(new_fld)
else:
if is_quad:
return op.QuadratureFluxOperator(flux, quad_tag)(new_fld)
else:
return op.FluxOperator(flux, expr.op.is_lift)(new_fld)
# }}}
else:
return IdentityMapper.map_operator_binding(self, expr)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment