-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add scalar floor and refactor temperature and density floors #363
Add scalar floor and refactor temperature and density floors #363
Conversation
…ust density floor
…o dev-scalar-floor
…o dev-scalar-floor
…o dev-scalar-floor
…o dev-scalar-floor
…o dev-scalar-floor
… calls to grid3d::update_hydro_grid
src/grid/grid3D.cpp
Outdated
#else | ||
H.temperature_floor = 0.0; | ||
H.scalar_floor = 0.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I understand this logic for the density and temperature floors, I think it doesn't actually apply for the scalar floor, since scalars can have negative values (think for example about the transverse velocities in the Riemann problem). In practice, it shouldn't matter, since you don't call the floor function unless you are applying a floor, in which case the value should have been specified in the parameter file. But I think it might make more sense rather than setting a default value of 0 here to just have the code throw a warning if the floor macro is turned on but no input value is supplied.
Updated the default hydro build to use the Van Leer (VL) and PLMC build options. Also, updated the test data for those new builds
Also updated test data
Updated template, basic_scalar, disk, dust, rot_proj, static_grav to use PLMC and Van Leer integrator
Avoids issues with running clang-tidy in non-VL builds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New parameter defaults should be set in global.h, and the code should give a warning if any floor is turned on but the input parameter isn't set.
Addressed in 3e1c195 |
In summary, this PR:
Apply_Scalar_Floor
.field_num
argument ofApply_Scalar_Floor
, and should be specified with itsgrid_enum
index.DENS_FLOOR
andTEMP_FLOOR
macros (the floors are instead stored in the Grid3D header asdensity_floor
,temperature_floor
, andscalar_floor
).Apply_Scalar_Floor
.