Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

Commit 5161a040 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

First try to generalize the FETI-DP solver to a multilevel method.

parent 4c8ae77a
......@@ -14,6 +14,7 @@
#include "parallel/PetscSolverFetiStructs.h"
#include "parallel/StdMpi.h"
#include "parallel/MpiHelper.h"
#include "parallel/SubDomainSolver.h"
#include "io/VtkWriter.h"
namespace AMDiS {
......@@ -185,7 +186,8 @@ namespace AMDiS {
PetscSolverFeti::PetscSolverFeti()
: PetscSolver(),
schurPrimalSolver(0)
schurPrimalSolver(0),
multiLevelTest(false)
{
FUNCNAME("PetscSolverFeti::PetscSolverFeti()");
......@@ -209,6 +211,12 @@ namespace AMDiS {
TEST_EXIT(schurPrimalSolver == 0 || schurPrimalSolver == 1)
("Wrong solver \"%d\"for the Schur primal complement!\n",
schurPrimalSolver);
Parameters::get("parallel->multi level test", multiLevelTest);
if (multiLevelTest) {
// subDomainSolver = new SubDomainSolver(meshDistributor, mpiComm, &PETSC_COMM_SELF);
}
}
......@@ -260,6 +268,12 @@ namespace AMDiS {
static_cast<unsigned int>(feSpace->getAdmin()->getUsedDofs()))
("Should not happen!\n");
}
// If multi level test, inform sub domain solver about coarse space.
if (multiLevelTest) {
subDomainSolver->setCoarseSpace(&primalDofMap);
}
}
......
......@@ -26,6 +26,7 @@
#include "parallel/PetscSolverFetiStructs.h"
#include "parallel/ParallelDofMapping.h"
#include "parallel/ParallelTypes.h"
#include "parallel/SubDomainSolver.h"
#ifndef AMDIS_PETSC_SOLVER_FETI_H
#define AMDIS_PETSC_SOLVER_FETI_H
......@@ -240,6 +241,10 @@ namespace AMDiS {
Mat mat_interior_interior, mat_duals_duals, mat_interior_duals, mat_duals_interior;
KSP ksp_interior;
bool multiLevelTest;
SubDomainSolver *subDomainSolver;
};
}
......
// ============================================================================
// == ==
// == 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 SubDomainSolver.h */
#ifndef AMDIS_SUBDOMAIN_SOLVER_H
#define AMDIS_SUBDOMAIN_SOLVER_H
#include <map>
#include <set>
#include <mpi.h>
#include <petsc.h>
#include "parallel/MeshDistributor.h"
#include "parallel/ParallelDofMapping.h"
namespace AMDiS {
using namespace std;
class SubDomainSolver {
public:
SubDomainSolver(MeshDistributor *md,
MPI::Intracomm* mpiComm0,
MPI::Intracomm* mpiComm1)
: meshDistributor(md),
coarseSpaceMpiComm(mpiComm0),
subDomainMpiComm(mpiComm1),
coarseSpace(NULL)
{}
void setCoarseSpace(ParallelDofMapping *coarseDofs)
{
coarseSpace = coarseDofs;
}
void solve(Vec &rhs, Vec &sol)
{}
protected:
MeshDistributor *meshDistributor;
MPI::Intracomm* coarseSpaceMpiComm;
MPI::Intracomm* subDomainMpiComm;
ParallelDofMapping* coarseSpace;
};
}
#endif
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