38 use,
intrinsic :: iso_c_binding, only : c_ptr, c_loc
40 use json_module,
only : json_file
47 real(kind=
rp),
dimension(3) :: x = [0d0, 0d0, 0d0]
67 class(
inflow_t),
intent(inout),
target :: this
68 type(
coef_t),
intent(in) :: coef
69 type(json_file),
intent(inout) ::json
70 real(kind=
rp),
allocatable :: x(:)
72 call this%init_base(coef)
79 class(
inflow_t),
intent(inout) :: this
80 integer,
intent(in) :: n
81 real(kind=
rp),
intent(inout),
dimension(n) :: x
82 real(kind=
rp),
intent(in),
optional :: t
83 integer,
intent(in),
optional :: tstep
84 logical,
intent(in),
optional :: strong
89 class(
inflow_t),
intent(inout),
target :: this
91 real(kind=
rp),
intent(in),
optional :: t
92 integer,
intent(in),
optional :: tstep
93 logical,
intent(in),
optional :: strong
98 class(
inflow_t),
intent(inout) :: this
99 integer,
intent(in) :: n
100 real(kind=
rp),
intent(inout),
dimension(n) :: x
101 real(kind=
rp),
intent(inout),
dimension(n) :: y
102 real(kind=
rp),
intent(inout),
dimension(n) :: z
103 real(kind=
rp),
intent(in),
optional :: t
104 logical,
intent(in),
optional :: strong
105 integer,
intent(in),
optional :: tstep
107 logical :: strong_ = .true.
109 if (
present(strong)) strong_ = strong
125 class(
inflow_t),
intent(inout),
target :: this
129 real(kind=
rp),
intent(in),
optional :: t
130 integer,
intent(in),
optional :: tstep
131 logical,
intent(in),
optional :: strong
132 logical :: strong_ = .true.
134 if (
present(strong)) strong_ = strong
136 if (strong_ .and. (this%msk(0) .gt. 0))
then
138 c_loc(this%x), this%msk(0))
145 class(
inflow_t),
target,
intent(inout) :: this
147 call this%free_base()
152 class(
inflow_t),
target,
intent(inout) :: this
154 call this%finalize_base()
Retrieves a parameter by name or throws an error.
Defines a boundary condition.
subroutine, public device_inflow_apply_vector(msk, x, y, z, g, m)
Defines inflow dirichlet conditions.
subroutine inflow_apply_scalar_dev(this, x_d, t, tstep, strong)
No-op scalar apply (device version)
subroutine inflow_apply_vector(this, x, y, z, n, t, tstep, strong)
Apply inflow conditions (vector valued)
subroutine inflow_finalize(this)
Finalize.
subroutine inflow_init(this, coef, json)
Constructor.
subroutine inflow_apply_vector_dev(this, x_d, y_d, z_d, t, tstep, strong)
Apply inflow conditions (vector valued) (device version)
subroutine inflow_apply_scalar(this, x, n, t, tstep, strong)
No-op scalar apply.
subroutine inflow_free(this)
Destructor.
Utilities for retrieving parameters from the case files.
integer, parameter, public rp
Global precision used in computations.
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)