Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
scalar_ic Module Reference

Scalar initial condition.

Data Types

interface  set_scalar_ic
 

Functions/Subroutines

subroutine set_scalar_ic_int (s, coef, gs, type, params, i)
 Set scalar initial condition (builtin)
 
subroutine set_scalar_ic_usr (scheme_name, s, coef, gs, user_proc)
 Set scalar intial condition (user defined)
 
subroutine set_scalar_ic_common (s, coef, gs)
 Set scalar initial condition (common)
 
subroutine set_scalar_ic_uniform (s, ic_value)
 Uniform initial condition.
 
subroutine set_scalar_ic_expression (s, expr)
 Expression initial condition.
 
subroutine set_scalar_ic_point_zone (s, base_value, zone_name, zone_value)
 Point zone initial condition.
 
subroutine set_scalar_ic_fld (s, file_name, interpolate, mesh_file_name, i, target_idx, global_interp_subdict)
 Set the initial condition of the scalar based on a field. @detail The field is read from an fld file. If enabled, interpolation is also possible. In that case, the mesh coordinates can be read from another file in the fld field series.
 

Function/Subroutine Documentation

◆ set_scalar_ic_common()

subroutine scalar_ic::set_scalar_ic_common ( type(field_t), intent(inout)  s,
type(coef_t), intent(in)  coef,
type(gs_t), intent(inout)  gs 
)
private

Finalize scalar initial condition by distributing the initial condition across elements and multiplying by the coefficient (if any). Operates on the device array when running on GPUs, so the caller must make sure the values are there.

Parameters
sScalar field.
coefCoefficient.
gsGather-Scatter object.

Definition at line 199 of file scalar_ic.f90.

Here is the caller graph for this function:

◆ set_scalar_ic_expression()

subroutine scalar_ic::set_scalar_ic_expression ( type(field_t), intent(inout)  s,
character(len=*), intent(in)  expr 
)
private

Set the scalar initial condition from a mathematical expression, evaluated in every GLL point of the mesh with x, y and z bound to the coordinates of the point. Constants declared under case.constants in the case file can be referred to by name, see the expression module for the full syntax.

Parameters
sScalar field.
exprThe expression prescribing the initial value.

Definition at line 244 of file scalar_ic.f90.

Here is the caller graph for this function:

◆ set_scalar_ic_fld()

subroutine scalar_ic::set_scalar_ic_fld ( type(field_t), intent(inout), target  s,
character(len=*), intent(in)  file_name,
logical, intent(in)  interpolate,
character(len=*), intent(inout)  mesh_file_name,
integer, intent(in)  i,
integer, intent(in)  target_idx,
type(json_file), intent(inout)  global_interp_subdict 
)
private
Parameters
sThe scalar field.
file_nameThe name of the "fld" file series.
interpolateFlag to indicate wether or not to interpolate the values onto the current mesh.
mesh_file_nameIf interpolation is enabled, name of the field file series where the mesh coordinates are located.
iIndex of the scalar field. 0 corresponds to temperature.
target_idxThe index of the scalar field to import from the fld file. 0 corresponds to temperature.
global_interp_subdictIf interpolation is enabled, subdict containing the interpolation parameters to use.

Definition at line 306 of file scalar_ic.f90.

Here is the caller graph for this function:

◆ set_scalar_ic_int()

subroutine scalar_ic::set_scalar_ic_int ( type(field_t), intent(inout)  s,
type(coef_t), intent(in)  coef,
type(gs_t), intent(inout)  gs,
character(len=*)  type,
type(json_file), intent(inout)  params,
integer, intent(in)  i 
)
private

Set scalar initial condition using one of the builtin types currently supported:

  • uniform
  • expression
  • point zone
  • field
    Parameters
    sScalar field.
    coefCoefficient.
    gsGather-Scatter object.
    typeType of initial condition.
    paramsJSON parameters.
    iIndex of the scalar field.

Definition at line 88 of file scalar_ic.f90.

◆ set_scalar_ic_point_zone()

subroutine scalar_ic::set_scalar_ic_point_zone ( type(field_t), intent(inout)  s,
real(kind=rp), intent(in)  base_value,
character(len=*), intent(in)  zone_name,
real(kind=rp), intent(in)  zone_value 
)
private

Set scalar initial condition to a uniform value across a point zone.

Parameters
sScalar field.
base_valueBase value of the scalar field.
zone_nameName of the point zone.
zone_valueDesired value of the scalar field in the point zone.

Definition at line 264 of file scalar_ic.f90.

Here is the caller graph for this function:

◆ set_scalar_ic_uniform()

subroutine scalar_ic::set_scalar_ic_uniform ( type(field_t), intent(inout)  s,
real(kind=rp), intent(in)  ic_value 
)
private

Set scalar initial condition to a uniform value across the domain.

Parameters
sScalar field.
ic_valueDesired value of the scalar field.

Definition at line 222 of file scalar_ic.f90.

Here is the caller graph for this function:

◆ set_scalar_ic_usr()

subroutine scalar_ic::set_scalar_ic_usr ( character(len=*), intent(in)  scheme_name,
type(field_t), intent(inout), target  s,
type(coef_t), intent(in)  coef,
type(gs_t), intent(inout)  gs,
procedure(user_initial_conditions_intf)  user_proc 
)
private

Set scalar initial condition using a user defined function.

Parameters
scheme_nameName of the scheme calling the user routine.
sScalar field.
coefCoefficient.
gsGather-Scatter object.
user_procUser defined initial condition function.
Note
No data is copied between the host and the device. The user routine must leave the values where the backend operates on them, i.e. on the device when running on GPUs.

Definition at line 165 of file scalar_ic.f90.