mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-29 04:23:48 -06:00
Remove unneeded template argument.
This commit is contained in:
parent
463e05a83d
commit
304e0a7bfc
@ -39,8 +39,7 @@
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
template <class B>
|
||||
class DuneMatrix : public Dune::BCRSMatrix<B>
|
||||
class DuneMatrix : public Dune::BCRSMatrix< Dune::FieldMatrix<double, 1, 1> >
|
||||
{
|
||||
public:
|
||||
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),
|
||||
// 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->ready = Super::built;
|
||||
this->n = rows;
|
||||
@ -61,8 +61,8 @@ namespace Opm
|
||||
this->overflowsize = -1.0;
|
||||
#endif
|
||||
|
||||
this->a = new B[this->nnz];
|
||||
static_assert(sizeof(B) == sizeof(double), "This constructor requires a block type that is the same as a double.");
|
||||
this->a = new block_type[this->nnz];
|
||||
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));
|
||||
this->j.reset(new typename Super::size_type[this->nnz]);
|
||||
std::copy(ja, ja +this-> nnz, this->j.get());
|
||||
|
@ -466,7 +466,7 @@ namespace Opm
|
||||
const int* ia = matrix.outerIndexPtr();
|
||||
const int* ja = matrix.innerIndexPtr();
|
||||
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