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
Backofen, Rainer
amdis
Commits
b115e944
Commit
b115e944
authored
Feb 08, 2012
by
Thomas Witkowski
Browse files
Small changes and code refactoring in parallel AMDiS.
parent
a71cce06
Changes
7
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/MeshStructure.cc
View file @
b115e944
...
...
@@ -137,14 +137,18 @@ namespace AMDiS {
if
(
!
reverseOrder
)
{
if
(
s1
!=
-
1
)
addAlongSide
(
el
->
getFirstChild
(),
subObj
,
s1
,
el
->
getChildType
(
elType
),
reverseOrder
);
addAlongSide
(
el
->
getFirstChild
(),
subObj
,
s1
,
el
->
getChildType
(
elType
),
reverseOrder
);
if
(
s2
!=
-
1
)
addAlongSide
(
el
->
getSecondChild
(),
subObj
,
s2
,
el
->
getChildType
(
elType
),
reverseOrder
);
addAlongSide
(
el
->
getSecondChild
(),
subObj
,
s2
,
el
->
getChildType
(
elType
),
reverseOrder
);
}
else
{
if
(
s2
!=
-
1
)
addAlongSide
(
el
->
getSecondChild
(),
subObj
,
s2
,
el
->
getChildType
(
elType
),
reverseOrder
);
addAlongSide
(
el
->
getSecondChild
(),
subObj
,
s2
,
el
->
getChildType
(
elType
),
reverseOrder
);
if
(
s1
!=
-
1
)
addAlongSide
(
el
->
getFirstChild
(),
subObj
,
s1
,
el
->
getChildType
(
elType
),
reverseOrder
);
addAlongSide
(
el
->
getFirstChild
(),
subObj
,
s1
,
el
->
getChildType
(
elType
),
reverseOrder
);
}
}
}
...
...
AMDiS/src/MeshStructure.h
View file @
b115e944
...
...
@@ -66,10 +66,8 @@ namespace AMDiS {
reset
();
}
/** \brief
* Sets all position counters, that are used to traverse the code, to the starting
* position. The code itself is not changed.
*/
/// Sets all position counters, that are used to traverse the code, to the
/// starting position. The code itself is not changed.
void
reset
();
/// Returns whether the code is empty or not.
...
...
AMDiS/src/io/ArhReader.cc
View file @
b115e944
...
...
@@ -51,7 +51,6 @@ namespace AMDiS {
{
FUNCNAME
(
"ArhReader::read()"
);
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
if
(
writeParallel
)
{
using
boost
::
lexical_cast
;
int
sPos
=
filename
.
find
(
".arh"
);
...
...
@@ -59,8 +58,12 @@ namespace AMDiS {
string
name
=
filename
.
substr
(
0
,
sPos
);
if
(
nProcs
==
-
1
)
{
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
string
procFilename
=
name
+
"-p"
+
lexical_cast
<
string
>
(
MPI
::
COMM_WORLD
.
Get_rank
())
+
"-.arh"
;
readFile
(
procFilename
,
mesh
,
vecs
);
#else
ERROR_EXIT
(
"Reading parallel ARH files in sequential computations requires to specify the number of nodes on which the ARH file was created!
\n
"
);
#endif
}
else
{
for
(
int
i
=
0
;
i
<
nProcs
;
i
++
)
{
string
procFilename
=
name
+
"-p"
+
lexical_cast
<
string
>
(
i
)
+
"-.arh"
;
...
...
@@ -70,10 +73,6 @@ namespace AMDiS {
}
else
{
readFile
(
filename
,
mesh
,
vecs
);
}
#else
readFile
(
filename
,
mesh
,
vecs
);
#endif
MSG
(
"ARH file read from: %s
\n
"
,
filename
.
c_str
());
}
...
...
AMDiS/src/parallel/DofComm.cc
View file @
b115e944
...
...
@@ -18,7 +18,8 @@ namespace AMDiS {
void
DofComm
::
removeEmpty
()
{
for
(
DataIter
dit
=
data
.
begin
();
dit
!=
data
.
end
();
++
dit
)
{
DataIter
dit
=
data
.
begin
();
while
(
dit
!=
data
.
end
())
{
FeMapIter
it
=
dit
->
second
.
begin
();
while
(
it
!=
dit
->
second
.
end
())
{
if
(
it
->
second
.
size
()
==
0
)
{
...
...
@@ -28,6 +29,11 @@ namespace AMDiS {
}
else
++
it
;
}
if
(
dit
->
second
.
size
()
==
0
)
data
.
erase
(
dit
++
);
else
++
dit
;
}
}
...
...
AMDiS/src/parallel/MeshDistributor.cc
View file @
b115e944
...
...
@@ -777,6 +777,9 @@ namespace AMDiS {
double
first
=
MPI
::
Wtime
();
int
skip
=
0
;
Parameters
::
get
(
"parallel->debug->skip check mesh change"
,
skip
);
// === If mesh has not been changed on all ranks, return. ===
int
recvAllValues
=
0
;
...
...
@@ -788,7 +791,8 @@ namespace AMDiS {
// === At least one rank mesh has been changed, so the boundaries must be ===
// === adapted to the new mesh structure. ===
if
(
skip
==
0
)
do
{
bool
meshChanged
=
false
;
...
...
AMDiS/src/parallel/ParallelDebug.cc
View file @
b115e944
...
...
@@ -785,7 +785,7 @@ namespace AMDiS {
{
FUNCNAME
(
"ParallelDebug::writeCoordsFile()"
);
const
FiniteElemSpace
*
feSpace
=
pdb
.
feSpaces
[
0
];
const
FiniteElemSpace
*
feSpace
=
pdb
.
feSpaces
[
pdb
.
feSpaces
.
size
()
-
1
];
stringstream
filename
;
filename
<<
prefix
<<
"-"
<<
pdb
.
mpiRank
<<
"."
<<
postfix
;
...
...
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
View file @
b115e944
...
...
@@ -431,6 +431,7 @@ namespace AMDiS {
(
"Should not happen!
\n
"
);
int
rowIndex
=
rowIt
->
first
;
MatSetValues
(
petscMatrix
,
1
,
&
rowIndex
,
rowIt
->
second
.
size
(),
&
(
rowIt
->
second
[
0
]),
&
(
valsMap
[
rowIt
->
first
][
0
]),
ADD_VALUES
);
}
...
...
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