field Module Reference

| programmer's documentation

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Data Fields

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Types | Public Member Functions | Data Fields
field Module Reference
Collaboration diagram for field:

## Data Types
interface | field_allocate_or_map_all
| Allocate arrays for all defined fields based on their location. More...
interface | field_set_key_double
| Assign a floating point value for a given key to a field. More...
interface | field_set_key_int
| Assign a floating point value for a given key to a field. More...

## Public Member Functions
subroutine | field_create (name, type_flag, location_id, dim, interleaved, has_previous, id)
| Define a field. More...
subroutine | field_get_n_fields (nfld)
| Return the number of defined fields. More...
subroutine | field_get_id (name, id)
| Return an id associated with a given field name. More...
subroutine | field_get_id_try (name, id)
| Return an id associated with a given field name if present. More...
subroutine | field_get_name (f_id, name)
| Return a given field's name. More...
subroutine | field_get_dim (f_id, f_dim, interleaved)
| Return a given field's dimension. More...
subroutine | field_have_previous (f_id, have_previous)
| Return a given field's dimension. More...
subroutine | field_allocate_values (id)
| Allocate field's value arrays. More...
subroutine | field_map_values (id, val, val_pre)
| Map existing value arrays to field descriptor. More...
subroutine | field_allocate_bc_coeffs (id, have_flux_bc, have_mom_bc, have_conv_bc)
| Allocate boundary condition coefficient arrays if applicable. More...
subroutine | field_init_bc_coeffs (id, have_flux_bc, have_mom_bc, have_conv_bc)
| Initialize boundary condition coefficient arrays if applicable. More...
subroutine | field_map_bc_coeffs (id, a, b, af, bf, ad, bd, ac, bc)
| Map existing field boundary condition coefficient arrays. More...
subroutine | field_current_to_previous (id)
| Copy current values to previous values. More...
subroutine | field_is_key_set (f_id, k_id, is_set)
| Query if a given key has been set for a field. More...
subroutine | field_get_key_id (name, id)
| Return an id associated with a given key name if present. More...
subroutine | field_get_key_int (f_id, k_id, k_value)
| Return an integer value for a given key associated with a field. More...
subroutine | field_get_key_int_by_name (f_id, k_name, k_value)
| Return an integer value for a given key associated with a field. More...
subroutine | field_get_key_double (f_id, k_id, k_value)
| Return a floating-point value for a given key associated with a field. More...
subroutine | field_set_key_str (f_id, k_id, str)
| Assign a character string for a given key to a field. More...
subroutine | field_get_key_str (f_id, k_id, str)
| Return a character string for a given key associated with a field. More...
subroutine | fldsnv (name1, name2, name3)
subroutine | field_get_val_s (field_id, p)
| Return pointer to the values array of a given scalar field. More...
subroutine | field_get_val_s_by_name (name, p)
| Return pointer to the values array of a given scalar field. More...
subroutine | field_get_val_prev_s_by_name (name, p)
| Return pointer to the array's previous values of a given scalar field. More...
subroutine | field_get_val_v (field_id, p)
| Return pointer to the values array of a given vector field. More...
subroutine | field_get_val_prev_s (field_id, p)
| Return pointer to the previous values array of a given scalar field. More...
subroutine | field_get_val_prev_v (field_id, p)
| Return pointer to the previous values array of a given vector field. More...
subroutine | field_get_coefa_s (field_id, p)
| Return pointer to the coefa array of a given scalar field. More...
subroutine | field_get_coefa_v (field_id, p)
| Return pointer to the coefa array of a given vector field. More...
subroutine | field_get_coefad_s (field_id, p)
| Return pointer to the coefad array of a given scalar field (used in the divergence operator such as div(Rij)) More...
subroutine | field_get_coefad_v (field_id, p)
| Return pointer to the coefa array of a given vector field (used in the divergence operator such as div(u'T')) More...
subroutine | field_get_coefac_v (field_id, p)
| Return pointer to the coefac array of a given vector field. More...
subroutine | field_get_coefb_s (field_id, p)
| Return pointer to the coefb array of a given scalar field. More...
subroutine | field_get_coefbc_s (field_id, p)
| Return pointer to the coefbc array of a given scalar field. More...
subroutine | field_get_coefb_uv (field_id, p)
| Return pointer to the coefb array of a given uncoupled vector field. More...
subroutine | field_get_coefbc_uv (field_id, p)
| Return pointer to the coefbc array of a given uncoupled vector field. More...
subroutine | field_get_coefb_v (field_id, p)
| Return pointer to the coefb array of a given coupled vector field. More...
subroutine | field_get_coefbc_v (field_id, p)
| Return pointer to the coefbc array of a given coupled vector field. More...
subroutine | field_get_coefaf_s (field_id, p)
| Return pointer to the coefaf array of a given scalar field. More...
subroutine | field_get_coefac_s (field_id, p)
| Return pointer to the coefac array of a given scalar field. More...
subroutine | field_get_coefaf_v (field_id, p)
| Return pointer to the coefaf array of a given vector field. More...
subroutine | field_get_coefbf_s (field_id, p)
| Return pointer to the coefbf array of a given scalar field. More...
subroutine | field_get_coefbf_uv (field_id, p)
| Return pointer to the coefbf array of a given uncoupled vector field. More...
subroutine | field_get_coefbf_v (field_id, p)
| Return pointer to the coefbf array of a given coupled vector field. More...
subroutine | field_get_coefbd_s (field_id, p)
| Return pointer to the coefbd array of a given scalar field (used in the divergence operator such as div(Rij)) More...
subroutine | field_get_coefbd_v (field_id, p)
| Return pointer to the coefbd array of a given coupled vector field (used in the divergence operator such as div(u'T')) More...

## Data Fields
integer | field_intensive
integer | field_extensive
integer | field_variable
integer | field_property
integer | field_postprocess
integer | field_accumulator
integer | field_user
integer | field_ok
integer | field_invalid_key_name
integer | field_invalid_key_id
integer | field_invalid_category
integer | field_invalid_type

## Member Function/Subroutine Documentation

subroutine field_allocate_bc_coeffs | ( | integer, intent(in) | id,
|  | logical, intent(in) | have_flux_bc,
|  | logical, intent(in) | have_mom_bc,
|  | logical, intent(in) | have_conv_bc
| ) |  |

Allocate boundary condition coefficient arrays if applicable.

Parameters

  [in] | id | field id
  [in] | have_flux_bc | if .true., flux BC coefficients (coefaf and coefbf) are added
  [in] | have_mom_bc | if .true., BC coefficients used in divergence term (coefad and coefbd) are added
  [in] | have_conv_bc | if .true., BC coefficients used in convection term (coefac and coefbc) are added

subroutine field_allocate_values | ( | integer, intent(in) | id | ) |

Allocate field's value arrays.

Parameters

  [in] | id | field id

subroutine field_create | ( | character(len=*), intent(in) | name,
|  | integer, intent(in) | type_flag,
|  | integer, intent(in) | location_id,
|  | integer, intent(in) | dim,
|  | logical, intent(in) | interleaved,
|  | logical, intent(in) | has_previous,
|  | integer, intent(out) | id
| ) |  |

Define a field.

Parameters

  [in] | name | field name
  [in] | type_flag | field categories (may be added)
  [in] | location_id | field location type: 0: none 1: cells 2: interior faces 3: interior faces 4: vertices
  [in] | dim | field dimension
  [in] | interleaved | .true. if values interleaved (ignored if < 2 components)
  [in] | has_previous | .true. if values at previous time step are maintained
  [out] | id | id of defined field

subroutine field_current_to_previous | ( | integer, intent(in) | id | ) |

Copy current values to previous values.

Parameters

  [in] | id | field id

subroutine field_get_coefa_s | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:), intent(out), pointer | p
| ) |  |

Return pointer to the coefa array of a given scalar field.

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to scalar field BC coefa values

subroutine field_get_coefa_v | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:,:), intent(out), pointer | p
| ) |  |

Return pointer to the coefa array of a given vector field.

Parameters

  [in] | field_id | id of given field (which must be a vector)
  [out] | p | pointer to vector field BC coefa values

subroutine field_get_coefac_s | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:), intent(out), pointer | p
| ) |  |

Return pointer to the coefac array of a given scalar field.

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to scalar field BC coefa values

subroutine field_get_coefac_v | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:,:), intent(out), pointer | p
| ) |  |

Return pointer to the coefac array of a given vector field.

Parameters

  [in] | field_id | id of given field (which must be a vector)
  [out] | p | pointer to vector field BC coefa values

subroutine field_get_coefad_s | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:), intent(out), pointer | p
| ) |  |

Return pointer to the coefad array of a given scalar field (used in the divergence operator such as div(Rij))

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to vector field BC coefa values

subroutine field_get_coefad_v | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:,:), intent(out), pointer | p
| ) |  |

Return pointer to the coefa array of a given vector field (used in the divergence operator such as div(u'T'))

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to vector field BC coefa values

subroutine field_get_coefaf_s | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:), intent(out), pointer | p
| ) |  |

Return pointer to the coefaf array of a given scalar field.

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to scalar field BC coefa values

subroutine field_get_coefaf_v | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:,:), intent(out), pointer | p
| ) |  |

Return pointer to the coefaf array of a given vector field.

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to vector field BC coefa values

subroutine field_get_coefb_s | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:), intent(out), pointer | p
| ) |  |

Return pointer to the coefb array of a given scalar field.

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to scalar field BC coefa values

subroutine field_get_coefb_uv | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:,:), intent(out), pointer | p
| ) |  |

Return pointer to the coefb array of a given uncoupled vector field.

Parameters

  [in] | field_id | id of given field (which must be a vector)
  [out] | p | pointer to vector field BC coefa values

subroutine field_get_coefb_v | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:,:,:), intent(out), pointer | p
| ) |  |

Return pointer to the coefb array of a given coupled vector field.

Parameters

  [in] | field_id | id of given field (which must be a vector)
  [out] | p | pointer to vector field BC coefa values

subroutine field_get_coefbc_s | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:), intent(out), pointer | p
| ) |  |

Return pointer to the coefbc array of a given scalar field.

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to scalar field BC coefbc values

subroutine field_get_coefbc_uv | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:,:), intent(out), pointer | p
| ) |  |

Return pointer to the coefbc array of a given uncoupled vector field.

Parameters

  [in] | field_id | id of given field (which must be a vector)
  [out] | p | pointer to vector field BC coefbc values

subroutine field_get_coefbc_v | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:,:,:), intent(out), pointer | p
| ) |  |

Return pointer to the coefbc array of a given coupled vector field.

Parameters

  [in] | field_id | id of given field (which must be a vector)
  [out] | p | pointer to vector field BC coefa values

subroutine field_get_coefbd_s | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:), intent(out), pointer | p
| ) |  |

Return pointer to the coefbd array of a given scalar field (used in the divergence operator such as div(Rij))

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to vector field BC coefb values

subroutine field_get_coefbd_v | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:,:,:), intent(out), pointer | p
| ) |  |

Return pointer to the coefbd array of a given coupled vector field (used in the divergence operator such as div(u'T'))

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to vector field BC coefa values

subroutine field_get_coefbf_s | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:), intent(out), pointer | p
| ) |  |

Return pointer to the coefbf array of a given scalar field.

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to scalar field BC coefb values

subroutine field_get_coefbf_uv | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:,:), intent(out), pointer | p
| ) |  |

Return pointer to the coefbf array of a given uncoupled vector field.

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to vector field BC coefb values

subroutine field_get_coefbf_v | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:,:,:), intent(out), pointer | p
| ) |  |

Return pointer to the coefbf array of a given coupled vector field.

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to vector field BC coefb values

subroutine field_get_dim | ( | integer, intent(in) | f_id,
|  | integer, intent(out) | f_dim,
|  | logical, intent(out) | interleaved
| ) |  |

Return a given field's dimension.

Parameters

  [in] | f_id | field id
  [out] | f_dim | number of field components (dimension)
  [out] | interleaved | true if field is interleaved, false otherwise

subroutine field_get_id | ( | character(len=*), intent(in) | name,
|  | integer, intent(out) | id
| ) |  |

Return an id associated with a given field name.

Parameters

  [in] | name | field name
  [out] | id | id of field

subroutine field_get_id_try | ( | character(len=*), intent(in) | name,
|  | integer, intent(out) | id
| ) |  |

Return an id associated with a given field name if present.

If the field has not been defined previously, -1 is returned.

Parameters

  [in] | name | field name
  [out] | id | id of field

subroutine field_get_key_double | ( | integer, intent(in) | f_id,
|  | integer, intent(in) | k_id,
|  | double precision, intent(out) | k_value
| ) |  |

Return a floating-point value for a given key associated with a field.

If the key id is not valid, or the value type or field category is not compatible, a fatal error is provoked.

Parameters

  [in] | f_id | field id
  [in] | k_id | id of associated key
  [out] | k_value | integer value associated with key id for this field

subroutine field_get_key_id | ( | character(len=*), intent(in) | name,
|  | integer, intent(out) | id
| ) |  |

Return an id associated with a given key name if present.

If the key has not been defined previously, -1 is returned.

Parameters

  [in] | name | key name
  [out] | id | associated key id

subroutine field_get_key_int | ( | integer, intent(in) | f_id,
|  | integer, intent(in) | k_id,
|  | integer, intent(out) | k_value
| ) |  |

Return an integer value for a given key associated with a field.

If the key id is not valid, or the value type or field category is not compatible, a fatal error is provoked.

Parameters

  [in] | f_id | field id
  [in] | k_id | id of associated key
  [out] | k_value | integer value associated with key id for this field

subroutine field_get_key_int_by_name | ( | integer, intent(in) | f_id,
|  | character(len=*), intent(in) | k_name,
|  | integer, intent(out) | k_value
| ) |  |

Return an integer value for a given key associated with a field.

If the key id is not valid, or the value type or field category is not compatible, a fatal error is provoked.

Parameters

  [in] | f_id | field id
  [in] | k_name | key name
  [out] | k_value | integer value associated with key id for this field

subroutine field_get_key_str | ( | integer, intent(in) | f_id,
|  | integer, intent(in) | k_id,
|  | character(len=*), intent(out) | str
| ) |  |

Return a character string for a given key associated with a field.

If the key id is not valid, or the value type or field category is not compatible, a fatal error is provoked.

Parameters

  [in] | f_id | field id
  [in] | k_id | id of associated key
  [out] | str | string associated with key

subroutine field_get_n_fields | ( | integer, intent(out) | nfld | ) |

Return the number of defined fields.

Parameters

  [out] | nfld | number of field

subroutine field_get_name | ( | integer, intent(in) | f_id,
|  | character(len=*), intent(out) | name
| ) |  |

Return a given field's name.

Parameters

  [in] | f_id | field id
  [out] | name | field's name

subroutine field_get_val_prev_s | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:), intent(out), pointer | p
| ) |  |

Return pointer to the previous values array of a given scalar field.

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to previous scalar field values

subroutine field_get_val_prev_s_by_name | ( | character(len=*), intent(in) | name,
|  | double precision, dimension(:), intent(out), pointer | p
| ) |  |

Return pointer to the array's previous values of a given scalar field.

Parameters

  [in] | name | name of given field (which must be scalar)
  [out] | p | pointer to scalar field values at the previous iteration

subroutine field_get_val_prev_v | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:,:), intent(out), pointer | p
| ) |  |

Return pointer to the previous values array of a given vector field.

Parameters

  [in] | field_id | id of given field (which must be vectorial)
  [out] | p | pointer to previous vector field values

subroutine field_get_val_s | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:), intent(out), pointer | p
| ) |  |

Return pointer to the values array of a given scalar field.

Parameters

  [in] | field_id | id of given field (which must be scalar)
  [out] | p | pointer to scalar field values

subroutine field_get_val_s_by_name | ( | character(len=*), intent(in) | name,
|  | double precision, dimension(:), intent(out), pointer | p
| ) |  |

Return pointer to the values array of a given scalar field.

Parameters

  [in] | name | name of given field (which must be scalar)
  [out] | p | pointer to scalar field values

subroutine field_get_val_v | ( | integer, intent(in) | field_id,
|  | double precision, dimension(:,:), intent(out), pointer | p
| ) |  |

Return pointer to the values array of a given vector field.

Parameters

  [in] | field_id | id of given field (which must be vectorial)
  [out] | p | pointer to vector field values

subroutine field_have_previous | ( | integer, intent(in) | f_id,
|  | logical, intent(out) | have_previous
| ) |  |

Return a given field's dimension.

Parameters

  [in] | f_id | field id
  [out] | have_previous | true if previous values are maintained

subroutine field_init_bc_coeffs | ( | integer, intent(in) | id,
|  | logical, intent(in) | have_flux_bc,
|  | logical, intent(in) | have_mom_bc,
|  | logical, intent(in) | have_conv_bc
| ) |  |

Initialize boundary condition coefficient arrays if applicable.

Parameters

  [in] | id | field id
  [in] | have_flux_bc | if .true., flux BC coefficients (coefaf and coefbf) are initialize
  [in] | have_mom_bc | if .true., BC coefficients used in divergence term (coefad and coefbd) are initialized
  [in] | have_conv_bc | if .true., BC coefficients used in convection term (coefac and coefbc) are initialized

subroutine field_is_key_set | ( | integer, intent(in) | f_id,
|  | integer, intent(in) | k_id,
|  | logical, intent(out) | is_set
| ) |  |

Query if a given key has been set for a field.

If the key id is not valid, or the field category is not compatible, a fatal error is provoked.

Parameters

  [in] | f_id | field id
  [in] | k_id | id of associated key
  [out] | is_set | is .true. if the field is set

subroutine field_map_bc_coeffs | ( | integer, intent(in) | id,
|  | double precision, dimension(*), intent(in) | a,
|  | double precision, dimension(*), intent(in) | b,
|  | double precision, dimension(*), intent(in) | af,
|  | double precision, dimension(*), intent(in) | bf,
|  | double precision, dimension(*), intent(in) | ad,
|  | double precision, dimension(*), intent(in) | bd,
|  | double precision, dimension(*), intent(in) | ac,
|  | double precision, dimension(*), intent(in) | bc
| ) |  |

Map existing field boundary condition coefficient arrays.

Parameters

  [in] | id | field id
  [in] | a | explicit BC coefficients array
  [in] | b | implicit BC coefficients array
  [in] | af | explicit flux BC coefficients array, if present
  [in] | bf | implicit flux BC coefficients array, if present
  [in] | ad | explicit div BC coefficients array, if present
  [in] | bd | implicit div BC coefficients array, if present
  [in] | ac | explicit conv BC coefficients array, if present
  [in] | bc | implicit conv BC coefficients array, if present

subroutine field_map_values | ( | integer, intent(in) | id,
|  | double precision, dimension(*), intent(in) | val,
|  | double precision, dimension(*), intent(in) | val_pre
| ) |  |

Map existing value arrays to field descriptor.

Parameters

  [in] | id | field id
  [in] | val | pointer to array of values
  [in] | val_pre | pointer to array of previous values (ignored if field was defined with have_previous = .false.)

subroutine field_set_key_str | ( | integer, intent(in) | f_id,
|  | integer, intent(in) | k_id,
|  | character(len=*), intent(in) | str
| ) |  |

Assign a character string for a given key to a field.

If the key id is not valid, or the value type or field category is not compatible, a fatal error is provoked.

Parameters

  [in] | f_id | field id
  [in] | k_id | id of associated key
  [in] | str | string associated with key

subroutine fldsnv | ( | character(len=*), intent(inout) | name1,
|  | character(len=*), intent(in) | name2,
|  | character(len=*), intent(in) | name3
| ) |  |

## Field Documentation

integer field_accumulator

integer field_extensive

integer field_intensive

integer field_invalid_category

integer field_invalid_key_id

integer field_invalid_key_name

integer field_invalid_type

integer field_ok

integer field_postprocess

integer field_property

integer field_user

integer field_variable

The documentation for this module was generated from the following file:

- src/base/field.f90