Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
chemistry::SparseLU< MemorySpace > Struct Template Reference

The linear solver of integrate() for SparseLUPattern: factor() gathers diagonal I - J_s from the compact Jacobian and factors it, then z = A_s^-1 u and beta = 1 - v . z; solve() is A_s^-1 b plus the Sherman-Morrison correction z (v . A_s^-1 b) / beta. More...

#include <sparse_lu.h>

Public Member Functions

template<typename Lanes >
KOKKOS_INLINE_FUNCTION void solve_s (const Lanes &lanes, double *b) const
 A_s^-1 b in place, with every entry's terms in the order of the elimination column by column (so the result does not depend on the lanes): the columns of the chain one by one, the rows of a column across the lanes; the others by levels of independent rows, each row by one lane.
 
template<typename Lanes >
KOKKOS_INLINE_FUNCTION bool factor (const Lanes &lanes, const double *J, const double diagonal) const
 Factor diagonal I - J_s (see SparseLU): one thread pivot by pivot; lanes stage by stage, the stage's L entries scaled by their pivots, then each entry it updates by one lane in pivot order, so that the factors are the same bits for any lanes.
 
template<typename Lanes >
KOKKOS_INLINE_FUNCTION void solve (const Lanes &lanes, double *b) const
 

Static Public Member Functions

template<typename Pairs >
static KOKKOS_INLINE_FUNCTION double subtract (double a, const Pairs &entry, const uint32_t begin, const uint32_t end, const double *values, const double *x)
 a - sum_e values[entry(e, 0)] x[entry(e, 1)] for e in [begin, end), in order; the loads of a few terms go out together.
 

Public Attributes

const SparseLUPattern< MemorySpace > & p
 
double * values
 
double * z
 
const double * u
 
double * x
 
double * beta
 

Detailed Description

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
struct chemistry::SparseLU< MemorySpace >

The linear solver of integrate() for SparseLUPattern: factor() gathers diagonal I - J_s from the compact Jacobian and factors it, then z = A_s^-1 u and beta = 1 - v . z; solve() is A_s^-1 b plus the Sherman-Morrison correction z (v . A_s^-1 b) / beta.

Member Function Documentation

◆ factor()

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
template<typename Lanes >
KOKKOS_INLINE_FUNCTION bool chemistry::SparseLU< MemorySpace >::factor ( const Lanes &  lanes,
const double *  J,
const double  diagonal 
) const
inline

Factor diagonal I - J_s (see SparseLU): one thread pivot by pivot; lanes stage by stage, the stage's L entries scaled by their pivots, then each entry it updates by one lane in pivot order, so that the factors are the same bits for any lanes.

◆ solve()

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
template<typename Lanes >
KOKKOS_INLINE_FUNCTION void chemistry::SparseLU< MemorySpace >::solve ( const Lanes &  lanes,
double *  b 
) const
inline

◆ solve_s()

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
template<typename Lanes >
KOKKOS_INLINE_FUNCTION void chemistry::SparseLU< MemorySpace >::solve_s ( const Lanes &  lanes,
double *  b 
) const
inline

A_s^-1 b in place, with every entry's terms in the order of the elimination column by column (so the result does not depend on the lanes): the columns of the chain one by one, the rows of a column across the lanes; the others by levels of independent rows, each row by one lane.

◆ subtract()

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
template<typename Pairs >
static KOKKOS_INLINE_FUNCTION double chemistry::SparseLU< MemorySpace >::subtract ( double  a,
const Pairs &  entry,
const uint32_t  begin,
const uint32_t  end,
const double *  values,
const double *  x 
)
inlinestatic

a - sum_e values[entry(e, 0)] x[entry(e, 1)] for e in [begin, end), in order; the loads of a few terms go out together.

Member Data Documentation

◆ beta

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
double* chemistry::SparseLU< MemorySpace >::beta

◆ p

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
const SparseLUPattern<MemorySpace>& chemistry::SparseLU< MemorySpace >::p

◆ u

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
const double* chemistry::SparseLU< MemorySpace >::u

◆ values

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
double* chemistry::SparseLU< MemorySpace >::values

◆ x

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
double* chemistry::SparseLU< MemorySpace >::x

◆ z

template<typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
double* chemistry::SparseLU< MemorySpace >::z

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