Skip to content

Class ae108::cpppetsc::Matrix::AssemblyView::Inserter

template <InsertMode Mode>

ClassList > ae108 > cpppetsc > Matrix > AssemblyView > Inserter

Provides element() and elements() access functions to set/add single/multiple elements. These calls can be chained (matrix is a Matrix object):More...

Public Types

Type Name
typedef Matrix::size_type size_type
typedef Matrix::value_type value_type

Public Functions

Type Name
Inserter (std::shared_ptr< Matrix > matrix)
Inserter (const Inserter &) = default
Inserter (Inserter &&) noexcept
size_type cols () const
const Inserter & element (const size_type row_index, const size_type column_index, const value_type value) const
const Inserter & elements (const std::vector< size_type > & row_indices, const std::vector< size_type > & column_indices, const std::vector< value_type > & values) const
InsertionProxy< Mode > operator() (const size_type row_index, const size_type column_index) const
Inserter & operator= (const Inserter &) = default
Inserter & operator= (Inserter &&) noexcept
size_type rows () const
void setZero () const
~Inserter ()

Detailed Description

matrix.replace().element(0, 0, 7.).element(1, 1, 3.);

It is also possible to set/add entries by accessing the index first:

matrix.replace()(0, 0) = 7.;

This way, the Inserter class can be used as a "matrix" for assembly.

Public Types Documentation

typedef size_type

using ae108::cpppetsc::Matrix< Policy >::AssemblyView::Inserter< Mode >::size_type =  Matrix::size_type;

typedef value_type

using ae108::cpppetsc::Matrix< Policy >::AssemblyView::Inserter< Mode >::value_type =  Matrix::value_type;

Public Functions Documentation

function Inserter [1/3]

inline explicit ae108::cpppetsc::Matrix::AssemblyView::Inserter::Inserter (
    std::shared_ptr< Matrix > matrix
) 

Parameters:

  • matrix nonzero pointer to a Matrix

function Inserter [2/3]

ae108::cpppetsc::Matrix::AssemblyView::Inserter::Inserter (
    const Inserter &
) = default

function Inserter [3/3]

ae108::cpppetsc::Matrix::AssemblyView::Inserter::Inserter (
    Inserter &&
) noexcept

function cols

inline size_type ae108::cpppetsc::Matrix::AssemblyView::Inserter::cols () const

function element

inline const Inserter & ae108::cpppetsc::Matrix::AssemblyView::Inserter::element (
    const size_type row_index,
    const size_type column_index,
    const value_type value
) const

function elements

inline const Inserter & ae108::cpppetsc::Matrix::AssemblyView::Inserter::elements (
    const std::vector< size_type > & row_indices,
    const std::vector< size_type > & column_indices,
    const std::vector< value_type > & values
) const

function operator()

inline InsertionProxy < Mode > ae108::cpppetsc::Matrix::AssemblyView::Inserter::operator() (
    const size_type row_index,
    const size_type column_index
) const

function operator=

Inserter & ae108::cpppetsc::Matrix::AssemblyView::Inserter::operator= (
    const Inserter &
) = default

function operator=

Inserter & ae108::cpppetsc::Matrix::AssemblyView::Inserter::operator= (
    Inserter &&
) noexcept

function rows

inline size_type ae108::cpppetsc::Matrix::AssemblyView::Inserter::rows () const

function setZero

inline void ae108::cpppetsc::Matrix::AssemblyView::Inserter::setZero () const

function ~Inserter

inline ae108::cpppetsc::Matrix::AssemblyView::Inserter::~Inserter () 


The documentation for this class was generated from the following file cpppetsc/src/include/ae108/cpppetsc/Matrix.h