41 use,
intrinsic :: iso_c_binding, only : c_ptr
63 integer,
intent(in) :: n
64 real(kind=
rp),
intent(inout),
dimension(n) :: x
65 real(kind=
rp),
intent(in),
optional :: t
66 integer,
intent(in),
optional :: tstep
73 real(kind=
rp),
intent(in),
optional :: t
74 integer,
intent(in),
optional :: tstep
84 real(kind=
rp),
intent(in),
optional :: t
85 integer,
intent(in),
optional :: tstep
92 integer,
intent(in) :: n
93 real(kind=
rp),
intent(inout),
dimension(n) :: x
94 real(kind=
rp),
intent(inout),
dimension(n) :: y
95 real(kind=
rp),
intent(inout),
dimension(n) :: z
96 real(kind=
rp),
intent(in),
optional :: t
97 integer,
intent(in),
optional :: tstep
103 integer,
intent(in) :: n
104 real(kind=
rp),
intent(inout),
dimension(n) :: x
105 real(kind=
rp),
intent(inout),
dimension(n) :: y
106 real(kind=
rp),
intent(inout),
dimension(n) :: z
107 real(kind=
rp),
intent(inout),
dimension(n) :: u
108 real(kind=
rp),
intent(inout),
dimension(n) :: v
109 real(kind=
rp),
intent(inout),
dimension(n) :: w
110 real(kind=
rp),
intent(in),
optional :: t
111 integer,
intent(in),
optional :: tstep
112 integer :: i, m, k, idx(4), facet
114 associate(c => this%coef)
118 facet = this%facet(i)
122 x(k) = u(k) * c%nx(idx(2), idx(3), facet, idx(4)) &
123 * c%area(idx(2), idx(3), facet, idx(4))
124 y(k) = v(k) * c%ny(idx(2), idx(3), facet, idx(4)) &
125 * c%area(idx(2), idx(3), facet, idx(4))
126 z(k) = w(k) * c%nz(idx(2), idx(3), facet, idx(4)) &
127 * c%area(idx(2), idx(3), facet, idx(4))
129 x(k) = u(k) * c%nx(idx(1), idx(3), facet, idx(4)) &
130 * c%area(idx(1), idx(3), facet, idx(4))
131 y(k) = v(k) * c%ny(idx(1), idx(3), facet, idx(4)) &
132 * c%area(idx(1), idx(3), facet, idx(4))
133 z(k) = w(k) * c%nz(idx(1), idx(3), facet, idx(4)) &
134 * c%area(idx(1), idx(3), facet, idx(4))
136 x(k) = u(k) * c%nx(idx(1), idx(2), facet, idx(4)) &
137 * c%area(idx(1), idx(2), facet, idx(4))
138 y(k) = v(k) * c%ny(idx(1), idx(2), facet, idx(4)) &
139 * c%area(idx(1), idx(2), facet, idx(4))
140 z(k) = w(k) * c%nz(idx(1), idx(2), facet, idx(4)) &
141 * c%area(idx(1), idx(2), facet, idx(4))
150 u_d, v_d, w_d, t, tstep)
152 type(c_ptr) :: x_d, y_d, z_d, u_d, v_d, w_d
153 real(kind=rp),
intent(in),
optional :: t
154 integer,
intent(in),
optional :: tstep
156 associate(c => this%coef)
157 call device_facet_normal_apply_surfvec(this%msk_d, this%facet_d, &
158 x_d, y_d, z_d, u_d, v_d, w_d, &
159 c%nx_d, c%ny_d, c%nz_d, c%area_d, &
160 c%Xh%lx,
size(this%msk))
169 call this%free_base()
__device__ void nonlinear_index(const int idx, const int lx, int *index)
Defines a boundary condition.
Dirichlet condition applied in the facet normal direction.
subroutine facet_normal_apply_vector_dev(this, x_d, y_d, z_d, t, tstep)
No-op vector apply on device.
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_dev(this, x_d, t, tstep)
No-op scalar apply on device.
subroutine facet_normal_free(this)
Destructor.
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.
Base type for a boundary condition.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Dirichlet condition in facet normal direction.