Commit 708ddb25 authored by David Moxey's avatar David Moxey
Browse files

Fix post-merge issues and update for latest PETSc version

parent 1b1e5b99
......@@ -147,7 +147,7 @@ IF( NEKTAR_USE_MPI )
ENDIF( NEKTAR_USE_MPI )
IF( NEKTAR_USE_PETSC )
TARGET_LINK_LIBRARIES(MultiRegions ${PETSC_LIBRARIES})
TARGET_LINK_LIBRARIES(MultiRegions LINK_PRIVATE ${PETSC_LIBRARIES})
ENDIF( NEKTAR_USE_PETSC )
INSTALL(DIRECTORY ./ DESTINATION ${NEKTAR_INCLUDE_DIR}/MultiRegions COMPONENT dev FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
......
......@@ -77,6 +77,15 @@ namespace Nektar
// fill global matrix
DNekScalMatSharedPtr loc_mat;
// reordering of global indices
//MPI_Comm comm = MPI_COMM_WORLD; // massive hack
//AOCreateMapping();
MatCreate(PETSC_COMM_WORLD, &m_matrix);
MatSetType(m_matrix, MATSEQAIJ);
MatSetSizes(m_matrix, rows, cols, PETSC_DETERMINE, PETSC_DETERMINE);
......@@ -163,8 +172,7 @@ namespace Nektar
m_ksp, pLocToGloMap->GetIterativeTolerance(),
PETSC_DEFAULT, PETSC_DEFAULT, PETSC_DEFAULT);
KSPSetFromOptions(m_ksp);
KSPSetOperators(
m_ksp, m_matrix, m_matrix, DIFFERENT_NONZERO_PATTERN);
KSPSetOperators(m_ksp, m_matrix, m_matrix);
}
......
......@@ -473,7 +473,7 @@ namespace Nektar
KSPGetPC(m_ksp, &pc);
PCSetType(pc, PCLU);
KSPSetFromOptions(m_ksp);
KSPSetOperators(m_ksp, m_matrix, m_matrix, DIFFERENT_NONZERO_PATTERN);
KSPSetOperators(m_ksp, m_matrix, m_matrix);
/*
ierr = VecDestroy(&x);CHKERRQ(ierr);
......
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