40 use json_module,
only : json_file
42 use,
intrinsic :: iso_c_binding, only : c_ptr
50 real(kind=
rp),
private :: g
60 procedure, pass(this) :: init_from_components => &
75 type(
coef_t),
target,
intent(in) :: coef
76 type(json_file),
intent(inout) ::json
79 call this%init_base(coef)
82 call this%init_from_components(coef, g)
90 type(
coef_t),
target,
intent(in) :: coef
91 real(kind=
rp),
intent(in) :: g
93 call this%init_base(coef)
102 integer,
intent(in) :: n
103 real(kind=
rp),
intent(inout),
dimension(n) :: x
105 logical,
intent(in),
optional :: strong
109 if (
present(strong))
then
130 integer,
intent(in) :: n
131 real(kind=
rp),
intent(inout),
dimension(n) :: x
132 real(kind=
rp),
intent(inout),
dimension(n) :: y
133 real(kind=
rp),
intent(inout),
dimension(n) :: z
135 logical,
intent(in),
optional :: strong
139 if (
present(strong))
then
163 type(c_ptr),
intent(inout) :: x_d
165 logical,
intent(in),
optional :: strong
166 type(c_ptr),
intent(inout) :: strm
169 if (
present(strong))
then
175 if (strong_ .and. this%msk(0) .gt. 0)
then
177 this%g,
size(this%msk), strm)
187 type(c_ptr),
intent(inout) :: x_d
188 type(c_ptr),
intent(inout) :: y_d
189 type(c_ptr),
intent(inout) :: z_d
191 logical,
intent(in),
optional :: strong
192 type(c_ptr),
intent(inout) :: strm
195 if (
present(strong))
then
201 if (strong_ .and. this%msk(0) .gt. 0)
then
203 size(this%msk), strm)
211 real(kind=
rp),
intent(in) :: g
228 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_dirichlet_apply_scalar(msk, x, g, m, strm)
subroutine, public device_dirichlet_apply_vector(msk, x, y, z, g, m, strm)
Defines a dirichlet boundary condition.
subroutine dirichlet_apply_vector_dev(this, x_d, y_d, z_d, time, strong, strm)
Boundary condition apply for a generic Dirichlet condition to vectors x, y and z (device version)
subroutine dirichlet_apply_scalar_dev(this, x_d, time, strong, strm)
Boundary condition apply for a generic Dirichlet condition to a vector x (device version)
subroutine dirichlet_apply_scalar(this, x, n, time, strong)
Boundary condition apply for a generic Dirichlet condition to a vector x.
subroutine dirichlet_apply_vector(this, x, y, z, n, time, strong)
Boundary condition apply for a generic Dirichlet condition to vectors x, y and z.
subroutine dirichlet_free(this)
Destructor.
subroutine dirichlet_init_from_components(this, coef, g)
Constructor from components.
subroutine dirichlet_finalize(this)
Finalize.
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.
Module with things related to the simulation time.
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 .
A struct that contains all info about the time, expand as needed.