core 1.5.0
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
Loading...
Searching...
No Matches
peclet::core::solver::GraphAMGDevice Class Reference

#include <graph_amg_device.hpp>

Classes

struct  DLevel
 

Public Types

using DView = View< double >
 
using IView = View< Index >
 

Public Member Functions

void build (const HostCsrOp &A, const AmgParams &prm={})
 Host setup + one-time device mirror. Rebuild whenever the operator changes.
 
void apply (const DView &r, const DView &z) const
 z = M⁻¹ r: one V-cycle (correction scheme) from a zero initial guess. Device views, size n.
 
int numLevels () const
 
Index size (int L=0) const
 
const GraphAMG & hostHierarchy () const
 
void mirror ()
 
void vcycle (int L) const
 
void smooth (const DLevel &lv, int sweeps) const
 
void jacobiSweep (const DLevel &lv) const
 
void chebSweep (const DLevel &lv) const
 
void coarseSolve (const DLevel &lv) const
 

Static Public Member Functions

template<class T >
static View< T > toDev (const std::vector< T > &v, const char *name)
 
static void spmv (const DLevel &lv, const DView &x, const DView &y)
 
static double dot (const DView &a, const DView &b, Index n)
 

Detailed Description

Definition at line 29 of file graph_amg_device.hpp.

Member Typedef Documentation

◆ DView

◆ IView

Member Function Documentation

◆ build()

void peclet::core::solver::GraphAMGDevice::build ( const HostCsrOp &  A,
const AmgParams &  prm = {} 
)
inline

Host setup + one-time device mirror. Rebuild whenever the operator changes.

Definition at line 35 of file graph_amg_device.hpp.

◆ apply()

void peclet::core::solver::GraphAMGDevice::apply ( const DView &  r,
const DView &  z 
) const
inline

z = M⁻¹ r: one V-cycle (correction scheme) from a zero initial guess. Device views, size n.

Definition at line 42 of file graph_amg_device.hpp.

References vcycle().

◆ numLevels()

int peclet::core::solver::GraphAMGDevice::numLevels ( ) const
inline

Definition at line 50 of file graph_amg_device.hpp.

◆ size()

Index peclet::core::solver::GraphAMGDevice::size ( int  L = 0) const
inline

Definition at line 51 of file graph_amg_device.hpp.

◆ hostHierarchy()

const GraphAMG & peclet::core::solver::GraphAMGDevice::hostHierarchy ( ) const
inline

Definition at line 52 of file graph_amg_device.hpp.

◆ toDev()

template<class T >
static View< T > peclet::core::solver::GraphAMGDevice::toDev ( const std::vector< T > &  v,
const char *  name 
)
inlinestatic

Definition at line 68 of file graph_amg_device.hpp.

Referenced by mirror().

◆ mirror()

void peclet::core::solver::GraphAMGDevice::mirror ( )
inline

◆ spmv()

static void peclet::core::solver::GraphAMGDevice::spmv ( const DLevel &  lv,
const DView &  x,
const DView &  y 
)
inlinestatic

Definition at line 130 of file graph_amg_device.hpp.

Referenced by chebSweep(), coarseSolve(), jacobiSweep(), and vcycle().

◆ vcycle()

void peclet::core::solver::GraphAMGDevice::vcycle ( int  L) const
inline

◆ smooth()

void peclet::core::solver::GraphAMGDevice::smooth ( const DLevel &  lv,
int  sweeps 
) const
inline

Definition at line 187 of file graph_amg_device.hpp.

References peclet::core::solver::AmgParams::chebDegree, chebSweep(), and jacobiSweep().

Referenced by coarseSolve(), and vcycle().

◆ jacobiSweep()

void peclet::core::solver::GraphAMGDevice::jacobiSweep ( const DLevel &  lv) const
inline

Definition at line 197 of file graph_amg_device.hpp.

References peclet::core::solver::AmgParams::jacobiOmega, and spmv().

Referenced by smooth().

◆ chebSweep()

void peclet::core::solver::GraphAMGDevice::chebSweep ( const DLevel &  lv) const
inline

Definition at line 206 of file graph_amg_device.hpp.

References peclet::core::solver::AmgParams::chebDegree, and spmv().

Referenced by smooth().

◆ dot()

static double peclet::core::solver::GraphAMGDevice::dot ( const DView &  a,
const DView &  b,
Index  n 
)
inlinestatic

Definition at line 233 of file graph_amg_device.hpp.

Referenced by coarseSolve().

◆ coarseSolve()

void peclet::core::solver::GraphAMGDevice::coarseSolve ( const DLevel &  lv) const
inline

Definition at line 243 of file graph_amg_device.hpp.

References peclet::core::solver::AmgParams::coarseSweeps, dot(), smooth(), and spmv().

Referenced by vcycle().


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