Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backofen, Rainer
amdis
Commits
c06506af
Commit
c06506af
authored
Aug 07, 2012
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed for parallel computations.
parent
54ce7c62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
65 deletions
+0
-65
extensions/ExtendedProblemStat.h
extensions/ExtendedProblemStat.h
+0
-65
No files found.
extensions/ExtendedProblemStat.h
View file @
c06506af
...
...
@@ -9,10 +9,6 @@
#include "nonlin/ProblemNonLin.h"
#endif
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
#include "parallel/PetscProblemStat.h"
#endif
using
namespace
AMDiS
;
const
Flag
INIT_EXACT_SOLUTION
=
0X2000L
;
...
...
@@ -40,22 +36,6 @@ public:
exactSolutions
.
resize
(
nComponents
);
for
(
int
i
=
0
;
i
<
nComponents
;
++
i
)
exactSolutions
[
i
]
=
NULL
;
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
ksp_type
=
"bcgs"
;
pc_type
=
"bjacobi"
;
pc_factor_mat_solver_package
=
"mumps"
;
ksp_rtol
=
0.0
;
ksp_abstol
=
1.e-8
;
ksp_maxits
=
500
;
Parameters
::
get
(
nameStr
+
"->petsc->ksp_type"
,
ksp_type
);
Parameters
::
get
(
nameStr
+
"->petsc->pc_type"
,
pc_type
);
Parameters
::
get
(
nameStr
+
"->petsc->pc_factor_mat_solver_package"
,
pc_factor_mat_solver_package
);
Parameters
::
get
(
nameStr
+
"->petsc->rtol"
,
ksp_rtol
);
Parameters
::
get
(
nameStr
+
"->petsc->abstol"
,
ksp_abstol
);
Parameters
::
get
(
nameStr
+
"->petsc->maxits"
,
ksp_maxits
);
#endif
}
void
initialize
(
Flag
initFlag
,
...
...
@@ -139,40 +119,6 @@ public:
bool
storeMatrixData
=
false
)
{
FUNCNAME
(
"ExtendedProblemStat::solve()"
);
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
TEST_EXIT
(
meshDistributor
)(
"Should not happen!
\n
"
);
TEST_EXIT
(
singularDirichletBC
.
size
()
==
0
)
(
"Singular Dirichlet BC not implemented for parallel computing!
\n
"
);
double
wtime
=
MPI
::
Wtime
();
if
(
createMatrixData
)
{
petscSolver
->
setMeshDistributor
(
meshDistributor
);
petscSolver
->
fillPetscMatrix
(
systemMatrix
);
}
petscSolver
->
fillPetscRhs
(
rhs
);
MSG
(
"set PETSC-Parameters...
\n
"
);
KSPSetType
(
petscSolver
->
getSolver
(),
ksp_type
.
c_str
());
KSPSetTolerances
(
petscSolver
->
getSolver
(),
ksp_rtol
,
ksp_abstol
,
PETSC_DEFAULT
,
ksp_maxits
);
if
(
ksp_type
==
"preonly"
)
{
KSPSetInitialGuessNonzero
(
petscSolver
->
getSolver
(),
PETSC_FALSE
);
}
PCSetType
(
petscSolver
->
getPc
(),
pc_type
.
c_str
());
if
(
pc_type
==
"lu"
)
{
PCFactorSetMatSolverPackage
(
petscSolver
->
getPc
(),
pc_factor_mat_solver_package
.
c_str
());
}
petscSolver
->
solvePetscMatrix
(
*
solution
,
adaptInfo
);
if
(
!
storeMatrixData
)
petscSolver
->
destroyMatrixData
();
INFO
(
info
,
8
)(
"solution of discrete system needed %.5f seconds
\n
"
,
MPI
::
Wtime
()
-
wtime
);
#endif
ProblemStat_
::
solve
(
adaptInfo
,
createMatrixData
,
storeMatrixData
);
oldMeshChangeIdx
=
getMesh
()
->
getChangeIndex
();
...
...
@@ -458,16 +404,5 @@ private:
std
::
map
<
const
FiniteElemSpace
*
,
bool
>
feSpaceVisited
;
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
std
::
string
ksp_type
;
std
::
string
pc_type
;
std
::
string
pc_factor_mat_solver_package
;
double
ksp_rtol
;
double
ksp_abstol
;
int
ksp_maxits
;
#endif
};
#endif // EXTENDED_PROBLEM_STAT_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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