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)
94 integer,
intent(in) :: n
95 real(kind=
rp),
intent(inout),
dimension(n) :: x
97 logical,
intent(in),
optional :: strong
101 if (
present(strong))
then
121 integer,
intent(in) :: n
122 real(kind=
rp),
intent(inout),
dimension(n) :: x
123 real(kind=
rp),
intent(inout),
dimension(n) :: y
124 real(kind=
rp),
intent(inout),
dimension(n) :: z
126 logical,
intent(in),
optional :: strong
130 if (
present(strong))
then
151 type(c_ptr),
intent(inout) :: x_d
153 logical,
intent(in),
optional :: strong
154 type(c_ptr),
intent(inout) :: strm
157 if (
present(strong))
then
163 if (strong_ .and. (this%msk(0) .gt. 0))
then
165 size(this%msk), strm)
174 type(c_ptr),
intent(inout) :: x_d
175 type(c_ptr),
intent(inout) :: y_d
176 type(c_ptr),
intent(inout) :: z_d
178 logical,
intent(in),
optional :: strong
179 type(c_ptr),
intent(inout) :: strm
182 if (
present(strong))
then
188 if (strong_ .and. (this%msk(0) .gt. 0))
then
190 size(this%msk), strm)
199 call this%free_base()
206 logical,
optional,
intent(in) :: only_facets
207 logical :: only_facets_
209 if (
present(only_facets))
then
210 only_facets_ = only_facets
212 only_facets_ = .false.
215 call this%finalize_base(only_facets_)
Defines a boundary condition.
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_finalize(this, only_facets)
Finalize.
subroutine zero_dirichlet_apply_vector(this, x, y, z, n, time, strong)
Apply boundary condition to a vector field.
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...