Opm::Accelerator::CprCreation< Scalar, block_size > Class Template Reference

This class implements a Constrained Pressure Residual (CPR) preconditioner. More...

#include <CprCreation.hpp>

Inheritance diagram for Opm::Accelerator::CprCreation< Scalar, block_size >:
Inheritance graph

Public Member Functions

 CprCreation ()
 

Protected Types

using DuneMat = Dune::BCRSMatrix< Dune::FieldMatrix< Scalar, 1, 1 > >
 
using DuneVec = Dune::BlockVector< Dune::FieldVector< Scalar, 1 > >
 
using MatrixOperator = Dune::MatrixAdapter< DuneMat, DuneVec, DuneVec >
 
using DuneAmg = Dune::Amg::MatrixHierarchy< MatrixOperator, Dune::Amg::SequentialInformation >
 

Protected Member Functions

void analyzeHierarchy ()
 
void analyzeAggregateMaps ()
 
void create_preconditioner_amg (BlockedMatrix< Scalar > *mat)
 

Protected Attributes

int num_levels
 
std::vector< Scalar > weights
 
std::vector< Scalar > coarse_vals
 
std::vector< Scalar > coarse_x
 
std::vector< Scalar > coarse_y
 
std::vector< Matrix< Scalar > > Amatrices
 
std::vector< Matrix< Scalar > > Rmatrices
 
std::vector< std::vector< int > > PcolIndices
 
std::vector< std::vector< Scalar > > invDiags
 
BlockedMatrix< Scalar > * mat = nullptr
 
std::unique_ptr< DuneAmgdune_amg
 
std::unique_ptr< DuneMatdune_coarse
 
std::shared_ptr< MatrixOperatordune_op
 
std::vector< int > level_sizes
 
std::vector< std::vector< int > > diagIndices
 
std::conditional_t< std::is_same_v< Scalar, double >, Dune::UMFPack< DuneMat >, int > umfpack
 
bool always_recalculate_aggregates = false
 
bool recalculate_aggregates = true
 
const int pressure_idx = 1
 
unsigned num_pre_smooth_steps
 
unsigned num_post_smooth_steps
 

Detailed Description

template<class Scalar, unsigned int block_size>
class Opm::Accelerator::CprCreation< Scalar, block_size >

This class implements a Constrained Pressure Residual (CPR) preconditioner.

Member Typedef Documentation

◆ DuneAmg

template<class Scalar , unsigned int block_size>
using Opm::Accelerator::CprCreation< Scalar, block_size >::DuneAmg = Dune::Amg::MatrixHierarchy<MatrixOperator, Dune::Amg::SequentialInformation>
protected

◆ DuneMat

template<class Scalar , unsigned int block_size>
using Opm::Accelerator::CprCreation< Scalar, block_size >::DuneMat = Dune::BCRSMatrix<Dune::FieldMatrix<Scalar, 1, 1> >
protected

◆ DuneVec

template<class Scalar , unsigned int block_size>
using Opm::Accelerator::CprCreation< Scalar, block_size >::DuneVec = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >
protected

◆ MatrixOperator

template<class Scalar , unsigned int block_size>
using Opm::Accelerator::CprCreation< Scalar, block_size >::MatrixOperator = Dune::MatrixAdapter<DuneMat, DuneVec, DuneVec>
protected

Constructor & Destructor Documentation

◆ CprCreation()

template<class Scalar , unsigned int block_size>
Opm::Accelerator::CprCreation< Scalar, block_size >::CprCreation ( )

Member Function Documentation

◆ analyzeAggregateMaps()

template<class Scalar , unsigned int block_size>
void Opm::Accelerator::CprCreation< Scalar, block_size >::analyzeAggregateMaps ( )
protected

◆ analyzeHierarchy()

template<class Scalar , unsigned int block_size>
void Opm::Accelerator::CprCreation< Scalar, block_size >::analyzeHierarchy ( )
protected

◆ create_preconditioner_amg()

template<class Scalar , unsigned int block_size>
void Opm::Accelerator::CprCreation< Scalar, block_size >::create_preconditioner_amg ( BlockedMatrix< Scalar > *  mat)
protected

Member Data Documentation

◆ always_recalculate_aggregates

template<class Scalar , unsigned int block_size>
bool Opm::Accelerator::CprCreation< Scalar, block_size >::always_recalculate_aggregates = false
protected

◆ Amatrices

template<class Scalar , unsigned int block_size>
std::vector<Matrix<Scalar> > Opm::Accelerator::CprCreation< Scalar, block_size >::Amatrices
protected

◆ coarse_vals

template<class Scalar , unsigned int block_size>
std::vector<Scalar> Opm::Accelerator::CprCreation< Scalar, block_size >::coarse_vals
protected

◆ coarse_x

template<class Scalar , unsigned int block_size>
std::vector<Scalar> Opm::Accelerator::CprCreation< Scalar, block_size >::coarse_x
protected

◆ coarse_y

template<class Scalar , unsigned int block_size>
std::vector<Scalar> Opm::Accelerator::CprCreation< Scalar, block_size >::coarse_y
protected

◆ diagIndices

template<class Scalar , unsigned int block_size>
std::vector<std::vector<int> > Opm::Accelerator::CprCreation< Scalar, block_size >::diagIndices
protected

◆ dune_amg

template<class Scalar , unsigned int block_size>
std::unique_ptr<DuneAmg> Opm::Accelerator::CprCreation< Scalar, block_size >::dune_amg
protected

◆ dune_coarse

template<class Scalar , unsigned int block_size>
std::unique_ptr<DuneMat> Opm::Accelerator::CprCreation< Scalar, block_size >::dune_coarse
protected

◆ dune_op

template<class Scalar , unsigned int block_size>
std::shared_ptr<MatrixOperator> Opm::Accelerator::CprCreation< Scalar, block_size >::dune_op
protected

◆ invDiags

template<class Scalar , unsigned int block_size>
std::vector<std::vector<Scalar> > Opm::Accelerator::CprCreation< Scalar, block_size >::invDiags
protected

◆ level_sizes

template<class Scalar , unsigned int block_size>
std::vector<int> Opm::Accelerator::CprCreation< Scalar, block_size >::level_sizes
protected

◆ mat

template<class Scalar , unsigned int block_size>
BlockedMatrix<Scalar>* Opm::Accelerator::CprCreation< Scalar, block_size >::mat = nullptr
protected

◆ num_levels

template<class Scalar , unsigned int block_size>
int Opm::Accelerator::CprCreation< Scalar, block_size >::num_levels
protected

◆ num_post_smooth_steps

template<class Scalar , unsigned int block_size>
unsigned Opm::Accelerator::CprCreation< Scalar, block_size >::num_post_smooth_steps
protected

◆ num_pre_smooth_steps

template<class Scalar , unsigned int block_size>
unsigned Opm::Accelerator::CprCreation< Scalar, block_size >::num_pre_smooth_steps
protected

◆ PcolIndices

template<class Scalar , unsigned int block_size>
std::vector<std::vector<int> > Opm::Accelerator::CprCreation< Scalar, block_size >::PcolIndices
protected

◆ pressure_idx

template<class Scalar , unsigned int block_size>
const int Opm::Accelerator::CprCreation< Scalar, block_size >::pressure_idx = 1
protected

◆ recalculate_aggregates

template<class Scalar , unsigned int block_size>
bool Opm::Accelerator::CprCreation< Scalar, block_size >::recalculate_aggregates = true
protected

◆ Rmatrices

template<class Scalar , unsigned int block_size>
std::vector<Matrix<Scalar> > Opm::Accelerator::CprCreation< Scalar, block_size >::Rmatrices
protected

◆ umfpack

template<class Scalar , unsigned int block_size>
std::conditional_t<std::is_same_v<Scalar,double>, Dune::UMFPack<DuneMat>, int> Opm::Accelerator::CprCreation< Scalar, block_size >::umfpack
protected

◆ weights

template<class Scalar , unsigned int block_size>
std::vector<Scalar> Opm::Accelerator::CprCreation< Scalar, block_size >::weights
protected

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