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
Backofen, Rainer
amdis
Commits
3f1c87ca
Commit
3f1c87ca
authored
Apr 11, 2011
by
Thomas Witkowski
Browse files
Added some new debug functions.
parent
147d0144
Changes
4
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/AdaptInstationary.cc
View file @
3f1c87ca
...
@@ -154,15 +154,15 @@ namespace AMDiS {
...
@@ -154,15 +154,15 @@ namespace AMDiS {
problemIteration
->
oneIteration
(
adaptInfo
,
NO_ADAPTION
);
problemIteration
->
oneIteration
(
adaptInfo
,
NO_ADAPTION
);
adaptInfo
->
incTimestepIteration
();
adaptInfo
->
incTimestepIteration
();
if
(
!
fixedTimestep
&&
if
(
!
fixedTimestep
&&
!
adaptInfo
->
timeToleranceReached
()
&&
!
adaptInfo
->
timeToleranceReached
()
&&
adaptInfo
->
getTimestepIteration
()
<=
adaptInfo
->
getMaxTimestepIteration
()
&&
adaptInfo
->
getTimestepIteration
()
<=
adaptInfo
->
getMaxTimestepIteration
()
&&
!
(
adaptInfo
->
getTimestep
()
<=
adaptInfo
->
getMinTimestep
()))
{
!
(
adaptInfo
->
getTimestep
()
<=
adaptInfo
->
getMinTimestep
()))
{
adaptInfo
->
setTime
(
adaptInfo
->
getTime
()
-
adaptInfo
->
getTimestep
());
adaptInfo
->
setTime
(
adaptInfo
->
getTime
()
-
adaptInfo
->
getTimestep
());
adaptInfo
->
setTimestep
(
adaptInfo
->
getTimestep
()
*
timeDelta1
);
adaptInfo
->
setTimestep
(
adaptInfo
->
getTimestep
()
*
timeDelta1
);
continue
;
continue
;
}
}
...
...
AMDiS/src/Debug.cc
View file @
3f1c87ca
...
@@ -136,6 +136,24 @@ namespace AMDiS {
...
@@ -136,6 +136,24 @@ namespace AMDiS {
}
}
void
colorMeshByMacroIndex
(
Mesh
*
mesh
,
std
::
string
filename
)
{
FUNCNAME
(
"debug::colorMeshByMacroIndex()"
);
std
::
map
<
int
,
double
>
vec
;
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
mesh
,
-
1
,
Mesh
::
CALL_LEAF_EL
);
while
(
elInfo
)
{
int
index
=
elInfo
->
getElement
()
->
getIndex
();
vec
[
index
]
=
elInfo
->
getMacroElement
()
->
getIndex
();
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
ElementFileWriter
::
writeFile
(
vec
,
mesh
,
filename
);
}
void
colorDofVectorByLocalElementDofs
(
DOFVector
<
double
>&
vec
,
Element
*
el
)
void
colorDofVectorByLocalElementDofs
(
DOFVector
<
double
>&
vec
,
Element
*
el
)
{
{
// === Get local indices of the given element. ===
// === Get local indices of the given element. ===
...
...
AMDiS/src/Debug.h
View file @
3f1c87ca
...
@@ -84,6 +84,8 @@ namespace AMDiS {
...
@@ -84,6 +84,8 @@ namespace AMDiS {
void
highlightElementIndexMesh
(
Mesh
*
mesh
,
int
idx
,
std
::
string
filename
);
void
highlightElementIndexMesh
(
Mesh
*
mesh
,
int
idx
,
std
::
string
filename
);
void
colorMeshByMacroIndex
(
Mesh
*
mesh
,
std
::
string
filename
);
void
colorDofVectorByLocalElementDofs
(
DOFVector
<
double
>&
vec
,
Element
*
el
);
void
colorDofVectorByLocalElementDofs
(
DOFVector
<
double
>&
vec
,
Element
*
el
);
bool
colorDofVectorByLocalElementDofs
(
DOFVector
<
double
>&
vec
,
bool
colorDofVectorByLocalElementDofs
(
DOFVector
<
double
>&
vec
,
...
...
AMDiS/src/Marker.cc
View file @
3f1c87ca
...
@@ -72,6 +72,8 @@ namespace AMDiS {
...
@@ -72,6 +72,8 @@ namespace AMDiS {
void
Marker
::
markElement
(
AdaptInfo
*
adaptInfo
,
ElInfo
*
elInfo
)
void
Marker
::
markElement
(
AdaptInfo
*
adaptInfo
,
ElInfo
*
elInfo
)
{
{
FUNCNAME
(
"Marker::markElement()"
);
Element
*
el
=
elInfo
->
getElement
();
Element
*
el
=
elInfo
->
getElement
();
double
lError
=
el
->
getEstimation
(
row
);
double
lError
=
el
->
getEstimation
(
row
);
...
...
Write
Preview
Supports
Markdown
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