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
47 class MKLDSS :
48 public SolverBase<LAFEM::DenseVector<double, Index>>
49 {
50 public:
55
58
59 private:
64
65 public:
72 explicit MKLDSS(const MatrixType& system_matrix);
73
75 virtual ~MKLDSS();
76
78 virtual String name() const override
79 {
80 return "MKLDSS";
81 }
82
83 virtual void init_symbolic() override;
84 virtual void done_symbolic() override;
85 virtual void init_numeric() override;
86 virtual void done_numeric() override;
87
98 virtual Status apply(VectorType& vec_sol, const VectorType& vec_rhs) override;
99 }; // class MKLDSS
100
110 inline std::shared_ptr<MKLDSS> new_mkl_dss(const LAFEM::SparseMatrixCSR<double, Index>& matrix)
111 {
112 return std::make_shared<MKLDSS>(matrix);
113 }
114#endif // defined(FEAT_HAVE_MKL) || defined(DOXYGEN)
115 } // namespace Solver
116} // 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:49
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:78
LAFEM::DenseVector< double, Index > VectorType
compatible vector type
Definition: mkl_dss.hpp:54
MKLDSS(const MatrixType &system_matrix)
Constructor.
SolverBase< VectorType > BaseClass
our base class
Definition: mkl_dss.hpp:57
void * _mkl_dss_handle
Intel MKL DSS handle;.
Definition: mkl_dss.hpp:63
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:52
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:61
Polymorphic solver interface.
Definition: base.hpp:183
String class implementation.
Definition: string.hpp:46
std::shared_ptr< MKLDSS > new_mkl_dss(const LAFEM::SparseMatrixCSR< double, Index > &matrix)
Creates a new MKLDSS solver object.
Definition: mkl_dss.hpp:110
double mkldss_native_data_type
native data type of MKLDSS solver
Definition: mkl_dss.hpp:25
Status
Solver status return codes enumeration.
Definition: base.hpp:47
std::uint32_t mkldss_native_index_type
native index type of MKLDSS solver
Definition: mkl_dss.hpp:30
FEAT namespace.
Definition: adjactor.hpp:12