flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
anderson_accelerator.hpp File Reference

flow — the Anderson accelerator of a steady march: core's AndersonCore wrapped around one Solver<Grid>::step() (doc/steady_acceleration.md, rev 1: D1, D13, §4.3, §5.1). More...

#include <array>
#include <chrono>
#include <cstddef>
#include <stdexcept>
#include <string>
#include <utility>
#include "flow_ibm.hpp"
#include "peclet/core/solver/anderson.hpp"

Go to the source code of this file.

Classes

class  peclet::flow::AndersonAccelerator< Grid >
 

Namespaces

namespace  peclet
 
namespace  peclet::flow
 

Detailed Description

flow — the Anderson accelerator of a steady march: core's AndersonCore wrapped around one Solver<Grid>::step() (doc/steady_acceleration.md, rev 1: D1, D13, §4.3, §5.1).

The data path of the steady acceleration. peclet::core::solver::AndersonCore owns the history, the reductions, the least squares, the safeguards and the lazy mix; this adapter supplies the solver's march state (Solver::marchState(): the velocity, P and, collocated with projected- face advection, the face field), re-checks the refusals of §5.3 at every call, detects a change of the parameter signature (internal dt, rho, mu, F and the advection settings: on, scheme, implicit) and calls the solver's step() unchanged. The control path (phases, the stop instrument) is the pure-Python peclet.flow.march_to_steady.

One call of step(accelerate) is §4.3: the refusal re-check, the signature check, core.prepare (the inner-entry state check and the lazy mix), solver.step(), core.complete. A step that throws at a mixed iterate is absorbed (the last map output is restored and acceleration is disabled); at a plain iterate it is the plain march's own failure and is rethrown.

Compiled once per grid beside the solver (src/flow_solver_{staggered,colocated}.cpp, the G.8 pattern): the member definitions below are out of line and the header ends with the matching extern template declarations.

Definition in file anderson_accelerator.hpp.