9.0
general documentation
Loading...
Searching...
No Matches
field Module Reference

Data Types

interface  field_clear_key_int_bits
 Set integer bits matching a mask to 0 for a given key for a field. 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...
interface  field_set_key_int_bits
 Set integer bits matching a mask to 1 for a given key for a field. More...

Functions/Subroutines

subroutine field_create (name, type_flag, location_id, dim, has_previous, id)
 Define a field.
subroutine field_find_or_create (name, type_flag, location_id, dim, id)
 Return the id of a field matching a given name and attributes, creating it if necessary.
subroutine field_get_n_fields (nfld)
 Return the number of defined fields.
subroutine field_get_id (name, id)
 Return an id associated with a given field name.
subroutine field_get_location (f_id, f_loc)
 Return the location of a given field.
subroutine field_get_id_try (name, id)
 Return an id associated with a given field name if present.
subroutine field_get_name (f_id, name)
 Return a given field's name.
subroutine field_get_dim (f_id, f_dim)
 Return a given field's dimension.
subroutine field_get_type (f_id, f_type)
 Return a given field's type.
subroutine field_have_previous (f_id, have_previous)
 Indicate if a field maintains values at the previous time step.
subroutine field_lock_key (f_id, k_id)
 Interface to C function locking a key value.
subroutine field_set_n_previous (f_id, n_previous)
 Modify a field's handling of values at the previous time step.
subroutine field_get_n_previous (f_id, f_n)
 Return a given field's number of previous values.
subroutine field_current_to_previous (id)
 Copy current values to previous values.
subroutine field_is_key_set (f_id, k_id, is_set)
 Query if a given key has been set for a field.
subroutine field_get_key_id (name, id)
 Return an id associated with a given key name if present.
subroutine field_get_key_int (f_id, k_id, k_value)
 Return an integer value for a given key associated with a field.
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.
subroutine field_get_key_double (f_id, k_id, k_value)
 Return a floating-point value for a given key associated with a field.
subroutine field_set_key_str (f_id, k_id, str)
 Assign a character string for a given key to a field.
subroutine field_get_key_str (f_id, k_id, str)
 Return a character string for a given key associated with a field.
subroutine field_get_label (f_id, str)
 Return a label associated with a field.
subroutine field_get_val_s (field_id, p)
 Return pointer to the values array of a given scalar field.
subroutine field_get_val_s_by_name (name, p)
 Return pointer to the values array of a given scalar field.
subroutine field_get_val_prev_s_by_name (name, p)
 Return pointer to the array's previous values of a given scalar field.
subroutine field_get_val_v (field_id, p)
 Return pointer to the values array of a given vector field.
subroutine field_get_val_t (field_id, p)
 Return pointer to the values array of a given 3*3 tensor field.
subroutine field_get_val_v_by_name (name, p)
 Return pointer to the values array of a given vector field.
subroutine field_get_val_prev_v_by_name (name, p)
 Return pointer to the array's previous values of a given vector field.
subroutine field_get_val_prev_s (field_id, p)
 Return pointer to the previous values array of a given scalar field.
subroutine field_get_val_prev2_s (field_id, p)
 Return pointer to the previous values array of a given scalar field.
subroutine field_get_val_prev_s_try (field_id, p)
 Return pointer to the previous values array of a given scalar field if it exists, to the current value otherwise.
subroutine field_get_val_prev_v (field_id, p)
 Return pointer to the previous values array of a given vector field.
subroutine field_get_coefa_s (field_id, p)
 Return pointer to the coefa array of a given scalar field.
subroutine field_get_coefb_s (field_id, p)
 Return pointer to the coefb array of a given scalar field.
subroutine field_get_coefaf_s (field_id, p)
 Return pointer to the coefaf array of a given scalar field.
subroutine field_get_coefac_s (field_id, p)
 Return pointer to the coefac array of a given scalar field.
subroutine field_get_coefbf_s (field_id, p)
 Return pointer to the coefbf array of a given scalar field.
subroutine field_build_bc_codes_all (icodcl, rcodcl)
 Map and return icodcl and rcodcl boundary condition arrays.

Variables

integer field_intensive
integer field_extensive
integer field_variable
integer field_property
integer field_postprocess
integer field_accumulator
integer field_user
integer field_cdo
integer field_ok
integer field_invalid_key_name
integer field_invalid_key_id
integer field_invalid_category
integer field_invalid_type

Function/Subroutine Documentation

◆ field_build_bc_codes_all()

subroutine field_build_bc_codes_all ( integer, dimension(:,:), intent(inout), pointer icodcl,
double precision, dimension(:,:,:), intent(inout), pointer rcodcl )

Map and return icodcl and rcodcl boundary condition arrays.

Parameters
[out]icodclpointer to icodcl array
[out]icodclpointer to icodcl array

◆ field_create()

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) has_previous,
integer, intent(out) id )

Define a field.

Parameters
[in]namefield name
[in]type_flagfield categories (may be added)
[in]location_idfield location type: 0: none 1: cells 2: interior faces 3: interior faces 4: vertices
[in]dimfield dimension
[in]has_previous.true. if values at previous time step are maintained
[out]idid of defined field

◆ field_current_to_previous()

subroutine field_current_to_previous ( integer, intent(in) id)

Copy current values to previous values.

Parameters
[in]idfield id

◆ field_find_or_create()

subroutine field_find_or_create ( character(len=*), intent(in) name,
integer, intent(in) type_flag,
integer, intent(in) location_id,
integer, intent(in) dim,
integer, intent(out) id )

Return the id of a field matching a given name and attributes, creating it if necessary.

If a field with the same name but different attributes is present, this is considered an error. The default number of time values associated with a field created through this function is 1. To modify it, use cs_field_set_n_time_vals.

Parameters
[in]namefield name
[in]type_flagfield categories (may be added)
[in]location_idfield location type: 0: none 1: cells 2: interior faces 3: interior faces 4: vertices
[in]dimfield dimension
[out]idid of defined field

◆ field_get_coefa_s()

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

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

Parameters
[in]field_idid of given field (which must be scalar)
[out]ppointer to scalar field BC coefa values

◆ field_get_coefac_s()

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

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

Parameters
[in]field_idid of given field (which must be scalar)
[out]ppointer to scalar field BC coefa values

◆ field_get_coefaf_s()

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

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

Parameters
[in]field_idid of given field (which must be scalar)
[out]ppointer to scalar field BC coefa values

◆ field_get_coefb_s()

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

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

Parameters
[in]field_idid of given field (which must be scalar)
[out]ppointer to scalar field BC coefa values

◆ field_get_coefbf_s()

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

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

Parameters
[in]field_idid of given field (which must be scalar)
[out]ppointer to scalar field BC coefb values

◆ field_get_dim()

subroutine field_get_dim ( integer, intent(in) f_id,
integer, intent(out) f_dim )

Return a given field's dimension.

Parameters
[in]f_idfield id
[out]f_dimnumber of field components (dimension)

◆ field_get_id()

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

Return an id associated with a given field name.

Parameters
[in]namefield name
[out]idid of field

◆ field_get_id_try()

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]namefield name
[out]idid of field

◆ field_get_key_double()

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_idfield id
[in]k_idid of associated key
[out]k_valueinteger value associated with key id for this field

◆ field_get_key_id()

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]namekey name
[out]idassociated key id

◆ field_get_key_int()

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_idfield id
[in]k_idid of associated key
[out]k_valueinteger value associated with key id for this field

◆ field_get_key_int_by_name()

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_idfield id
[in]k_namekey name
[out]k_valueinteger value associated with key id for this field

◆ field_get_key_str()

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_idfield id
[in]k_idid of associated key
[out]strstring associated with key

◆ field_get_label()

subroutine field_get_label ( integer, intent(in) f_id,
character(len=*), intent(out) str )

Return a label associated with a field.

If the "label" key has been set for this field, its associated string is returned. Otherwise, the field's name is returned.

Parameters
[in]f_idfield id
[out]strstring associated with key

◆ field_get_location()

subroutine field_get_location ( integer, intent(in) f_id,
integer, intent(out) f_loc )

Return the location of a given field.

Parameters
[in]f_idfield id
[out]f_loclocation of the field

◆ field_get_n_fields()

subroutine field_get_n_fields ( integer, intent(out) nfld)

Return the number of defined fields.

Parameters
[out]nfldnumber of field

◆ field_get_n_previous()

subroutine field_get_n_previous ( integer, intent(in) f_id,
integer, intent(out) f_n )

Return a given field's number of previous values.

Parameters
[in]f_idfield id
[out]f_nnumber of previous values

◆ field_get_name()

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

Return a given field's name.

Parameters
[in]f_idfield id
[out]namefield's name

◆ field_get_type()

subroutine field_get_type ( integer, intent(in) f_id,
integer, intent(out) f_type )

Return a given field's type.

Parameters
[in]f_idfield id
[out]f_typefield type flag

◆ field_get_val_prev2_s()

subroutine field_get_val_prev2_s ( integer, intent(in) field_id,
double precision, dimension(:), intent(inout), pointer p )

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

Parameters
[in]field_idid of given field (which must be scalar)
[out]ppointer to previous scalar field values

◆ field_get_val_prev_s()

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

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

Parameters
[in]field_idid of given field (which must be scalar)
[out]ppointer to previous scalar field values

◆ field_get_val_prev_s_by_name()

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

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

Parameters
[in]namename of given field (which must be scalar)
[out]ppointer to scalar field values at the previous iteration

◆ field_get_val_prev_s_try()

subroutine field_get_val_prev_s_try ( integer, intent(in) field_id,
double precision, dimension(:), intent(inout), pointer p )

Return pointer to the previous values array of a given scalar field if it exists, to the current value otherwise.

Parameters
[in]field_idid of given field (which must be scalar)
[out]ppointer to previous scalar field values

◆ field_get_val_prev_v()

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

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

Parameters
[in]field_idid of given field (which must be vectorial)
[out]ppointer to previous vector field values

◆ field_get_val_prev_v_by_name()

subroutine field_get_val_prev_v_by_name ( character(len=*), intent(in) name,
double precision, dimension(:,:), intent(inout), pointer p )

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

Parameters
[in]namename of given field (which must be vectorial)
[out]ppointer to vector field values at the previous iteration

◆ field_get_val_s()

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

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

Parameters
[in]field_idid of given field (which must be scalar)
[out]ppointer to scalar field values

◆ field_get_val_s_by_name()

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

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

Parameters
[in]namename of given field (which must be scalar)
[out]ppointer to scalar field values

◆ field_get_val_t()

subroutine field_get_val_t ( integer, intent(in) field_id,
double precision, dimension(:,:,:), intent(inout), pointer p )

Return pointer to the values array of a given 3*3 tensor field.

Parameters
[in]field_idid of given field (which must be vectorial)
[out]ppointer to vector field values

◆ field_get_val_v()

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

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

Parameters
[in]field_idid of given field (which must be vectorial)
[out]ppointer to vector field values

◆ field_get_val_v_by_name()

subroutine field_get_val_v_by_name ( character(len=*), intent(in) name,
double precision, dimension(:,:), intent(inout), pointer p )

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

Parameters
[in]namename of given field (which must be vectorial)
[out]ppointer to scalar field values

◆ field_have_previous()

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

Indicate if a field maintains values at the previous time step.

Parameters
[in]f_idfield id
[out]have_previoustrue if previous values are maintained

◆ field_is_key_set()

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_idfield id
[in]k_idid of associated key
[out]is_setis .true. if the field is set

◆ field_lock_key()

subroutine field_lock_key ( integer, intent(in) f_id,
integer, intent(in) k_id )

Interface to C function locking a key value.

Parameters
[in]f_idfield id
[in]k_idkey id

◆ field_set_key_str()

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_idfield id
[in]k_idid of associated key
[in]strstring associated with key

◆ field_set_n_previous()

subroutine field_set_n_previous ( integer, intent(in) f_id,
integer, intent(in) n_previous )

Modify a field's handling of values at the previous time step.

Parameters
[in]f_idfield id
[out]n_previousnumber of previous values (0 or 1)

Variable Documentation

◆ field_accumulator

integer field_accumulator

◆ field_cdo

integer field_cdo

◆ field_extensive

integer field_extensive

◆ field_intensive

integer field_intensive

◆ field_invalid_category

integer field_invalid_category

◆ field_invalid_key_id

integer field_invalid_key_id

◆ field_invalid_key_name

integer field_invalid_key_name

◆ field_invalid_type

integer field_invalid_type

◆ field_ok

integer field_ok

◆ field_postprocess

integer field_postprocess

◆ field_property

integer field_property

◆ field_user

integer field_user

◆ field_variable

integer field_variable