25#ifndef __BITPIT_SYSTEM_MATRIX_HPP__
26#define __BITPIT_SYSTEM_MATRIX_HPP__
30#if BITPIT_ENABLE_MPI==1
34#include "bitpit_containers.hpp"
43 SparseMatrix(
int blockSize,
long nRows,
long nCols,
long nNZ);
44#if BITPIT_ENABLE_MPI==1
46 SparseMatrix(MPI_Comm communicator,
bool partitioned,
long nRows,
long nCols,
long nNZ);
47 SparseMatrix(MPI_Comm communicator,
bool partitioned,
int blockSize,
long nRows,
long nCols,
long nNZ);
50#if BITPIT_ENABLE_MPI==1
57 void initialize(
long nRows,
long nCols,
long nNZ);
58 void initialize(
int blockSize,
long nRows,
long nCols,
long nNZ);
59#if BITPIT_ENABLE_MPI==1
60 void initialize(
bool partitioned,
long nRows,
long nCols,
long nNZ);
61 void initialize(
bool partitioned,
int blockSize,
long nRows,
long nCols,
long nNZ);
63 void clear(
bool release =
false);
66 virtual void display(std::ostream &stream,
double negligiblity,
int indent = 0)
const;
90#if BITPIT_ENABLE_MPI==1
120 void addRow(
const std::vector<long> &rowPattern,
const std::vector<double> &rowValues);
121 void addRow(
long nRowNZ,
const long *rowPattern,
const double *rowValues);
143#if BITPIT_ENABLE_MPI==1
145 MPI_Comm m_communicator;
150 long m_global_maxRowNZ;
151 long m_global_rowOffset;
152 long m_global_colOffset;
156 std::vector<double> m_values;
173 void _initialize(
int blockSize,
long nRows,
long nCols,
long nNZ);
174#if BITPIT_ENABLE_MPI==1
175 void _initialize(
bool partitioned,
int bBlocks,
long nRows,
long nCols,
long nNZ);
178#if BITPIT_ENABLE_MPI==1
179 void setCommunicator(MPI_Comm communicator);
180 void freeCommunicator();
Metafunction for generation of a flattened vector of vectors.
Metafunction for generating a list of elements that can be either stored in an external vectror or,...
long countMissingRows() const
const MPI_Comm & getCommunicator() const
long getColElementCount() const
void initialize(long nRows, long nCols, long nNZ)
long getColGlobalCount() const
ConstProxyVector< double > getRowValues(long row) const
long getColGlobalOffset() const
bool isPartitioned() const
long getNZGlobalElementCount() const
void initializeValueStorage()
long getNZElementCount() const
void clear(bool release=false)
long getMaxRowNZCount() const
long getRowNZElementCount(long row) const
virtual void display(std::ostream &stream, double negligiblity, int indent=0) const
long getRowGlobalCount() const
std::unique_ptr< SparseMatrix > computeTranspose() const
long getRowElementCount() const
void initializePatternStorage()
std::vector< long > extractLocalGlobalRows() const
void squeezePatternStorage()
long getRowGlobalElementCount() const
long getMaxRowNZGlobalElementCount() const
std::vector< long > extractGhostGlobalRows() const
ConstProxyVector< long > getRowPattern(long row) const
long getMaxRowNZElementCount() const
long getNZGlobalCount() const
long getRowGlobalElementOffset() const
void addRow(const std::vector< long > &rowPattern, const std::vector< double > &rowValues)
long * getRowPatternData(long row)
long getColGlobalElementCount() const
long getColGlobalElementOffset() const
std::vector< long > extractLocalGlobalCols() const
long getRowNZCount(long row) const
void clearValueStorage(bool release)
std::vector< long > extractGhostGlobalCols() const
void clearPatternStorage(bool release)
double * getRowValuesData(long row)
long getRowGlobalOffset() const
long getMaxRowNZGlobalCount() const
long countAddedRows() const
void squeezeValueStorage()