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.
Internals are derived from the shared config_engine field-descriptor
table (built once per process by config.build_field_table) rather than a
hand-maintained select case per field; the public API is unchanged.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(config_t), | private, | save, target | :: | schema_defaults |
Static schema state: one saved table bound to a saved default instance. |
||
| type(field_desc_t), | private, | save | :: | schema_fields(n_config_fields) | |||
| 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 | = | 0 |
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.
Thin wrapper over lowercase_token (from string_utils) fixing the
result to the schema's 32-character key field width.
| 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), | target | :: | 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), | target | :: | 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), | target | :: | 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), | target | :: | 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), | target | :: | 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 |
Populate the saved schema table on first use, bound to a saved default
config_t instance (the single-source-of-defaults property the spec
requires).
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 |