From c6ef3d4bc1a1e73f70fb4e36f87bd3f258500d79 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 3 Mar 2025 13:27:02 -0500 Subject: [PATCH] add a __str__ method to Simulation --- pyro/simulation_null.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyro/simulation_null.py b/pyro/simulation_null.py index 0baaea658..53d79fa45 100644 --- a/pyro/simulation_null.py +++ b/pyro/simulation_null.py @@ -185,6 +185,12 @@ def __init__(self, solver_name, problem_name, problem_func, rp, *, # plotting self.cm = "viridis" + def __str__(self): + ostr = "pyro Simulation:\n" + ostr += f" solver: {self.solver_name}\n" + ostr += f" problem: {self.problem_name}\n" + return ostr + def finished(self): """ is the simulation finished based on time or the number of steps