Skip to content

Commit a3da1f1

Browse files
authored
add a __str__ method to Simulation (#344)
1 parent 91aed7b commit a3da1f1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pyro/simulation_null.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ def __init__(self, solver_name, problem_name, problem_func, rp, *,
185185
# plotting
186186
self.cm = "viridis"
187187

188+
def __str__(self):
189+
ostr = "pyro Simulation:\n"
190+
ostr += f" solver: {self.solver_name}\n"
191+
ostr += f" problem: {self.problem_name}\n"
192+
return ostr
193+
188194
def finished(self):
189195
"""
190196
is the simulation finished based on time or the number of steps

0 commit comments

Comments
 (0)