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
746b26ef
Commit
746b26ef
authored
16 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
* Removed not required code from traverse
parent
5f346ca0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AMDiS/src/Traverse.cc
+0
-26
0 additions, 26 deletions
AMDiS/src/Traverse.cc
AMDiS/src/Traverse.h
+28
-103
28 additions, 103 deletions
AMDiS/src/Traverse.h
with
28 additions
and
129 deletions
AMDiS/src/Traverse.cc
+
0
−
26
View file @
746b26ef
...
@@ -361,10 +361,6 @@ namespace AMDiS {
...
@@ -361,10 +361,6 @@ namespace AMDiS {
((
info_stack
[
stack_used
]
>=
2
)
||
(
el
->
getFirstChild
()
==
NULL
)))
{
((
info_stack
[
stack_used
]
>=
2
)
||
(
el
->
getFirstChild
()
==
NULL
)))
{
stack_used
--
;
stack_used
--
;
el
=
elinfo_stack
[
stack_used
]
->
getElement
();
el
=
elinfo_stack
[
stack_used
]
->
getElement
();
if
(
calcDisplacement
)
{
displacementStack
.
pop
();
}
}
}
/* goto next macro element */
/* goto next macro element */
...
@@ -401,15 +397,6 @@ namespace AMDiS {
...
@@ -401,15 +397,6 @@ namespace AMDiS {
elinfo_stack
[
stack_used
+
1
]
->
fillElInfo
(
i
,
elinfo_stack
[
stack_used
]);
elinfo_stack
[
stack_used
+
1
]
->
fillElInfo
(
i
,
elinfo_stack
[
stack_used
]);
stack_used
++
;
stack_used
++
;
if
(
calcDisplacement
)
{
if
(
i
==
0
)
{
displacementStack
.
push
(
displacementStack
.
top
()
*
2
);
}
else
{
displacementStack
.
push
(
displacementStack
.
top
()
*
2
+
1
);
}
}
TEST_EXIT_DBG
(
stack_used
<
stack_size
)
TEST_EXIT_DBG
(
stack_used
<
stack_size
)
(
"stack_size=%d too small, level=(%d,%d)
\n
"
,
(
"stack_size=%d too small, level=(%d,%d)
\n
"
,
stack_size
,
elinfo_stack
[
stack_used
]
->
getLevel
());
stack_size
,
elinfo_stack
[
stack_used
]
->
getLevel
());
...
@@ -417,9 +404,6 @@ namespace AMDiS {
...
@@ -417,9 +404,6 @@ namespace AMDiS {
info_stack
[
stack_used
]
=
0
;
info_stack
[
stack_used
]
=
0
;
}
}
if
(
calcDisplacement
)
{
}
return
elinfo_stack
[
stack_used
];
return
elinfo_stack
[
stack_used
];
}
}
...
@@ -1101,14 +1085,4 @@ namespace AMDiS {
...
@@ -1101,14 +1085,4 @@ namespace AMDiS {
}
}
}
}
void
TraverseStack
::
startDisplacementCalculation
(
int
level
)
{
calcDisplacement
=
true
;
displacementStack
.
empty
();
for
(
int
i
=
0
;
i
<=
elinfo_stack
[
stack_used
]
->
getLevel
()
-
level
;
i
++
)
{
displacementStack
.
push
(
0
);
}
}
}
}
This diff is collapsed.
Click to expand it.
AMDiS/src/Traverse.h
+
28
−
103
View file @
746b26ef
...
@@ -71,7 +71,6 @@ namespace AMDiS {
...
@@ -71,7 +71,6 @@ namespace AMDiS {
stack_size
(
0
),
stack_size
(
0
),
stack_used
(
0
),
stack_used
(
0
),
save_stack_used
(
0
),
save_stack_used
(
0
),
calcDisplacement
(
false
),
myThreadId_
(
0
),
myThreadId_
(
0
),
maxThreads_
(
1
)
maxThreads_
(
1
)
{
{
...
@@ -105,71 +104,39 @@ namespace AMDiS {
...
@@ -105,71 +104,39 @@ namespace AMDiS {
*/
*/
ElInfo
*
traverseNext
(
ElInfo
*
elinfo_old
);
ElInfo
*
traverseNext
(
ElInfo
*
elinfo_old
);
/** \brief
/// Returns the neighbour-th neighbour of elInfoOld
* Returns the neighbour-th neighbour of elInfoOld
*/
ElInfo
*
traverseNeighbour
(
ElInfo
*
elInfoOld
,
int
neighbour
);
ElInfo
*
traverseNeighbour
(
ElInfo
*
elInfoOld
,
int
neighbour
);
/** \brief
/// Returns the neighbour-th neighbour of elInfoOld
* Returns the neighbour-th neighbour of elInfoOld
*/
ElInfo
*
traverseNeighbour3d
(
ElInfo
*
elInfoOld
,
int
neighbour
);
ElInfo
*
traverseNeighbour3d
(
ElInfo
*
elInfoOld
,
int
neighbour
);
/** \brief
/// Returns the neighbour-th neighbour of elInfoOld
* Returns the neighbour-th neighbour of elInfoOld
*/
ElInfo
*
traverseNeighbour2d
(
ElInfo
*
elInfoOld
,
int
neighbour
);
ElInfo
*
traverseNeighbour2d
(
ElInfo
*
elInfoOld
,
int
neighbour
);
/** \brief
/// Not yet implemented
* Not yet implemented
*/
ElInfo
*
traverseMultiGridLevel
();
ElInfo
*
traverseMultiGridLevel
();
/** \brief
/// Preorder traversal of all elements
* Preorder traversal of all elements
*/
ElInfo
*
traverseEveryElementPreorder
();
ElInfo
*
traverseEveryElementPreorder
();
/** \brief
/// Inorder traversal of all elements
* Inorder traversal of all elements
*/
ElInfo
*
traverseEveryElementInorder
();
ElInfo
*
traverseEveryElementInorder
();
/** \brief
/// Postorder traversal of all elements
* Postorder traversal of all elements
*/
ElInfo
*
traverseEveryElementPostorder
();
ElInfo
*
traverseEveryElementPostorder
();
/** \brief
/// Only for 3d: Calls update of all ElInfo3d onjects in \ref elinfo_stack
* Only for 3d: Calls update of all ElInfo3d onjects in \ref elinfo_stack
*/
void
update
();
void
update
();
void
getCoordsInElem
(
const
ElInfo
*
upperElInfo
,
void
getCoordsInElem
(
const
ElInfo
*
upperElInfo
,
DimMat
<
double
>
*
coords
);
DimMat
<
double
>
*
coords
);
/** \brief
/// Is used for parallel mesh traverse.
* Starts the calculation of the displacement relative to given level.
*/
void
startDisplacementCalculation
(
int
level
);
/** \brief
* Stops the calculation of displacement information.
*/
void
stopDisplacementCalculation
()
{
calcDisplacement
=
false
;
}
/** \brief
* Is used for parallel mesh traverse.
*/
inline
void
setMyThreadId
(
int
myThreadId
)
{
inline
void
setMyThreadId
(
int
myThreadId
)
{
myThreadId_
=
myThreadId
;
myThreadId_
=
myThreadId
;
}
}
/** \brief
/// Is used for parallel mesh traverse.
* Is used for parallel mesh traverse.
*/
inline
void
setMaxThreads
(
int
maxThreads
)
{
inline
void
setMaxThreads
(
int
maxThreads
)
{
maxThreads_
=
maxThreads
;
maxThreads_
=
maxThreads
;
}
}
...
@@ -182,24 +149,16 @@ namespace AMDiS {
...
@@ -182,24 +149,16 @@ namespace AMDiS {
}
}
private
:
private
:
/** \brief
/// Enlargement of the stack
* Enlargement of the stack
*/
void
enlargeTraverseStack
();
void
enlargeTraverseStack
();
/** \brief
/// Used by \ref traverseFirst() \ref traverseNext()
* Used by \ref traverseFirst() \ref traverseNext()
*/
ElInfo
*
traverseLeafElement
();
ElInfo
*
traverseLeafElement
();
/** \brief
/// Used by \ref traverseFirst() \ref traverseNext()
* Used by \ref traverseFirst() \ref traverseNext()
*/
ElInfo
*
traverseLeafElementLevel
();
ElInfo
*
traverseLeafElementLevel
();
/** \brief
/// Used by \ref traverseFirst() \ref traverseNext()
* Used by \ref traverseFirst() \ref traverseNext()
*/
ElInfo
*
traverseElementLevel
();
ElInfo
*
traverseElementLevel
();
/** \brief
/** \brief
...
@@ -221,14 +180,10 @@ namespace AMDiS {
...
@@ -221,14 +180,10 @@ namespace AMDiS {
}
}
private
:
private
:
/** \brief
/// Iterator to the current MacroElement
* Iterator to the current MacroElement
*/
std
::
deque
<
MacroElement
*>::
const_iterator
currentMacro
;
std
::
deque
<
MacroElement
*>::
const_iterator
currentMacro
;
/** \brief
/// Mesh which is currently traversed
* Mesh which is currently traversed
*/
Mesh
*
traverse_mesh
;
Mesh
*
traverse_mesh
;
/** \brief
/** \brief
...
@@ -243,24 +198,16 @@ namespace AMDiS {
...
@@ -243,24 +198,16 @@ namespace AMDiS {
*/
*/
Flag
traverse_fill_flag
;
Flag
traverse_fill_flag
;
/** \brief
/// current macro element
* current macro element
*/
const
MacroElement
*
traverse_mel
;
const
MacroElement
*
traverse_mel
;
/** \brief
/// Current size of the stack
* Current size of the stack
*/
int
stack_size
;
int
stack_size
;
/** \brief
/// Used size of the stack
* Used size of the stack
*/
int
stack_used
;
int
stack_used
;
/** \brief
///
*
*/
std
::
vector
<
ElInfo
*>
elinfo_stack
;
std
::
vector
<
ElInfo
*>
elinfo_stack
;
/** \brief
/** \brief
...
@@ -271,41 +218,21 @@ namespace AMDiS {
...
@@ -271,41 +218,21 @@ namespace AMDiS {
* visited.
* visited.
*/
*/
std
::
vector
<
int
>
info_stack
;
std
::
vector
<
int
>
info_stack
;
/** \brief
///
*
*/
const
MacroElement
*
save_traverse_mel
;
const
MacroElement
*
save_traverse_mel
;
/** \brief
///
*
*/
std
::
vector
<
ElInfo
*>
save_elinfo_stack
;
std
::
vector
<
ElInfo
*>
save_elinfo_stack
;
/** \brief
///
*
*/
std
::
vector
<
unsigned
char
>
save_info_stack
;
std
::
vector
<
unsigned
char
>
save_info_stack
;
/** \brief
///
*
*/
int
save_stack_used
;
int
save_stack_used
;
/** \brief
*
*/
int
id
;
/** \brief
* Stack for counting the deplacement information for dual traverse.
*/
std
::
stack
<
int
>
displacementStack
;
/** \brief
///
* True, if \ref displacementStack should be calculated.
int
id
;
*/
bool
calcDisplacement
;
/** \brief
/** \brief
* Is used for parallel mesh traverse. The thread with the id
* Is used for parallel mesh traverse. The thread with the id
...
@@ -352,9 +279,7 @@ namespace AMDiS {
...
@@ -352,9 +279,7 @@ namespace AMDiS {
TEST_EXIT
(
m
)(
"No traverse without mesh!
\n
"
);
TEST_EXIT
(
m
)(
"No traverse without mesh!
\n
"
);
}
}
/** \brief
/// Performs the recursive traversal
* Performs the recursive traversal
*/
int
recursive
(
ElInfoStack
*
);
int
recursive
(
ElInfoStack
*
);
private
:
private
:
...
...
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