ATC version 2.0, date: Aug7
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10561 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
40
lib/atc/ParDiagonalMatrix.h
Normal file
40
lib/atc/ParDiagonalMatrix.h
Normal file
@ -0,0 +1,40 @@
|
||||
#ifndef PARDIAGONALMATRIX_H
|
||||
#define PARDIAGONALMATRIX_H
|
||||
|
||||
#include "mpi.h"
|
||||
#include "MPI_Wrappers.h"
|
||||
#include "MatrixLibrary.h"
|
||||
#include "DiagonalMatrix.h"
|
||||
#include "DenseMatrix.h"
|
||||
|
||||
using namespace MPI_Wrappers;
|
||||
|
||||
namespace ATC_matrix {
|
||||
|
||||
/**
|
||||
* @class ParDiagonalMatrix
|
||||
* @brief Parallelized version of DiagonalMatrix class.
|
||||
*/
|
||||
|
||||
template <typename T>
|
||||
class ParDiagonalMatrix : public DiagonalMatrix<T> {
|
||||
public:
|
||||
ParDiagonalMatrix(MPI_Comm comm, INDEX rows=0, bool z=0)
|
||||
: DiagonalMatrix<T>(rows, z), _comm(comm) {}
|
||||
ParDiagonalMatrix(MPI_Comm comm, const DiagonalMatrix<T>& c)
|
||||
: DiagonalMatrix<T>(c), _comm(comm) {}
|
||||
ParDiagonalMatrix(MPI_Comm comm, const Vector<T>& v)
|
||||
: DiagonalMatrix<T>(v), _comm(comm) {}
|
||||
|
||||
void MultAB(const Matrix<T> &B, DenseMatrix<T> &C) const;
|
||||
|
||||
private:
|
||||
MPI_Comm _comm;
|
||||
};
|
||||
|
||||
template<>
|
||||
void ParDiagonalMatrix<double>::MultAB(const Matrix<double> &B, DenseMatrix<double> &C) const;
|
||||
|
||||
} // end namespace
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user