Skip to content

Commit

Permalink
Formatting adjustments.
Browse files Browse the repository at this point in the history
  • Loading branch information
ludgerpaehler committed Nov 26, 2023
1 parent 4c215d3 commit 759f738
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion hydrogym/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,15 @@ def render(self, **kwargs):
"""Plot the current PDE state (called by `gym.Env`)"""
raise NotImplementedError


'''
@ray.remote
class EvaluationActor:
"""To remotely evaluate Firedrake solutions."""
def __init__(self, firedrake_instance: "Firedrake_instance", index: int, seeds: Union[ActorSeeds, tuple], state:dict):
def __init__(self, firedrake_instance: "Firedrake_instance", index: int, seeds:
Union[ActorSeeds, tuple], state:dict):
"""
Initialize a remote runner for a Firedrake problem instance.
Expand All @@ -217,6 +219,7 @@ def __init__(self, firedrake_instance: "Firedrake_instance", index: int, seeds:
# code here running.
'''


class CallbackBase:
def __init__(self, interval: int = 1):
"""
Expand Down
4 changes: 3 additions & 1 deletion hydrogym/firedrake/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ def control_vec(self, mixed=False):

# Control as Function
B.append(
fd.assemble(inner(fd.Constant((0, 0)), v) * dx, bcs=self.collect_bcs()).riesz_representation(riesz_map = 'l2')
fd.assemble(
inner(fd.Constant((0, 0)), v) * dx, cs=self.collect_bcs()
).riesz_representation(riesz_map="l2")
)

# Have to have mixed function space for computing B functions
Expand Down

0 comments on commit 759f738

Please sign in to comment.