51 CepsUInt dLength = diagBlockNnz .size();
52 CepsUInt oLength = offdiagBlockNnz.size();
54 "provided non zero structure is ill-formed"
126 "when setting non zero template, provided number of local rows (" << nbLocalRows <<
127 ")\ndoes not match number of rows of the factory (" <<
m_localRows <<
")"
#define CEPS_ABORT_IF(condition, message)
Stops the execution with a message if condition is true. If testing is enabled, only throws a runtime...
std::vector< _Type, _Alloc > CepsVector
C++ vector.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
int32_t CepsInt
Need 32 bit integer.
CepsInt CepsIndex
Index rowid etc.
std::shared_ptr< DistributedHaloVector > DHVecPtr
Typedef for pointer on Distributed Halo CepsVector.
std::shared_ptr< DistributedMatrix > DMatPtr
Short typedef for pointer on dist matrix.
std::shared_ptr< DistributedVector > DVecPtr
Short typedef for pointer on distributed vector.
void setHaloIndices(CepsIndex *haloRows, CepsUInt nHaloRows, CepsIndex *haloCols, CepsUInt nHaloCols)
Local halo rows and columns.
CepsIndex m_nHaloCols
local number of halo cols
~DistributedFactory()
Destructor.
CepsIndex * m_haloRows
global indices of halo rows on this proc
void setGlobalSizes(CepsUInt globalRows, CepsUInt globalCols)
Total number of rows and columns.
CepsInt m_o_nz
number of non-zero values on each local row on off-diagonal
CepsInt m_d_nz
number of non-zero values on each local row on diagonal
CepsIndex m_globalRows
global number of rows
DVecPtr getDistributedVector() const
Pointer to created distributed vector.
CepsIndex m_globalCols
global number of columns
DHVecPtr getDistributedHaloVector() const
Pointer on a created distributed vector that has additional memory allocated to enable the exchange o...
void setLocalSizes(CepsUInt localRows, CepsUInt localCols)
Local number of rows and columns.
DMatPtr getDistributedMatrix() const
Pointer to created distributed matrix.
CepsInt * m_o_nnz
number of non-zero values specified for each local row on off-diagonal
CepsInt * m_d_nnz
number of non-zero values specified for each local row on diagonal
void initialize()
Sets some variables.
CepsIndex * m_haloCols
global indices of halo cols on this proc
DistributedFactory()
Default constructor.
CepsIndex m_localRows
local number of rows
CepsIndex m_localCols
local number of columns
void setNonZeroTemplate(const CepsIndex *d_nnz, const CepsIndex *o_nnz, CepsInt nbLocalRows)
Set the non-zero structure of the matrices to create.
CepsIndex m_nHaloRows
local number of halo rows
Sparse matrix distributed between process.
void setNonZeroStructure(const CepsInt d_nnz[], const CepsInt o_nnz[])
Set the matrix non-zero structure.
void destroyTabular(_Type &)
Destroy[delete] any type.
CepsBool isValidPtr(_Type *ptr)
Tells if pointer is not null.
_Type * newCopyArray(_Type *src, long unsigned int n)
Generates a C-style copy of a C-style array.