|
core 1.5.0
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
|
Classes | |
| struct | MixColumns |
| The window columns the mix reads, oldest first. More... | |
| struct | ScaledEig |
| The Jacobi-scaled eigendecomposition of a Gram block G: A = D⁻¹ G D⁻¹, D = diag(G)^{1/2} (design §4.4 steps 1–3). More... | |
| struct | SumN |
| N independent double sums in one reduction. More... | |
Typedefs | |
| using | InnerPolicy = Kokkos::MDRangePolicy< ExecSpace, Kokkos::IndexType< Index >, Kokkos::Rank< 3, Kokkos::Iterate::Left, Kokkos::Iterate::Left > > |
| Inner-region policy, x (the first index) fastest in tiles and within a tile on every backend (suite CONVENTIONS §1; the same policy as flow's MDRange3). | |
| template<class T > | |
| using | DeviceScalar = Kokkos::View< T, MemSpace > |
| A reduction result held on the device: a reduction into it does not synchronise the host, so a phase's reductions queue back to back and are read back behind one fence (design §6.1). | |
| using | Mat = double[kMaxWindow][kMaxWindow] |
Functions | |
| InnerPolicy | innerPolicy (const IVec< 3 > &e, int g) |
| void | countChanged (View< const double > buf, View< const double > prev, const IVec< 3 > &e, int g, const DeviceScalar< Index > &out) |
COUNT: inner entries where buf != prev, into out (no host synchronisation). | |
| void | mix (View< double > buf, View< double > xOut, View< const double > rPrev, const MixColumns &cols, double beta) |
| MIX (design §4.3 step 1, §4.5): x = buf − ΔG γ − (1−β)(Rprev − ΔR γ); buf = X = x. Padded. | |
| void | diff (View< const double > buf, View< double > x, View< const double > rPrev, View< const double > gPrev, View< double > dRs, View< double > dGs) |
| DIFF (step 3): r = buf − X; dR_s = r − Rprev; dG_s = buf − Gprev; X = r. Padded. | |
| void | residual (View< const double > buf, View< double > x) |
| R (step 3, first evaluation): X = buf − X. Padded. | |
| void | selfSums (View< const double > x, View< const double > buf, const IVec< 3 > &e, int g, const DeviceScalar< SumN< 2 > > &out) |
Pass 2, residual part: {Σ X², Σ buf²} over the inner entries of one Velocity field, into out (no host synchronisation). | |
| void | columnSums (View< const double > dRs, View< const double > dRj, View< const double > x, const IVec< 3 > &e, int g, const DeviceScalar< SumN< 2 > > &out) |
Pass 2, one window column j against the new column s, over the inner entries of one Velocity field: {⟨dR_s,dR_j⟩, ⟨dR_j,X⟩}, into out (no host synchronisation). | |
| void | jacobiEigen (int n, Mat &a, Mat &v, double(&lam)[kMaxWindow]) |
Cyclic Jacobi eigendecomposition of the symmetric n×n a (overwritten), fixed sweep order p < q row-major; stops when the off-diagonal Frobenius norm is ≤ 1e-15·‖A‖_F or after 50 sweeps (design §4.4 step 3). | |
| ScaledEig | scaledEigen (int n, const Mat &gram) |
| void | truncatedSolve (const ScaledEig &se, const double *b, double condMin, double *x) |
| x = D⁻¹ Σ_i v_i (v_iᵀ D⁻¹ b)/λ_i over the eigenvalues λ_i ≥ condMin·λ_max (and > 0): the truncated solve of design §4.4 step 5 (after the caller's column drops, nothing is truncated). | |
Variables | |
| constexpr int | kMaxWindow = 8 |
| using peclet::core::solver::detail::anderson::InnerPolicy = typedef Kokkos::MDRangePolicy<ExecSpace, Kokkos::IndexType<Index>, Kokkos::Rank<3, Kokkos::Iterate::Left, Kokkos::Iterate::Left> > |
Inner-region policy, x (the first index) fastest in tiles and within a tile on every backend (suite CONVENTIONS §1; the same policy as flow's MDRange3).
Definition at line 77 of file anderson.hpp.
| using peclet::core::solver::detail::anderson::DeviceScalar = typedef Kokkos::View<T, MemSpace> |
A reduction result held on the device: a reduction into it does not synchronise the host, so a phase's reductions queue back to back and are read back behind one fence (design §6.1).
Definition at line 118 of file anderson.hpp.
Definition at line 215 of file anderson.hpp.
|
inline |
Definition at line 81 of file anderson.hpp.
Referenced by columnSums(), countChanged(), and selfSums().
|
inline |
COUNT: inner entries where buf != prev, into out (no host synchronisation).
Definition at line 121 of file anderson.hpp.
References innerPolicy().
Referenced by peclet::core::solver::AndersonCore::prepare().
|
inline |
MIX (design §4.3 step 1, §4.5): x = buf − ΔG γ − (1−β)(Rprev − ΔR γ); buf = X = x. Padded.
Definition at line 143 of file anderson.hpp.
Referenced by peclet::core::solver::AndersonCore::prepare().
|
inline |
DIFF (step 3): r = buf − X; dR_s = r − Rprev; dG_s = buf − Gprev; X = r. Padded.
Definition at line 161 of file anderson.hpp.
|
inline |
R (step 3, first evaluation): X = buf − X. Padded.
Definition at line 174 of file anderson.hpp.
|
inline |
Pass 2, residual part: {Σ X², Σ buf²} over the inner entries of one Velocity field, into out (no host synchronisation).
Definition at line 183 of file anderson.hpp.
References innerPolicy().
|
inline |
Pass 2, one window column j against the new column s, over the inner entries of one Velocity field: {⟨dR_s,dR_j⟩, ⟨dR_j,X⟩}, into out (no host synchronisation).
Reads dR_s, dR_j and X only (design §6.1, rev 2: no reduction reads a dG column; dG is read by MIX alone).
Definition at line 199 of file anderson.hpp.
References innerPolicy().
|
inline |
Cyclic Jacobi eigendecomposition of the symmetric n×n a (overwritten), fixed sweep order p < q row-major; stops when the off-diagonal Frobenius norm is ≤ 1e-15·‖A‖_F or after 50 sweeps (design §4.4 step 3).
Eigenvalue i is lam[i], its eigenvector the column v[·][i].
Definition at line 220 of file anderson.hpp.
Referenced by scaledEigen().
Definition at line 274 of file anderson.hpp.
References peclet::core::solver::detail::anderson::ScaledEig::dinv, jacobiEigen(), peclet::core::solver::detail::anderson::ScaledEig::lam, peclet::core::solver::detail::anderson::ScaledEig::lamMax, peclet::core::solver::detail::anderson::ScaledEig::lamMin, peclet::core::solver::detail::anderson::ScaledEig::n, and peclet::core::solver::detail::anderson::ScaledEig::v.
|
inline |
x = D⁻¹ Σ_i v_i (v_iᵀ D⁻¹ b)/λ_i over the eigenvalues λ_i ≥ condMin·λ_max (and > 0): the truncated solve of design §4.4 step 5 (after the caller's column drops, nothing is truncated).
Definition at line 296 of file anderson.hpp.
References kMaxWindow, and peclet::core::solver::detail::anderson::ScaledEig::n.
Definition at line 73 of file anderson.hpp.
Referenced by truncatedSolve().