Okay thanks,
I am attempting to do the diffusion part only at the moment under DG, but I am getting these errors:
$ python 2D_OS_boundary_ex1.py 100 50 0 0 0 -D_pc_type bjacobi
UFL:WARNING Discontinuous Lagrange element requested on quadrilateral, creating DQ element.
UFL:WARNING Discontinuous Lagrange element requested on quadrilateral, creating DQ element.
UFL:WARNING Discontinuous Lagrange element requested on quadrilateral, creating DQ element.
UFL:ERROR Discontinuous type Coefficient must be restricted.
Traceback (most recent call last):
File "2D_OS_boundary_ex1.py", line 255, in <module>
A_D = assemble(a_D,bcs=bc_D)
File "/home/justin/Software/firedrake/src/firedrake/firedrake/assemble.py", line 81, in assemble
inverse=inverse, mat_type=mat_type, appctx=appctx)
File "<decorator-gen-291>", line 2, in _assemble
File "/home/justin/Software/firedrake/src/firedrake/firedrake/utils.py", line 62, in wrapper
return f(*args, **kwargs)
File "/home/justin/Software/firedrake/src/firedrake/firedrake/assemble.py", line 120, in _assemble
inverse=inverse)
File "/home/justin/Software/firedrake/src/firedrake/firedrake/tsfc_interface.py", line 189, in compile_form
number_map).kernels
File "/home/justin/Software/firedrake/src/PyOP2/pyop2/caching.py", line 198, in __new__
obj = make_obj()
File "/home/justin/Software/firedrake/src/PyOP2/pyop2/caching.py", line 188, in make_obj
obj.__init__(*args, **kwargs)
File "/home/justin/Software/firedrake/src/firedrake/firedrake/tsfc_interface.py", line 110, in __init__
tree = tsfc_compile_form(form, prefix=name, parameters=parameters)
File "/home/justin/Software/firedrake/src/tsfc/tsfc/driver.py", line 36, in compile_form
fd = ufl_utils.compute_form_data(form)
File "/home/justin/Software/firedrake/src/tsfc/tsfc/ufl_utils.py", line 47, in compute_form_data
do_estimate_degrees=do_estimate_degrees,
File "/home/justin/Software/firedrake/src/ufl/ufl/algorithms/compute_form_data.py", line 305, in compute_form_data
form = apply_restrictions(form)
File "/home/justin/Software/firedrake/src/ufl/ufl/algorithms/apply_restrictions.py", line 211, in apply_restrictions
only_integral_type=integral_types)
File "/home/justin/Software/firedrake/src/ufl/ufl/algorithms/map_integrands.py", line 58, in map_integrand_dags
form, only_integral_type)
File "/home/justin/Software/firedrake/src/ufl/ufl/algorithms/map_integrands.py", line 39, in map_integrands
for itg in form.integrals()]
File "/home/justin/Software/firedrake/src/ufl/ufl/algorithms/map_integrands.py", line 46, in map_integrands
return itg.reconstruct(function(itg.integrand()))
File "/home/justin/Software/firedrake/src/ufl/ufl/algorithms/map_integrands.py", line 57, in <lambda>
return map_integrands(lambda expr: map_expr_dag(function, expr, compress),
File "/home/justin/Software/firedrake/src/ufl/ufl/corealg/map_dag.py", line 37, in map_expr_dag
result, = map_expr_dags(function, [expression], compress=compress)
File "/home/justin/Software/firedrake/src/ufl/ufl/corealg/map_dag.py", line 84, in map_expr_dags
r = handlers[v._ufl_typecode_](v)
File "/home/justin/Software/firedrake/src/ufl/ufl/algorithms/apply_restrictions.py", line 102, in reference_value
g = self(f)
File "/home/justin/Software/firedrake/src/ufl/ufl/corealg/multifunction.py", line 95, in __call__
return self._handlers[o._ufl_typecode_](o, *args)
File "/home/justin/Software/firedrake/src/ufl/ufl/algorithms/apply_restrictions.py", line 129, in coefficient
return self._require_restriction(o)
File "/home/justin/Software/firedrake/src/ufl/ufl/algorithms/apply_restrictions.py", line 59, in _require_restriction
"Discontinuous type %s must be restricted." % o._ufl_class_.__name__)
File "/home/justin/Software/firedrake/src/ufl/ufl/assertions.py", line 51, in ufl_assert
error(*message)
File "/home/justin/Software/firedrake/src/ufl/ufl/log.py", line 167, in error
raise self._exception_type(self._format_raw(*message))
ufl.log.UFLException: Discontinuous type Coefficient must be restricted.
I can't seem to figure out why. Attached is the code. Run as: