Commit 47482dd3 authored by Praetorius, Simon's avatar Praetorius, Simon

Merge branch 'feature/debian_package' of...

Merge branch 'feature/debian_package' of https://gitlab.math.tu-dresden.de/iwr/amdis into feature/debian_package
parents bf5105e1 0fccc81b
...@@ -17,7 +17,7 @@ macro(enable_hypre _FLAGS_ _INC_DIRS_ _LIBS_) ...@@ -17,7 +17,7 @@ macro(enable_hypre _FLAGS_ _INC_DIRS_ _LIBS_)
HINTS ${PETSC_INCLUDE_DIRS}) HINTS ${PETSC_INCLUDE_DIRS})
if (_HYPRE_H) if (_HYPRE_H)
get_filename_component(HYPRE_INCLUDE_DIRECTORIES ${HYPRE_H} PATH) get_filename_component(HYPRE_INCLUDE_DIRECTORIES ${_HYPRE_H} PATH)
list(APPEND ${_INC_DIRS_} ${HYPRE_INCLUDE_DIRECTORIES}) list(APPEND ${_INC_DIRS_} ${HYPRE_INCLUDE_DIRECTORIES})
endif (_HYPRE_H) endif (_HYPRE_H)
......
if (ENABLE_SEQ_PETSC) if (ENABLE_SEQ_PETSC)
target_enable_mpi(amdis PRIVATE) target_enable_mpi(amdis PUBLIC)
target_enable_petsc(amdis PRIVATE) target_enable_petsc(amdis PUBLIC)
target_compile_definitions(amdis PRIVATE HAVE_SEQ_PETSC=1) target_compile_definitions(amdis PUBLIC HAVE_SEQ_PETSC=1)
target_sources(amdis PRIVATE target_sources(amdis PRIVATE
${SOURCE_DIR}/solver/PetscSolver.cc ${SOURCE_DIR}/solver/PetscSolver.cc
......
...@@ -17,7 +17,7 @@ macro(target_enable_hypre _TARGET_ _SCOPE_) ...@@ -17,7 +17,7 @@ macro(target_enable_hypre _TARGET_ _SCOPE_)
HINTS ${PETSC_INCLUDE_DIRS}) HINTS ${PETSC_INCLUDE_DIRS})
if (_HYPRE_H) if (_HYPRE_H)
get_filename_component(HYPRE_INCLUDE_DIRECTORIES ${HYPRE_H} PATH) get_filename_component(HYPRE_INCLUDE_DIRECTORIES ${_HYPRE_H} PATH)
target_include_directories(${_TARGET_} ${_SCOPE_} ${HYPRE_INCLUDE_DIRECTORIES}) target_include_directories(${_TARGET_} ${_SCOPE_} ${HYPRE_INCLUDE_DIRECTORIES})
endif (_HYPRE_H) endif (_HYPRE_H)
......
...@@ -566,14 +566,16 @@ namespace AMDiS { ...@@ -566,14 +566,16 @@ namespace AMDiS {
FUNCNAME("ProblemStat::createSolver()"); FUNCNAME("ProblemStat::createSolver()");
// definition of standard-backends // definition of standard-backends
#if defined HAVE_PARALLEL_PETSC #ifdef HAVE_PARALLEL_DOMAIN_AMDIS
string backend("p_petsc"); std::string backend = "p_";
#elif defined HAVE_PARALLEL_MTL #else
string backend("p_mtl"); std::string backend = "";
#elif defined HAVE_SEQ_PETSC #endif
string backend("petsc");
#if defined(HAVE_PARALLEL_PETSC) || defined(HAVE_SEQ_PETSC)
backend += "petsc";
#else #else
string backend("mtl"); backend += "mtl";
#endif #endif
// === read backend-name === // === read backend-name ===
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <vector> #include <vector>
#include <petsc.h> #include <petsc.h>
#include "AMDiS_fwd.h" #include "AMDiS_fwd.h"
#include "utility/PetscWrapper.h"
namespace AMDiS namespace AMDiS
{ {
...@@ -121,80 +122,4 @@ namespace AMDiS ...@@ -121,80 +122,4 @@ namespace AMDiS
} // end namespace petsc_helper } // end namespace petsc_helper
} // end namespace Parallel } // end namespace Parallel
// functions for PETSc API changes
namespace petsc
{
inline PetscErrorCode options_view(PetscViewer viewer)
{
#if (PETSC_VERSION_MINOR >= 7)
return PetscOptionsView(PETSC_NULL, viewer);
#else
return PetscOptionsView(viewer);
#endif
}
inline PetscErrorCode options_insert_string(const char in_str[])
{
#if (PETSC_VERSION_MINOR >= 7)
return PetscOptionsInsertString(PETSC_NULL, in_str);
#else
return PetscOptionsInsertString(in_str);
#endif
}
inline PetscErrorCode ksp_set_operators(KSP ksp, Mat Amat,Mat Pmat)
{
#if (PETSC_VERSION_MINOR >= 5)
return KSPSetOperators(ksp, Amat, Pmat);
#else
return KSPSetOperators(ksp, Amat, Pmat, SAME_NONZERO_PATTERN);
#endif
}
inline PetscErrorCode ksp_get_operators(KSP ksp, Mat *Amat,Mat *Pmat)
{
#if (PETSC_VERSION_MINOR >= 5)
return KSPGetOperators(ksp, Amat, Pmat);
#else
return KSPGetOperators(ksp, Amat, Pmat, SAME_NONZERO_PATTERN);
#endif
}
template <class Monitor>
inline PetscErrorCode ksp_monitor_set(KSP ksp, Monitor monitor)
{
#if (PETSC_VERSION_MINOR >= 7)
PetscViewerAndFormat *vf;
PetscErrorCode ierr;
ierr = PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_DEFAULT,&vf);CHKERRQ(ierr);
ierr = KSPMonitorSet(ksp,(PetscErrorCode (*)(KSP,PetscInt,PetscReal,void*))monitor,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);CHKERRQ(ierr);
return ierr;
#else
return KSPMonitorSet(ksp, monitor, PETSC_NULL, PETSC_NULL);
#endif
}
inline PetscErrorCode mat_create_vecs(Mat mat,Vec *right,Vec *left)
{
#if (PETSC_VERSION_MINOR >= 6)
return MatCreateVecs(mat, right, left);
#else
return MatGetVecs(mat, right, left);
#endif
}
inline PetscErrorCode mat_nullspace_remove(MatNullSpace sp,Vec vec)
{
#if (PETSC_VERSION_MINOR >= 5)
return MatNullSpaceRemove(sp, vec);
#else
return MatNullSpaceRemove(sp, vec, PETSC_NULL);
#endif
}
} // end namespace petsc
} // end namespace AMDiS } // end namespace AMDiS
#endif
...@@ -91,14 +91,16 @@ namespace AMDiS { ...@@ -91,14 +91,16 @@ namespace AMDiS {
int max_iter = 100, double tol = 1.e-8) int max_iter = 100, double tol = 1.e-8)
{ {
// definition of standard-backends // definition of standard-backends
#if defined HAVE_PARALLEL_PETSC #ifdef HAVE_PARALLEL_DOMAIN_AMDIS
std::string backend("p_petsc"); std::string backend = "p_";
#elif defined HAVE_PARALLEL_MTL
std::string backend("p_mtl");
#elif defined HAVE_PETSC
std::string backend("petsc");
#else #else
std::string backend("mtl"); std::string backend = "";
#endif
#if defined(HAVE_PARALLEL_PETSC) || defined(HAVE_SEQ_PETSC)
backend += "petsc";
#else
backend += "mtl";
#endif #endif
// === read backend-name === // === read backend-name ===
......
...@@ -70,15 +70,16 @@ namespace AMDiS { ...@@ -70,15 +70,16 @@ namespace AMDiS {
solver(NULL), solver(NULL),
runner(NULL) runner(NULL)
{ {
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
std::string backend = "p_";
#else
std::string backend = "";
#endif
#if defined HAVE_PARALLEL_PETSC #if defined(HAVE_PARALLEL_PETSC) || defined(HAVE_SEQ_PETSC)
std::string backend("p_petsc"); backend += "petsc";
#elif defined HAVE_PARALLEL_MTL
std::string backend("p_mtl");
#elif defined HAVE_PETSC || defined HAVE_SEQ_PETSC
std::string backend("petsc");
#else #else
std::string backend("mtl"); backend += "mtl";
#endif #endif
// === read backend-name === // === read backend-name ===
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "solver/LinearSolver.h" #include "solver/LinearSolver.h"
#include "solver/PetscTypes.h" #include "solver/PetscTypes.h"
#include "solver/MatrixStreams.h" #include "solver/MatrixStreams.h"
#include "utility/PetscWrapper.h"
#include "Timer.h" #include "Timer.h"
#include <vector> #include <vector>
#include <iostream> #include <iostream>
...@@ -58,7 +59,7 @@ namespace AMDiS { ...@@ -58,7 +59,7 @@ namespace AMDiS {
virtual void init(PC pc, const SolverMatrix<Matrix<DOFMatrix*> >& A, const MatrixType& fullMatrix) virtual void init(PC pc, const SolverMatrix<Matrix<DOFMatrix*> >& A, const MatrixType& fullMatrix)
{ {
petsc_options_insert_string(("-" + prefix + "pc_type " + name).c_str()); petsc::options_insert_string(("-" + prefix + "pc_type " + name).c_str());
PCSetFromOptions(pc); PCSetFromOptions(pc);
} }
......
/******************************************************************************
*
* AMDiS - Adaptive multidimensional simulations
*
* Copyright (C) 2013 Dresden University of Technology. All Rights Reserved.
* Web: https://fusionforge.zih.tu-dresden.de/projects/amdis
*
* Authors:
* Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
*
* This file is part of AMDiS
*
* See also license.opensource.txt in the distribution.
*
******************************************************************************/
/** \file PetscWrapper.h */
#ifndef AMDIS_PETSCWRAPPER_H
#define AMDIS_PETSCWRAPPER_H
#include <mpi.h>
#include <petsc.h>
namespace AMDiS
{
// functions for PETSc API changes
namespace petsc
{
inline PetscErrorCode options_view(PetscViewer viewer)
{
#if (PETSC_VERSION_MINOR >= 7)
return PetscOptionsView(PETSC_NULL, viewer);
#else
return PetscOptionsView(viewer);
#endif
}
inline PetscErrorCode options_insert_string(const char in_str[])
{
#if (PETSC_VERSION_MINOR >= 7)
return PetscOptionsInsertString(PETSC_NULL, in_str);
#else
return PetscOptionsInsertString(in_str);
#endif
}
inline PetscErrorCode ksp_set_operators(KSP ksp, Mat Amat,Mat Pmat)
{
#if (PETSC_VERSION_MINOR >= 5)
return KSPSetOperators(ksp, Amat, Pmat);
#else
return KSPSetOperators(ksp, Amat, Pmat, SAME_NONZERO_PATTERN);
#endif
}
inline PetscErrorCode ksp_get_operators(KSP ksp, Mat *Amat,Mat *Pmat)
{
#if (PETSC_VERSION_MINOR >= 5)
return KSPGetOperators(ksp, Amat, Pmat);
#else
return KSPGetOperators(ksp, Amat, Pmat, SAME_NONZERO_PATTERN);
#endif
}
template <class Monitor>
inline PetscErrorCode ksp_monitor_set(KSP ksp, Monitor monitor)
{
#if (PETSC_VERSION_MINOR >= 7)
PetscViewerAndFormat *vf;
PetscErrorCode ierr;
ierr = PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_DEFAULT,&vf);CHKERRQ(ierr);
ierr = KSPMonitorSet(ksp,(PetscErrorCode (*)(KSP,PetscInt,PetscReal,void*))monitor,vf,(PetscErrorCode (*)(void**))PetscViewerAndFormatDestroy);CHKERRQ(ierr);
return ierr;
#else
return KSPMonitorSet(ksp, monitor, PETSC_NULL, PETSC_NULL);
#endif
}
inline PetscErrorCode mat_create_vecs(Mat mat,Vec *right,Vec *left)
{
#if (PETSC_VERSION_MINOR >= 6)
return MatCreateVecs(mat, right, left);
#else
return MatGetVecs(mat, right, left);
#endif
}
inline PetscErrorCode mat_nullspace_remove(MatNullSpace sp,Vec vec)
{
#if (PETSC_VERSION_MINOR >= 5)
return MatNullSpaceRemove(sp, vec);
#else
return MatNullSpaceRemove(sp, vec, PETSC_NULL);
#endif
}
} // end namespace petsc
} // end namespace AMDiS
#endif
...@@ -48,7 +48,7 @@ cmake --build . --target all ...@@ -48,7 +48,7 @@ cmake --build . --target all
The documentation is built using [Doxygen](http://www.doxygen.org). Simply run the command in the `doc` subdirectory: The documentation is built using [Doxygen](http://www.doxygen.org). Simply run the command in the `doc` subdirectory:
``` ```
cd doc cd AMDiS/doc
doxygen doxygen
``` ```
......
...@@ -2,21 +2,18 @@ project("extensions_demo_pfc") ...@@ -2,21 +2,18 @@ project("extensions_demo_pfc")
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
find_package(AMDIS REQUIRED) find_package(AMDIS REQUIRED)
include(${AMDIS_USE_FILE})
if(AMDIS_FOUND) add_definitions(-DUSE_MTL=1)
message("amdis was found\n")
include(${AMDIS_USE_FILE})
SET(BASIS_LIBS ${AMDIS_LIBRARIES})
endif(AMDIS_FOUND)
set(pfc src/pfc.cc) set(pfc src/pfc.cc)
add_executable("pfc" ${pfc}) add_executable("pfc" ${pfc})
target_link_libraries("pfc" ${BASIS_LIBS}) target_link_libraries("pfc" ${AMDIS_LIBRARIES})
set(pfc_rb src/pfc_rb.cc) set(pfc_rb src/pfc_rb.cc)
add_executable("pfc_rb" ${pfc_rb}) add_executable("pfc_rb" ${pfc_rb})
target_link_libraries("pfc_rb" ${BASIS_LIBS}) target_link_libraries("pfc_rb" ${AMDIS_LIBRARIES})
set(vpfc src/vpfc.cc) set(vpfc src/vpfc.cc)
add_executable("vpfc" ${vpfc}) add_executable("vpfc" ${vpfc})
target_link_libraries("vpfc" ${BASIS_LIBS}) target_link_libraries("vpfc" ${AMDIS_LIBRARIES})
...@@ -28,16 +28,8 @@ pfc->space->dim: 2 ...@@ -28,16 +28,8 @@ pfc->space->dim: 2
% ================== SOLVER ====================================== % ================== SOLVER ======================================
%#include "init/pfc_solver.inc" pfc->space->solver->backend: bpetsc
pfc->space->solver: cg #include "init/pfc_solver.mtl.inc"
pfc->space->MG->number of levels: 10
pfc->space->MG->max iteration: 100
pfc->space->MG->tolerance: 1.e-8
pfc->space->MG->nu1: 20
pfc->space->MG->nu2: 20
pfc->space->MG->gamma: 1
pfc->space->MG->mu: 3
pfc->space->MG->fine level: 12
% ==================== TIMESTEPS =============================== % ==================== TIMESTEPS ===============================
adapt->timestep: 1.e-1 adapt->timestep: 1.e-1
......
...@@ -29,6 +29,7 @@ pfc->space->dim: 2 ...@@ -29,6 +29,7 @@ pfc->space->dim: 2
% ================== SOLVER ====================================== % ================== SOLVER ======================================
pfc->space->solver->backend: mtl
#include "init/pfc_solver.mtl.inc" #include "init/pfc_solver.mtl.inc"
......
%pfc->space->solver->backend: p_petsc pfc->space->solver->backend: petsc
pfc->space->solver->petsc prefix: pfc_ pfc->space->solver->petsc prefix: pfc_
pfc->space->solver: pfc pfc->space->solver: pfc
pfc->space->solver->ksp_type: fgmres pfc->space->solver->ksp_type: fgmres
......
...@@ -2,13 +2,11 @@ ...@@ -2,13 +2,11 @@
#include "Helpers.h" #include "Helpers.h"
#include "PhaseFieldCrystal.h" #include "PhaseFieldCrystal.h"
#if (defined HAVE_SEQ_PETSC) || (defined HAVE_PETSC) #if defined(USE_SEQ_PETSC)
#include "preconditioner/PetscPreconPfc.h" #include "preconditioner/PetscPreconPfc.h"
#endif #elif defined(USE_PARALLEL_PETSC)
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
#include "preconditioner/PetscSolverPfc.h" #include "preconditioner/PetscSolverPfc.h"
#endif #elif defined(USE_MTL)
#if (!defined HAVE_SEQ_PETSC) && (!defined HAVE_PETSC) && (!defined HAVE_PARALLEL_DOMAIN_AMDIS)
#include "preconditioner/MTLPreconPfc.h" #include "preconditioner/MTLPreconPfc.h"
#endif #endif
...@@ -30,33 +28,24 @@ public: ...@@ -30,33 +28,24 @@ public:
{ {
super::finalizeData(); super::finalizeData();
#ifdef USE_PRECON #if defined(USE_SEQ_PETSC)
// sequential PFC preconditioner // sequential PFC preconditioner
#if (defined HAVE_SEQ_PETSC) || (defined HAVE_PETSC)
PetscPreconPfc* precon = dynamic_cast<PetscPreconPfc*>(prob->getSolver()->getRightPrecon()); PetscPreconPfc* precon = dynamic_cast<PetscPreconPfc*>(prob->getSolver()->getRightPrecon());
if (precon) { if (precon) {
precon->setData(getTau(), M0); precon->setData(getTau(), M0);
} }
// PetscPreconPfcDiag* precon2 = dynamic_cast<PetscPreconPfcDiag*>(prob->getSolver()->getRightPrecon()); #elif defined(USE_PARALLEL_PETSC)
// if (precon2) {
// precon2->setData(getTau(), M0);
}
#elif !defined(HAVE_PARALLEL_DOMAIN_AMDIS)
MTLPreconPfc* precon = dynamic_cast<MTLPreconPfc*>(prob->getSolver()->getRightPrecon());
if (precon)
precon->setData(getTau(), M0);
#else
// parallel PFC preconditioner // parallel PFC preconditioner
Parallel::PetscSolverPfc* solver = dynamic_cast<Parallel::PetscSolverPfc*>(prob->getSolver()); Parallel::PetscSolverPfc* solver = dynamic_cast<Parallel::PetscSolverPfc*>(prob->getSolver());
if (solver) if (solver) {
solver->setData(getTau(), M0); solver->setData(getTau(), M0);
}
// Parallel::PetscSolverPfcDiag* solver2 = dynamic_cast<Parallel::PetscSolverPfcDiag*>(prob->getSolver()); #elif defined(USE_MTL)
// if (solver2) // mtl4 preconditioner
// solver2->setData(getTau(), M0); MTLPreconPfc* precon = dynamic_cast<MTLPreconPfc*>(prob->getSolver()->getRightPrecon());
#endif if (precon) {
precon->setData(getTau(), M0);
}
#endif #endif
} }
...@@ -82,20 +71,13 @@ int main(int argc, char** argv) ...@@ -82,20 +71,13 @@ int main(int argc, char** argv)
AMDiS::init(argc, argv); AMDiS::init(argc, argv);
Timer t; Timer t;
#ifdef USE_PRECON
// add preconditioner / solver to the parameter list. Must be added before problem is initialized. // add preconditioner / solver to the parameter list. Must be added before problem is initialized.
#if (defined HAVE_SEQ_PETSC) || (defined HAVE_PETSC) #if defined(USE_SEQ_PETSC)
CreatorMap<PetscPreconditionerNested>::addCreator("pfc", new PetscPreconPfc::Creator); CreatorMap<PetscPreconditionerNested>::addCreator("pfc", new PetscPreconPfc::Creator);
// CreatorMap<PetscPreconditionerNested>::addCreator("pfc_diag", new PetscPreconPfcDiag::Creator); #elif defined(USE_PARALLEL_PETSC)
#elif !defined(HAVE_PARALLEL_DOMAIN_AMDIS)
CreatorMap<typename MTLPreconPfc::precon_base>::addCreator("pfc", new MTLPreconPfc::Creator);
// CreatorMap<typename MTLPreconPfc_Diag::base_precon>::addCreator("pfc", new MTLPreconPfc::Creator);
#else
CreatorMap<LinearSolverInterface>::addCreator("p_petsc_pfc", new Parallel::PetscSolverPfc::Creator); CreatorMap<LinearSolverInterface>::addCreator("p_petsc_pfc", new Parallel::PetscSolverPfc::Creator);
// CreatorMap<LinearSolverInterface>::addCreator("p_petsc_pfc_diag", new Parallel::PetscSolverPfcDiag::Creator); #elif defined(USE_MTL)
#endif CreatorMap<typename MTLPreconPfc::precon_base>::addCreator("pfc", new MTLPreconPfc::Creator);
#endif #endif
// create and initialize the PFC BaseProblem // create and initialize the PFC BaseProblem
......
...@@ -2,13 +2,11 @@ ...@@ -2,13 +2,11 @@
#include "Helpers.h" #include "Helpers.h"
#include "PhaseFieldCrystal.h" #include "PhaseFieldCrystal.h"
#if (defined HAVE_SEQ_PETSC) || (defined HAVE_PETSC) #if defined(USE_SEQ_PETSC)
#include "preconditioner/PetscPreconPfc.h" #include "preconditioner/PetscPreconPfc.h"
#endif #elif defined(USE_PARALLEL_PETSC)
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
#include "preconditioner/PetscSolverPfc.h" #include "preconditioner/PetscSolverPfc.h"
#endif #elif defined(USE_MTL)
#if (!defined HAVE_SEQ_PETSC) && (!defined HAVE_PETSC) && (!defined HAVE_PARALLEL_DOMAIN_AMDIS)
#include "preconditioner/MTLPreconPfc.h" #include "preconditioner/MTLPreconPfc.h"
#endif #endif
...@@ -49,24 +47,19 @@ public: ...@@ -49,24 +47,19 @@ public:
{ {
super::initData(); super::initData();
#if defined(USE_SEQ_PETSC)
// sequential PFC preconditioner // sequential PFC preconditioner
#if (defined HAVE_SEQ_PETSC) || (defined HAVE_PETSC)
PetscPreconPfc* runner = dynamic_cast<PetscPreconPfc*>(prob->getSolver()->getRunner()); PetscPreconPfc* runner = dynamic_cast<PetscPreconPfc*>(prob->getSolver()->getRunner());
if (runner) { if (runner) {
dynamic_cast<PetscSolver<PetscPreconPfc>*>(prob->getSolver())->setNested(true);
runner->setData(getTau()); runner->setData(getTau());
} }
#endif #elif defined(USE_PARALLEL_PETSC)
// parallel PFC preconditioner // parallel PFC preconditioner
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
Parallel::PetscSolverPfc* solver = dynamic_cast<Parallel::PetscSolverPfc*>(prob->getSolver()); Parallel::PetscSolverPfc* solver = dynamic_cast<Parallel::PetscSolverPfc*>(prob->getSolver());
if (solver) if (solver)
solver->setData(getTau()); solver->setData(getTau());
#endif #elif defined(USE_MTL)
// sequential PFC preconditioner using MTL // sequential PFC preconditioner using MTL
#if (!defined HAVE_SEQ_PETSC) && (!defined HAVE_PETSC) && (!defined HAVE_PARALLEL_DOMAIN_AMDIS)
using AMDiS::extensions::MTLPreconPfc; using AMDiS::extensions::MTLPreconPfc;
MTLPreconPfc* precon = dynamic_cast<MTLPreconPfc*>(prob->getSolver()->getRightPrecon()); MTLPreconPfc* precon = dynamic_cast<MTLPreconPfc*>(prob->getSolver()->getRightPrecon());
if (precon) if (precon)
...@@ -197,15 +190,11 @@ int main(int argc, char** argv) ...@@ -197,15 +190,11 @@ int main(int argc, char** argv)
Timer t; Timer t;
// add preconditioner / solver to the parameter list. Must be added before problem is initialized. // add preconditioner / solver to the parameter list. Must be added before problem is initialized.
#if (defined HAVE_SEQ_PETSC) || (defined HAVE_PETSC) #if defined(USE_SEQ_PETSC)
CreatorMap<LinearSolverInterface>::addCreator("petsc_pfc", new PetscSolver<PetscPreconPfc>::Creator); CreatorMap<PetscPreconditionerNested>::addCreator("petsc_pfc", new PetscPreconPfc::Creator);
#endif #elif defined(USE_PARALLEL_PETSC)