135 integer,
intent(in) :: n
136 real(kind=
rp),
intent(inout),
dimension(n) :: x
137 real(kind=
rp),
intent(in),
optional :: t
138 integer,
intent(in),
optional :: tstep
139 logical,
intent(in),
optional :: strong
140 integer :: i, m, k, idx(4), facet, tstep_
142 logical :: strong_ = .true.
144 if (
present(strong)) strong_ = strong
152 if (
present(tstep))
then
158 associate(xc => this%coef%dof%x, yc => this%coef%dof%y, &
159 zc => this%coef%dof%z, nx => this%coef%nx, ny => this%coef%ny, &
160 nz => this%coef%nz, lx => this%coef%Xh%lx)
165 facet = this%facet(i)
169 call this%eval(x(k), &
170 xc(idx(1), idx(2), idx(3), idx(4)), &
171 yc(idx(1), idx(2), idx(3), idx(4)), &
172 zc(idx(1), idx(2), idx(3), idx(4)), &
173 nx(idx(2), idx(3), facet, idx(4)), &
174 ny(idx(2), idx(3), facet, idx(4)), &
175 nz(idx(2), idx(3), facet, idx(4)), &
176 idx(1), idx(2), idx(3), idx(4), &
179 call this%eval(x(k), &
180 xc(idx(1), idx(2), idx(3), idx(4)), &
181 yc(idx(1), idx(2), idx(3), idx(4)), &
182 zc(idx(1), idx(2), idx(3), idx(4)), &
183 nx(idx(1), idx(3), facet, idx(4)), &
184 ny(idx(1), idx(3), facet, idx(4)), &
185 nz(idx(1), idx(3), facet, idx(4)), &
186 idx(1), idx(2), idx(3), idx(4), &
189 call this%eval(x(k), &
190 xc(idx(1), idx(2), idx(3), idx(4)), &
191 yc(idx(1), idx(2), idx(3), idx(4)), &
192 zc(idx(1), idx(2), idx(3), idx(4)), &
193 nx(idx(1), idx(2), facet, idx(4)), &
194 ny(idx(1), idx(2), facet, idx(4)), &
195 nz(idx(1), idx(2), facet, idx(4)), &
196 idx(1), idx(2), idx(3), idx(4), &
212 real(kind=rp),
intent(in),
optional :: t
213 integer,
intent(in),
optional :: tstep
214 logical,
intent(in),
optional :: strong
215 integer :: i, m, k, idx(4), facet, tstep_
217 integer(c_size_t) :: s
218 real(kind=rp),
allocatable :: x(:)
219 logical :: strong_ = .true.
223 if (
present(strong)) strong_ = strong
231 if (
present(tstep))
then
237 associate(xc => this%coef%dof%x, yc => this%coef%dof%y, &
238 zc => this%coef%dof%z, nx => this%coef%nx, ny => this%coef%ny, &
239 nz => this%coef%nz, lx => this%coef%Xh%lx, &
240 usr_x_d => this%usr_x_d)
244 if (.not. c_associated(usr_x_d) .and. strong_)
then
248 call device_alloc(this%usr_x_d, s)
252 facet = this%facet(i)
256 call this%eval(x(i), &
257 xc(idx(1), idx(2), idx(3), idx(4)), &
258 yc(idx(1), idx(2), idx(3), idx(4)), &
259 zc(idx(1), idx(2), idx(3), idx(4)), &
260 nx(idx(2), idx(3), facet, idx(4)), &
261 ny(idx(2), idx(3), facet, idx(4)), &
262 nz(idx(2), idx(3), facet, idx(4)), &
263 idx(1), idx(2), idx(3), idx(4), &
266 call this%eval(x(i), &
267 xc(idx(1), idx(2), idx(3), idx(4)), &
268 yc(idx(1), idx(2), idx(3), idx(4)), &
269 zc(idx(1), idx(2), idx(3), idx(4)), &
270 nx(idx(1), idx(3), facet, idx(4)), &
271 ny(idx(1), idx(3), facet, idx(4)), &
272 nz(idx(1), idx(3), facet, idx(4)), &
273 idx(1), idx(2), idx(3), idx(4), &
276 call this%eval(x(i), &
277 xc(idx(1), idx(2), idx(3), idx(4)), &
278 yc(idx(1), idx(2), idx(3), idx(4)), &
279 zc(idx(1), idx(2), idx(3), idx(4)), &
280 nx(idx(1), idx(2), facet, idx(4)), &
281 ny(idx(1), idx(2), facet, idx(4)), &
282 nz(idx(1), idx(2), facet, idx(4)), &
283 idx(1), idx(2), idx(3), idx(4), &
288 call device_memcpy(x, this%usr_x_d, m, host_to_device, sync = .true.)
294 call device_inhom_dirichlet_apply_scalar(this%msk_d, x_d, &