39 use json_module,
only : json_file
64 real(kind=
rp) :: omega(3)
66 real(kind=
rp) :: ref_point(3)
71 procedure, pass(this) :: init_from_compenents => &
88 type(json_file),
intent(inout) :: json
90 type(
coef_t),
intent(in),
target :: coef
91 character(len=*),
intent(in) :: variable_name
93 real(kind=
rp),
allocatable :: rotation_vec(:), ref_point(:)
94 real(kind=
rp) :: start_time, end_time
99 if (json%valid_path(
"rotation_vector"))
then
100 call json_get(json,
"rotation_vector", rotation_vec)
103 &for the centrifugal source term.")
106 if (json%valid_path(
"reference_point"))
then
107 call json_get(json,
"reference_point", ref_point)
110 &for the centrifugal source term.")
114 rotation_vec, ref_point, coef, start_time, end_time)
126 ref_point, coef, start_time, end_time)
129 real(kind=
rp),
intent(in) :: omega(3)
130 real(kind=
rp),
intent(in) :: ref_point(3)
132 real(kind=
rp),
intent(in) :: start_time
133 real(kind=
rp),
intent(in) :: end_time
136 call this%init_base(fields, coef, start_time, end_time)
138 if (fields%size() .ne. 3)
then
139 call neko_error(
"Number of fields for the centrifugal force must be 3.")
143 this%ref_point = ref_point
150 call this%free_base()
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 centrifugal_source_term_t type. Maintainer: Adam Peplinski.
subroutine, public centrifugal_source_term_compute_cpu(omega, ref_point, fields)
Computes the centrifugal source term on the cpu.
Implements the device kernel for the centrifugal_source_term_t type.
subroutine, public centrifugal_source_term_compute_device(omega, ref_point, fields)
Computes the centrifugal source term on the device.
Implements the centrifugal_source_term_t type. Maintainer: Adam Peplinski.
subroutine centrifugal_source_term_free(this)
Destructor.
subroutine centrifugal_source_term_init_from_json(this, json, fields, coef, variable_name)
The common constructor using a JSON object.
subroutine centrifugal_source_term_init_from_components(this, fields, omega, ref_point, coef, start_time, end_time)
The constructor from type components.
subroutine centrifugal_source_term_compute(this, time)
Computes the source term and adds the result to fields.
Defines a registry for storing solution fields.
type(field_registry_t), target, public neko_field_registry
Global field registry.
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.
This source term adds the centrifugal force.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
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.