Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::composite::OwnedCSR Struct Reference

Rows owned by this rank in CSR form, columns sorted within each row and duplicates summed. More...

#include <AMReX_CompositeSystemUtil.H>

Public Member Functions

Long nnz () const
void define (Long a_row_begin, Long a_nrows, Vector< Triplet > trips)
void toSpMatrix (SpMatrix< Real > &mat, Vector< Long > const &rank_offset) const
 Define an SpMatrix (device memory in GPU builds) with this CSR.

Public Attributes

Long row_begin = 0
 first global row of this rank
Long nrows = 0
 number of rows owned by this rank
Vector< Long > row_offset
 size nrows+1
Vector< Long > col_index
 global column indices
Vector< Real > values

Detailed Description

Rows owned by this rank in CSR form, columns sorted within each row and duplicates summed.

Member Function Documentation

◆ define()

void amrex::composite::OwnedCSR::define ( Long a_row_begin,
Long a_nrows,
Vector< Triplet > trips )
inline

Build from the triplets of this rank's rows (rows outside [row_begin, row_begin+nrows) are an error).

◆ nnz()

Long amrex::composite::OwnedCSR::nnz ( ) const
inlinenodiscard

◆ toSpMatrix()

void amrex::composite::OwnedCSR::toSpMatrix ( SpMatrix< Real > & mat,
Vector< Long > const & rank_offset ) const
inline

Define an SpMatrix (device memory in GPU builds) with this CSR.

Member Data Documentation

◆ col_index

Vector<Long> amrex::composite::OwnedCSR::col_index

global column indices

◆ nrows

Long amrex::composite::OwnedCSR::nrows = 0

number of rows owned by this rank

◆ row_begin

Long amrex::composite::OwnedCSR::row_begin = 0

first global row of this rank

◆ row_offset

Vector<Long> amrex::composite::OwnedCSR::row_offset

size nrows+1

◆ values

Vector<Real> amrex::composite::OwnedCSR::values

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