flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
peclet::flow::AndersonAccelerator< Grid > Class Template Reference

#include <anderson_accelerator.hpp>

Inheritance diagram for peclet::flow::AndersonAccelerator< Grid >:
peclet::flow::bindings::BoundAccelerator< Grid >

Public Types

using Core = peclet::core::solver::AndersonCore

Public Member Functions

 AndersonAccelerator (Solver< Grid > &solver, int window=5, double mixing=1.0)
 Builds the march state (throws std::runtime_error on a refused configuration, §5.3) and allocates the history ((2m+3)·n_s·8·n_pad bytes, §6.3; throws std::runtime_error naming the bytes when it does not fit).
 AndersonAccelerator (const AndersonAccelerator &)=delete
AndersonAccelerator & operator= (const AndersonAccelerator &)=delete
void step (bool accelerate)
 One map evaluation (§4.3): the lazy mix when accelerate and a mix is pending, then solver.step().
const char * statusName () const
const std::string & reason () const
double residual () const
 Relative velocity residual of the last evaluation (design §3.2); +inf before the first.
int numRestarts () const
int numResets () const
int numColumns () const
int window () const
double mixing () const
std::size_t memoryBytes () const
 Bytes of the history (= Core::memoryBytesFor(window, n_s, n_pad), design §6.3).
double seconds () const
 Cumulative wall time spent in the accelerator, solver.step() excluded (device-fenced at both ends of each part; the instrument of gate G8), seconds, this rank.
void reset ()
void disable ()
const Core & core () const
 The core itself (tests: γ, engagement, the descriptor).

Detailed Description

template<class Grid>
class peclet::flow::AndersonAccelerator< Grid >

Definition at line 40 of file anderson_accelerator.hpp.

Member Typedef Documentation

◆ Core

template<class Grid>
using peclet::flow::AndersonAccelerator< Grid >::Core = peclet::core::solver::AndersonCore

Definition at line 42 of file anderson_accelerator.hpp.

Constructor & Destructor Documentation

◆ AndersonAccelerator() [1/2]

template<class Grid>
peclet::flow::AndersonAccelerator< Grid >::AndersonAccelerator ( Solver< Grid > & solver,
int window = 5,
double mixing = 1.0 )
inlineexplicit

Builds the march state (throws std::runtime_error on a refused configuration, §5.3) and allocates the history ((2m+3)·n_s·8·n_pad bytes, §6.3; throws std::runtime_error naming the bytes when it does not fit).

Collective under MPI.

Definition at line 47 of file anderson_accelerator.hpp.

References AndersonAccelerator(), mixing(), and window().

Referenced by AndersonAccelerator(), AndersonAccelerator(), and operator=().

◆ AndersonAccelerator() [2/2]

template<class Grid>
peclet::flow::AndersonAccelerator< Grid >::AndersonAccelerator ( const AndersonAccelerator< Grid > & )
delete

References AndersonAccelerator().

Member Function Documentation

◆ operator=()

template<class Grid>
AndersonAccelerator & peclet::flow::AndersonAccelerator< Grid >::operator= ( const AndersonAccelerator< Grid > & )
delete

References AndersonAccelerator().

◆ step()

template<class Grid>
void peclet::flow::AndersonAccelerator< Grid >::step ( bool accelerate)

One map evaluation (§4.3): the lazy mix when accelerate and a mix is pending, then solver.step().

Collective under MPI.

Definition at line 121 of file anderson_accelerator.hpp.

References same().

◆ statusName()

template<class Grid>
const char * peclet::flow::AndersonAccelerator< Grid >::statusName ( ) const
inline

Definition at line 58 of file anderson_accelerator.hpp.

◆ reason()

template<class Grid>
const std::string & peclet::flow::AndersonAccelerator< Grid >::reason ( ) const
inline

Definition at line 59 of file anderson_accelerator.hpp.

◆ residual()

template<class Grid>
double peclet::flow::AndersonAccelerator< Grid >::residual ( ) const
inline

Relative velocity residual of the last evaluation (design §3.2); +inf before the first.

Definition at line 61 of file anderson_accelerator.hpp.

◆ numRestarts()

template<class Grid>
int peclet::flow::AndersonAccelerator< Grid >::numRestarts ( ) const
inline

Definition at line 62 of file anderson_accelerator.hpp.

◆ numResets()

template<class Grid>
int peclet::flow::AndersonAccelerator< Grid >::numResets ( ) const
inline

Definition at line 63 of file anderson_accelerator.hpp.

◆ numColumns()

template<class Grid>
int peclet::flow::AndersonAccelerator< Grid >::numColumns ( ) const
inline

Definition at line 64 of file anderson_accelerator.hpp.

◆ window()

template<class Grid>
int peclet::flow::AndersonAccelerator< Grid >::window ( ) const
inline

Definition at line 65 of file anderson_accelerator.hpp.

Referenced by AndersonAccelerator().

◆ mixing()

template<class Grid>
double peclet::flow::AndersonAccelerator< Grid >::mixing ( ) const
inline

Definition at line 66 of file anderson_accelerator.hpp.

Referenced by AndersonAccelerator().

◆ memoryBytes()

template<class Grid>
std::size_t peclet::flow::AndersonAccelerator< Grid >::memoryBytes ( ) const
inline

Bytes of the history (= Core::memoryBytesFor(window, n_s, n_pad), design §6.3).

Definition at line 68 of file anderson_accelerator.hpp.

◆ seconds()

template<class Grid>
double peclet::flow::AndersonAccelerator< Grid >::seconds ( ) const
inline

Cumulative wall time spent in the accelerator, solver.step() excluded (device-fenced at both ends of each part; the instrument of gate G8), seconds, this rank.

Definition at line 71 of file anderson_accelerator.hpp.

◆ reset()

template<class Grid>
void peclet::flow::AndersonAccelerator< Grid >::reset ( )
inline

Definition at line 72 of file anderson_accelerator.hpp.

Referenced by anderson_oracle.AndersonOracle::step().

◆ disable()

template<class Grid>
void peclet::flow::AndersonAccelerator< Grid >::disable ( )
inline

Definition at line 73 of file anderson_accelerator.hpp.

◆ core()

template<class Grid>
const Core & peclet::flow::AndersonAccelerator< Grid >::core ( ) const
inline

The core itself (tests: γ, engagement, the descriptor).

Definition at line 75 of file anderson_accelerator.hpp.


The documentation for this class was generated from the following file: