39 use,
intrinsic :: iso_c_binding, only : c_ptr
41 use json_module,
only : json_file
53 procedure, pass(this) :: apply_scalar_dev => &
55 procedure, pass(this) :: apply_vector_dev => &
60 procedure, pass(this) :: init_from_components => &
75 type(
coef_t),
target,
intent(in) :: coef
76 type(json_file),
intent(inout) :: json
78 call this%init_from_components(coef)
85 type(
coef_t),
target,
intent(in) :: coef
87 call this%init_base(coef)
95 integer,
intent(in) :: n
96 real(kind=
rp),
intent(inout),
dimension(n) :: x
98 logical,
intent(in),
optional :: strong
102 if (
present(strong))
then
124 integer,
intent(in) :: n
125 real(kind=
rp),
intent(inout),
dimension(n) :: x
126 real(kind=
rp),
intent(inout),
dimension(n) :: y
127 real(kind=
rp),
intent(inout),
dimension(n) :: z
129 logical,
intent(in),
optional :: strong
133 if (
present(strong))
then
156 type(c_ptr),
intent(inout) :: x_d
158 logical,
intent(in),
optional :: strong
159 type(c_ptr),
intent(inout) :: strm
162 if (
present(strong))
then
168 if (strong_ .and. (this%msk(0) .gt. 0))
then
170 size(this%msk), strm)
179 type(c_ptr),
intent(inout) :: x_d
180 type(c_ptr),
intent(inout) :: y_d
181 type(c_ptr),
intent(inout) :: z_d
183 logical,
intent(in),
optional :: strong
184 type(c_ptr),
intent(inout) :: strm
187 if (
present(strong))
then
193 if (strong_ .and. (this%msk(0) .gt. 0))
then
195 size(this%msk), strm)
204 call this%free_base()
211 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_zero_dirichlet_apply_vector(msk, x, y, z, m, strm)
subroutine, public device_zero_dirichlet_apply_scalar(msk, x, m, strm)
integer, parameter, public rp
Global precision used in computations.
Module with things related to the simulation time.
Defines a zero-valued Dirichlet boundary condition.
subroutine zero_dirichlet_apply_scalar(this, x, n, time, strong)
Apply boundary condition to a scalar field. to a vector x.
subroutine zero_dirichlet_apply_vector_dev(this, x_d, y_d, z_d, time, strong, strm)
Apply boundary condition to a vector field, device version.
subroutine zero_dirichlet_init(this, coef, json)
Constructor.
subroutine zero_dirichlet_apply_scalar_dev(this, x_d, time, strong, strm)
Apply boundary condition to a scalar field, device version.
subroutine zero_dirichlet_free(this)
Destructor.
subroutine zero_dirichlet_init_from_components(this, coef)
Constructor.
subroutine zero_dirichlet_apply_vector(this, x, y, z, n, time, strong)
Apply boundary condition to a vector field.
subroutine zero_dirichlet_finalize(this)
Finalize.
Base type for a boundary condition.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
A struct that contains all info about the time, expand as needed.
Zero-valued Dirichlet boundary condition. Used for no-slip walls, but also for various auxillary cond...