38 use,
intrinsic :: iso_c_binding, only : c_ptr
40 use json_module,
only : json_file
51 procedure, pass(this) :: apply_scalar_dev => &
53 procedure, pass(this) :: apply_vector_dev => &
58 procedure, pass(this) :: init_from_components => &
73 type(
coef_t),
intent(in) :: coef
74 type(json_file),
intent(inout) :: json
76 call this%init_from_components(coef)
83 type(
coef_t),
intent(in) :: coef
85 call this%init_base(coef)
92 integer,
intent(in) :: n
93 real(kind=
rp),
intent(inout),
dimension(n) :: x
94 real(kind=
rp),
intent(in),
optional :: t
95 integer,
intent(in),
optional :: tstep
96 logical,
intent(in),
optional :: strong
98 logical :: strong_ = .true.
100 if (
present(strong)) strong_ = strong
115 integer,
intent(in) :: n
116 real(kind=
rp),
intent(inout),
dimension(n) :: x
117 real(kind=
rp),
intent(inout),
dimension(n) :: y
118 real(kind=
rp),
intent(inout),
dimension(n) :: z
119 real(kind=
rp),
intent(in),
optional :: t
120 integer,
intent(in),
optional :: tstep
121 logical,
intent(in),
optional :: strong
123 logical :: strong_ = .true.
125 if (
present(strong)) strong_ = strong
143 real(kind=
rp),
intent(in),
optional :: t
144 integer,
intent(in),
optional :: tstep
145 logical,
intent(in),
optional :: strong
146 logical :: strong_ = .true.
148 if (
present(strong)) strong_ = strong
150 if (strong_ .and. (this%msk(0) .gt. 0))
then
163 real(kind=
rp),
intent(in),
optional :: t
164 integer,
intent(in),
optional :: tstep
165 logical,
intent(in),
optional :: strong
166 logical :: strong_ = .true.
168 if (
present(strong)) strong_ = strong
170 if (strong_ .and. (this%msk(0) .gt. 0))
then
181 call this%free_base()
189 call this%finalize_base()
Defines a boundary condition.
subroutine, public device_zero_dirichlet_apply_scalar(msk, x, m)
subroutine, public device_zero_dirichlet_apply_vector(msk, x, y, z, m)
integer, parameter, public rp
Global precision used in computations.
Defines a zero-valued Dirichlet boundary condition.
subroutine zero_dirichlet_apply_scalar(this, x, n, t, tstep, strong)
Apply boundary condition to a scalar field. to a vector x.
subroutine zero_dirichlet_init(this, coef, json)
Constructor.
subroutine zero_dirichlet_apply_vector(this, x, y, z, n, t, tstep, strong)
Apply boundary condition to a vector field.
subroutine zero_dirichlet_apply_scalar_dev(this, x_d, t, tstep, strong)
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)
Finalize.
subroutine zero_dirichlet_apply_vector_dev(this, x_d, y_d, z_d, t, tstep, strong)
Apply boundary condition to a vector field, device version.
Base type for a boundary condition.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Zero-valued Dirichlet boundary condition. Used for no-slip walls, but also for various auxillary cond...