Skip to content

Commit

Permalink
Initialise abstract sphere
Browse files Browse the repository at this point in the history
  • Loading branch information
sbradnam committed Nov 5, 2024
1 parent 6f75f04 commit 68aba66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 6 additions & 0 deletions jade/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,9 @@ def _read_code_version(self, simulation_folder: os.PathLike) -> str | None:
version of the MCNP code used to run the benchmark
"""

if self.testname in ['Sphere', 'SphereSDDR']:
if not os.path.exists(simulation_folder):
return None
_, outf, _ = self._get_output_files(simulation_folder)
outp = MCNPOutputFile(outf)
try:
Expand Down Expand Up @@ -1019,6 +1022,9 @@ def _read_code_version(self, simulation_path: os.PathLike) -> str | None:
str | None
version of the OpenMC code used to run the benchmark
"""
if self.testname in ['Sphere', 'SphereSDDR']:
if not os.path.exists(simulation_path):
return None
_, spfile = self._get_output_files(simulation_path)
statepoint = omc.OpenMCStatePoint(spfile)
version = statepoint.version
Expand Down
12 changes: 1 addition & 11 deletions jade/sphereoutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
if OMC_AVAIL:
import jade.openmc as omc


class SphereOutput(AbstractBenchmarkOutput):
class AbstractSphereBenchmarkOutput(AbstractBenchmarkOutput):
def __init__(self, lib: str, code: str, testname: str, session: Session):
"""
Initialises the SphereOutput class from the general BenchmarkOutput
Expand Down Expand Up @@ -98,15 +97,6 @@ def __init__(self, lib: str, code: str, testname: str, session: Session):
# means that self.test_path is a dict, hence a comparison. No
# metadata involved here
self.metadata = None

def _get_output_files(self, resuts_path):
pass

def _read_code_version(self, pathtofile):
pass

def parse_output_data(self, results_path):
pass

def single_postprocess(self):
"""
Expand Down

0 comments on commit 68aba66

Please sign in to comment.