39 use json_module,
only : json_file
41 use,
intrinsic :: iso_c_binding, only : c_ptr
48 real(kind=
rp),
private :: g
58 procedure, pass(this) :: init_from_components => &
73 type(
coef_t),
intent(in) :: coef
74 type(json_file),
intent(inout) ::json
77 call this%init_base(coef)
88 type(
coef_t),
intent(in) :: coef
89 real(kind=
rp),
intent(in) :: g
91 call this%init_base(coef)
99 integer,
intent(in) :: n
100 real(kind=
rp),
intent(inout),
dimension(n) :: x
101 real(kind=
rp),
intent(in),
optional :: t
102 integer,
intent(in),
optional :: tstep
103 logical,
intent(in),
optional :: strong
105 logical :: strong_ = .true.
107 if (
present(strong)) strong_ = strong
122 integer,
intent(in) :: n
123 real(kind=
rp),
intent(inout),
dimension(n) :: x
124 real(kind=
rp),
intent(inout),
dimension(n) :: y
125 real(kind=
rp),
intent(inout),
dimension(n) :: z
126 real(kind=
rp),
intent(in),
optional :: t
127 integer,
intent(in),
optional :: tstep
128 logical,
intent(in),
optional :: strong
130 logical :: strong_ = .true.
132 if (
present(strong)) strong_ = strong
151 real(kind=
rp),
intent(in),
optional :: t
152 integer,
intent(in),
optional :: tstep
153 logical,
intent(in),
optional :: strong
154 logical :: strong_ = .true.
156 if (
present(strong)) strong_ = strong
159 if (strong_ .and. this%msk(0) .gt. 0)
then
161 this%g,
size(this%msk))
173 real(kind=
rp),
intent(in),
optional :: t
174 integer,
intent(in),
optional :: tstep
175 logical,
intent(in),
optional :: strong
176 logical :: strong_ = .true.
178 if (
present(strong)) strong_ = strong
180 if (strong_ .and. this%msk(0) .gt. 0)
then
190 real(kind=
rp),
intent(in) :: g
208 call this%finalize_base()
Retrieves a parameter by name or throws an error.
Defines a boundary condition.
subroutine, public device_dirichlet_apply_scalar(msk, x, g, m)
subroutine, public device_dirichlet_apply_vector(msk, x, y, z, g, m)
Defines a dirichlet boundary condition.
subroutine dirichlet_apply_vector(this, x, y, z, n, t, tstep, strong)
Boundary condition apply for a generic Dirichlet condition to vectors x, y and z.
subroutine dirichlet_apply_scalar(this, x, n, t, tstep, strong)
Boundary condition apply for a generic Dirichlet condition to a vector x.
subroutine dirichlet_free(this)
Destructor.
subroutine dirichlet_init_from_components(this, coef, g)
Constructor from components.
subroutine dirichlet_apply_vector_dev(this, x_d, y_d, z_d, t, tstep, strong)
Boundary condition apply for a generic Dirichlet condition to vectors x, y and z (device version)
subroutine dirichlet_finalize(this)
Finalize.
subroutine dirichlet_apply_scalar_dev(this, x_d, t, tstep, strong)
Boundary condition apply for a generic Dirichlet condition to a vector x (device version)
subroutine dirichlet_init(this, coef, json)
Constructor from JSON.
subroutine dirichlet_set_g(this, g)
Set value of .
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,...
Generic Dirichlet boundary condition on .