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
123 integer,
intent(in) :: n
124 real(kind=
rp),
intent(inout),
dimension(n) :: x
125 real(kind=
rp),
intent(inout),
dimension(n) :: y
126 real(kind=
rp),
intent(inout),
dimension(n) :: z
128 logical,
intent(in),
optional :: strong
132 if (
present(strong))
then
155 type(c_ptr),
intent(inout) :: x_d
157 logical,
intent(in),
optional :: strong
158 type(c_ptr),
intent(inout) :: strm
161 if (
present(strong))
then
167 if (strong_ .and. (this%msk(0) .gt. 0))
then
169 size(this%msk), strm)
178 type(c_ptr),
intent(inout) :: x_d
179 type(c_ptr),
intent(inout) :: y_d
180 type(c_ptr),
intent(inout) :: z_d
182 logical,
intent(in),
optional :: strong
183 type(c_ptr),
intent(inout) :: strm
186 if (
present(strong))
then
192 if (strong_ .and. (this%msk(0) .gt. 0))
then
194 size(this%msk), strm)
203 call this%free_base()
210 logical,
optional,
intent(in) :: only_facets
211 logical :: only_facets_
213 if (
present(only_facets))
then
214 only_facets_ = only_facets
216 only_facets_ = .false.
219 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...