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
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
Backofen, Rainer
amdis
Commits
b728a4ee
Commit
b728a4ee
authored
15 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
Parallelization of instationary problems.
parent
a1b5b1b9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AMDiS/src/FileWriter.cc
+19
-14
19 additions, 14 deletions
AMDiS/src/FileWriter.cc
AMDiS/src/ParallelDomainBase.h
+25
-5
25 additions, 5 deletions
AMDiS/src/ParallelDomainBase.h
with
44 additions
and
19 deletions
AMDiS/src/FileWriter.cc
+
19
−
14
View file @
b728a4ee
...
@@ -13,13 +13,17 @@
...
@@ -13,13 +13,17 @@
#include
"Mesh.h"
#include
"Mesh.h"
#include
"OpenMP.h"
#include
"OpenMP.h"
#if HAVE_PARALLEL_DOMAIN_AMDIS
#include
"mpi.h"
#endif
namespace
AMDiS
{
namespace
AMDiS
{
FileWriter
::
FileWriter
(
const
std
::
string
&
name_
,
FileWriter
::
FileWriter
(
const
std
::
string
&
str
,
Mesh
*
m
esh_
,
Mesh
*
m
,
DOFVector
<
double
>
*
vec
)
DOFVector
<
double
>
*
vec
)
:
name
(
name_
),
:
name
(
str
),
mesh
(
m
esh_
)
mesh
(
m
)
{
{
FUNCNAME
(
"FileWriter::FileWriter()"
);
FUNCNAME
(
"FileWriter::FileWriter()"
);
...
@@ -42,10 +46,9 @@ namespace AMDiS {
...
@@ -42,10 +46,9 @@ namespace AMDiS {
initialize
();
initialize
();
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
vecs
.
size
());
i
++
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
vecs
.
size
());
i
++
)
TEST_EXIT
(
vecs
[
0
]
->
getFESpace
()
==
vecs
[
i
]
->
getFESpace
())
TEST_EXIT
(
vecs
[
0
]
->
getFESpace
()
==
vecs
[
i
]
->
getFESpace
())
(
"All FESpace have to be equal!
\n
"
);
(
"All FESpace have to be equal!
\n
"
);
}
feSpace
=
vecs
[
0
]
->
getFESpace
();
feSpace
=
vecs
[
0
]
->
getFESpace
();
solutionVecs_
=
vecs
;
solutionVecs_
=
vecs
;
...
@@ -87,11 +90,9 @@ namespace AMDiS {
...
@@ -87,11 +90,9 @@ namespace AMDiS {
{
{
// Do not forget to delete temporal solution vector, if there have been
// Do not forget to delete temporal solution vector, if there have been
// some created in the constructor.
// some created in the constructor.
if
(
nTmpSolutions_
>
0
)
{
if
(
nTmpSolutions_
>
0
)
for
(
int
i
=
0
;
i
<
nTmpSolutions_
;
i
++
)
{
for
(
int
i
=
0
;
i
<
nTmpSolutions_
;
i
++
)
delete
solutionVecs_
[
i
];
delete
solutionVecs_
[
i
];
}
}
}
}
...
@@ -166,21 +167,25 @@ namespace AMDiS {
...
@@ -166,21 +167,25 @@ namespace AMDiS {
std
::
vector
<
DataCollector
*
>
dataCollectors
(
solutionVecs_
.
size
());
std
::
vector
<
DataCollector
*
>
dataCollectors
(
solutionVecs_
.
size
());
if
(
writeElem
)
{
if
(
writeElem
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
dataCollectors
.
size
());
i
++
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
dataCollectors
.
size
());
i
++
)
dataCollectors
[
i
]
=
new
DataCollector
(
feSpace
,
solutionVecs_
[
i
],
dataCollectors
[
i
]
=
new
DataCollector
(
feSpace
,
solutionVecs_
[
i
],
level
,
flag
,
writeElem
);
level
,
flag
,
writeElem
);
}
}
else
{
}
else
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
dataCollectors
.
size
());
i
++
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
dataCollectors
.
size
());
i
++
)
dataCollectors
[
i
]
=
new
DataCollector
(
feSpace
,
solutionVecs_
[
i
],
dataCollectors
[
i
]
=
new
DataCollector
(
feSpace
,
solutionVecs_
[
i
],
traverseLevel
,
traverseLevel
,
flag
|
traverseFlag
,
flag
|
traverseFlag
,
writeElement
);
writeElement
);
}
}
}
std
::
string
fn
=
filename
;
std
::
string
fn
=
filename
;
#if HAVE_PARALLEL_DOMAIN_AMDIS
char
f
[
10
];
sprintf
(
f
,
"-p%d-"
,
MPI
::
COMM_WORLD
.
Get_rank
());
fn
+=
f
;
#endif
if
(
appendIndex
)
{
if
(
appendIndex
)
{
TEST_EXIT
(
indexLength
<=
99
)(
"index lenght > 99
\n
"
);
TEST_EXIT
(
indexLength
<=
99
)(
"index lenght > 99
\n
"
);
TEST_EXIT
(
indexDecimals
<=
97
)(
"index decimals > 97
\n
"
);
TEST_EXIT
(
indexDecimals
<=
97
)(
"index decimals > 97
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
AMDiS/src/ParallelDomainBase.h
+
25
−
5
View file @
b728a4ee
...
@@ -105,15 +105,35 @@ namespace AMDiS {
...
@@ -105,15 +105,35 @@ namespace AMDiS {
void
partitionMesh
(
AdaptInfo
*
adaptInfo
);
void
partitionMesh
(
AdaptInfo
*
adaptInfo
);
virtual
void
setTime
(
AdaptInfo
*
adaptInfo
)
{}
virtual
void
setTime
(
AdaptInfo
*
adaptInfo
)
{
if
(
timeIF
)
timeIF
->
setTime
(
adaptInfo
);
}
virtual
void
initTimestep
(
AdaptInfo
*
adaptInfo
)
{}
virtual
void
initTimestep
(
AdaptInfo
*
adaptInfo
)
{
if
(
timeIF
)
timeIF
->
initTimestep
(
adaptInfo
);
}
virtual
void
closeTimestep
(
AdaptInfo
*
adaptInfo
)
{}
virtual
void
closeTimestep
(
AdaptInfo
*
adaptInfo
)
{
if
(
timeIF
)
timeIF
->
closeTimestep
(
adaptInfo
);
}
virtual
void
solveInitialProblem
(
AdaptInfo
*
adaptInfo
)
{}
virtual
void
solveInitialProblem
(
AdaptInfo
*
adaptInfo
)
{
if
(
timeIF
)
timeIF
->
solveInitialProblem
(
adaptInfo
);
}
virtual
void
transferInitialSolution
(
AdaptInfo
*
adaptInfo
)
{}
virtual
void
transferInitialSolution
(
AdaptInfo
*
adaptInfo
)
{
if
(
timeIF
)
timeIF
->
transferInitialSolution
(
adaptInfo
);
}
virtual
void
beginIteration
(
AdaptInfo
*
adaptInfo
)
virtual
void
beginIteration
(
AdaptInfo
*
adaptInfo
)
{
{
...
...
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