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

NoPCM Inputs #1450

Closed
bmaclach opened this issue May 30, 2019 · 4 comments · Fixed by #1496
Closed

NoPCM Inputs #1450

bmaclach opened this issue May 30, 2019 · 4 comments · Fixed by #1496
Assignees

Comments

@bmaclach
Copy link
Collaborator

Some of the inputs to NoPCM aren't included in the inputs field of the SystemInformation. Specifically, timeStep, rel_tol, abs_tol, and cons_tol are inputs but are not included in the SystemInformation for NoPCM. Also, tau is mistakenly included as in input in DataDesc.hs instead of timeStep. This breaks the generated code.

@bmaclach bmaclach self-assigned this May 30, 2019
@JacquesCarette
Copy link
Owner

There is surely a bigger lesson than just this issue to be learned from this.

@bmaclach
Copy link
Collaborator Author

bmaclach commented Jun 3, 2019

@JacquesCarette That Drasil shouldn't allow conflicts between the stated inputs and the input file format definition?

In terms of a lesson related to forgetting to state some inputs, Drasil already throws an error if it can't figure out how it can get from input -> output based on the given inputs and definitions. I'm wondering why that error wasn't thrown here...

Okay I just investigated, and it's because none of the missing inputs are explicitly used in any of the equations for calculating the outputs. The absolute and relative tolerances and time step are passed to the ODE solver and cons_tol is used when verifying that the output follows the law of conservation of energy. Maybe we need to teach Drasil that if an ODE solver is being used, tolerances and step sizes are required, and if we are checking a property of a correct solution (like adherence to the law of conservation of energy, in this case), a tolerance is again required.

@JacquesCarette
Copy link
Owner

Yes, this kind of stuff. Any argument passed to the ODE solver should be considered used, and so should be checked to make sure they are present. Same goes for checking a property, but the details matter, so that may be slightly trickier.

@bmaclach
Copy link
Collaborator Author

bmaclach commented Jun 5, 2019

Issues #1497, #1499, and #1500 created for the improvements discussed above. This issue will be closed with the merge of #1496.

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

Successfully merging a pull request may close this issue.

2 participants