mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Simplify parameter
This commit is contained in:
@@ -56,7 +56,7 @@ rocalutionSolverBackend<block_size>::~rocalutionSolverBackend() {
|
||||
|
||||
|
||||
template <unsigned int block_size>
|
||||
void rocalutionSolverBackend<block_size>::initialize(std::shared_ptr<BlockedMatrix> matrix) {
|
||||
void rocalutionSolverBackend<block_size>::initialize(BlockedMatrix *matrix) {
|
||||
this->Nb = matrix->Nb;
|
||||
this->N = Nb * block_size;
|
||||
this->nnzb = matrix->nnzbs;
|
||||
@@ -74,7 +74,7 @@ void rocalutionSolverBackend<block_size>::initialize(std::shared_ptr<BlockedMatr
|
||||
|
||||
|
||||
template <unsigned int block_size>
|
||||
void rocalutionSolverBackend<block_size>::convert_matrix(std::shared_ptr<BlockedMatrix> matrix) {
|
||||
void rocalutionSolverBackend<block_size>::convert_matrix(BlockedMatrix *matrix) {
|
||||
Timer t;
|
||||
|
||||
for(int i = 0; i < Nb+1; ++i){
|
||||
@@ -134,14 +134,14 @@ SolverStatus rocalutionSolverBackend<block_size>::solve_system(std::shared_ptr<B
|
||||
BdaResult &res)
|
||||
{
|
||||
if (initialized == false) {
|
||||
initialize(matrix);
|
||||
initialize(matrix.get());
|
||||
}
|
||||
|
||||
tmp_rowpointers = new int[Nb+1];
|
||||
tmp_colindices = new int[nnzb];
|
||||
tmp_nnzvalues = new double[nnzb*block_size*block_size];
|
||||
|
||||
convert_matrix(matrix);
|
||||
convert_matrix(matrix.get());
|
||||
|
||||
rocalution::LocalVector<double> roc_x;
|
||||
rocalution::LocalVector<double> roc_rhs;
|
||||
|
||||
@@ -66,12 +66,12 @@ private:
|
||||
|
||||
/// Initialize sizes and allocate memory
|
||||
/// \param[in] matrix matrix A
|
||||
void initialize(std::shared_ptr<BlockedMatrix> matrix);
|
||||
void initialize(BlockedMatrix *matrix);
|
||||
|
||||
/// Convert matrix to rocalution format
|
||||
/// copy matrix to raw pointers, which are given to and freed by rocalution
|
||||
/// \param[in] matrix matrix A
|
||||
void convert_matrix(std::shared_ptr<BlockedMatrix> matrix);
|
||||
void convert_matrix(BlockedMatrix *matrix);
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user