FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
mkl_dss.hpp
1// FEAT3: Finite Element Analysis Toolbox, Version 3
2// Copyright (C) 2010 by Stefan Turek & the FEAT group
3// FEAT3 is released under the GNU General Public License version 3,
4// see the file 'copyright.txt' in the top level directory for details.
5
6#pragma once
7
8// includes, FEAT
10#include <kernel/solver/base.hpp>
11#include <kernel/lafem/saddle_point_matrix.hpp>
12#include <kernel/lafem/sparse_matrix_bcsr.hpp>
13#include <kernel/lafem/sparse_matrix_csr.hpp>
14#include <kernel/lafem/mean_filter.hpp>
15#include <kernel/lafem/tuple_vector.hpp>
16#include <kernel/lafem/dense_vector.hpp>
17#include <kernel/lafem/dense_vector_blocked.hpp>
18
19namespace FEAT
20{
21 namespace Solver
22 {
23#if defined(FEAT_HAVE_MKL) || defined(DOXYGEN)
27#ifdef MKL_ILP64
28 typedef std::uint64_t mkldss_native_index_type;
29#else
30 typedef std::uint32_t mkldss_native_index_type;
31#endif
32
49 class MKLDSS :
50 public SolverBase<LAFEM::DenseVector<double, Index>>
51 {
52 public:
57
60
61 private:
66
67 public:
74 explicit MKLDSS(const MatrixType& system_matrix);
75
77 virtual ~MKLDSS();
78
80 virtual String name() const override
81 {
82 return "MKLDSS";
83 }
84
85 virtual void init_symbolic() override;
86 virtual void done_symbolic() override;
87 virtual void init_numeric() override;
88 virtual void done_numeric() override;
89
100 virtual Status apply(VectorType& vec_sol, const VectorType& vec_rhs) override;
101 }; // class MKLDSS
102
112 inline std::shared_ptr<MKLDSS> new_mkl_dss(const LAFEM::SparseMatrixCSR<double, Index>& matrix)
113 {
114 return std::make_shared<MKLDSS>(matrix);
115 }
116#endif // defined(FEAT_HAVE_MKL) || defined(DOXYGEN)
117 } // namespace Solver
118} // namespace FEAT
FEAT Kernel base header.
Dense data vector class template.
CSR based sparse matrix.
Intel MKL Direct Sparse Solver wrapper.
Definition: mkl_dss.hpp:51
virtual void init_symbolic() override
Symbolic initialization method.
virtual void done_symbolic() override
Symbolic finalization method.
virtual String name() const override
Returns the name of the solver.
Definition: mkl_dss.hpp:80
LAFEM::DenseVector< double, Index > VectorType
compatible vector type
Definition: mkl_dss.hpp:56
MKLDSS(const MatrixType &system_matrix)
Constructor.
SolverBase< VectorType > BaseClass
our base class
Definition: mkl_dss.hpp:59
void * _mkl_dss_handle
Intel MKL DSS handle;.
Definition: mkl_dss.hpp:65
virtual Status apply(VectorType &vec_sol, const VectorType &vec_rhs) override
Solves a linear system with the factorized system matrix.
virtual ~MKLDSS()
virtual destructor
LAFEM::SparseMatrixCSR< double, Index > MatrixType
compatible matrix type
Definition: mkl_dss.hpp:54
virtual void init_numeric() override
Numeric initialization method.
virtual void done_numeric() override
Numeric finalization method.
const MatrixType & _system_matrix
system matrix
Definition: mkl_dss.hpp:63
Polymorphic solver interface.
Definition: base.hpp:183
String class implementation.
Definition: string.hpp:47
std::shared_ptr< MKLDSS > new_mkl_dss(const LAFEM::SparseMatrixCSR< double, Index > &matrix)
Creates a new MKLDSS solver object.
Definition: mkl_dss.hpp:112
Status
Solver status return codes enumeration.
Definition: base.hpp:47
double mkldss_native_data_type
native data type of MKLDSS solver
Definition: mkl_dss.hpp:25
std::uint32_t mkldss_native_index_type
native index type of MKLDSS solver
Definition: mkl_dss.hpp:30
FEAT namespace.
Definition: adjactor.hpp:12