Castro
Castro copied to clipboard
radiation should use _cpp_parameters
To make it easier to discover, document, and add runtime parameters, we should modify Gravity.cpp
, Radiation.cpp
, and Diffusion.cpp
to use the _cpp_parameters
functionality.
the radiation parameters seem confusing. A lot of them are dimensioned as arrays, but we only ever use them as scalars.
Take for instance, const_c_v
We declare this as:
const Real* const_c_v
dimension it as:
const_c_v.resize( 1, -1.0);
and then fill it as:
pp.queryarr("const_c_v", const_c_v, 0, 1);
(note, we even print it as:
std::cout << "const_c_v =";
for (n = 0; n < 1; n++) std::cout << " " << const_c_v[n];
)
When passing it to RAD_1D.F90
, we dimension const
in Fortran as: const(0:1)
-- this has 2 elements even though in C++ we have only one quantity.
This all seems inconsistent.
Why can't these parameters just be scalars? and the Fortran code fixed to accept them as scalars?
@WeiqunZhang thoughts?
This is leftover from Louis's previous code for multiple materials.
Feel free to change it to scalar.
On Sep 18, 2016 8:56 AM, "Michael Zingale" [email protected] wrote:
the radiation parameters seem confusing. A lot of them are dimensioned as arrays, but we only ever use them as scalars.
Take for instance, const_c_v
We declare this as:
const Real* const_c_v
dimension it as:
const_c_v.resize( 1, -1.0);
and then fill it as:
pp.queryarr("const_c_v", const_c_v, 0, 1);
(note, we even print it as:
std::cout << "const_c_v ="; for (n = 0; n < 1; n++) std::cout << " " << const_c_v[n];
)
When passing it to RAD_1D.F90, we dimension const in Fortran as: const(0:1) -- this has 2 elements even though in C++ we have only one quantity.
This all seems inconsistent.
Why can't these parameters just be scalars? and the Fortran code fixed to accept them as scalars?
@WeiqunZhang https://github.com/WeiqunZhang thoughts?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BoxLib-Codes/Castro/issues/42#issuecomment-247855788, or mute the thread https://github.com/notifications/unsubscribe-auth/AHf54cxVaU8A4WMEvFKQ6DIsn-vZg29Qks5qrV8dgaJpZM4J_nRM .
The array runtime parameters referenced in the above comment have now been removed
particle parameters should also be moved into _cpp_parameters
renamed to reflect that gravity and diffusion have been moved already
radiation is difficult because a lot of the defaults are dependent on if-tests in the code that are only known at runtime.
it looks like particles are all done