Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iwr
amdis
Commits
c06506af
Commit
c06506af
authored
12 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
Fixed for parallel computations.
parent
54ce7c62
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
extensions/ExtendedProblemStat.h
+0
-65
0 additions, 65 deletions
extensions/ExtendedProblemStat.h
with
0 additions
and
65 deletions
extensions/ExtendedProblemStat.h
+
0
−
65
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment