Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backofen, Rainer
amdis
Commits
8d9574c0
Commit
8d9574c0
authored
Oct 19, 2009
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make periodic boundaries working also for parallel domain problems.
parent
42cd169f
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
312 additions
and
102 deletions
+312
-102
AMDiS/src/ParallelDomainBase.cc
AMDiS/src/ParallelDomainBase.cc
+273
-100
AMDiS/src/ParallelDomainBase.h
AMDiS/src/ParallelDomainBase.h
+32
-2
AMDiS/src/ParallelDomainVec.cc
AMDiS/src/ParallelDomainVec.cc
+5
-0
AMDiS/src/ParallelDomainVec.h
AMDiS/src/ParallelDomainVec.h
+2
-0
No files found.
AMDiS/src/ParallelDomainBase.cc
View file @
8d9574c0
This diff is collapsed.
Click to expand it.
AMDiS/src/ParallelDomainBase.h
View file @
8d9574c0
...
@@ -93,7 +93,7 @@ namespace AMDiS {
...
@@ -93,7 +93,7 @@ namespace AMDiS {
virtual
void
initParallelization
(
AdaptInfo
*
adaptInfo
);
virtual
void
initParallelization
(
AdaptInfo
*
adaptInfo
);
void
exitParallelization
(
AdaptInfo
*
adaptInfo
);
virtual
void
exitParallelization
(
AdaptInfo
*
adaptInfo
);
void
updateDofAdmins
();
void
updateDofAdmins
();
...
@@ -194,7 +194,7 @@ namespace AMDiS {
...
@@ -194,7 +194,7 @@ namespace AMDiS {
* Determine the interior boundaries, i.e. boundaries between ranks, and store
* Determine the interior boundaries, i.e. boundaries between ranks, and store
* all information about them in \ref interiorBoundary.
* all information about them in \ref interiorBoundary.
*/
*/
void
createInteriorBoundaryInfo
(
DofContainer
&
rankDOFs
);
void
createInteriorBoundaryInfo
();
/// Removes all macro elements from the mesh that are not part of ranks partition.
/// Removes all macro elements from the mesh that are not part of ranks partition.
void
removeMacroElements
();
void
removeMacroElements
();
...
@@ -276,9 +276,15 @@ namespace AMDiS {
...
@@ -276,9 +276,15 @@ namespace AMDiS {
DofToRank
&
boundaryDofs
,
DofToRank
&
boundaryDofs
,
DofToBool
&
vertexDof
);
DofToBool
&
vertexDof
);
/** \brief
* Takes a dof matrix and sends the values to the global petsc matrix.
*/
void
setDofMatrix
(
DOFMatrix
*
mat
,
int
dispMult
=
1
,
void
setDofMatrix
(
DOFMatrix
*
mat
,
int
dispMult
=
1
,
int
dispAddRow
=
0
,
int
dispAddCol
=
0
);
int
dispAddRow
=
0
,
int
dispAddCol
=
0
);
/** \brief
* Takes a dof vector and sends its values to a given petsc vector.
*/
void
setDofVector
(
Vec
&
petscVec
,
DOFVector
<
double
>*
vec
,
void
setDofVector
(
Vec
&
petscVec
,
DOFVector
<
double
>*
vec
,
int
disMult
=
1
,
int
dispAdd
=
0
);
int
disMult
=
1
,
int
dispAdd
=
0
);
...
@@ -299,6 +305,22 @@ namespace AMDiS {
...
@@ -299,6 +305,22 @@ namespace AMDiS {
*/
*/
void
DbgTestCommonDofs
(
bool
printCoords
=
false
);
void
DbgTestCommonDofs
(
bool
printCoords
=
false
);
/** \brief
* This function is used for debugging only. It prints all information from
* the local to global dof mapping, see \ref mapLocalGlobalDOFs.
*
* \param rank If specified, only the information from the given rank is printed.
*/
void
writeMapLocalGlobal
(
int
rank
=
-
1
);
/** \brief
* This function is used for debugging only. It prints all information about
* the periodic mapping of dofs, that are on periodic boundaries.
*
* \param rank If specified, only the information from the given rank is printed.
*/
void
writeMapPeriodic
(
int
rank
=
-
1
);
/** \brief
/** \brief
* This functions create a Paraview file with the macro mesh where the elements
* This functions create a Paraview file with the macro mesh where the elements
* are colored by the partition they are part of. This function can be used for
* are colored by the partition they are part of. This function can be used for
...
@@ -397,6 +419,14 @@ namespace AMDiS {
...
@@ -397,6 +419,14 @@ namespace AMDiS {
vec
[
1
]
=
dof3
;
vec
[
1
]
=
dof3
;
}
}
inline
void
printColValues
(
int
row
,
std
::
vector
<
int
>&
cols
,
std
::
vector
<
double
>&
values
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
cols
.
size
());
i
++
)
std
::
cout
<<
"Mat["
<<
row
<<
"]["
<<
cols
[
i
]
<<
"] = "
<<
values
[
i
]
<<
"
\n
"
;
}
protected:
protected:
///
///
ProblemIterationInterface
*
iterationIF
;
ProblemIterationInterface
*
iterationIF
;
...
...
AMDiS/src/ParallelDomainVec.cc
View file @
8d9574c0
...
@@ -85,6 +85,11 @@ namespace AMDiS {
...
@@ -85,6 +85,11 @@ namespace AMDiS {
}
}
}
}
void
ParallelDomainVec
::
exitParallelization
(
AdaptInfo
*
adaptInfo
)
{
ParallelDomainBase
::
exitParallelization
(
adaptInfo
);
}
void
ParallelDomainVec
::
solve
()
void
ParallelDomainVec
::
solve
()
{
{
...
...
AMDiS/src/ParallelDomainVec.h
View file @
8d9574c0
...
@@ -36,6 +36,8 @@ namespace AMDiS {
...
@@ -36,6 +36,8 @@ namespace AMDiS {
void
initParallelization
(
AdaptInfo
*
adaptInfo
);
void
initParallelization
(
AdaptInfo
*
adaptInfo
);
void
exitParallelization
(
AdaptInfo
*
adaptInfo
);
virtual
void
solveInitialProblem
(
AdaptInfo
*
adaptInfo
)
virtual
void
solveInitialProblem
(
AdaptInfo
*
adaptInfo
)
{
{
ParallelDomainBase
::
solveInitialProblem
(
adaptInfo
);
ParallelDomainBase
::
solveInitialProblem
(
adaptInfo
);
...
...
Write
Preview
Markdown
is supported
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