38 use,
intrinsic :: iso_c_binding, only : c_ptr, c_loc
40 use json_module,
only : json_file
49 real(kind=
rp),
dimension(3) :: x = [0d0, 0d0, 0d0]
58 procedure, pass(this) :: init_from_components => &
72 class(
inflow_t),
intent(inout),
target :: this
73 type(
coef_t),
target,
intent(in) :: coef
74 type(json_file),
intent(inout) ::json
75 real(kind=
rp),
allocatable :: x(:)
78 if (
size(x) .ne. 3)
then
79 call neko_error(
"The inflow boundary condition requires a " // &
80 "3-component value vector.")
82 call this%init_from_components(coef, x)
89 class(
inflow_t),
intent(inout),
target :: this
90 type(
coef_t),
target,
intent(in) :: coef
91 real(kind=
rp),
intent(in) :: x(3)
93 call this%init_base(coef)
100 class(
inflow_t),
intent(inout) :: this
101 integer,
intent(in) :: n
102 real(kind=
rp),
intent(inout),
dimension(n) :: x
104 logical,
intent(in),
optional :: strong
109 class(
inflow_t),
intent(inout),
target :: this
110 type(c_ptr),
intent(inout) :: x_d
112 logical,
intent(in),
optional :: strong
113 type(c_ptr),
intent(inout) :: strm
118 class(
inflow_t),
intent(inout) :: this
119 integer,
intent(in) :: n
120 real(kind=
rp),
intent(inout),
dimension(n) :: x
121 real(kind=
rp),
intent(inout),
dimension(n) :: y
122 real(kind=
rp),
intent(inout),
dimension(n) :: z
124 logical,
intent(in),
optional :: strong
128 if (
present(strong))
then
151 class(
inflow_t),
intent(inout),
target :: this
152 type(c_ptr),
intent(inout) :: x_d
153 type(c_ptr),
intent(inout) :: y_d
154 type(c_ptr),
intent(inout) :: z_d
156 logical,
intent(in),
optional :: strong
157 type(c_ptr),
intent(inout) :: strm
160 if (
present(strong))
then
166 if (strong_ .and. (this%msk(0) .gt. 0))
then
168 c_loc(this%x), this%msk(0), strm)
175 class(
inflow_t),
target,
intent(inout) :: this
177 call this%free_base()
182 class(
inflow_t),
target,
intent(inout) :: this
185 call this%finalize_base()
Defines a boundary condition.
integer, parameter, public bc_dirichlet
Supported boundary condition types. The values are set in order of precedence for global resolution....
subroutine, public device_inflow_apply_vector(msk, x, y, z, g, m, strm)
Defines inflow dirichlet conditions.
subroutine inflow_apply_scalar_dev(this, x_d, time, strong, strm)
No-op scalar apply (device version)
subroutine inflow_apply_scalar(this, x, n, time, strong)
No-op scalar apply.
subroutine inflow_finalize(this)
Finalize.
subroutine inflow_init(this, coef, json)
Constructor.
subroutine inflow_apply_vector(this, x, y, z, n, time, strong)
Apply inflow conditions (vector valued)
subroutine inflow_apply_vector_dev(this, x_d, y_d, z_d, time, strong, strm)
Apply inflow conditions (vector valued) (device version)
subroutine inflow_free(this)
Destructor.
subroutine inflow_init_from_components(this, coef, x)
Constructor from components.
Utilities for retrieving parameters from the case files.
integer, parameter, public rp
Global precision used in computations.
Module with things related to the simulation time.
Base type for a boundary condition.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Dirichlet condition for inlet (vector valued)
A struct that contains all info about the time, expand as needed.