Check if pcp_schedule is allocated before assigning pi_p values#32
Check if pcp_schedule is allocated before assigning pi_p values#32
Conversation
|
I think that there is more work to be done to get this and the associated behavior lying flat. For example, there are instances in the solver where pi_p is used whether or not it's allocated, e.g., line 809 of rocket.f90 and a similar occurance in the fac subroutine. There may be other instances. In general, none of pi_p, subar, or supar should be required. CEA2 will happily compute the chamber and throat if no contraction or expansion conditions are requested, but CEA3 crashes. |
|
going through rocket.f90 it looks like the only instances where pi_p is required are at line 809 (IAC) and 997 (FAC). In that case, I guess the solution would be to go from and to and However the input to all the RocketSolver functions should then also allow for pi_p to be an optional argument and this might have a cascade effect on other routines. I wonder why it was written in such a way to always require pi_p though, seems like it would have been easily avoidable |
|
I am closing this and replacing with PR #36. This is a work-in-progress - the fortran side seems stable, and I am making updates to C and Python interfaces and added testing |
Summary
Running a rocket problem with legacy style input files would create a sigsegv if a pip value was not explicitly assigned. This has been fixed in this branch
Fixes #30
Changes
rocket problem checks if pcp_schedule is allocated before assigning to pi_p
Testing
test_results appended
Tested on a windows installation compiled with MinGW64-
Compatibility / Numerical behavior
test_results.csv
Some numerical results are slightly different (relative error ~1e-4) but I would attribute this to a different building environment, I can't see how this change would affect that