16#ifndef dealii_scalapack_h
17#define dealii_scalapack_h
21#ifdef DEAL_II_WITH_SCALAPACK
75template <
typename NumberType>
95 const std::shared_ptr<const Utilities::MPI::ProcessGrid> &process_grid,
110 const std::shared_ptr<const Utilities::MPI::ProcessGrid> &process_grid,
128 const std::string & filename,
129 const std::shared_ptr<const Utilities::MPI::ProcessGrid> &process_grid,
150 const std::shared_ptr<const Utilities::MPI::ProcessGrid> &process_grid,
164 const std::shared_ptr<const Utilities::MPI::ProcessGrid> &process_grid,
207 const unsigned int rank);
264 const std::pair<unsigned int, unsigned int> &offset_A,
265 const std::pair<unsigned int, unsigned int> &offset_B,
266 const std::pair<unsigned int, unsigned int> &submatrix_size)
const;
292 const NumberType a = 0.,
293 const NumberType b = 1.,
294 const bool transpose_B =
false);
341 mult(
const NumberType b,
345 const bool transpose_A =
false,
346 const bool transpose_B =
false)
const;
368 const bool adding =
false)
const;
390 const bool adding =
false)
const;
412 const bool adding =
false)
const;
435 const bool adding =
false)
const;
458 save(
const std::string & filename,
459 const std::pair<unsigned int, unsigned int> &chunk_size =
475 load(
const std::string &filename);
523 std::vector<NumberType>
525 const std::pair<unsigned int, unsigned int> &index_limits,
526 const bool compute_eigenvectors);
536 std::vector<NumberType>
538 const std::pair<NumberType, NumberType> &value_limits,
539 const bool compute_eigenvectors);
557 std::vector<NumberType>
559 const std::pair<unsigned int, unsigned int> &index_limits,
560 const bool compute_eigenvectors);
572 std::vector<NumberType>
574 const std::pair<NumberType, NumberType> &value_limits,
575 const bool compute_eigenvectors);
605 std::vector<NumberType>
753 local_el(
const unsigned int loc_row,
const unsigned int loc_column)
const;
759 local_el(
const unsigned int loc_row,
const unsigned int loc_column);
771 template <
class InputVector>
785 template <
class InputVector>
814 std::vector<NumberType>
816 const bool compute_eigenvectors,
817 const std::pair<unsigned int, unsigned int> &index_limits =
820 const std::pair<NumberType, NumberType> &value_limits =
821 std::make_pair(std::numeric_limits<NumberType>::quiet_NaN(),
822 std::numeric_limits<NumberType>::quiet_NaN()));
843 std::vector<NumberType>
845 const bool compute_eigenvectors,
846 const std::pair<unsigned int, unsigned int> &index_limits =
849 const std::pair<NumberType, NumberType> &value_limits =
850 std::make_pair(std::numeric_limits<NumberType>::quiet_NaN(),
851 std::numeric_limits<NumberType>::quiet_NaN()));
859 const std::pair<unsigned int, unsigned int> &chunk_size)
const;
874 const std::pair<unsigned int, unsigned int> &chunk_size)
const;
900 std::shared_ptr<const Utilities::MPI::ProcessGrid>
grid;
940 mutable std::vector<NumberType>
work;
993template <
typename NumberType>
996 const unsigned int loc_column)
const
998 return (*
this)(loc_row, loc_column);
1003template <
typename NumberType>
1006 const unsigned int loc_column)
1008 return (*
this)(loc_row, loc_column);
1012template <
typename NumberType>
1021template <
typename NumberType>
1030template <
typename NumberType>
1034 return n_local_rows;
1039template <
typename NumberType>
1043 return n_local_columns;
std::vector< NumberType > compute_SVD(ScaLAPACKMatrix< NumberType > *U=nullptr, ScaLAPACKMatrix< NumberType > *VT=nullptr)
std::vector< NumberType > eigenpairs_symmetric_by_value(const std::pair< NumberType, NumberType > &value_limits, const bool compute_eigenvectors)
unsigned int local_n() const
NumberType frobenius_norm() const
unsigned int pseudoinverse(const NumberType ratio)
std::vector< NumberType > eigenpairs_symmetric_by_value_MRRR(const std::pair< NumberType, NumberType > &value_limits, const bool compute_eigenvectors)
const int first_process_column
void copy_from(const LAPACKFullMatrix< NumberType > &matrix, const unsigned int rank)
void save_parallel(const std::string &filename, const std::pair< unsigned int, unsigned int > &chunk_size) const
void least_squares(ScaLAPACKMatrix< NumberType > &B, const bool transpose=false)
NumberType local_el(const unsigned int loc_row, const unsigned int loc_column) const
ScaLAPACKMatrix< NumberType > & operator=(const FullMatrix< NumberType > &)
void Tadd(const NumberType b, const ScaLAPACKMatrix< NumberType > &B)
void mTmult(ScaLAPACKMatrix< NumberType > &C, const ScaLAPACKMatrix< NumberType > &B, const bool adding=false) const
void add(const ScaLAPACKMatrix< NumberType > &B, const NumberType a=0., const NumberType b=1., const bool transpose_B=false)
LAPACKSupport::State get_state() const
LAPACKSupport::Property get_property() const
void Tmmult(ScaLAPACKMatrix< NumberType > &C, const ScaLAPACKMatrix< NumberType > &B, const bool adding=false) const
std::vector< NumberType > eigenpairs_symmetric_MRRR(const bool compute_eigenvectors, const std::pair< unsigned int, unsigned int > &index_limits=std::make_pair(numbers::invalid_unsigned_int, numbers::invalid_unsigned_int), const std::pair< NumberType, NumberType > &value_limits=std::make_pair(std::numeric_limits< NumberType >::quiet_NaN(), std::numeric_limits< NumberType >::quiet_NaN()))
void scale_rows(const InputVector &factors)
const int first_process_row
NumberType & local_el(const unsigned int loc_row, const unsigned int loc_column)
std::shared_ptr< const Utilities::MPI::ProcessGrid > grid
void load(const std::string &filename)
const int submatrix_column
void mmult(ScaLAPACKMatrix< NumberType > &C, const ScaLAPACKMatrix< NumberType > &B, const bool adding=false) const
std::vector< NumberType > eigenpairs_symmetric(const bool compute_eigenvectors, const std::pair< unsigned int, unsigned int > &index_limits=std::make_pair(numbers::invalid_unsigned_int, numbers::invalid_unsigned_int), const std::pair< NumberType, NumberType > &value_limits=std::make_pair(std::numeric_limits< NumberType >::quiet_NaN(), std::numeric_limits< NumberType >::quiet_NaN()))
void save_serial(const std::string &filename, const std::pair< unsigned int, unsigned int > &chunk_size) const
NumberType norm_general(const char type) const
~ScaLAPACKMatrix() override=default
std::vector< NumberType > work
void save(const std::string &filename, const std::pair< unsigned int, unsigned int > &chunk_size=std::make_pair(numbers::invalid_unsigned_int, numbers::invalid_unsigned_int)) const
void load_parallel(const std::string &filename)
NumberType l1_norm() const
void compute_lu_factorization()
NumberType norm_symmetric(const char type) const
void mult(const NumberType b, const ScaLAPACKMatrix< NumberType > &B, const NumberType c, ScaLAPACKMatrix< NumberType > &C, const bool transpose_A=false, const bool transpose_B=false) const
LAPACKSupport::Property property
void set_property(const LAPACKSupport::Property property)
void reinit(const size_type n_rows, const size_type n_columns, const std::shared_ptr< const Utilities::MPI::ProcessGrid > &process_grid, const size_type row_block_size=32, const size_type column_block_size=32, const LAPACKSupport::Property property=LAPACKSupport::Property::general)
void load_serial(const std::string &filename)
std::vector< NumberType > eigenpairs_symmetric_by_index_MRRR(const std::pair< unsigned int, unsigned int > &index_limits, const bool compute_eigenvectors)
NumberType reciprocal_condition_number(const NumberType a_norm) const
LAPACKSupport::State state
void TmTmult(ScaLAPACKMatrix< NumberType > &C, const ScaLAPACKMatrix< NumberType > &B, const bool adding=false) const
std::vector< NumberType > eigenpairs_symmetric_by_index(const std::pair< unsigned int, unsigned int > &index_limits, const bool compute_eigenvectors)
unsigned int global_column(const unsigned int loc_column) const
void copy_to(FullMatrix< NumberType > &matrix) const
unsigned int global_row(const unsigned int loc_row) const
unsigned int local_m() const
void compute_cholesky_factorization()
void copy_transposed(const ScaLAPACKMatrix< NumberType > &B)
NumberType linfty_norm() const
void scale_columns(const InputVector &factors)
const TableIndices< N > & size() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
@ symmetric
Matrix is symmetric.
@ general
No special properties.
static const unsigned int invalid_unsigned_int