Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iwr
amdis
Commits
5161a040
Commit
5161a040
authored
Apr 11, 2012
by
Thomas Witkowski
Browse files
First try to generalize the FETI-DP solver to a multilevel method.
parent
4c8ae77a
Changes
3
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/parallel/PetscSolverFeti.cc
View file @
5161a040
...
...
@@ -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
);
}
}
...
...
AMDiS/src/parallel/PetscSolverFeti.h
View file @
5161a040
...
...
@@ -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/src/parallel/SubDomainSolver.h
0 → 100644
View file @
5161a040
// ============================================================================
// == ==
// == 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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment