37 use,
intrinsic :: iso_c_binding, only : c_ptr
48 real(kind=
rp),
private :: flux_
64 integer,
intent(in) :: n
65 real(kind=
rp),
intent(inout),
dimension(n) :: x
66 real(kind=
rp),
intent(in),
optional :: t
67 integer,
intent(in),
optional :: tstep
68 integer :: i, m, k, facet
80 x(k) = x(k) + this%flux_*this%coef%area(idx(2), idx(3), facet, idx(4))
82 x(k) = x(k) + this%flux_*this%coef%area(idx(1), idx(3), facet, idx(4))
84 x(k) = x(k) + this%flux_*this%coef%area(idx(1), idx(2), facet, idx(4))
93 integer,
intent(in) :: n
94 real(kind=
rp),
intent(inout),
dimension(n) :: x
95 real(kind=
rp),
intent(inout),
dimension(n) :: y
96 real(kind=
rp),
intent(inout),
dimension(n) :: z
97 real(kind=
rp),
intent(in),
optional :: t
98 integer,
intent(in),
optional :: tstep
101 call neko_error(
"Neumann bc not implemented for vectors")
108 class(
neumann_t),
intent(inout),
target :: this
110 real(kind=
rp),
intent(in),
optional :: t
111 integer,
intent(in),
optional :: tstep
113 call neko_error(
"Neumann bc not implemented on the device")
120 class(
neumann_t),
intent(inout),
target :: this
124 real(kind=
rp),
intent(in),
optional :: t
125 integer,
intent(in),
optional :: tstep
127 call neko_error(
"Neumann bc not implemented on the device")
136 real(kind=
rp),
intent(in) :: flux
144 real(kind=
rp) :: flux
__device__ void nonlinear_index(const int idx, const int lx, int *index)
Defines a boundary condition.
Defines a Neumann boundary condition.
subroutine neumann_apply_vector(this, x, y, z, n, t, tstep)
Boundary condition apply for a generic Neumann condition to vectors x, y and z.
subroutine neumann_apply_scalar(this, x, n, t, tstep)
Boundary condition apply for a generic Neumann condition to a vector x.
subroutine neumann_init_neumann(this, flux)
Constructor.
pure real(kind=rp) function neumann_flux(this)
Get the set flux.
subroutine neumann_apply_scalar_dev(this, x_d, t, tstep)
Boundary condition apply for a generic Neumann condition to a vector x (device version)
subroutine neumann_apply_vector_dev(this, x_d, y_d, z_d, t, tstep)
Boundary condition apply for a generic Neumann condition to vectors x, y and z (device version)
integer, parameter, public rp
Global precision used in computations.
Base type for a boundary condition.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Generic Neumann boundary condition. This sets the flux of the field to the chosen value.