39 use device,
only: c_ptr, c_size_t
78 procedure, pass(this) :: apply_vector_dev => &
81 procedure, pass(this) :: apply_scalar_dev => &
90 character(len=*),
intent(in) :: bc_name
92 call neko_error(
"Fields must be initialized individually!")
101 call this%bc_u%free()
102 call this%bc_v%free()
103 call this%bc_w%free()
105 call this%field_list%free()
108 if (
associated(this%update))
then
122 integer,
intent(in) :: n
123 real(kind=
rp),
intent(inout),
dimension(n) :: x
124 real(kind=
rp),
intent(in),
optional :: t
125 integer,
intent(in),
optional :: tstep
127 call neko_error(
"field_dirichlet_vector cannot apply scalar BCs.&
128 &Use field_dirichlet instead!")
139 real(kind=
rp),
intent(in),
optional :: t
140 integer,
intent(in),
optional :: tstep
142 call neko_error(
"field_dirichlet_vector cannot apply scalar BCs.&
143 &Use field_dirichlet instead!")
156 integer,
intent(in) :: n
157 real(kind=
rp),
intent(inout),
dimension(n) :: x
158 real(kind=
rp),
intent(inout),
dimension(n) :: y
159 real(kind=
rp),
intent(inout),
dimension(n) :: z
160 real(kind=
rp),
intent(in),
optional :: t
161 integer,
intent(in),
optional :: tstep
163 if (
present(t) .and.
present(tstep))
then
164 call this%bc_u%apply_scalar(x, n, t, tstep)
165 call this%bc_v%apply_scalar(y, n, t, tstep)
166 call this%bc_w%apply_scalar(z, n, t, tstep)
167 else if (
present(t))
then
168 call this%bc_u%apply_scalar(x, n, t=t)
169 call this%bc_v%apply_scalar(y, n, t=t)
170 call this%bc_w%apply_scalar(z, n, t=t)
171 else if (
present(tstep))
then
172 call this%bc_u%apply_scalar(x, n, tstep=tstep)
173 call this%bc_v%apply_scalar(y, n, tstep=tstep)
174 call this%bc_w%apply_scalar(z, n, tstep=tstep)
190 real(kind=
rp),
intent(in),
optional :: t
191 integer,
intent(in),
optional :: tstep
193 if (
present(t) .and.
present(tstep))
then
194 call this%bc_u%apply_scalar_dev(x_d, t, tstep)
195 call this%bc_v%apply_scalar_dev(y_d, t, tstep)
196 call this%bc_w%apply_scalar_dev(z_d, t, tstep)
197 else if (
present(t))
then
198 call this%bc_u%apply_scalar_dev(x_d, t=t)
199 call this%bc_v%apply_scalar_dev(y_d, t=t)
200 call this%bc_w%apply_scalar_dev(z_d, t=t)
201 else if (
present(tstep))
then
202 call this%bc_u%apply_scalar_dev(x_d, tstep=tstep)
203 call this%bc_v%apply_scalar_dev(y_d, tstep=tstep)
204 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 bc_list_free(bclst)
Destructor for a list of boundary conditions.
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,...
A list of boundary conditions.
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 .
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