37 use json_module,
only : json_file
54 real(kind=
rp),
allocatable :: values(:)
59 procedure, pass(this) :: init_from_compenents => &
76 type(json_file),
intent(inout) :: json
78 type(
coef_t),
intent(in),
target :: coef
79 character(len=*),
intent(in) :: variable_name
80 real(kind=
rp),
allocatable :: values(:)
81 real(kind=
rp) :: start_time, end_time
83 call json_get(json,
"values", values)
100 coef, start_time, end_time)
103 real(kind=
rp),
intent(in) :: values(:)
105 real(kind=
rp),
intent(in) :: start_time
106 real(kind=
rp),
intent(in) :: end_time
109 call this%init_base(fields, coef, start_time, end_time)
111 if (
size(values) .ne. fields%size())
then
112 call neko_error(
"Number of fields and values inconsistent.")
122 call this%free_base()
130 integer :: n_fields, i, n
132 n_fields = this%fields%size()
134 n = this%fields%item_size(1)
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
Retrieves a parameter by name or throws an error.
Implements the cpu kernel for the const_source_term_t type.
subroutine, public const_source_term_compute_cpu(fields, values)
Computes the constant source term on the cpu.
Implements the device kernel for the const_source_term_t type.
subroutine, public const_source_term_compute_device(fields, values)
Computes the constant source term on the device.
Implements the const_source_term_t type.
subroutine const_source_term_free(this)
Destructor.
subroutine const_source_term_init_from_components(this, fields, values, coef, start_time, end_time)
The constructor from type components.
subroutine const_source_term_compute(this, time)
Computes the source term and adds the result to fields.
subroutine const_source_term_init_from_json(this, json, fields, coef, variable_name)
The common constructor using a JSON object.
Utilities for retrieving parameters from the case files.
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
Implements the source_term_t type and a wrapper source_term_wrapper_t.
Module with things related to the simulation time.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
A constant source term. The strength is specified with the values keyword, which should be an array,...
field_list_t, To be able to group fields together
Base abstract type for source terms.
A struct that contains all info about the time, expand as needed.