CEPS  24.01
Cardiac ElectroPhysiology Simulator
DistributedFactory Class Reference

Detailed Description

Definition at line 37 of file DistributedFactory.hpp.

#include <DistributedFactory.hpp>

Public Member Functions

 DistributedFactory ()
 Default constructor. More...
 
 DistributedFactory (CepsUInt globalRows, CepsUInt globalCols, CepsUInt localRows, CepsUInt localCols, const CepsVector< CepsInt > &diagBlockNnz, const CepsVector< CepsInt > &offdiagBlockNnz)
 Constructor with non zero data. More...
 
 DistributedFactory (CepsUInt globalRows, CepsUInt globalCols, CepsUInt localRows, CepsUInt localCols, CepsUInt diagBlockNz, CepsUInt offdiagBlockNz)
 Constructor with non zero data. More...
 
 ~DistributedFactory ()
 Destructor. More...
 
void setGlobalSizes (CepsUInt globalRows, CepsUInt globalCols)
 Total number of rows and columns. More...
 
void setLocalSizes (CepsUInt localRows, CepsUInt localCols)
 Local number of rows and columns. More...
 
void setHaloIndices (CepsIndex *haloRows, CepsUInt nHaloRows, CepsIndex *haloCols, CepsUInt nHaloCols)
 Local halo rows and columns. More...
 
void setNonZeroTemplate (const CepsIndex *d_nnz, const CepsIndex *o_nnz, CepsInt nbLocalRows)
 Set the non-zero structure of the matrices to create. More...
 
void setNonZeroTemplate (CepsIndex d_nz, CepsIndex o_nz)
 Set the non-zero structure of the matrices to create. More...
 
DVecPtr getDistributedVector () const
 Pointer to created distributed vector. More...
 
DHVecPtr getDistributedHaloVector () const
 Pointer on a created distributed vector that has additional memory allocated to enable the exchange of halo values. More...
 
DMatPtr getDistributedMatrix () const
 Pointer to created distributed matrix. More...
 

Protected Member Functions

void initialize ()
 Sets some variables. More...
 

Protected Attributes

CepsIndex m_globalRows
 global number of rows More...
 
CepsIndex m_globalCols
 global number of columns More...
 
CepsIndex m_localRows
 local number of rows More...
 
CepsIndex m_localCols
 local number of columns More...
 
CepsIndexm_haloRows
 global indices of halo rows on this proc More...
 
CepsIndex m_nHaloRows
 local number of halo rows More...
 
CepsIndexm_haloCols
 global indices of halo cols on this proc More...
 
CepsIndex m_nHaloCols
 local number of halo cols More...
 
CepsIntm_d_nnz
 number of non-zero values specified for each local row on diagonal More...
 
CepsInt m_d_nz
 number of non-zero values on each local row on diagonal More...
 
CepsIntm_o_nnz
 number of non-zero values specified for each local row on off-diagonal More...
 
CepsInt m_o_nz
 number of non-zero values on each local row on off-diagonal More...
 

Constructor & Destructor Documentation

◆ DistributedFactory() [1/3]

DistributedFactory::DistributedFactory ( )

Default constructor.

Definition at line 34 of file DistributedFactory.cpp.

◆ DistributedFactory() [2/3]

DistributedFactory::DistributedFactory ( CepsUInt  globalRows,
CepsUInt  globalCols,
CepsUInt  localRows,
CepsUInt  localCols,
const CepsVector< CepsInt > &  diagBlockNnz,
const CepsVector< CepsInt > &  offdiagBlockNnz 
)

Constructor with non zero data.

See also
setNonZeroTemplate

Definition at line 39 of file DistributedFactory.cpp.

◆ DistributedFactory() [3/3]

DistributedFactory::DistributedFactory ( CepsUInt  globalRows,
CepsUInt  globalCols,
CepsUInt  localRows,
CepsUInt  localCols,
CepsUInt  diagBlockNz,
CepsUInt  offdiagBlockNz 
)

Constructor with non zero data.

See also
setNonZeroTemplate

Definition at line 60 of file DistributedFactory.cpp.

◆ ~DistributedFactory()

DistributedFactory::~DistributedFactory ( )

Destructor.

Definition at line 73 of file DistributedFactory.cpp.

Member Function Documentation

◆ getDistributedHaloVector()

DHVecPtr DistributedFactory::getDistributedHaloVector ( ) const

Pointer on a created distributed vector that has additional memory allocated to enable the exchange of halo values.

Definition at line 154 of file DistributedFactory.cpp.

◆ getDistributedMatrix()

DMatPtr DistributedFactory::getDistributedMatrix ( ) const

Pointer to created distributed matrix.

Definition at line 160 of file DistributedFactory.cpp.

◆ getDistributedVector()

DVecPtr DistributedFactory::getDistributedVector ( ) const

Pointer to created distributed vector.

Definition at line 148 of file DistributedFactory.cpp.

◆ initialize()

void DistributedFactory::initialize ( )
protected

Sets some variables.

Definition at line 174 of file DistributedFactory.cpp.

◆ setGlobalSizes()

void DistributedFactory::setGlobalSizes ( CepsUInt  globalRows,
CepsUInt  globalCols 
)

Total number of rows and columns.

Definition at line 82 of file DistributedFactory.cpp.

◆ setHaloIndices()

void DistributedFactory::setHaloIndices ( CepsIndex haloRows,
CepsUInt  nHaloRows,
CepsIndex haloCols,
CepsUInt  nHaloCols 
)

Local halo rows and columns.

Definition at line 98 of file DistributedFactory.cpp.

◆ setLocalSizes()

void DistributedFactory::setLocalSizes ( CepsUInt  localRows,
CepsUInt  localCols 
)

Local number of rows and columns.

Definition at line 90 of file DistributedFactory.cpp.

◆ setNonZeroTemplate() [1/2]

void DistributedFactory::setNonZeroTemplate ( CepsIndex  d_nz,
CepsIndex  o_nz 
)

Set the non-zero structure of the matrices to create.

For better memory management and performance, it is always better to provide d_nnz and o_nnz instead of their constant alternative d_nz and o_nz

Parameters
[in]d_nznumber of non-zero values for each row on diagonal part of the matrix
[in]o_nzsimilar to o_nz for off-diagonal part

Definition at line 140 of file DistributedFactory.cpp.

◆ setNonZeroTemplate() [2/2]

void DistributedFactory::setNonZeroTemplate ( const CepsIndex d_nnz,
const CepsIndex o_nnz,
CepsInt  nbLocalRows 
)

Set the non-zero structure of the matrices to create.

For better memory management and performance, it is always better to provide d_nnz and o_nnz instead of their constant alternative d_nz and o_nz

Parameters
[in]d_nnzarray of size nbLocalRows, where d_nnz[i] holds the number of non-zero values for row i on diagonal part of the matrix.
[in]o_nnzsimilar to d_nnz but for off-diagonal.
[in]nbLocalRowsnumber of local rows

Definition at line 119 of file DistributedFactory.cpp.

Field Documentation

◆ m_d_nnz

CepsInt* DistributedFactory::m_d_nnz
protected

number of non-zero values specified for each local row on diagonal

Definition at line 125 of file DistributedFactory.hpp.

◆ m_d_nz

CepsInt DistributedFactory::m_d_nz
protected

number of non-zero values on each local row on diagonal

Definition at line 126 of file DistributedFactory.hpp.

◆ m_globalCols

CepsIndex DistributedFactory::m_globalCols
protected

global number of columns

Definition at line 114 of file DistributedFactory.hpp.

◆ m_globalRows

CepsIndex DistributedFactory::m_globalRows
protected

global number of rows

Definition at line 113 of file DistributedFactory.hpp.

◆ m_haloCols

CepsIndex* DistributedFactory::m_haloCols
protected

global indices of halo cols on this proc

Definition at line 122 of file DistributedFactory.hpp.

◆ m_haloRows

CepsIndex* DistributedFactory::m_haloRows
protected

global indices of halo rows on this proc

Definition at line 120 of file DistributedFactory.hpp.

◆ m_localCols

CepsIndex DistributedFactory::m_localCols
protected

local number of columns

Definition at line 118 of file DistributedFactory.hpp.

◆ m_localRows

CepsIndex DistributedFactory::m_localRows
protected

local number of rows

Definition at line 117 of file DistributedFactory.hpp.

◆ m_nHaloCols

CepsIndex DistributedFactory::m_nHaloCols
protected

local number of halo cols

Definition at line 123 of file DistributedFactory.hpp.

◆ m_nHaloRows

CepsIndex DistributedFactory::m_nHaloRows
protected

local number of halo rows

Definition at line 121 of file DistributedFactory.hpp.

◆ m_o_nnz

CepsInt* DistributedFactory::m_o_nnz
protected

number of non-zero values specified for each local row on off-diagonal

Definition at line 127 of file DistributedFactory.hpp.

◆ m_o_nz

CepsInt DistributedFactory::m_o_nz
protected

number of non-zero values on each local row on off-diagonal

Definition at line 128 of file DistributedFactory.hpp.


The documentation for this class was generated from the following files: