Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve validation of input profiles #15

Open
speth opened this issue Apr 11, 2022 · 0 comments
Open

Improve validation of input profiles #15

speth opened this issue Apr 11, 2022 · 0 comments

Comments

@speth
Copy link
Owner

speth commented Apr 11, 2022

Currently, no input validation is performed on the InitialCondition object based on the contents of the x, Y, T, U and V variables. These could be checked at a minimum to make sure they are all of compatible dimensions, with Y being a matrix of shape n_species by n_points. The lack of checking here leads to unhelpful errors such as:

Traceback (most recent call last):
  File "/Users/speth/src/cantera-related/ember-profiles/example_diffusion.py", line 83, in <module>
    conf.run()
  File "/Users/speth/src/ember/build/python/ember/input.py", line 1049, in run
    concrete = self.evaluate()
  File "/Users/speth/src/ember/build/python/ember/input.py", line 902, in evaluate
    return ConcreteConfig(self)
  File "/Users/speth/src/ember/build/python/ember/input.py", line 1129, in __init__
    self.apply_options()
  File "python/ember/_ember.pyx", line 235, in ember._ember.ConfigOptions.apply_options
ValueError: Buffer has wrong number of dimensions (expected 2, got 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant