Skip to content

Commit

Permalink
wind back API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dham committed Dec 18, 2024
1 parent cde10ed commit 8f86232
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions firedrake/cofunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def assign(self, expr, subset=None, expr_from_assemble=False):
raise ValueError('Cannot assign %s' % expr)

def riesz_representation(self, riesz_map='L2', *, bcs=None,
solver_parameters=None,
solver_options=None,
form_compiler_parameters=None):
"""Return the Riesz representation of this :class:`Cofunction`.
Expand All @@ -246,7 +246,7 @@ def riesz_representation(self, riesz_map='L2', *, bcs=None,
callable.
bcs: DirichletBC or list of DirichletBC
Boundary conditions to apply to the Riesz map.
solver_parameters: dict
solver_options: dict
A dictionary of PETSc options to be passed to the solver.
form_compiler_parameters: dict
A dictionary of form compiler parameters to be passed to the
Expand All @@ -261,7 +261,7 @@ def riesz_representation(self, riesz_map='L2', *, bcs=None,
if not callable(riesz_map):
riesz_map = RieszMap(
self.function_space(), riesz_map, bcs=bcs,
solver_parameters=solver_parameters,
solver_parameters=solver_options,
form_compiler_parameters=form_compiler_parameters
)

Expand Down
6 changes: 2 additions & 4 deletions firedrake/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def assign(self, expr, subset=None):
Assigner(self, expr, subset).assign()
return self

def riesz_representation(self, riesz_map='L2', bcs=None):
def riesz_representation(self, riesz_map='L2'):
"""Return the Riesz representation of this :class:`Function`.
Example: For a L2 Riesz map, the Riesz representation is obtained by
Expand All @@ -491,8 +491,6 @@ def riesz_representation(self, riesz_map='L2', bcs=None):
collections.abc.Callable
The Riesz map to use (`l2`, `L2`, or `H1`). This can also be a
callable which applies the Riesz map.
bcs: DirichletBC or list of DirichletBC
Boundary conditions to apply to the Riesz map.
Returns
-------
Expand All @@ -501,7 +499,7 @@ def riesz_representation(self, riesz_map='L2', bcs=None):
given Riesz map.
"""
if not callable(riesz_map):
riesz_map = RieszMap(self.function_space(), riesz_map, bcs=bcs)
riesz_map = RieszMap(self.function_space(), riesz_map)

return riesz_map(self)

Expand Down

0 comments on commit 8f86232

Please sign in to comment.