Provides a single public entry point apply_initial_condition that fills
the conserved-state array state%ub and the ghost-state vectors
(state%q_left, state%q_right, and the boundary split fluxes for FVS
schemes) based on the problem_type field in the supplied configuration.
Supported problems: 'sod' — Sod shock tube 'shu_osher' — Shu-Osher shock/entropy-wave interaction 'smooth_wave' — Smooth advecting density wave (periodic) 'linear_advection' — Sinusoidal density on uniform background flow (periodic) 'woodward_colella' — Woodward-Colella interacting blast waves 'lax' — Lax shock tube 'from_file' — Read primitives (x, rho, u, p) from an external data file 'udf' — Call a user-defined Fortran subroutine compiled at runtime 'acoustic_pulse' — Gaussian acoustic pulse (quiescent background; NRBC benchmark)
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=c_int), | private, | parameter | :: | host_platform_windows | = | 1_c_int | |
| integer(kind=c_int), | private, | parameter | :: | host_platform_macos | = | 2_c_int | |
| integer(kind=c_int), | private, | parameter | :: | host_platform_linux | = | 3_c_int |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(kind=c_char, len=1), | intent(in) | :: | libpath(*) | |||
| integer(kind=c_int), | intent(in), | value | :: | n | ||
| real(kind=c_double), | intent(in) | :: | x(n) | |||
| real(kind=c_double), | intent(out) | :: | rho(n) | |||
| real(kind=c_double), | intent(out) | :: | rho_u(n) | |||
| real(kind=c_double), | intent(out) | :: | e_arr(n) |
Return the host platform detected by the C portability shim.
Return the preferred runtime-UDF output directory on Windows.
Join a directory and leaf name with a platform-appropriate separator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | dirpath | |||
| character(len=*), | intent(in) | :: | leafname | |||
| character(len=1), | intent(in) | :: | separator |
Wrap a filesystem path for the shell used by execute_command_line.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | raw_path |
Fill state%ub with the initial condition selected by cfg%problem_type.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(solver_state_t), | intent(inout) | :: | state |
Solver state (must have ub allocated, schemes bound) |
||
| type(config_t), | intent(in) | :: | cfg |
Runtime configuration |
Convert namelist primitives (rho_left, u_left, p_left / rho_right, …) to conserved ghost state vectors and optionally pre-compute boundary split fluxes for FVS schemes.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(solver_state_t), | intent(inout) | :: | state | |||
| type(config_t), | intent(in) | :: | cfg |
Pre-compute the boundary split fluxes fl_pos/fl_neg/fr_pos/fr_neg for FVS
schemes. No-op when the FDS path is active (state%use_fds = .true.).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(solver_state_t), | intent(inout) | :: | state |
Load the initial condition from a data file containing columns: x rho u p.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(solver_state_t), | intent(inout) | :: | state |
Solver state (must have ub allocated, schemes bound) |
||
| type(config_t), | intent(in) | :: | cfg |
Runtime configuration (uses cfg%ic_file, cfg%ic_interp, cfg%gam) |
Compile a user-defined Fortran source file to a shared library at runtime
and call its ic_udf subroutine to fill the initial state.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(solver_state_t), | intent(inout) | :: | state |
Solver state (must have ub allocated, schemes bound) |
||
| type(config_t), | intent(in) | :: | cfg |
Runtime configuration (uses cfg%ic_udf_src) |