Skip to content

Commit

Permalink
prevent mat_type to be passed to OneFormAssembler
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Dec 20, 2024
1 parent 6742374 commit 0acaa6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firedrake/assemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit 0acaa6e

Please sign in to comment.