Commit 59fe3dc3 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

* PardisoSolver extended

parent bd724c08
......@@ -62,8 +62,8 @@ namespace AMDiS {
}
double *a = (double*)malloc(sizeof(double) * nElements);
int *ja = (int*)malloc(sizeof(int) * nElements);
int *ia = (int*)malloc(sizeof(int) * (newMatrixSize + 1));
MKL_INT *ja = (int*)malloc(sizeof(MKL_INT) * nElements);
MKL_INT *ia = (int*)malloc(sizeof(MKL_INT) * (newMatrixSize + 1));
double *bvec = (double*)malloc(sizeof(double) * newMatrixSize);
double *xvec = (double*)malloc(sizeof(double) * newMatrixSize);
......@@ -102,10 +102,10 @@ namespace AMDiS {
}
// real unsymmetric matrix
int mtype = 11;
MKL_INT mtype = 11;
// number of right hand sides
int nRhs = 1;
MKL_INT nRhs = 1;
// Pardiso internal memory
void *pt[64];
......@@ -114,7 +114,7 @@ namespace AMDiS {
}
// Pardiso control parameters
int iparm[64];
MKL_INT iparm[64];
for (int i = 0; i < 64; i++) {
iparm[i] = 0;
}
......@@ -129,25 +129,25 @@ namespace AMDiS {
iparm[18] = -1; // Output: Mflops for LU factorization
// Maximum number of numerical factorizations
int maxfct = 1;
MKL_INT maxfct = 1;
// Which factorization to use
int mnum = 1;
MKL_INT mnum = 1;
// Print statistical information in file
int msglvl = 1;
MKL_INT msglvl = 1;
// Error flag
int error = 0;
MKL_INT error = 0;
int n = newMatrixSize;
MKL_INT n = newMatrixSize;
// Reordering and symbolic factorization
int phase = 11;
MKL_INT phase = 11;
double ddum;
int idum;
MKL_INT idum;
PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &idum, &nRhs,
iparm, &msglvl, &ddum, &ddum, &error);
......
......@@ -24,9 +24,17 @@
#ifdef HAVE_MKL
#include <mkl.h>
#include "OEMSolver.h"
#include "MemoryManager.h"
#if defined(MKL_ILP64)
#define MKL_INT long long
#else
#define MKL_INT int
#endif
namespace AMDiS {
// ============================================================================
......
......@@ -743,6 +743,7 @@ namespace AMDiS {
assembledMatrix_[i][j] = true;
}
// fill boundary conditions
if (rhs_->getDOFVector(i)->getBoundaryManager())
rhs_->getDOFVector(i)->getBoundaryManager()->initVector(rhs_->getDOFVector(i));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment