Avoid error from invalid floating point operation
Peter Hill (approved)
Branch: bugfix/uninit-trinity-var
Branch: 8.1-RC
Merged
Merged pull request
Merged in bugfix/uninit-trinity-var (pull request #499)
Merged in bugfix/uninit-trinity-var (pull request #499)
If
theta_grid_knobs::equilibrium_option
isn'teik
, then neithersurfarea
nordvdrhon
are set, resulting in an invalid floating point operation error.grhoavg
is already calculated, so just use that. It will still be undefined ifeik
isn't used, but at least we won't be dividing by NaNs.Another solution would be to only set these variables if
eik
is usedUpdate to ensure that theta_grid provides these values for all geometry types.