Skip to content

Commit 19757e6

Browse files
authored
add an example of comparing the compressible solvers (#236)
also fix __repr__ of Pyro
1 parent 7860a1f commit 19757e6

File tree

3 files changed

+203
-1
lines changed

3 files changed

+203
-1
lines changed

docs/source/compressible-rt-compare.ipynb

Lines changed: 198 additions & 0 deletions
Large diffs are not rendered by default.

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ new ideas.
6262
:caption: Examples
6363
:hidden:
6464

65+
compressible-rt-compare.ipynb
6566
advection-error.ipynb
6667
compressible-convergence.ipynb
6768

pyro/pyro_sim.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,10 @@ def single_step(self):
239239
tm_vis.end()
240240

241241
def __repr__(self):
242-
""" Return a representation of the Pyro object """
242+
s = f"Pyro('{self.solver_name}')"
243+
return s
244+
245+
def __str__(self):
243246
s = f"Solver = {self.solver_name}\n"
244247
if self.is_initialized:
245248
s += f"Problem = {self.sim.problem_name}\n"

0 commit comments

Comments
 (0)