Skip to content

Commit

Permalink
[discretizer/disc] add assertion about param file existence
Browse files Browse the repository at this point in the history
  • Loading branch information
renefritze committed Oct 14, 2016
1 parent e8e2eac commit 59e81d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pymor/discretizers/disk.py
Expand Up @@ -86,6 +86,7 @@ def discretize_stationary_from_disk(parameter_file):
The |StationaryDiscretization| that has been generated.
"""
assert ".ini" == parameter_file[-4:], "Given file is not an .ini file"
assert os.path.isfile(parameter_file)
base_path = os.path.dirname(parameter_file)

# Get input from parameter file
Expand Down Expand Up @@ -221,6 +222,7 @@ def discretize_instationary_from_disk(parameter_file, T=None, steps=None, u0=Non
The |InstationaryDiscretization| that has been generated.
"""
assert ".ini" == parameter_file[-4:], "Given file is not an .ini file"
assert os.path.isfile(parameter_file)
base_path = os.path.dirname(parameter_file)

# Get input from parameter file
Expand Down

0 comments on commit 59e81d0

Please sign in to comment.