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
7f428556
Commit
7f428556
authored
14 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
Fixed coarsening bug with periodic BCs in sequentiell code.
parent
9a62894f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AMDiS/src/CoarseningManager3d.cc
+49
-25
49 additions, 25 deletions
AMDiS/src/CoarseningManager3d.cc
with
49 additions
and
25 deletions
AMDiS/src/CoarseningManager3d.cc
+
49
−
25
View file @
7f428556
...
@@ -313,46 +313,70 @@ namespace AMDiS {
...
@@ -313,46 +313,70 @@ namespace AMDiS {
coarsenList
.
setElement
(
*
n_neigh
,
neigh
);
coarsenList
.
setElement
(
*
n_neigh
,
neigh
);
coarsenList
.
setElType
(
*
n_neigh
,
neigh_info
->
getType
());
coarsenList
.
setElType
(
*
n_neigh
,
neigh_info
->
getType
());
int
n_vertices
=
mesh
->
getGeo
(
VERTEX
);
int
nVertices
=
mesh
->
getGeo
(
VERTEX
);
int
i
,
j
,
k
,
edge_no
;
while
(
neigh
!=
el
)
{
while
(
neigh
!=
el
)
{
for
(
j
=
0
;
j
<
n_vertices
;
j
++
)
// === Find the coarsening edge on the current neighbour element. ===
int
i
,
j
,
k
;
// === First, try to identify the edge DOFs directly. ===
for
(
j
=
0
;
j
<
nVertices
;
j
++
)
if
(
neigh
->
getDof
(
j
)
==
edge
[
0
])
if
(
neigh
->
getDof
(
j
)
==
edge
[
0
])
break
;
break
;
for
(
k
=
0
;
k
<
n_vertices
;
k
++
)
for
(
k
=
0
;
k
<
nVertices
;
k
++
)
if
(
neigh
->
getDof
(
k
)
==
edge
[
1
])
if
(
neigh
->
getDof
(
k
)
==
edge
[
1
])
break
;
break
;
if
(
j
>
3
||
k
>
3
)
{
// === If one of the edge DOFs was not found, try to make use of periodic ===
for
(
j
=
0
;
j
<
n_vertices
;
j
++
)
// === DOF associations. First, use the direct associations between DOFs. ===
// === If this will not work, continue with testing on indirect ===
// === associations. ===
if
(
j
>=
nVertices
)
{
for
(
j
=
0
;
j
<
nVertices
;
j
++
)
if
(
mesh
->
associated
(
neigh
->
getDof
(
j
,
0
),
edge
[
0
][
0
]))
if
(
mesh
->
associated
(
neigh
->
getDof
(
j
,
0
),
edge
[
0
][
0
]))
break
;
break
;
for
(
k
=
0
;
k
<
n_vertices
;
k
++
)
if
(
j
>=
nVertices
)
for
(
j
=
0
;
j
<
nVertices
;
j
++
)
if
(
mesh
->
indirectlyAssociated
(
neigh
->
getDof
(
j
,
0
),
edge
[
0
][
0
]))
break
;
TEST_EXIT_DBG
(
j
<
nVertices
)
(
"Process element %d: DOF %d not found on element %d with nodes (%d %d %d %d)
\n
"
,
el
->
getIndex
(),
edge
[
0
][
0
],
neigh
->
getIndex
(),
neigh
->
getDof
(
0
,
0
),
neigh
->
getDof
(
1
,
0
),
neigh
->
getDof
(
2
,
0
),
neigh
->
getDof
(
3
,
0
));
}
if
(
k
>=
nVertices
)
{
for
(
k
=
0
;
k
<
nVertices
;
k
++
)
if
(
mesh
->
associated
(
neigh
->
getDof
(
k
,
0
),
edge
[
1
][
0
]))
if
(
mesh
->
associated
(
neigh
->
getDof
(
k
,
0
),
edge
[
1
][
0
]))
break
;
break
;
if
(
k
>=
nVertices
)
for
(
k
=
0
;
k
<
nVertices
;
k
++
)
if
(
mesh
->
indirectlyAssociated
(
neigh
->
getDof
(
k
,
0
),
edge
[
1
][
0
]))
break
;
TEST_EXIT_DBG
(
j
<
n_vertices
)
TEST_EXIT_DBG
(
k
<
nVertices
)
(
"dof %d not found on element %d with nodes (%d %d %d %d)
\n
"
,
(
"Process element %d: DOF %d not found on element %d with nodes (%d %d %d %d)
\n
"
,
edge
[
0
][
0
],
neigh
->
getIndex
(),
neigh
->
getDof
(
0
,
0
),
el
->
getIndex
(),
edge
[
1
][
0
],
neigh
->
getIndex
(),
neigh
->
getDof
(
0
,
0
),
neigh
->
getDof
(
1
,
0
),
neigh
->
getDof
(
2
,
0
),
neigh
->
getDof
(
3
,
0
));
TEST_EXIT_DBG
(
k
<
n_vertices
)
(
"dof %d not found on element %d with nodes (%d %d %d %d)
\n
"
,
edge
[
1
][
0
],
neigh
->
getIndex
(),
neigh
->
getDof
(
0
,
0
),
neigh
->
getDof
(
1
,
0
),
neigh
->
getDof
(
2
,
0
),
neigh
->
getDof
(
3
,
0
));
neigh
->
getDof
(
1
,
0
),
neigh
->
getDof
(
2
,
0
),
neigh
->
getDof
(
3
,
0
));
}
}
edge_no
=
Tetrahedron
::
edgeOfDofs
[
j
][
k
];
coarsenList
.
setCoarsePatch
(
*
n_neigh
,
edge_no
==
0
);
/****************************************************************************/
int
edgeNo
=
Tetrahedron
::
edgeOfDofs
[
j
][
k
];
/* get the direction of the next neighbour */
coarsenList
.
setCoarsePatch
(
*
n_neigh
,
edgeNo
==
0
);
/****************************************************************************/
// === Get the direction of the next neighbour. ===
if
(
next_el
[
edge
_n
o
][
0
]
!=
opp_v
)
if
(
next_el
[
edge
N
o
][
0
]
!=
opp_v
)
i
=
next_el
[
edge
_n
o
][
0
];
i
=
next_el
[
edge
N
o
][
0
];
else
else
i
=
next_el
[
edge
_n
o
][
1
];
i
=
next_el
[
edge
N
o
][
1
];
++*
n_neigh
;
++*
n_neigh
;
...
@@ -383,7 +407,7 @@ namespace AMDiS {
...
@@ -383,7 +407,7 @@ namespace AMDiS {
/* the domain's boundary is reached; loop back to the starting el */
/* the domain's boundary is reached; loop back to the starting el */
/****************************************************************************/
/****************************************************************************/
i
=
*
n_neigh
-
1
;
int
i
=
*
n_neigh
-
1
;
opp_v
=
coarsenList
.
getOppVertex
(
i
,
0
);
opp_v
=
coarsenList
.
getOppVertex
(
i
,
0
);
do
{
do
{
TEST_EXIT_DBG
(
neigh_info
->
getNeighbour
(
opp_v
)
&&
i
>
0
)
TEST_EXIT_DBG
(
neigh_info
->
getNeighbour
(
opp_v
)
&&
i
>
0
)
...
...
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