39 use json_module,
only : json_file
41 use,
intrinsic :: iso_c_binding, only : c_ptr
49 real(kind=
rp),
private :: g
59 procedure, pass(this) :: init_from_components => &
74 type(
coef_t),
target,
intent(in) :: coef
75 type(json_file),
intent(inout) ::json
78 call this%init_base(coef)
89 type(
coef_t),
target,
intent(in) :: coef
90 real(kind=
rp),
intent(in) :: g
92 call this%init_base(coef)
100 integer,
intent(in) :: n
101 real(kind=
rp),
intent(inout),
dimension(n) :: x
103 logical,
intent(in),
optional :: strong
107 if (
present(strong))
then
126 integer,
intent(in) :: n
127 real(kind=
rp),
intent(inout),
dimension(n) :: x
128 real(kind=
rp),
intent(inout),
dimension(n) :: y
129 real(kind=
rp),
intent(inout),
dimension(n) :: z
131 logical,
intent(in),
optional :: strong
135 if (
present(strong))
then
157 type(c_ptr),
intent(inout) :: x_d
159 logical,
intent(in),
optional :: strong
160 type(c_ptr),
intent(inout) :: strm
163 if (
present(strong))
then
169 if (strong_ .and. this%msk(0) .gt. 0)
then
171 this%g,
size(this%msk), strm)
181 type(c_ptr),
intent(inout) :: x_d
182 type(c_ptr),
intent(inout) :: y_d
183 type(c_ptr),
intent(inout) :: z_d
185 logical,
intent(in),
optional :: strong
186 type(c_ptr),
intent(inout) :: strm
189 if (
present(strong))
then
195 if (strong_ .and. this%msk(0) .gt. 0)
then
197 size(this%msk), strm)
205 real(kind=
rp),
intent(in) :: g
222 logical,
optional,
intent(in) :: only_facets
223 logical :: only_facets_
225 if (
present(only_facets))
then
226 only_facets_ = only_facets
228 only_facets_ = .false.
231 call this%finalize_base(only_facets_)
Retrieves a parameter by name or throws an error.
Defines a boundary condition.
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_finalize(this, only_facets)
Finalize.
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_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.