8#ifndef PECLET_CORE_SOLVER_VECTOR_OPS_HPP
9#define PECLET_CORE_SOLVER_VECTOR_OPS_HPP
19 Kokkos::parallel_reduce(
20 "amr::mom_dot", n, KOKKOS_LAMBDA(
const Index i,
double& acc) { acc += a(i) * b(i); }, s);
27 double omega,
Index n) {
29 "amr::mom_pupdate", n,
30 KOKKOS_LAMBDA(
const Index i) { p(i) = r(i) + beta * (p(i) - omega * v(i)); });
35 Kokkos::parallel_for(
"amr::pcg_axpy", n, KOKKOS_LAMBDA(
const Index i) { y(i) += a * x(i); });
41 "amr::pcg_zpby", n, KOKKOS_LAMBDA(
const Index i) { p(i) = z(i) + b * p(i); });
46 Kokkos::parallel_for(
"amr::pcg_negate", n, KOKKOS_LAMBDA(
const Index i) { x(i) = -x(i); });
void bicgPUpdate(View< double > p, View< const double > r, View< const double > v, double beta, double omega, Index n)
BiCGStab direction update: p = r + β(p − ω v).
double dotPlain(View< const double > a, View< const double > b, Index n)
Plain (unweighted) dot product.
void zpby(View< double > p, View< const double > z, double b, Index n)
p = z + b·p (CG direction update)
void axpy(View< double > y, double a, View< const double > x, Index n)
y += a·x
void negate(View< double > x, Index n)
y = −x (negate in place)
std::int64_t Index
Signed index type for grids and particles (supersedes block_decomposer's long int IndxT).
Kokkos::View< T *, MemSpace > View
1D device array.