1#ifndef AMREX_SMOOTHER_MV_H_
2#define AMREX_SMOOTHER_MV_H_
15 int setNumIters (
int a_niters) {
return std::exchange(m_niters, a_niters); }
18 bool with_initial_guess =
false)
20 auto const& diag = m_A->diagonalVector();
22 if ( ! with_initial_guess) {
25 for (
int iter = 0; iter < m_niters; ++iter) {
26 if ((iter == 0) && ! with_initial_guess) {
29 SpMV(Axvec, *m_A, xvec);
31 ForEach(xvec, Axvec, bvec, diag,
35 x += (b-ax)/d * T(2./3.);
#define AMREX_GPU_DEVICE
Definition AMReX_GpuQualifiers.H:18
Definition AMReX_AlgVector.H:20
void setVal(T val)
Definition AMReX_AlgVector.H:246
AlgPartition const & partition() const
Definition AMReX_AlgVector.H:44
Definition AMReX_Smoother_MV.H:11
JacobiSmoother(SpMatrix< T > const *a_A)
Definition AMReX_Smoother_MV.H:13
int setNumIters(int a_niters)
Definition AMReX_Smoother_MV.H:15
void operator()(AlgVector< T > &xvec, AlgVector< T > const &bvec, bool with_initial_guess=false)
Definition AMReX_Smoother_MV.H:17
Definition AMReX_SpMatrix.H:52
void streamSynchronize() noexcept
Definition AMReX_GpuDevice.H:263
Definition AMReX_Amr.cpp:49
constexpr void ForEach(TypeList< Ts... >, F &&f)
For each type t in TypeList, call f(t)
Definition AMReX_TypeList.H:82
void SpMV(Long nrows, Long ncols, T *__restrict__ py, CsrView< T const > const &A, T const *__restrict__ px)
Definition AMReX_SpMV.H:13