This module exposes the solver-owned metadata needed by adapters:
parameter names, groups, value kinds, bounds, and choice lists. It also
provides typed getters/setters so higher-level integrations do not need to
know the layout of config_t.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | cfg_kind_int | = | 1 |
Schema kind tag for integer-valued parameters. |
| integer, | public, | parameter | :: | cfg_kind_real | = | 2 |
Schema kind tag for scalar real-valued parameters. |
| integer, | public, | parameter | :: | cfg_kind_logical | = | 3 |
Schema kind tag for logical |
| integer, | public, | parameter | :: | cfg_kind_choice | = | 4 |
Schema kind tag for string parameters constrained to a published choice list. |
| integer, | public, | parameter | :: | cfg_kind_string | = | 5 |
Schema kind tag for free-form string parameters such as file paths. |
| integer, | public, | parameter | :: | cfg_kind_real3 | = | 6 |
Schema kind tag for fixed-length real vectors of length 3. |
| integer, | private, | parameter | :: | choice_none | = | 0 | |
| integer, | private, | parameter | :: | choice_flux | = | 1 | |
| integer, | private, | parameter | :: | choice_recon | = | 2 | |
| integer, | private, | parameter | :: | choice_time | = | 3 | |
| integer, | private, | parameter | :: | choice_limiter | = | 4 | |
| integer, | private, | parameter | :: | choice_problem | = | 5 | |
| integer, | private, | parameter | :: | choice_bc | = | 6 | |
| integer, | private, | parameter | :: | choice_char_proj | = | 7 | |
| integer, | private, | parameter | :: | choice_nrbc_mode | = | 8 | |
| integer, | private, | parameter | :: | choice_hybrid_sensor | = | 9 | |
| integer, | private, | parameter | :: | n_schema_entries | = | 58 | |
| type(config_schema_entry_t), | private, | save | :: | schema_entries(n_schema_entries) | |||
| logical, | private, | save | :: | schema_ready | = | .false. |
Metadata published for one runtime-queryable configuration key.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=32), | public | :: | key | = | '' | ||
| character(len=32), | public | :: | group | = | '' | ||
| integer, | public | :: | value_kind | = | 0 | ||
| character(len=256), | public | :: | help | = | '' | ||
| logical, | public | :: | has_min | = | .false. | ||
| real(kind=wp), | public | :: | min_value | = | 0.0_wp | ||
| logical, | public | :: | has_max | = | .false. | ||
| real(kind=wp), | public | :: | max_value | = | 0.0_wp | ||
| integer, | public | :: | choice_set | = | choice_none |
Return the number of published schema entries.
Find a schema entry by key and return its 1-based index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | key |
Return the number of allowed choices for a choice-valued schema entry.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | index |
Normalise a user-provided parameter key to lowercase trimmed form.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | key |
Copy one schema entry by its 1-based index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | index | |||
| type(config_schema_entry_t), | intent(out) | :: | entry | |||
| logical, | intent(out) | :: | found |
Copy one allowed string token from a schema entry's choice list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | index | |||
| integer, | intent(in) | :: | choice_index | |||
| character(len=*), | intent(out) | :: | value | |||
| logical, | intent(out) | :: | found |
Read the compiled-in default integer value for a schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | key | |||
| integer, | intent(out) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Read the compiled-in default scalar real value for a schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | key | |||
| real(kind=wp), | intent(out) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Read the compiled-in default logical value for a schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | key | |||
| logical, | intent(out) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Read the compiled-in default string or choice token for a schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | key | |||
| character(len=*), | intent(out) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Read the compiled-in default length-3 real vector for a schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | key | |||
| real(kind=wp), | intent(out) | :: | value(3) | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Read one integer-valued field from cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(in) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| integer, | intent(out) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Read one scalar real-valued field from cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(in) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| real(kind=wp), | intent(out) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Read one logical field from cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(in) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| logical, | intent(out) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Read one string or choice token from cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(in) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| character(len=*), | intent(out) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Read one fixed-length real-3 field from cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(in) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| real(kind=wp), | intent(out) | :: | value(3) | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Write one integer-valued field in cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(inout) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| integer, | intent(in) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Write one scalar real-valued field in cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(inout) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| real(kind=wp), | intent(in) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Write one logical field in cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(inout) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| logical, | intent(in) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Write one string or choice token in cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(inout) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| character(len=*), | intent(in) | :: | value | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Write one fixed-length real-3 field in cfg by schema key.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(config_t), | intent(inout) | :: | cfg | |||
| character(len=*), | intent(in) | :: | key | |||
| real(kind=wp), | intent(in) | :: | value(3) | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |
Fill one slot in the lazily initialised schema table.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | index | |||
| character(len=*), | intent(in) | :: | key | |||
| character(len=*), | intent(in) | :: | group | |||
| integer, | intent(in) | :: | value_kind | |||
| character(len=*), | intent(in) | :: | help | |||
| logical, | intent(in), | optional | :: | has_min | ||
| real(kind=wp), | intent(in), | optional | :: | min_value | ||
| logical, | intent(in), | optional | :: | has_max | ||
| real(kind=wp), | intent(in), | optional | :: | max_value | ||
| integer, | intent(in), | optional | :: | choice_set |
Copy one 1-based choice-list item into value.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | values(:) | |||
| integer, | intent(in) | :: | index | |||
| character(len=*), | intent(out) | :: | value | |||
| logical, | intent(out) | :: | found |
Fan out a success flag and optional message to caller-provided outputs.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in) | :: | ok | |||
| character(len=*), | intent(in) | :: | err | |||
| logical, | intent(out), | optional | :: | is_ok | ||
| character(len=*), | intent(out), | optional | :: | message |