Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Backofen, Rainer
amdis
Commits
234ea16e
Commit
234ea16e
authored
Oct 25, 2012
by
Thomas Witkowski
Browse files
Hopefully fixed problem with local-global matrix indices for the last.
parent
c9ae1359
Changes
5
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/parallel/MeshDistributor.cc
View file @
234ea16e
...
@@ -1686,8 +1686,6 @@ namespace AMDiS {
...
@@ -1686,8 +1686,6 @@ namespace AMDiS {
vector
<
const
FiniteElemSpace
*>&
dofMapSpaces
=
dofMaps
[
i
]
->
getFeSpaces
();
vector
<
const
FiniteElemSpace
*>&
dofMapSpaces
=
dofMaps
[
i
]
->
getFeSpaces
();
dofMaps
[
i
]
->
clear
();
dofMaps
[
i
]
->
clear
();
if
(
hasPeriodicBoundary
)
dofMaps
[
i
]
->
setComputeMatIndex
(
true
);
for
(
int
j
=
0
;
j
<
static_cast
<
int
>
(
dofMapSpaces
.
size
());
j
++
)
for
(
int
j
=
0
;
j
<
static_cast
<
int
>
(
dofMapSpaces
.
size
());
j
++
)
updateLocalGlobalNumbering
(
*
(
dofMaps
[
i
]),
dofMapSpaces
[
j
]);
updateLocalGlobalNumbering
(
*
(
dofMaps
[
i
]),
dofMapSpaces
[
j
]);
...
...
AMDiS/src/parallel/ParallelDofMapping.cc
View file @
234ea16e
...
@@ -208,12 +208,13 @@ namespace AMDiS {
...
@@ -208,12 +208,13 @@ namespace AMDiS {
}
}
ParallelDofMapping
::
ParallelDofMapping
(
DofMappingMode
mode
)
ParallelDofMapping
::
ParallelDofMapping
(
DofMappingMode
mode
,
bool
matIndexFromGlobal
)
:
meshLevel
(
0
),
:
meshLevel
(
0
),
levelData
(
NULL
),
levelData
(
NULL
),
dofComm
(
NULL
),
dofComm
(
NULL
),
globalMapping
(
true
),
globalMapping
(
true
),
needMatIndexFromGlobal
(
true
),
needMatIndexFromGlobal
(
matIndexFromGlobal
),
nRankDofs
(
1
),
nRankDofs
(
1
),
nLocalDofs
(
1
),
nLocalDofs
(
1
),
nOverallDofs
(
1
),
nOverallDofs
(
1
),
...
...
AMDiS/src/parallel/ParallelDofMapping.h
View file @
234ea16e
...
@@ -643,10 +643,13 @@ namespace AMDiS {
...
@@ -643,10 +643,13 @@ namespace AMDiS {
/** \brief
/** \brief
* Constructur for parallel DOF mapping.
* Constructur for parallel DOF mapping.
*
*
* \param[in] mode Defines if DOF mapping is defined either per
* \param[in] mode Defines if DOF mapping is defined either per
* component or per FE space.
* component or per FE space.
* \param[in] matIndexGlobal If true, the mat index is defined on global
* DOF indices, otherwise on local ones.
*/
*/
ParallelDofMapping
(
DofMappingMode
mode
);
ParallelDofMapping
(
DofMappingMode
mode
,
bool
matIndexFromGlobal
=
false
);
/** \brief
/** \brief
* Initialize the parallel DOF mapping.
* Initialize the parallel DOF mapping.
...
@@ -694,19 +697,11 @@ namespace AMDiS {
...
@@ -694,19 +697,11 @@ namespace AMDiS {
return
*
dofComm
;
return
*
dofComm
;
}
}
/// Changes the computation of matrix indices based of either local or
/// global DOF indices, see \ref needMatIndexFromGlobal
void
setComputeMatIndex
(
bool
global
)
{
needMatIndexFromGlobal
=
global
;
}
inline
bool
isMatIndexFromGlobal
()
inline
bool
isMatIndexFromGlobal
()
{
{
return
needMatIndexFromGlobal
;
return
needMatIndexFromGlobal
;
}
}
/// Access the DOF mapping for a given component number.
/// Access the DOF mapping for a given component number.
inline
ComponentDofMap
&
operator
[](
int
compNumber
)
inline
ComponentDofMap
&
operator
[](
int
compNumber
)
{
{
...
...
AMDiS/src/parallel/PetscSolver.cc
View file @
234ea16e
...
@@ -22,8 +22,8 @@ namespace AMDiS {
...
@@ -22,8 +22,8 @@ namespace AMDiS {
PetscSolver
::
PetscSolver
()
PetscSolver
::
PetscSolver
()
:
ParallelCoarseSpaceMatVec
(),
:
ParallelCoarseSpaceMatVec
(),
dofMap
(
FESPACE_WISE
),
dofMap
(
FESPACE_WISE
,
true
),
dofMapSd
(
FESPACE_WISE
),
dofMapSd
(
FESPACE_WISE
,
true
),
kspPrefix
(
""
),
kspPrefix
(
""
),
removeRhsNullspace
(
false
),
removeRhsNullspace
(
false
),
hasConstantNullspace
(
false
),
hasConstantNullspace
(
false
),
...
...
AMDiS/src/parallel/PetscSolverFeti.cc
View file @
234ea16e
...
@@ -1286,12 +1286,11 @@ namespace AMDiS {
...
@@ -1286,12 +1286,11 @@ namespace AMDiS {
massMapping
=
massMatrixSolver
->
getDofMapping
();
massMapping
=
massMatrixSolver
->
getDofMapping
();
}
else
{
}
else
{
massMapping
=
massMapping
=
new
ParallelDofMapping
(
COMPONENT_WISE
);
new
ParallelDofMapping
(
COMPONENT_WISE
,
true
);
massMapping
->
init
(
meshDistributor
->
getMeshLevelData
(),
massMapping
->
init
(
meshDistributor
->
getMeshLevelData
(),
pressureFeSpace
,
pressureFeSpace
);
pressureFeSpace
,
pressureFeSpace
);
massMapping
->
setDofComm
(
meshDistributor
->
getDofComm
());
massMapping
->
setDofComm
(
meshDistributor
->
getDofComm
());
massMapping
->
setMpiComm
(
meshDistributor
->
getMeshLevelData
().
getMpiComm
(
0
),
0
);
massMapping
->
setMpiComm
(
meshDistributor
->
getMeshLevelData
().
getMpiComm
(
0
),
0
);
massMapping
->
setComputeMatIndex
(
true
);
}
}
(
*
massMapping
)[
0
]
=
interfaceDofMap
[
pressureComponent
];
(
*
massMapping
)[
0
]
=
interfaceDofMap
[
pressureComponent
];
massMapping
->
update
();
massMapping
->
update
();
...
...
Write
Preview
Supports
Markdown
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