40 use device,
only: c_ptr, c_size_t
79 procedure, pass(this) :: apply_vector_dev => &
82 procedure, pass(this) :: apply_scalar_dev => &
91 character(len=*),
intent(in) :: bc_name
93 call neko_error(
"Fields must be initialized individually!")
102 call this%bc_u%free()
103 call this%bc_v%free()
104 call this%bc_w%free()
106 call this%field_list%free()
107 call this%bc_list%free()
109 if (
associated(this%update))
then
123 integer,
intent(in) :: n
124 real(kind=
rp),
intent(inout),
dimension(n) :: x
125 real(kind=
rp),
intent(in),
optional :: t
126 integer,
intent(in),
optional :: tstep
128 call neko_error(
"field_dirichlet_vector cannot apply scalar BCs.&
129&Use field_dirichlet instead!")
140 real(kind=
rp),
intent(in),
optional :: t
141 integer,
intent(in),
optional :: tstep
143 call neko_error(
"field_dirichlet_vector cannot apply scalar BCs.&
144&Use field_dirichlet instead!")
157 integer,
intent(in) :: n
158 real(kind=
rp),
intent(inout),
dimension(n) :: x
159 real(kind=
rp),
intent(inout),
dimension(n) :: y
160 real(kind=
rp),
intent(inout),
dimension(n) :: z
161 real(kind=
rp),
intent(in),
optional :: t
162 integer,
intent(in),
optional :: tstep
164 if (
present(t) .and.
present(tstep))
then
165 call this%bc_u%apply_scalar(x, n, t, tstep)
166 call this%bc_v%apply_scalar(y, n, t, tstep)
167 call this%bc_w%apply_scalar(z, n, t, tstep)
168 else if (
present(t))
then
169 call this%bc_u%apply_scalar(x, n, t=t)
170 call this%bc_v%apply_scalar(y, n, t=t)
171 call this%bc_w%apply_scalar(z, n, t=t)
172 else if (
present(tstep))
then
173 call this%bc_u%apply_scalar(x, n, tstep=tstep)
174 call this%bc_v%apply_scalar(y, n, tstep=tstep)
175 call this%bc_w%apply_scalar(z, n, tstep=tstep)
191 real(kind=
rp),
intent(in),
optional :: t
192 integer,
intent(in),
optional :: tstep
194 if (
present(t) .and.
present(tstep))
then
195 call this%bc_u%apply_scalar_dev(x_d, t, tstep)
196 call this%bc_v%apply_scalar_dev(y_d, t, tstep)
197 call this%bc_w%apply_scalar_dev(z_d, t, tstep)
198 else if (
present(t))
then
199 call this%bc_u%apply_scalar_dev(x_d, t=t)
200 call this%bc_v%apply_scalar_dev(y_d, t=t)
201 call this%bc_w%apply_scalar_dev(z_d, t=t)
202 else if (
present(tstep))
then
203 call this%bc_u%apply_scalar_dev(x_d, tstep=tstep)
204 call this%bc_v%apply_scalar_dev(y_d, tstep=tstep)
205 call this%bc_w%apply_scalar_dev(z_d, tstep=tstep)
Abstract interface defining a dirichlet condition on a list of fields.
Defines a boundary condition.
subroutine, public device_masked_copy(a_d, b_d, mask_d, n, m)
Copy a masked vector .
Device abstraction, common interface for various accelerators.
Defines a dirichlet boundary condition.
Defines a mapping of the degrees of freedom.
Defines inflow dirichlet conditions.
subroutine field_dirichlet_vector_apply_scalar(this, x, n, t, tstep)
Apply scalar by performing a masked copy.
subroutine field_dirichlet_vector_init(this, bc_name)
Initializes thisfield_bc.
subroutine field_dirichlet_vector_apply_vector_dev(this, x_d, y_d, z_d, t, tstep)
(No-op) Apply vector (device).
subroutine field_dirichlet_vector_apply_scalar_dev(this, x_d, t, tstep)
Apply scalar (device).
subroutine field_dirichlet_vector_apply_vector(this, x, y, z, n, t, tstep)
(No-op) Apply vector.
subroutine field_dirichlet_vector_free(this)
Destructor. Currently unused as is, all field_dirichlet attributes are freed in fluid_scheme::free.
Defines inflow dirichlet conditions.
subroutine, public masked_copy(a, b, mask, n, m)
Copy a masked vector .
integer, parameter, public rp
Global precision used in computations.
character(len=100) function, dimension(:), allocatable, public split_string(string, delimiter)
Split a string based on delimiter (tokenizer) OBS: very hacky, this should really be improved,...
Base type for a boundary condition.
A list of allocatable `bc_t`. Follows the standard interface of lists.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Generic Dirichlet boundary condition on .
User defined dirichlet condition, for which the user can work with an entire field....
Extension of the user defined dirichlet condition field_dirichlet
field_list_t, To be able to group fields together