My Project
Loading...
Searching...
No Matches
Opm::Accelerator::openclCPR< Scalar, block_size > Class Template Reference

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

#include <openclCPR.hpp>

Inheritance diagram for Opm::Accelerator::openclCPR< Scalar, block_size >:
Opm::Accelerator::openclPreconditioner< Scalar, block_size > Opm::Accelerator::CprCreation< Scalar, block_size > Opm::Accelerator::Preconditioner< Scalar, block_size >

Public Member Functions

 openclCPR (bool opencl_ilu_parallel, int verbosity)
 
bool analyze_matrix (BlockedMatrix< Scalar > *mat) override
 
bool analyze_matrix (BlockedMatrix< Scalar > *mat, BlockedMatrix< Scalar > *jacMat) override
 
void setOpencl (std::shared_ptr< cl::Context > &context, std::shared_ptr< cl::CommandQueue > &queue) override
 
void apply (const cl::Buffer &y, cl::Buffer &x) override
 
void apply (Scalar &, Scalar &) override
 
bool create_preconditioner (BlockedMatrix< Scalar > *mat) override
 
bool create_preconditioner (BlockedMatrix< Scalar > *mat, BlockedMatrix< Scalar > *jacMat) override
 
- Public Member Functions inherited from Opm::Accelerator::openclPreconditioner< Scalar, block_size >
- Public Member Functions inherited from Opm::Accelerator::Preconditioner< Scalar, block_size >
- Public Member Functions inherited from Opm::Accelerator::CprCreation< Scalar, block_size >

Additional Inherited Members

- Static Public Member Functions inherited from Opm::Accelerator::openclPreconditioner< Scalar, block_size >
static std::unique_ptr< openclPreconditioner< Scalar, block_size > > create (PreconditionerType type, int verbosity, bool opencl_ilu_parallel)
 
- Static Public Member Functions inherited from Opm::Accelerator::Preconditioner< Scalar, block_size >
static std::unique_ptr< Preconditionercreate (PreconditionerType type, bool opencl_ilu_parallel, int verbosity)
 
- Protected Types inherited from Opm::Accelerator::CprCreation< Scalar, block_size >
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 inherited from Opm::Accelerator::openclPreconditioner< Scalar, block_size >
 openclPreconditioner (int verbosity_)
 
- Protected Member Functions inherited from Opm::Accelerator::Preconditioner< Scalar, block_size >
 Preconditioner (int verbosity_)
 
- Protected Member Functions inherited from Opm::Accelerator::CprCreation< Scalar, block_size >
void analyzeHierarchy ()
 
void analyzeAggregateMaps ()
 
void create_preconditioner_amg (BlockedMatrix< Scalar > *mat)
 
- Protected Attributes inherited from Opm::Accelerator::openclPreconditioner< Scalar, block_size >
std::shared_ptr< cl::Context > context
 
std::shared_ptr< cl::CommandQueue > queue
 
std::vector< cl::Event > events
 
cl_int err
 
- Protected Attributes inherited from Opm::Accelerator::Preconditioner< Scalar, block_size >
int N = 0
 
int Nb = 0
 
int nnz = 0
 
int nnzb = 0
 
int verbosity = 0
 
- Protected Attributes inherited from Opm::Accelerator::CprCreation< Scalar, block_size >
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< DuneAmg > dune_amg
 
std::unique_ptr< DuneMat > dune_coarse
 
std::shared_ptr< MatrixOperator > dune_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::openclCPR< Scalar, block_size >

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

Member Function Documentation

◆ analyze_matrix() [1/2]

template<class Scalar , unsigned int block_size>
bool Opm::Accelerator::openclCPR< Scalar, block_size >::analyze_matrix ( BlockedMatrix< Scalar > * mat)
overridevirtual

◆ analyze_matrix() [2/2]

template<class Scalar , unsigned int block_size>
bool Opm::Accelerator::openclCPR< Scalar, block_size >::analyze_matrix ( BlockedMatrix< Scalar > * mat,
BlockedMatrix< Scalar > * jacMat )
overridevirtual

◆ apply() [1/2]

template<class Scalar , unsigned int block_size>
void Opm::Accelerator::openclCPR< Scalar, block_size >::apply ( const cl::Buffer & y,
cl::Buffer & x )
overridevirtual

◆ apply() [2/2]

template<class Scalar , unsigned int block_size>
void Opm::Accelerator::openclCPR< Scalar, block_size >::apply ( Scalar & ,
Scalar &  )
inlineoverridevirtual

◆ create_preconditioner() [1/2]

template<class Scalar , unsigned int block_size>
bool Opm::Accelerator::openclCPR< Scalar, block_size >::create_preconditioner ( BlockedMatrix< Scalar > * mat)
overridevirtual

◆ create_preconditioner() [2/2]

template<class Scalar , unsigned int block_size>
bool Opm::Accelerator::openclCPR< Scalar, block_size >::create_preconditioner ( BlockedMatrix< Scalar > * mat,
BlockedMatrix< Scalar > * jacMat )
overridevirtual

◆ setOpencl()

template<class Scalar , unsigned int block_size>
void Opm::Accelerator::openclCPR< Scalar, block_size >::setOpencl ( std::shared_ptr< cl::Context > & context,
std::shared_ptr< cl::CommandQueue > & queue )
overridevirtual

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