| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private, | parameter | :: | handle_token | = | 1 | |
| type(solver_session_t), | private, | pointer, save | :: | active_session | => | null() | |
| type(cfd_solver_handle_t), | private, | pointer, save | :: | active_handle | => | null() | |
| character(len=512), | private, | save | :: | api_last_error | = | '' |
C-interoperable progress record returned by cfd_solver_get_progress.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=c_int), | public | :: | iteration | = | 0 | ||
| integer(kind=c_int), | public | :: | n_point | = | 0 | ||
| integer(kind=c_int), | public | :: | is_initialized | = | 0 | ||
| integer(kind=c_int), | public | :: | is_finished | = | 0 | ||
| real(kind=c_double), | public | :: | sim_time | = | 0.0_c_double | ||
| real(kind=c_double), | public | :: | time_stop | = | 0.0_c_double | ||
| real(kind=c_double), | public | :: | dt | = | 0.0_c_double | ||
| real(kind=c_double), | public | :: | residual | = | 0.0_c_double |
Opaque token wrapper used to validate ABI handles from foreign code.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=c_int), | public | :: | token | = | 0 |
Allocate the sole supported v1 session and return its opaque handle.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | intent(out) | :: | handle |
Destroy the active session referenced by handle.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle |
Load a namelist file into the session configuration.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(in) | :: | filename(*) |
Validate config and allocate the runtime owned by handle.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle |
Advance the solver by at most max_steps iterations.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| integer(kind=c_int), | value | :: | max_steps | |||
| integer(kind=c_int), | intent(out) | :: | steps_taken | |||
| integer(kind=c_int), | intent(out) | :: | finished |
Run the session to completion without intermediate polling.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle |
Copy out the current progress snapshot for a session.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| type(cfd_solver_progress_c_t), | intent(out) | :: | progress |
Return the grid-point count required by solution-copy buffers.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| integer(kind=c_int), | intent(out) | :: | n_point |
Copy the primitive solution into caller-owned C buffers.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| real(kind=c_double), | intent(out) | :: | x(*) | |||
| real(kind=c_double), | intent(out) | :: | rho(*) | |||
| real(kind=c_double), | intent(out) | :: | u(*) | |||
| real(kind=c_double), | intent(out) | :: | p(*) | |||
| integer(kind=c_int), | value | :: | n_point |
Write the current solution in the standard text result format.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(in) | :: | filename(*) |
Force an immediate checkpoint write for the active runtime.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(in) | :: | base(*) |
Copy the last surfaced error string into a C buffer.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(out) | :: | buffer(*) | |||
| integer(kind=c_int), | value | :: | buffer_len |
Read an integer configuration field by canonical schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(in) | :: | key(*) | |||
| integer(kind=c_int), | intent(out) | :: | value |
Read a scalar real configuration field by canonical schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(in) | :: | key(*) | |||
| real(kind=c_double), | intent(out) | :: | value |
Read a logical configuration field by canonical schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(in) | :: | key(*) | |||
| integer(kind=c_int), | intent(out) | :: | value |
Read a string or choice-token configuration field by canonical schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(in) | :: | key(*) | |||
| character(kind=c_char, len=1), | intent(out) | :: | buffer(*) | |||
| integer(kind=c_int), | value | :: | buffer_len |
Read a length-3 real configuration field by canonical schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(in) | :: | key(*) | |||
| real(kind=c_double), | intent(out) | :: | values(*) | |||
| integer(kind=c_int), | value | :: | n_values |
Set an integer configuration field by canonical schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(in) | :: | key(*) | |||
| integer(kind=c_int), | value | :: | value |
Set a scalar real configuration field by canonical schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(in) | :: | key(*) | |||
| real(kind=c_double), | value | :: | value |
Set a logical configuration field by canonical schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(in) | :: | key(*) | |||
| integer(kind=c_int), | value | :: | value |
Set a string or choice-token configuration field by canonical schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(in) | :: | key(*) | |||
| character(kind=c_char, len=1), | intent(in) | :: | value(*) |
Set a length-3 real configuration field by canonical schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| character(kind=c_char, len=1), | intent(in) | :: | key(*) | |||
| real(kind=c_double), | intent(in) | :: | values(*) | |||
| integer(kind=c_int), | value | :: | n_values |
Return the number of schema entries exported through the ABI.
Copy the canonical key for schema entry index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | index | |||
| character(kind=c_char, len=1), | intent(out) | :: | buffer(*) | |||
| integer(kind=c_int), | value | :: | buffer_len |
Copy the namelist group name for schema entry index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | index | |||
| character(kind=c_char, len=1), | intent(out) | :: | buffer(*) | |||
| integer(kind=c_int), | value | :: | buffer_len |
Copy the short help text for schema entry index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | index | |||
| character(kind=c_char, len=1), | intent(out) | :: | buffer(*) | |||
| integer(kind=c_int), | value | :: | buffer_len |
Return the cfg_kind_* tag for schema entry index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | index | |||
| integer(kind=c_int), | intent(out) | :: | value_kind |
Return optional numeric bounds for schema entry index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | index | |||
| integer(kind=c_int), | intent(out) | :: | has_min | |||
| real(kind=c_double), | intent(out) | :: | min_value | |||
| integer(kind=c_int), | intent(out) | :: | has_max | |||
| real(kind=c_double), | intent(out) | :: | max_value |
Return the number of allowed string choices for schema entry index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | index | |||
| integer(kind=c_int), | intent(out) | :: | count |
Copy one allowed string token for a choice-valued schema entry.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | index | |||
| integer(kind=c_int), | value | :: | choice_index | |||
| character(kind=c_char, len=1), | intent(out) | :: | buffer(*) | |||
| integer(kind=c_int), | value | :: | buffer_len |
Copy the compiled-in default integer value for schema entry index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | index | |||
| integer(kind=c_int), | intent(out) | :: | value |
Copy the compiled-in default scalar real value for schema entry index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | index | |||
| real(kind=c_double), | intent(out) | :: | value |
Copy the compiled-in default logical value for schema entry index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | index | |||
| integer(kind=c_int), | intent(out) | :: | value |
Copy the compiled-in default string or choice token for schema entry index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | index | |||
| character(kind=c_char, len=1), | intent(out) | :: | buffer(*) | |||
| integer(kind=c_int), | value | :: | buffer_len |
Copy the compiled-in default length-3 real vector for schema entry index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | index | |||
| real(kind=c_double), | intent(out) | :: | values(*) | |||
| integer(kind=c_int), | value | :: | n_values |
Resolve an opaque C handle to the active Fortran session pointer.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | handle | |||
| type(solver_session_t), | pointer | :: | session |
Shared helper for copying one text field from a schema entry into a C buffer.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | value | :: | index | |||
| character(kind=c_char, len=1), | intent(out) | :: | buffer(*) | |||
| integer(kind=c_int), | value | :: | buffer_len | |||
| logical, | intent(out) | :: | found | |||
| type(config_schema_entry_t), | intent(out) | :: | entry | |||
| character(len=*), | intent(in) | :: | field_name |
Convert a NUL-terminated C string into a fixed-length Fortran buffer.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(kind=c_char, len=1), | intent(in) | :: | cstr(*) |
Copy trimmed Fortran text into a NUL-terminated C buffer.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | text | |||
| character(kind=c_char, len=1), | intent(out) | :: | buffer(*) | |||
| integer, | intent(in) | :: | buffer_len |