mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Remove unneeded template argument.
This commit is contained in:
parent
463e05a83d
commit
304e0a7bfc
@ -39,8 +39,7 @@
|
|||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
|
|
||||||
template <class B>
|
class DuneMatrix : public Dune::BCRSMatrix< Dune::FieldMatrix<double, 1, 1> >
|
||||||
class DuneMatrix : public Dune::BCRSMatrix<B>
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DuneMatrix(const int rows, const int cols, const int* ia, const int* ja, const double* sa)
|
DuneMatrix(const int rows, const int cols, const int* ia, const int* ja, const double* sa)
|
||||||
@ -48,7 +47,8 @@ namespace Opm
|
|||||||
// allocationSize(nnz), r(0), a(0),
|
// allocationSize(nnz), r(0), a(0),
|
||||||
// avg(0), overflowsize(-1.0)
|
// avg(0), overflowsize(-1.0)
|
||||||
{
|
{
|
||||||
typedef Dune::BCRSMatrix<B> Super;
|
typedef Dune::BCRSMatrix< Dune::FieldMatrix<double, 1, 1> > Super;
|
||||||
|
typedef Super::block_type block_type;
|
||||||
this->build_mode = Super::unknown;
|
this->build_mode = Super::unknown;
|
||||||
this->ready = Super::built;
|
this->ready = Super::built;
|
||||||
this->n = rows;
|
this->n = rows;
|
||||||
@ -61,8 +61,8 @@ namespace Opm
|
|||||||
this->overflowsize = -1.0;
|
this->overflowsize = -1.0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
this->a = new B[this->nnz];
|
this->a = new block_type[this->nnz];
|
||||||
static_assert(sizeof(B) == sizeof(double), "This constructor requires a block type that is the same as a double.");
|
static_assert(sizeof(block_type) == sizeof(double), "This constructor requires a block type that is the same as a double.");
|
||||||
std::copy(sa, sa + this->nnz, reinterpret_cast<double*>(this->a));
|
std::copy(sa, sa + this->nnz, reinterpret_cast<double*>(this->a));
|
||||||
this->j.reset(new typename Super::size_type[this->nnz]);
|
this->j.reset(new typename Super::size_type[this->nnz]);
|
||||||
std::copy(ja, ja +this-> nnz, this->j.get());
|
std::copy(ja, ja +this-> nnz, this->j.get());
|
||||||
|
@ -466,7 +466,7 @@ namespace Opm
|
|||||||
const int* ia = matrix.outerIndexPtr();
|
const int* ia = matrix.outerIndexPtr();
|
||||||
const int* ja = matrix.innerIndexPtr();
|
const int* ja = matrix.innerIndexPtr();
|
||||||
const double* sa = matrix.valuePtr();
|
const double* sa = matrix.valuePtr();
|
||||||
return Opm::DuneMatrix<MatrixBlockType>(size, size, ia, ja, sa);
|
return Opm::DuneMatrix(size, size, ia, ja, sa);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user