diff --git a/firedrake/assemble.py b/firedrake/assemble.py index 875d27862e..f000643803 100644 --- a/firedrake/assemble.py +++ b/firedrake/assemble.py @@ -143,8 +143,8 @@ def get_assembler(form, *args, **kwargs): """ is_base_form_preprocessed = kwargs.pop('is_base_form_preprocessed', False) + mat_type = kwargs.pop('mat_type', None) if isinstance(form, ufl.form.BaseForm) and not is_base_form_preprocessed: - mat_type = kwargs.get('mat_type', None) fc_params = kwargs.get('form_compiler_parameters', None) # Preprocess the DAG and restructure the DAG # Only pre-process `form` once beforehand to avoid pre-processing for each assembly call @@ -156,7 +156,7 @@ def get_assembler(form, *args, **kwargs): elif len(form.arguments()) == 1 or diagonal: return OneFormAssembler(form, *args, diagonal=diagonal, **kwargs) elif len(form.arguments()) == 2: - return TwoFormAssembler(form, *args, **kwargs) + return TwoFormAssembler(form, *args, mat_type=mat_type, **kwargs) else: raise ValueError('Expecting a 0-, 1-, or 2-form: got %s' % (form)) elif isinstance(form, ufl.core.expr.Expr) and not isinstance(form, ufl.core.base_form_operator.BaseFormOperator):