title: COARSEN summary: This class is used to manage the Coarsening for AMG. There are the following option for the coarsening: 0 → SoC with Diagonal Dominance 1 → Classical SoC 2 → Affinity-based SoC.
COARSEN
This class is used to manage the Coarsening for AMG. There are the following option for the coarsening: 0 → SoC with Diagonal Dominance 1 → Classical SoC 2 → Affinity-based SoC. More…
#include "COARSEN.h"
Public Functions
| Name | |
|---|---|
| COARSEN(const COARSEN_params & input_params) Creates an empty object. |
|
| ~COARSEN() Deletes the object. |
|
| void | Compute(DSMat & mat_A, const DDMat *restrict TV, int nlevel, bool const cpt_PMIS =true) Computes the SoC and the Fine/Coarse nodes. |
| void | Compute_AC(DSMat & mat_A) Computes the SoC and the Fine Coarse/Coarse nodes for aggressive coarsening. |
| void | Strong(DSMat & mat_A) Computes the strong SoC. |
| void | Print_ASCII(DSMat & mat_A, const string & filename) const Prints the SoC Matrix in ASCII format. |
| const VEC_CPU< int > * | Get_ptr_SoC_ind() const Retrieves pointer to SoC_ind. |
| VEC< iReg > ** | Get_ptr_fcnodes() Retrieves pointer to fcnodes. |
| VEC< iReg > *const * | Get_ptr_fcnodes() const |
| DSMat * | Get_ptr_SoC_strong() Retrieves pointer to SoC_strong. |
| const DSMat * | Get_ptr_SoC_strong() const |
| void | Set_ncoarse(const iReg ncoarse_in) Sets number of coarse nodes. |
| iReg | Get_ncoarse() const Retrieves number of coarse nodes. |
| bool | Get_strong_storage() const Retrieves flag for strong-pattern storage. |
| const iReg * | Get_ptr_ncoarse() const Retrieves pointer to the number of coarse nodes. |
| iExt | Get_nnz_strong() const Retrieves the number of strong connections. |
| iExt | Get_nnz_jump() const Retrieves the number of connections with big jumps. |
| iExt | Get_nnz_negSoC() const Retrieves the number of zero or negative SoC. |
Friends
| Name | |
|---|---|
| class | SoC_DiagDom_CPU |
| class | SoC_DiagDom_GPU |
| class | SoC_Classical_CPU |
| class | SoC_Classical_GPU |
| class | PMIS_new_CPU |
| class | PMIS_new_GPU |
Detailed Description
class COARSEN;
This class is used to manage the Coarsening for AMG. There are the following option for the coarsening: 0 → SoC with Diagonal Dominance 1 → Classical SoC 2 → Affinity-based SoC.
class COARSEN.
Public Functions Documentation
function COARSEN
COARSEN(
const COARSEN_params & input_params
)
Creates an empty object.
function ~COARSEN
~COARSEN()
Deletes the object.
function Compute
void Compute(
DSMat & mat_A,
const DDMat *__restrict__ TV,
int nlevel,
bool const cpt_PMIS =true
)
Computes the SoC and the Fine/Coarse nodes.
Parameters:
- mat_A system matrix.
- TV test space.
- nlevel level index (used only for debug printing).
function Compute_AC
void Compute_AC(
DSMat & mat_A
)
Computes the SoC and the Fine Coarse/Coarse nodes for aggressive coarsening.
Parameters:
- mat_A system matrix.
function Strong
void Strong(
DSMat & mat_A
)
Computes the strong SoC.
Parameters:
- mat_A system matrix.
function Print_ASCII
void Print_ASCII(
DSMat & mat_A,
const string & filename
) const
Prints the SoC Matrix in ASCII format.
Parameters:
- mat_A system matrix (used for SoC connectivity).
- filename output file name.
function Get_ptr_SoC_ind
inline const VEC_CPU< int > * Get_ptr_SoC_ind() const
Retrieves pointer to SoC_ind.
function Get_ptr_fcnodes
inline VEC< iReg > ** Get_ptr_fcnodes()
Retrieves pointer to fcnodes.
function Get_ptr_fcnodes
inline VEC< iReg > *const * Get_ptr_fcnodes() const
function Get_ptr_SoC_strong
inline DSMat * Get_ptr_SoC_strong()
Retrieves pointer to SoC_strong.
function Get_ptr_SoC_strong
inline const DSMat * Get_ptr_SoC_strong() const
function Set_ncoarse
inline void Set_ncoarse(
const iReg ncoarse_in
)
Sets number of coarse nodes.
function Get_ncoarse
inline iReg Get_ncoarse() const
Retrieves number of coarse nodes.
function Get_strong_storage
inline bool Get_strong_storage() const
Retrieves flag for strong-pattern storage.
function Get_ptr_ncoarse
inline const iReg * Get_ptr_ncoarse() const
Retrieves pointer to the number of coarse nodes.
function Get_nnz_strong
inline iExt Get_nnz_strong() const
Retrieves the number of strong connections.
function Get_nnz_jump
inline iExt Get_nnz_jump() const
Retrieves the number of connections with big jumps.
function Get_nnz_negSoC
inline iExt Get_nnz_negSoC() const
Retrieves the number of zero or negative SoC.
Friends
friend SoC_DiagDom_CPU
friend class SoC_DiagDom_CPU;
friend SoC_DiagDom_GPU
friend class SoC_DiagDom_GPU;
friend SoC_Classical_CPU
friend class SoC_Classical_CPU;
friend SoC_Classical_GPU
friend class SoC_Classical_GPU;
friend PMIS_new_CPU
friend class PMIS_new_CPU;
friend PMIS_new_GPU
friend class PMIS_new_GPU;
Updated on 19 November 2024 at 10:20:48 CET