41 use,
intrinsic :: iso_c_binding, only : c_ptr
60 integer,
intent(in) :: n
61 real(kind=
rp),
intent(inout),
dimension(n) :: x
62 real(kind=
rp),
intent(in),
optional :: t
63 integer,
intent(in),
optional :: tstep
69 integer,
intent(in) :: n
70 real(kind=
rp),
intent(inout),
dimension(n) :: x
71 real(kind=
rp),
intent(inout),
dimension(n) :: y
72 real(kind=
rp),
intent(inout),
dimension(n) :: z
73 real(kind=
rp),
intent(in),
optional :: t
74 integer,
intent(in),
optional :: tstep
80 integer,
intent(in) :: n
81 real(kind=
rp),
intent(inout),
dimension(n) :: x
82 real(kind=
rp),
intent(inout),
dimension(n) :: y
83 real(kind=
rp),
intent(inout),
dimension(n) :: z
84 real(kind=
rp),
intent(inout),
dimension(n) :: u
85 real(kind=
rp),
intent(inout),
dimension(n) :: v
86 real(kind=
rp),
intent(inout),
dimension(n) :: w
87 real(kind=
rp),
intent(in),
optional :: t
88 integer,
intent(in),
optional :: tstep
89 integer :: i, m, k, idx(4), facet
91 associate(c => this%coef)
99 x(k) = u(k) * c%nx(idx(2), idx(3), facet, idx(4)) &
100 * c%area(idx(2), idx(3), facet, idx(4))
101 y(k) = v(k) * c%ny(idx(2), idx(3), facet, idx(4)) &
102 * c%area(idx(2), idx(3), facet, idx(4))
103 z(k) = w(k) * c%nz(idx(2), idx(3), facet, idx(4)) &
104 * c%area(idx(2), idx(3), facet, idx(4))
106 x(k) = u(k) * c%nx(idx(1), idx(3), facet, idx(4)) &
107 * c%area(idx(1), idx(3), facet, idx(4))
108 y(k) = v(k) * c%ny(idx(1), idx(3), facet, idx(4)) &
109 * c%area(idx(1), idx(3), facet, idx(4))
110 z(k) = w(k) * c%nz(idx(1), idx(3), facet, idx(4)) &
111 * c%area(idx(1), idx(3), facet, idx(4))
113 x(k) = u(k) * c%nx(idx(1), idx(2), facet, idx(4)) &
114 * c%area(idx(1), idx(2), facet, idx(4))
115 y(k) = v(k) * c%ny(idx(1), idx(2), facet, idx(4)) &
116 * c%area(idx(1), idx(2), facet, idx(4))
117 z(k) = w(k) * c%nz(idx(1), idx(2), facet, idx(4)) &
118 * c%area(idx(1), idx(2), facet, idx(4))
127 u_d, v_d, w_d, t, tstep)
129 type(c_ptr) :: x_d, y_d, z_d, u_d, v_d, w_d
130 real(kind=rp),
intent(in),
optional :: t
131 integer,
intent(in),
optional :: tstep
133 associate(c => this%coef)
134 call device_facet_normal_apply_surfvec(this%msk_d, this%facet_d, &
135 x_d, y_d, z_d, u_d, v_d, w_d, &
136 c%nx_d, c%ny_d, c%nz_d, c%area_d, &
137 c%Xh%lx,
size(this%msk))
__device__ void nonlinear_index(const int idx, const int lx, int *index)
Defines a dirichlet boundary condition.
Dirichlet condition applied in the facet normal direction.
subroutine facet_normal_apply_surfvec_dev(this, x_d, y_d, z_d, u_d, v_d, w_d, t, tstep)
Apply in facet normal direction (vector valued, device version)
subroutine facet_normal_apply_surfvec(this, x, y, z, u, v, w, n, t, tstep)
Apply in facet normal direction (vector valued)
subroutine facet_normal_apply_scalar(this, x, n, t, tstep)
No-op scalar apply.
subroutine facet_normal_apply_vector(this, x, y, z, n, t, tstep)
No-op vector apply.
integer, parameter, public rp
Global precision used in computations.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Generic Dirichlet boundary condition on .
Dirichlet condition in facet normal direction.