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
a9938f46
Commit
a9938f46
authored
May 25, 2011
by
Thomas Witkowski
Browse files
Update checker partitioner for 3D.
parent
e633aa27
Changes
2
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/parallel/CheckerPartitioner.cc
View file @
a9938f46
...
...
@@ -23,12 +23,14 @@ namespace AMDiS {
int
mpiRank
=
mpiComm
->
Get_rank
();
int
mpiSize
=
mpiComm
->
Get_size
();
int
nElementsPerBlock
=
(
mesh
->
getDim
()
==
2
?
2
:
6
);
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
mesh
,
0
,
Mesh
::
CALL_EL_LEVEL
);
while
(
elInfo
)
{
Element
*
el
=
elInfo
->
getElement
();
int
elIndex
=
el
->
getIndex
();
int
elInRank
=
elIndex
/
2
;
int
elInRank
=
elIndex
/
nElementsPerBlock
;
TEST_EXIT_DBG
(
elInRank
<
mpiSize
)(
"Should not happen!
\n
"
);
elementInRank
[
elIndex
]
=
(
elInRank
==
mpiRank
);
...
...
AMDiS/src/parallel/PetscSolverFeti.cc
View file @
a9938f46
...
...
@@ -130,9 +130,6 @@ namespace AMDiS {
{
FUNCNAME
(
"PetscSolverFeti::updateDofData()"
);
TEST_EXIT
(
meshDistributor
->
getMesh
()
->
getDim
()
==
2
)
(
"Works for 2D problems only!"
);
TEST_EXIT
(
meshDistributor
->
getFeSpace
()
->
getBasisFcts
()
->
getDegree
()
==
1
)
(
"Works for linear basis functions only!
\n
"
);
...
...
@@ -189,8 +186,8 @@ namespace AMDiS {
it
!=
globalPrimalIndex
.
end
();
++
it
)
it
->
second
+=
rStartPrimals
;
MSG
_DBG
(
"nRankPrimals = %d nOverallPrimals = %d
\n
"
,
nRankPrimals
,
nOverallPrimals
);
MSG
(
"nRankPrimals = %d nOverallPrimals = %d
\n
"
,
nRankPrimals
,
nOverallPrimals
);
// === Communicate primal's global index from ranks that own the ===
...
...
@@ -335,8 +332,8 @@ namespace AMDiS {
int
nOverallDuals
=
nRankDuals
;
mpi
::
globalAdd
(
nOverallDuals
);
MSG
_DBG
(
"nRankDuals = %d nOverallDuals = %d
\n
"
,
nRankDuals
,
nOverallDuals
);
MSG
(
"nRankDuals = %d nOverallDuals = %d
\n
"
,
nRankDuals
,
nOverallDuals
);
}
...
...
@@ -370,8 +367,8 @@ namespace AMDiS {
if
(
meshDistributor
->
getIsRankDof
(
*
it
))
dofFirstLagrange
[
*
it
]
+=
rStartLagrange
;
MSG
_DBG
(
"nRankLagrange = %d nOverallLagrange = %d
\n
"
,
nRankLagrange
,
nOverallLagrange
);
MSG
(
"nRankLagrange = %d nOverallLagrange = %d
\n
"
,
nRankLagrange
,
nOverallLagrange
);
// === Communicate dofFirstLagrange to all other ranks. ===
...
...
@@ -1272,6 +1269,7 @@ namespace AMDiS {
// === Solve with FETI-DP operator. ===
MSG
(
"START FETI SOLVE!
\n
"
);
KSPSolve
(
ksp_feti
,
vec_rhs
,
vec_rhs
);
...
...
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