39 use device,
only: c_ptr, c_size_t
65 procedure, pass(this) :: apply_vector_dev => &
68 procedure, pass(this) :: apply_scalar_dev => &
77 character(len=*),
intent(in) :: bc_name
79 call neko_error(
"Fields must be initialized individually!")
88 call this%field_dirichlet_u%free()
89 call this%field_dirichlet_v%free()
90 call this%field_dirichlet_w%free()
101 integer,
intent(in) :: n
102 real(kind=
rp),
intent(inout),
dimension(n) :: x
103 real(kind=
rp),
intent(in),
optional :: t
104 integer,
intent(in),
optional :: tstep
106 call neko_error(
"field_dirichlet_vector cannot apply scalar BCs.&
107 &Use field_dirichlet instead!")
118 real(kind=
rp),
intent(in),
optional :: t
119 integer,
intent(in),
optional :: tstep
121 call neko_error(
"field_dirichlet_vector cannot apply scalar BCs.&
122 &Use field_dirichlet instead!")
135 integer,
intent(in) :: n
136 real(kind=
rp),
intent(inout),
dimension(n) :: x
137 real(kind=
rp),
intent(inout),
dimension(n) :: y
138 real(kind=
rp),
intent(inout),
dimension(n) :: z
139 real(kind=
rp),
intent(in),
optional :: t
140 integer,
intent(in),
optional :: tstep
142 if (
present(t) .and.
present(tstep))
then
143 call this%field_dirichlet_u%apply_scalar(x, n, t, tstep)
144 call this%field_dirichlet_v%apply_scalar(y, n, t, tstep)
145 call this%field_dirichlet_w%apply_scalar(z, n, t, tstep)
146 else if (
present(t))
then
147 call this%field_dirichlet_u%apply_scalar(x, n, t=t)
148 call this%field_dirichlet_v%apply_scalar(y, n, t=t)
149 call this%field_dirichlet_w%apply_scalar(z, n, t=t)
150 else if (
present(tstep))
then
151 call this%field_dirichlet_u%apply_scalar(x, n, tstep=tstep)
152 call this%field_dirichlet_v%apply_scalar(y, n, tstep=tstep)
153 call this%field_dirichlet_w%apply_scalar(z, n, tstep=tstep)
169 real(kind=
rp),
intent(in),
optional :: t
170 integer,
intent(in),
optional :: tstep
172 if (
present(t) .and.
present(tstep))
then
173 call this%field_dirichlet_u%apply_scalar_dev(x_d, t, tstep)
174 call this%field_dirichlet_v%apply_scalar_dev(y_d, t, tstep)
175 call this%field_dirichlet_w%apply_scalar_dev(z_d, t, tstep)
176 else if (
present(t))
then
177 call this%field_dirichlet_u%apply_scalar_dev(x_d, t=t)
178 call this%field_dirichlet_v%apply_scalar_dev(y_d, t=t)
179 call this%field_dirichlet_w%apply_scalar_dev(z_d, t=t)
180 else if (
present(tstep))
then
181 call this%field_dirichlet_u%apply_scalar_dev(x_d, tstep=tstep)
182 call this%field_dirichlet_v%apply_scalar_dev(y_d, tstep=tstep)
183 call this%field_dirichlet_w%apply_scalar_dev(z_d, tstep=tstep)
Defines a boundary condition.
subroutine, public device_masked_copy(a_d, b_d, mask_d, n, m)
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 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