diff --git a/AMDiS/CMakeLists.txt b/AMDiS/CMakeLists.txt index 01afc914418339442c0ff284e963d782f993d2d1..23daa50e63390514b85d6931bdfed63a1ece4297 100644 --- a/AMDiS/CMakeLists.txt +++ b/AMDiS/CMakeLists.txt @@ -199,6 +199,7 @@ if(ENABLE_PARALLEL_DOMAIN) ${SOURCE_DIR}/parallel/ParMetisPartitioner.cc ${SOURCE_DIR}/parallel/PetscProblemStat.cc ${SOURCE_DIR}/parallel/PetscSolver.cc + ${SOURCE_DIR}/parallel/PetscSolverFeti.cc ${SOURCE_DIR}/parallel/PetscSolverGlobalMatrix.cc ${SOURCE_DIR}/parallel/PetscSolverSchur.cc ${SOURCE_DIR}/parallel/StdMpi.cc diff --git a/AMDiS/src/parallel/ParallelProblemStatBase.h b/AMDiS/src/parallel/ParallelProblemStatBase.h index 773095a9705717186269bd847c15e3279bbce29a..6455158dc720157a65655fe684a3dc5686f252f3 100644 --- a/AMDiS/src/parallel/ParallelProblemStatBase.h +++ b/AMDiS/src/parallel/ParallelProblemStatBase.h @@ -52,10 +52,6 @@ namespace AMDiS { MeshDistributor *meshDistributor; }; -#ifdef HAVE_PARALLEL_DOMAIN_AMDIS - typedef ProblemStatSeq ProblemStat; -#endif - } #endif diff --git a/AMDiS/src/parallel/PetscProblemStat.h b/AMDiS/src/parallel/PetscProblemStat.h index b4669ed19afcaf168b35ae4eab00392b3a2e4175..4dce9b10161b45c54b984c4fec9d1a59c95f2702 100644 --- a/AMDiS/src/parallel/PetscProblemStat.h +++ b/AMDiS/src/parallel/PetscProblemStat.h @@ -27,6 +27,7 @@ #include "Global.h" #include "parallel/ParallelProblemStatBase.h" #include "parallel/PetscSolver.h" +#include "parallel/PetscSolverFeti.h" #include "parallel/PetscSolverGlobalMatrix.h" #include "parallel/PetscSolverSchur.h" @@ -46,7 +47,13 @@ namespace AMDiS { #ifdef HAVE_PETSC_DEV petscSolver = new PetscSolverSchur(); #else - ERROR_EXIT("Petsc schur complement solver is only supported when petsc-dev is used!\n"); + ERROR_EXIT("PETSc schur complement solver is only supported when petsc-dev is used!\n"); +#endif + } else if (name == "petsc-feti") { +#ifdef HAVE_PETSC_DEV + petscSolver = new PetscSolverFeti(); +#else + ERROR_EXIT("PETSc FETI-DP solver is only supported when petsc-dev is used!\n"); #endif } else if (name == "petsc" || name == "") { petscSolver = new PetscSolverGlobalMatrix(); @@ -75,6 +82,10 @@ namespace AMDiS { typedef PetscProblemStat ParallelProblemStat; +#ifdef HAVE_PARALLEL_DOMAIN_AMDIS + typedef PetscProblemStat ProblemStat; +#endif + } // namespace AMDiS #endif diff --git a/AMDiS/src/parallel/PetscSolverFeti.cc b/AMDiS/src/parallel/PetscSolverFeti.cc new file mode 100644 index 0000000000000000000000000000000000000000..f7b9ef62dc3a8081a83633570627b64b4ade01d3 --- /dev/null +++ b/AMDiS/src/parallel/PetscSolverFeti.cc @@ -0,0 +1,35 @@ +// +// Software License for AMDiS +// +// Copyright (c) 2010 Dresden University of Technology +// All rights reserved. +// Authors: Simon Vey, Thomas Witkowski et al. +// +// This file is part of AMDiS +// +// See also license.opensource.txt in the distribution. + + +#include "parallel/PetscSolverFeti.h" +#include "parallel/StdMpi.h" +#include "parallel/MpiHelper.h" + +namespace AMDiS { + + using namespace std; + + +#ifdef HAVE_PETSC_DEV + void PetscSolverFeti::fillPetscMatrix(Matrix<DOFMatrix*> *mat, SystemVector *vec) + { + FUNCNAME("PetscSolverFeti::fillPetscMatrix()"); + } + + + void PetscSolverFeti::solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo) + { + FUNCNAME("PetscSolverFeti::solvePetscMatrix()"); + } +#endif + +} diff --git a/AMDiS/src/parallel/PetscSolverFeti.h b/AMDiS/src/parallel/PetscSolverFeti.h new file mode 100644 index 0000000000000000000000000000000000000000..4dfcb4e0f7562daafcdd722a77c72d7c0cc64659 --- /dev/null +++ b/AMDiS/src/parallel/PetscSolverFeti.h @@ -0,0 +1,49 @@ +// ============================================================================ +// == == +// == AMDiS - Adaptive multidimensional simulations == +// == == +// == http://www.amdis-fem.org == +// == == +// ============================================================================ +// +// Software License for AMDiS +// +// Copyright (c) 2010 Dresden University of Technology +// All rights reserved. +// Authors: Simon Vey, Thomas Witkowski et al. +// +// This file is part of AMDiS +// +// See also license.opensource.txt in the distribution. + + + +/** \file PetscSolverFeti.h */ + +#include "parallel/PetscSolver.h" + +#ifndef AMDIS_PETSC_SOLVER_FETI_H +#define AMDIS_PETSC_SOLVER_FETI_H + +namespace AMDiS { + + using namespace std; + + +#ifdef HAVE_PETSC_DEV + class PetscSolverFeti : public PetscSolver + { + public: + PetscSolverFeti() + : PetscSolver() + {} + + void fillPetscMatrix(Matrix<DOFMatrix*> *mat, SystemVector *vec); + + void solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo); + }; +#endif + +} + +#endif