Skip to content

Commit

Permalink
Fixed bug in constructor of MKL solver if MKL was not used. Now not r…
Browse files Browse the repository at this point in the history
…egistering mkl solvers if mkl is not used.
  • Loading branch information
SteveMaas1978 committed Dec 12, 2024
1 parent 8425656 commit aed29b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NumCore/MKLDSSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ BEGIN_FECORE_CLASS(MKLDSSolver, LinearSolver)
ADD_PARAMETER(m->msglvl, "msglvl");
END_FECORE_CLASS();

MKLDSSolver::MKLDSSolver(FEModel* fem) : LinearSolver(fem), m(nullptr) {}
MKLDSSolver::MKLDSSolver(FEModel* fem) : LinearSolver(fem), m(new MKLDSSolver::Imp) {}
MKLDSSolver::~MKLDSSolver() {}
SparseMatrix* MKLDSSolver::CreateSparseMatrix(Matrix_Type ntype) { return nullptr; }
bool MKLDSSolver::SetSparseMatrix(SparseMatrix* pA) { return false; }
Expand Down
5 changes: 4 additions & 1 deletion NumCore/NumCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@ SOFTWARE.*/
NUMCORE_API void NumCore::InitModule()
{
// register linear solvers
#ifdef PARDISO
REGISTER_FECORE_CLASS(PardisoSolver , "pardiso");
REGISTER_FECORE_CLASS(PardisoSolver64, "pardiso_64");
REGISTER_FECORE_CLASS(MKLDSSolver, "mkl_dss");
#endif

REGISTER_FECORE_CLASS(PardisoProjectSolver, "pardiso-project");
REGISTER_FECORE_CLASS(FGMRESSolver , "fgmres" );
REGISTER_FECORE_CLASS(BoomerAMGSolver , "boomeramg");
Expand All @@ -72,7 +76,6 @@ NUMCORE_API void NumCore::InitModule()
REGISTER_FECORE_CLASS(TestSolver , "test");
REGISTER_FECORE_CLASS(AccelerateSparseSolver, "accelerate");
REGISTER_FECORE_CLASS(SuperLU_MT_Solver , "superlu_mt");
REGISTER_FECORE_CLASS(MKLDSSolver , "mkl_dss");

// register preconditioners
REGISTER_FECORE_CLASS(ILU0_Preconditioner, "ilu0");
Expand Down

0 comments on commit aed29b9

Please sign in to comment.