Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backofen, Rainer
amdis
Commits
43b8af78
Commit
43b8af78
authored
Jul 13, 2010
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new debug function.
parent
cbc573e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
AMDiS/src/Debug.cc
AMDiS/src/Debug.cc
+36
-4
AMDiS/src/Debug.h
AMDiS/src/Debug.h
+2
-0
No files found.
AMDiS/src/Debug.cc
View file @
43b8af78
...
...
@@ -87,15 +87,15 @@ namespace AMDiS {
int
markLevel
=
-
1
;
while
(
elInfo
)
{
if
(
markChildren
&&
elInfo
->
getLevel
()
<=
markLevel
)
markChildren
=
false
;
int
index
=
elInfo
->
getElement
()
->
getIndex
();
if
(
index
==
idx
)
{
markChildren
=
true
;
markLevel
=
elInfo
->
getLevel
();
}
if
(
markChildren
&&
elInfo
->
getLevel
()
<
markLevel
)
markChildren
=
false
;
if
(
elInfo
->
getElement
()
->
isLeaf
())
vec
[
index
]
=
(
markChildren
?
1.0
:
0.0
);
...
...
@@ -438,6 +438,38 @@ namespace AMDiS {
}
void
printElementHierarchie
(
Mesh
*
mesh
,
int
elIndex
)
{
FUNCNAME
(
"debug::printElementHierarchie()"
);
bool
printInfo
=
false
;
int
elLevel
=
-
1
;
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
mesh
,
-
1
,
Mesh
::
CALL_EVERY_EL_PREORDER
);
while
(
elInfo
)
{
if
(
printInfo
&&
elInfo
->
getLevel
()
<=
elLevel
)
return
;
if
(
elInfo
->
getElement
()
->
getIndex
()
==
elIndex
)
{
printInfo
=
true
;
elLevel
=
elInfo
->
getLevel
();
MSG
(
" Hierarchie for elIdx = %d
\n
"
,
elIndex
);
}
else
{
if
(
printInfo
)
{
std
::
stringstream
oss
;
for
(
int
i
=
0
;
i
<
(
elInfo
->
getLevel
()
-
elLevel
);
i
++
)
oss
<<
" "
;
oss
<<
"|--"
<<
elInfo
->
getElement
()
->
getIndex
();
MSG
(
"%s
\n
"
,
oss
.
str
().
c_str
());
}
}
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
}
void
createSortedDofs
(
Mesh
*
mesh
,
ElementIdxToDofs
&
elMap
)
{
FUNCNAME
(
"debug::dbgCreateElementMap()"
);
...
...
AMDiS/src/Debug.h
View file @
43b8af78
...
...
@@ -133,6 +133,8 @@ namespace AMDiS {
void
writeCoordsFile
(
const
FiniteElemSpace
*
feSpace
,
std
::
string
filename
);
void
printElementHierarchie
(
Mesh
*
mesh
,
int
elIndex
);
/** \brief
* Traverse a mesh and store for each element all its vertex DOFs in local sorted
* order (by values).
...
...
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