Skip to content

Commit

Permalink
add an example of comparing the compressible solvers (#236)
Browse files Browse the repository at this point in the history
also fix __repr__ of Pyro
  • Loading branch information
zingale authored Sep 2, 2024
1 parent 7860a1f commit 19757e6
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 1 deletion.
198 changes: 198 additions & 0 deletions docs/source/compressible-rt-compare.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ new ideas.
:caption: Examples
:hidden:

compressible-rt-compare.ipynb
advection-error.ipynb
compressible-convergence.ipynb

Expand Down
5 changes: 4 additions & 1 deletion pyro/pyro_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ def single_step(self):
tm_vis.end()

def __repr__(self):
""" Return a representation of the Pyro object """
s = f"Pyro('{self.solver_name}')"
return s

def __str__(self):
s = f"Solver = {self.solver_name}\n"
if self.is_initialized:
s += f"Problem = {self.sim.problem_name}\n"
Expand Down

0 comments on commit 19757e6

Please sign in to comment.