mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
more scalars
This commit is contained in:
parent
40c0539bc3
commit
b51f27517b
@ -47,10 +47,10 @@ public:
|
||||
protected:
|
||||
|
||||
int num_levels;
|
||||
std::vector<double> weights, coarse_vals, coarse_x, coarse_y;
|
||||
std::vector<Scalar> weights, coarse_vals, coarse_x, coarse_y;
|
||||
std::vector<Matrix<Scalar>> Amatrices, Rmatrices; // scalar matrices that represent the AMG hierarchy
|
||||
std::vector<std::vector<int> > PcolIndices; // prolongation does not need a full matrix, only store colIndices
|
||||
std::vector<std::vector<double> > invDiags; // inverse of diagonal of Amatrices
|
||||
std::vector<std::vector<Scalar> > invDiags; // inverse of diagonal of Amatrices
|
||||
|
||||
BlockedMatrix<Scalar> *mat = nullptr; // input matrix, blocked
|
||||
|
||||
|
@ -43,7 +43,7 @@ RocmMatrix(int Nb_,
|
||||
nnzbs(nnzbs_),
|
||||
block_size(block_size_)
|
||||
{
|
||||
HIP_CHECK(hipMalloc((void**)&nnzValues, sizeof(double) * block_size * block_size * nnzbs));
|
||||
HIP_CHECK(hipMalloc((void**)&nnzValues, sizeof(Scalar) * block_size * block_size * nnzbs));
|
||||
|
||||
HIP_CHECK(hipMalloc((void**)&colIndices, sizeof(int) * nnzbs));
|
||||
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
int verbosity);
|
||||
|
||||
// apply preconditioner, x = prec(y)
|
||||
virtual void apply(double& y, double& x) = 0;
|
||||
virtual void apply(Scalar& y, Scalar& x) = 0;
|
||||
|
||||
// create/update preconditioner, probably used every linear solve
|
||||
// the version with two params can be overloaded, if not, it will default to using the one param version
|
||||
@ -70,11 +70,11 @@ public:
|
||||
rocsparse_int *d_Arows,
|
||||
rocsparse_int *d_Acols) = 0;
|
||||
|
||||
virtual void copy_system_to_gpu(double *b)=0;
|
||||
virtual void copy_system_to_gpu(Scalar *b)=0;
|
||||
|
||||
/// Update linear system to GPU
|
||||
/// \param[in] b input vector, contains N values
|
||||
virtual void update_system_on_gpu(double *b)=0;
|
||||
virtual void update_system_on_gpu(Scalar *b)=0;
|
||||
|
||||
void set_matrix_analysis(rocsparse_mat_descr descr_L,
|
||||
rocsparse_mat_descr descr_U);
|
||||
|
@ -127,7 +127,7 @@ public:
|
||||
std::string linsolver);
|
||||
|
||||
/// For the CPR coarse solver
|
||||
rocsparseSolverBackend(int linear_solver_verbosity, int maxit, double tolerance, bool opencl_ilu_reorder);
|
||||
rocsparseSolverBackend(int linear_solver_verbosity, int maxit, Scalar tolerance, bool opencl_ilu_reorder);
|
||||
|
||||
/// Destroy a openclSolver, and free memory
|
||||
~rocsparseSolverBackend();
|
||||
|
Loading…
Reference in New Issue
Block a user