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
Aland, Sebastian
amdis
Commits
520a6e23
Commit
520a6e23
authored
May 30, 2012
by
Thomas Witkowski
Browse files
Implemented 2D periodic boundaries for FETI-DP method.
parent
709dcdda
Changes
3
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/parallel/ElementObjectDatabase.cc
View file @
520a6e23
...
...
@@ -98,22 +98,41 @@ namespace AMDiS {
DofEdge
edge0
=
el
->
getEdge
(
i
);
DofEdge
edge1
=
neigh
->
getEdge
(
elInfo
->
getOppVertex
(
i
));
BoundaryType
boundaryType
=
elInfo
->
getBoundary
(
EDGE
,
i
);
// Add the periodic edge.
periodicEdges
[
make_pair
(
edge0
,
edge1
)]
=
boundaryType
;
periodicEdgeAssoc
[
edge0
].
insert
(
edge1
);
// Add both vertices of the edge to be periodic.
periodicVertices
[
make_pair
(
edge0
.
first
,
edge1
.
first
)]
=
boundaryType
;
periodicVertices
[
make_pair
(
edge0
.
second
,
edge1
.
second
)]
=
boundaryType
;
periodicDofAssoc
[
edge0
.
first
].
insert
(
boundaryType
);
periodicDofAssoc
[
edge0
.
second
].
insert
(
boundaryType
);
TEST_EXIT_DBG
(
edge0
.
first
==
mesh
->
getPeriodicAssociations
(
boundaryType
)[
edge1
.
first
]
&&
edge0
.
second
==
mesh
->
getPeriodicAssociations
(
boundaryType
)[
edge1
.
second
])
(
"Should not happen!
\n
"
);
if
(
removePeriodicBoundary
)
{
ElementObjectData
elObjEdge
(
el
->
getIndex
(),
i
);
edgeElements
[
edge1
].
push_back
(
elObjEdge
);
edgeLocalMap
[
elObjEdge
]
=
edge1
;
#if 0
ElementObjectData elObjVertex0(el->getIndex(),
el->getVertexOfEdge(i, 0));
vertexElements[edge1.first].push_back(elObjVertex0);
vertexLocalMap[elObjVertex0] = edge1.first;
ElementObjectData elObjVertex1(el->getIndex(),
el->getVertexOfEdge(i, 1));
vertexElements[edge1.second].push_back(elObjVertex1);
vertexLocalMap[elObjVertex1] = edge1.first;
#endif
}
else
{
// Add the periodic edge.
periodicEdges
[
make_pair
(
edge0
,
edge1
)]
=
boundaryType
;
periodicEdgeAssoc
[
edge0
].
insert
(
edge1
);
// Add both vertices of the edge to be periodic.
periodicVertices
[
make_pair
(
edge0
.
first
,
edge1
.
first
)]
=
boundaryType
;
periodicVertices
[
make_pair
(
edge0
.
second
,
edge1
.
second
)]
=
boundaryType
;
periodicDofAssoc
[
edge0
.
first
].
insert
(
boundaryType
);
periodicDofAssoc
[
edge0
.
second
].
insert
(
boundaryType
);
TEST_EXIT_DBG
(
edge0
.
first
==
mesh
->
getPeriodicAssociations
(
boundaryType
)[
edge1
.
first
]
&&
edge0
.
second
==
mesh
->
getPeriodicAssociations
(
boundaryType
)[
edge1
.
second
])
(
"Should not happen!
\n
"
);
}
}
}
break
;
...
...
@@ -128,6 +147,9 @@ namespace AMDiS {
DofFace
face0
=
el
->
getFace
(
i
);
DofFace
face1
=
neigh
->
getFace
(
elInfo
->
getOppVertex
(
i
));
BoundaryType
boundaryType
=
elInfo
->
getBoundary
(
FACE
,
i
);
TEST_EXIT
(
removePeriodicBoundary
==
false
)
(
"Not yet implemented for 3D!
\n
"
);
// Add the periodic face.
periodicFaces
[
make_pair
(
face0
,
face1
)]
=
elInfo
->
getBoundary
(
i
);
...
...
AMDiS/src/parallel/ElementObjectDatabase.h
View file @
520a6e23
...
...
@@ -107,8 +107,11 @@ namespace AMDiS {
mesh
(
NULL
),
iterGeoPos
(
CENTER
),
macroElementRankMap
(
NULL
),
levelData
(
NULL
)
{}
levelData
(
NULL
),
removePeriodicBoundary
(
false
)
{
Parameters
::
get
(
"parallel->remove periodic boundary"
,
removePeriodicBoundary
);
}
void
setFeSpace
(
const
FiniteElemSpace
*
fe
)
{
...
...
@@ -575,6 +578,12 @@ namespace AMDiS {
map
<
int
,
int
>
macroElIndexTypeMap
;
MeshLevelData
*
levelData
;
/// If this variable is set to true, the mesh distributor removes all
/// periodic boundary conditions. The element neighbourhood relation is
/// not changed. Thus, when using some domain decomposition method, this is
/// a natural way to deal with periodic boundary conditions.
bool
removePeriodicBoundary
;
};
}
...
...
AMDiS/src/parallel/MeshDistributor.cc
View file @
520a6e23
...
...
@@ -185,13 +185,13 @@ namespace AMDiS {
}
// Test, if the mesh is the macro mesh only! Paritioning of the mesh is
supported
// only for macro meshes, so it will not work yet if the mesh is
already refined
// in some way.
// Test, if the mesh is the macro mesh only! Paritioning of the mesh is
//
supported
only for macro meshes, so it will not work yet if the mesh is
//
already refined
in some way.
testForMacroMesh
();
// For later mesh repartitioning, we need to store some information about
the
// macro mesh.
// For later mesh repartitioning, we need to store some information about
//
the
macro mesh.
createMacroElementInfo
();
// create an initial partitioning of the mesh
...
...
@@ -741,7 +741,7 @@ namespace AMDiS {
// Remove periodic boundaries on elements in mesh.
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
mesh
,
-
1
,
Mesh
::
CALL_EVERY_EL_PREORDER
);
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
mesh
,
-
1
,
Mesh
::
CALL_EVERY_EL_PREORDER
);
while
(
elInfo
)
{
elInfo
->
getElement
()
->
deleteElementData
(
PERIODIC
);
elInfo
=
stack
.
traverseNext
(
elInfo
);
...
...
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