36 use num_types,
only: rp
37 use field_list,
only: field_list_t
38 use json_module,
only: json_file
39 use json_utils,
only: json_get, json_get_or_default
40 use source_term,
only: source_term_t
41 use coefs,
only: coef_t
42 use neko_config,
only: neko_bcknd_device
43 use utils,
only: neko_error
44 use field,
only: field_t
45 use field_math,
only: field_subcol3
53 type(field_t),
pointer :: chi, u, v, w
57 procedure, pass(this) :: init => &
60 procedure, pass(this) :: init_from_components => &
76 type(json_file),
intent(inout) :: json
77 type(field_list_t),
intent(in),
target :: fields
78 type(coef_t),
intent(in),
target :: coef
93 f_x, f_y, f_z, chi, u, v, w, coef)
95 type(field_t),
pointer,
intent(in) :: f_x, f_y, f_z
96 type(field_list_t) :: fields
98 real(kind=rp) :: start_time
99 real(kind=rp) :: end_time
100 type(field_t),
intent(in),
target :: u, v, w
101 type(field_t),
intent(in),
target :: chi
106 end_time = 100000000.0_rp
113 call fields%assign(1, f_x)
114 call fields%assign(2, f_y)
115 call fields%assign(3, f_z)
117 call this%init_base(fields, coef, start_time, end_time)
132 call this%free_base()
140 real(kind=rp),
intent(in) :: t
141 integer,
intent(in) :: tstep
142 type(field_t),
pointer :: fu, fv, fw
144 fu => this%fields%get_by_index(1)
145 fv => this%fields%get_by_index(2)
146 fw => this%fields%get_by_index(3)
148 call field_subcol3(fu, this%u, this%chi)
149 call field_subcol3(fv, this%v, this%chi)
150 call field_subcol3(fw, this%w, this%chi)
Implements the simple_brinkman_source_term_t type.
subroutine simple_brinkman_source_term_init_from_json(this, json, fields, coef)
The common constructor using a JSON object.
subroutine simple_brinkman_source_term_compute(this, t, tstep)
Computes the source term and adds the result to fields.
subroutine simple_brinkman_source_term_init_from_components(this, f_x, f_y, f_z, chi, u, v, w, coef)
The constructor from type components.
subroutine simple_brinkman_source_term_free(this)
Destructor.
A simple Brinkman source term.