Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Aland, Sebastian
amdis
Commits
42521b59
Commit
42521b59
authored
May 20, 2008
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Introduction of TEST_EXIT_DBG
parent
e6a9f68e
Changes
64
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
64 changed files
with
1107 additions
and
1685 deletions
+1107
-1685
AMDiS/bin/Makefile.am
AMDiS/bin/Makefile.am
+1
-1
AMDiS/bin/Makefile.in
AMDiS/bin/Makefile.in
+1
-1
AMDiS/src/Assembler.cc
AMDiS/src/Assembler.cc
+2
-2
AMDiS/src/Assembler.h
AMDiS/src/Assembler.h
+4
-5
AMDiS/src/CoarseningManager1d.h
AMDiS/src/CoarseningManager1d.h
+1
-4
AMDiS/src/CoarseningManager2d.cc
AMDiS/src/CoarseningManager2d.cc
+36
-40
AMDiS/src/CoarseningManager3d.cc
AMDiS/src/CoarseningManager3d.cc
+11
-38
AMDiS/src/CoarseningManager3d.h
AMDiS/src/CoarseningManager3d.h
+1
-4
AMDiS/src/ConditionalEstimator.cc
AMDiS/src/ConditionalEstimator.cc
+4
-4
AMDiS/src/ConditionalMarker.h
AMDiS/src/ConditionalMarker.h
+4
-12
AMDiS/src/DOFAdmin.cc
AMDiS/src/DOFAdmin.cc
+40
-39
AMDiS/src/DOFMatrix.cc
AMDiS/src/DOFMatrix.cc
+17
-51
AMDiS/src/DOFMatrix.h
AMDiS/src/DOFMatrix.h
+6
-6
AMDiS/src/DOFVector.cc
AMDiS/src/DOFVector.cc
+22
-23
AMDiS/src/DOFVector.h
AMDiS/src/DOFVector.h
+8
-6
AMDiS/src/DOFVector.hh
AMDiS/src/DOFVector.hh
+205
-452
AMDiS/src/DiagonalPreconditioner.cc
AMDiS/src/DiagonalPreconditioner.cc
+22
-25
AMDiS/src/DirichletBC.cc
AMDiS/src/DirichletBC.cc
+2
-2
AMDiS/src/DualTraverse.cc
AMDiS/src/DualTraverse.cc
+4
-4
AMDiS/src/ElInfo.cc
AMDiS/src/ElInfo.cc
+2
-2
AMDiS/src/ElInfo1d.cc
AMDiS/src/ElInfo1d.cc
+12
-13
AMDiS/src/ElInfo2d.cc
AMDiS/src/ElInfo2d.cc
+12
-14
AMDiS/src/ElInfo3d.cc
AMDiS/src/ElInfo3d.cc
+15
-18
AMDiS/src/Element.cc
AMDiS/src/Element.cc
+6
-5
AMDiS/src/Element.h
AMDiS/src/Element.h
+9
-9
AMDiS/src/ElementData.cc
AMDiS/src/ElementData.cc
+2
-2
AMDiS/src/ElementFileWriter.cc
AMDiS/src/ElementFileWriter.cc
+0
-3
AMDiS/src/Estimator.cc
AMDiS/src/Estimator.cc
+27
-28
AMDiS/src/FixVec.h
AMDiS/src/FixVec.h
+16
-20
AMDiS/src/FixVec.hh
AMDiS/src/FixVec.hh
+4
-4
AMDiS/src/Global.cc
AMDiS/src/Global.cc
+2
-2
AMDiS/src/Global.h
AMDiS/src/Global.h
+16
-1
AMDiS/src/InterpolRestrictMatrix.cc
AMDiS/src/InterpolRestrictMatrix.cc
+6
-6
AMDiS/src/Lagrange.cc
AMDiS/src/Lagrange.cc
+33
-33
AMDiS/src/LeafData.cc
AMDiS/src/LeafData.cc
+175
-335
AMDiS/src/LeafData.h
AMDiS/src/LeafData.h
+0
-9
AMDiS/src/Line.h
AMDiS/src/Line.h
+4
-4
AMDiS/src/MacroElement.cc
AMDiS/src/MacroElement.cc
+8
-5
AMDiS/src/MacroReader.cc
AMDiS/src/MacroReader.cc
+62
-38
AMDiS/src/MatVecMultiplier.cc
AMDiS/src/MatVecMultiplier.cc
+6
-6
AMDiS/src/MatrixVector.h
AMDiS/src/MatrixVector.h
+12
-12
AMDiS/src/MemoryManager.h
AMDiS/src/MemoryManager.h
+3
-3
AMDiS/src/Mesh.cc
AMDiS/src/Mesh.cc
+17
-15
AMDiS/src/MeshStructure.cc
AMDiS/src/MeshStructure.cc
+6
-6
AMDiS/src/MpCCIAdapter.cc
AMDiS/src/MpCCIAdapter.cc
+86
-109
AMDiS/src/MultiGridSolver.cc
AMDiS/src/MultiGridSolver.cc
+4
-4
AMDiS/src/Parameters.h
AMDiS/src/Parameters.h
+6
-2
AMDiS/src/PeriodicBC.cc
AMDiS/src/PeriodicBC.cc
+5
-92
AMDiS/src/ProblemInstat.h
AMDiS/src/ProblemInstat.h
+13
-7
AMDiS/src/ProblemVec.h
AMDiS/src/ProblemVec.h
+7
-0
AMDiS/src/QPInfo.cc
AMDiS/src/QPInfo.cc
+7
-7
AMDiS/src/QPsiPhi.cc
AMDiS/src/QPsiPhi.cc
+13
-13
AMDiS/src/Quadrature.h
AMDiS/src/Quadrature.h
+12
-43
AMDiS/src/Recovery.cc
AMDiS/src/Recovery.cc
+15
-12
AMDiS/src/RefinementManager2d.cc
AMDiS/src/RefinementManager2d.cc
+4
-4
AMDiS/src/RefinementManager3d.cc
AMDiS/src/RefinementManager3d.cc
+8
-8
AMDiS/src/SparseVector.h
AMDiS/src/SparseVector.h
+1
-1
AMDiS/src/SubQuadrature.h
AMDiS/src/SubQuadrature.h
+10
-8
AMDiS/src/SystemVector.h
AMDiS/src/SystemVector.h
+23
-22
AMDiS/src/Tetrahedron.cc
AMDiS/src/Tetrahedron.cc
+2
-2
AMDiS/src/Tetrahedron.h
AMDiS/src/Tetrahedron.h
+15
-9
AMDiS/src/Traverse.cc
AMDiS/src/Traverse.cc
+23
-23
AMDiS/src/Triangle.cc
AMDiS/src/Triangle.cc
+1
-1
AMDiS/src/Triangle.h
AMDiS/src/Triangle.h
+6
-6
No files found.
AMDiS/bin/Makefile.am
View file @
42521b59
...
...
@@ -38,7 +38,7 @@ INCLUDES = $(AMDIS_INCLUDES) $(PARALLEL_INCLUDES)
if
AMDIS_DEBUG
libamdis_la_CXXFLAGS
+=
-g
-O0
-Wall
-DDEBUG
=
1
$(OPENMP_FLAG)
-ftemplate-depth-30
$(INCLUDES)
#-pedantic
else
libamdis_la_CXXFLAGS
+=
-O
3
-Wall
-DDEBUG
=
0
$(OPENMP_FLAG)
-ftemplate-depth-30
$(INCLUDES)
#-pedantic
libamdis_la_CXXFLAGS
+=
-O
2
-Wall
-DDEBUG
=
0
$(OPENMP_FLAG)
-ftemplate-depth-30
$(INCLUDES)
#-pedantic
endif
...
...
AMDiS/bin/Makefile.in
View file @
42521b59
...
...
@@ -42,7 +42,7 @@ host_triplet = @host@
@ENABLE_UMFPACK_TRUE@
-I
$(LIB_DIR)
/UMFPACK/Include
@AMDIS_DEBUG_TRUE@
am__append_3
=
-g
-O0
-Wall
-DDEBUG
=
1
$(OPENMP_FLAG)
-ftemplate-depth-30
$(INCLUDES)
#-pedantic
@AMDIS_DEBUG_FALSE@
am__append_4
=
-O
3
-Wall
-DDEBUG
=
0
$(OPENMP_FLAG)
-ftemplate-depth-30
$(INCLUDES)
#-pedantic
@AMDIS_DEBUG_FALSE@
am__append_4
=
-O
2
-Wall
-DDEBUG
=
0
$(OPENMP_FLAG)
-ftemplate-depth-30
$(INCLUDES)
#-pedantic
subdir
=
bin
DIST_COMMON
=
$(srcdir)
/Makefile.am
$(srcdir)
/Makefile.in
ACLOCAL_M4
=
$(top_srcdir)
/aclocal.m4
...
...
AMDiS/src/Assembler.cc
View file @
42521b59
...
...
@@ -150,7 +150,7 @@ namespace AMDiS {
const
DOFVectorBase
<
double
>*
vec
=
dv
?
dv
:
owner
->
operat
->
getUhOld
();
TEST_EXIT
(
vec
)(
"no dof vector!
\n
"
);
TEST_EXIT
_DBG
(
vec
)(
"no dof vector!
\n
"
);
if
(
valuesAtQPs
[
vec
]
&&
valuesAtQPs
[
vec
]
->
valid
)
return
valuesAtQPs
[
vec
]
->
values
.
getValArray
();
...
...
@@ -206,7 +206,7 @@ namespace AMDiS {
const
DOFVectorBase
<
double
>*
vec
=
dv
?
dv
:
owner
->
operat
->
getUhOld
();
TEST_EXIT
(
vec
)(
"no dof vector!
\n
"
);
TEST_EXIT
_DBG
(
vec
)(
"no dof vector!
\n
"
);
if
(
gradientsAtQPs
[
vec
]
&&
gradientsAtQPs
[
vec
]
->
valid
)
return
gradientsAtQPs
[
vec
]
->
values
.
getValArray
();
...
...
AMDiS/src/Assembler.h
View file @
42521b59
...
...
@@ -132,7 +132,6 @@ namespace AMDiS {
* Sets \ref quadrature to q.
*/
inline
void
setQuadrature
(
Quadrature
*
q
)
{
/* TEST_EXIT(!quadrature)("quadrature already set\n"); */
quadrature
=
q
;
};
...
...
@@ -1015,22 +1014,22 @@ namespace AMDiS {
Quadrature
*
quad1GrdPhi
,
Quadrature
*
quad0
)
{
if
(
secondOrderAssembler
)
{
if
(
secondOrderAssembler
)
{
TEST_EXIT
(
!
secondOrderAssembler
->
getQuadrature
())
(
"quadrature already existing
\n
"
);
secondOrderAssembler
->
setQuadrature
(
quad2
);
}
if
(
firstOrderAssemblerGrdPsi
)
{
if
(
firstOrderAssemblerGrdPsi
)
{
TEST_EXIT
(
!
firstOrderAssemblerGrdPsi
->
getQuadrature
())
(
"quadrature already existing
\n
"
);
firstOrderAssemblerGrdPsi
->
setQuadrature
(
quad1GrdPsi
);
}
if
(
firstOrderAssemblerGrdPhi
)
{
if
(
firstOrderAssemblerGrdPhi
)
{
TEST_EXIT
(
!
firstOrderAssemblerGrdPhi
->
getQuadrature
())
(
"quadrature already existing
\n
"
);
firstOrderAssemblerGrdPhi
->
setQuadrature
(
quad1GrdPhi
);
}
if
(
zeroOrderAssembler
)
{
if
(
zeroOrderAssembler
)
{
TEST_EXIT
(
!
zeroOrderAssembler
->
getQuadrature
())
(
"quadrature already existing
\n
"
);
zeroOrderAssembler
->
setQuadrature
(
quad0
);
...
...
AMDiS/src/CoarseningManager1d.h
View file @
42521b59
...
...
@@ -43,10 +43,7 @@ namespace AMDiS {
/** \brief
* Calls base class constructor and checks dimension of mesh.
*/
CoarseningManager1d
()
:
CoarseningManager
()
{
// FUNCNAME("CoarseningManager1d::CoarseningManager1d");
// TEST_EXIT(mesh->getDim()==1)("mesh->dim != 1\n");
};
CoarseningManager1d
()
:
CoarseningManager
()
{};
/** \brief
* destructor
...
...
AMDiS/src/CoarseningManager2d.cc
View file @
42521b59
...
...
@@ -25,7 +25,7 @@ namespace AMDiS {
child
[
0
]
=
dynamic_cast
<
Triangle
*>
(
const_cast
<
Element
*>
(
el
->
getChild
(
0
)));
child
[
1
]
=
dynamic_cast
<
Triangle
*>
(
const_cast
<
Element
*>
(
el
->
getChild
(
1
)));
TEST_EXIT
(
child
[
0
]
->
getMark
()
<
0
&&
child
[
1
]
->
getMark
()
<
0
)
TEST_EXIT
_DBG
(
child
[
0
]
->
getMark
()
<
0
&&
child
[
1
]
->
getMark
()
<
0
)
(
"element %d with children[%d,%d] must not be coarsend!
\n
"
,
el
->
getIndex
(),
child
[
0
]
->
getIndex
(),
child
[
1
]
->
getIndex
());
...
...
@@ -202,57 +202,53 @@ namespace AMDiS {
int
CoarseningManager2d
::
coarsenFunction
(
ElInfo
*
el_info
)
{
Triangle
*
el
=
dynamic_cast
<
Triangle
*>
(
const_cast
<
Element
*>
(
el_info
->
getElement
()));
Triangle
*
el
=
dynamic_cast
<
Triangle
*>
(
const_cast
<
Element
*>
(
el_info
->
getElement
()));
DegreeOfFreedom
*
edge
[
2
];
int
n_neigh
,
bound
=
0
;
int
n_neigh
,
bound
=
0
;
RCNeighbourList
coarse_list
(
2
);
coarse_list
.
setCoarseningManager
(
this
);
if
(
el
->
getMark
()
>=
0
)
return
0
;
// el must not be coarsend, return
if
(
!
(
el
->
getChild
(
0
)))
return
0
;
// single leaves don't get coarsened
if
(
el
->
getChild
(
0
)
->
getMark
()
>=
0
||
el
->
getChild
(
1
)
->
getMark
()
>=
0
)
{
/****************************************************************************/
/* one of the children must not be coarsend; return :-( */
/****************************************************************************/
el
->
setMark
(
0
);
return
0
;
}
if
(
el
->
getMark
()
>=
0
)
return
0
;
// el must not be coarsend, return
if
(
!
(
el
->
getChild
(
0
)))
return
0
;
// single leaves don't get coarsened
if
(
el
->
getChild
(
0
)
->
getMark
()
>=
0
||
el
->
getChild
(
1
)
->
getMark
()
>=
0
)
{
/****************************************************************************/
/* one of the children must not be coarsend; return :-( */
/****************************************************************************/
el
->
setMark
(
0
);
return
0
;
}
if
(
!
el
->
getChild
(
0
)
->
isLeaf
()
||
!
el
->
getChild
(
1
)
->
isLeaf
())
{
/****************************************************************************/
/* one of the children is not a leaf element; try again later on */
/****************************************************************************/
doMore
=
true
;
return
0
;
}
if
(
!
el
->
getChild
(
0
)
->
isLeaf
()
||
!
el
->
getChild
(
1
)
->
isLeaf
())
{
/****************************************************************************/
/* one of the children is not a leaf element; try again later on */
/****************************************************************************/
doMore
=
true
;
return
0
;
}
/****************************************************************************/
/* give the refinement edge the right orientation */
/****************************************************************************/
if
(
el
->
getDOF
(
0
,
0
)
<
el
->
getDOF
(
1
,
0
))
{
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
0
));
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
1
));
}
else
{
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
0
));
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
1
));
}
if
(
el
->
getDOF
(
0
,
0
)
<
el
->
getDOF
(
1
,
0
))
{
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
0
));
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
1
));
}
else
{
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
0
));
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
1
));
}
coarse_list
.
setElement
(
0
,
el
,
true
);
n_neigh
=
1
;
if
(
coarse_list
.
setElement
(
1
,
el_info
->
getNeighbour
(
2
)))
{
n_neigh
=
2
;
coarse_list
.
setCoarsePatch
(
1
,
el_info
->
getOppVertex
(
2
)
==
2
);
}
if
(
coarse_list
.
setElement
(
1
,
el_info
->
getNeighbour
(
2
)))
{
n_neigh
=
2
;
coarse_list
.
setCoarsePatch
(
1
,
el_info
->
getOppVertex
(
2
)
==
2
);
}
/****************************************************************************/
/* check wether we can coarsen the patch or not */
...
...
@@ -262,20 +258,20 @@ namespace AMDiS {
// === check for periodic boundary ==========================================
// ==========================================================================
if
(
coarse_list
.
doCoarsePatch
(
n_neigh
))
{
if
(
coarse_list
.
doCoarsePatch
(
n_neigh
))
{
int
n_neigh_periodic
;
DegreeOfFreedom
*
next_edge
[
2
];
RCNeighbourList
*
periodicList
;
while
(
edge
[
0
]
!=
NULL
)
{
while
(
edge
[
0
]
!=
NULL
)
{
periodicList
=
coarse_list
.
periodicSplit
(
edge
,
next_edge
,
&
n_neigh
,
&
n_neigh_periodic
);
TEST_EXIT
(
periodicList
)(
"periodicList = NULL
\n
"
);
TEST_EXIT
_DBG
(
periodicList
)(
"periodicList = NULL
\n
"
);
coarsenPatch
(
periodicList
,
n_neigh_periodic
,
bound
);
...
...
AMDiS/src/CoarseningManager3d.cc
View file @
42521b59
...
...
@@ -49,11 +49,11 @@ namespace AMDiS {
/****************************************************************************/
if
(
el
->
getDOF
(
0
,
0
)
<
el
->
getDOF
(
1
,
0
))
{
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
0
));
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
1
));
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
0
));
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
1
));
}
else
{
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
0
));
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
1
));
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
0
));
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getDOF
(
1
));
}
coarsenList
->
setElement
(
0
,
el
,
true
);
...
...
@@ -72,51 +72,24 @@ namespace AMDiS {
/* check wether we can coarsen the patch or not */
/****************************************************************************/
// // ==========================================================================
// // === check for periodic boundary ==========================================
// // ==========================================================================
// DegreeOfFreedom *periodic_edge[2];
// int n_neigh_periodic;
// RCNeighbourList *periodicList = coarsenList->periodicSplit(edge,
// &n_neigh,
// periodic_edge,
// &n_neigh_periodic);
// bool doCoarsening = coarsenList->doCoarsePatch(n_neigh);
// if(periodicList && doCoarsening) {
// if (periodicList->doCoarsePatch(n_neigh_periodic)) {
// coarsenPatch(periodicList, n_neigh_periodic, bound);
// } else {
// doCoarsening = false;
// }
// DELETE periodicList;
// }
// if (coarsenList->doCoarsePatch(n_neigh)/*doCoarsening*/) {
// coarsenPatch(coarsenList, n_neigh, bound);
// }
// ==========================================================================
// === check for periodic boundary ==========================================
// ==========================================================================
if
(
coarsenList
->
doCoarsePatch
(
n_neigh
))
{
if
(
coarsenList
->
doCoarsePatch
(
n_neigh
))
{
int
n_neigh_periodic
;
DegreeOfFreedom
*
next_edge
[
2
];
RCNeighbourList
*
periodicList
;
while
(
edge
[
0
]
!=
NULL
)
{
while
(
edge
[
0
]
!=
NULL
)
{
periodicList
=
coarsenList
->
periodicSplit
(
edge
,
next_edge
,
&
n_neigh
,
&
n_neigh_periodic
);
TEST_EXIT
(
periodicList
)(
"periodicList = NULL
\n
"
);
TEST_EXIT
_DBG
(
periodicList
)(
"periodicList = NULL
\n
"
);
coarsenPatch
(
periodicList
,
n_neigh_periodic
,
bound
);
...
...
@@ -255,7 +228,7 @@ namespace AMDiS {
opp_v
=
el_info
->
getOppVertex
(
3
-
dir
);
neigh_info
=
stack
->
traverseNeighbour3d
(
el_info
,
3
-
dir
);
TEST_EXIT
(
neigh
==
neigh_info
->
getElement
())
TEST_EXIT
_DBG
(
neigh
==
neigh_info
->
getElement
())
(
"neigh %d and neigh_info->el %d are not identical
\n
"
,
neigh
->
getIndex
(),
neigh_info
->
getElement
()
->
getIndex
());
/****************************************************************************/
...
...
@@ -280,7 +253,7 @@ namespace AMDiS {
for
(
k
=
0
;
k
<
n_vertices
;
k
++
)
if
(
mesh
->
associated
(
neigh
->
getDOF
(
k
,
0
),
edge
[
1
][
0
]))
break
;
TEST_EXIT
(
j
<
n_vertices
&&
k
<
n_vertices
)
TEST_EXIT
_DBG
(
j
<
n_vertices
&&
k
<
n_vertices
)
(
"dof %d or dof %d not found on element %d with nodes (%d %d %d %d)
\n
"
,
edge
[
0
][
0
],
edge
[
1
][
0
],
neigh
->
getIndex
(),
neigh
->
getDOF
(
0
,
0
),
neigh
->
getDOF
(
1
,
0
),
neigh
->
getDOF
(
2
,
0
),
neigh
->
getDOF
(
3
,
0
));
...
...
@@ -302,7 +275,7 @@ namespace AMDiS {
opp_v
=
neigh_info
->
getOppVertex
(
i
);
if
((
neigh
=
dynamic_cast
<
Tetrahedron
*>
(
const_cast
<
Element
*>
(
neigh_info
->
getNeighbour
(
i
)))))
{
neigh_info
=
stack
->
traverseNeighbour3d
(
neigh_info
,
i
);
TEST_EXIT
(
neigh
==
neigh_info
->
getElement
())
TEST_EXIT
_DBG
(
neigh
==
neigh_info
->
getElement
())
(
"neigh %d and neigh_info->el %d are not identical
\n
"
,
neigh
->
getIndex
(),
neigh_info
->
getElement
()
->
getIndex
());
/****************************************************************************/
...
...
@@ -326,7 +299,7 @@ namespace AMDiS {
i
=
*
n_neigh
-
1
;
opp_v
=
coarsenList
->
getOppVertex
(
i
,
0
);
do
{
TEST_EXIT
(
neigh_info
->
getNeighbour
(
opp_v
)
&&
i
>
0
)
TEST_EXIT
_DBG
(
neigh_info
->
getNeighbour
(
opp_v
)
&&
i
>
0
)
(
"while looping back domains boundary was reached or i == 0
\n
"
);
opp_v
=
coarsenList
->
getOppVertex
(
i
--
,
0
);
neigh_info
=
stack
->
traverseNeighbour3d
(
neigh_info
,
opp_v
);
...
...
AMDiS/src/CoarseningManager3d.h
View file @
42521b59
...
...
@@ -43,10 +43,7 @@ namespace AMDiS {
/** \brief
* Calls base class constructor and checks dimension of mesh.
*/
CoarseningManager3d
()
:
CoarseningManager
()
{
// FUNCNAME("CoarseningManager3d::CoarseningManager3d");
// TEST_EXIT(mesh->getDim()==3)("mesh->dim != 3\n");
};
CoarseningManager3d
()
:
CoarseningManager
()
{};
/** \brief
* destructor
...
...
AMDiS/src/ConditionalEstimator.cc
View file @
42521b59
...
...
@@ -26,10 +26,10 @@ namespace AMDiS {
PartitionElementData
*
elData
=
dynamic_cast
<
PartitionElementData
*>
(
elInfo
->
getElement
()
->
getElementData
(
PARTITION_ED
));
TEST_EXIT
(
elInfo
->
getElement
()
->
isLeaf
())(
"element not leaf
\n
"
);
TEST_EXIT
(
elData
)(
"no partitoin data on leaf element %d (rank %d)
\n
"
,
elInfo
->
getElement
()
->
getIndex
(),
MPI
::
COMM_WORLD
.
Get_rank
());
TEST_EXIT
_DBG
(
elInfo
->
getElement
()
->
isLeaf
())(
"element not leaf
\n
"
);
TEST_EXIT
_DBG
(
elData
)(
"no partitoin data on leaf element %d (rank %d)
\n
"
,
elInfo
->
getElement
()
->
getIndex
(),
MPI
::
COMM_WORLD
.
Get_rank
());
PartitionStatus
status
=
elData
->
getPartitionStatus
();
...
...
AMDiS/src/ConditionalMarker.h
View file @
42521b59
...
...
@@ -89,30 +89,22 @@ namespace AMDiS {
void
markElement
(
AdaptInfo
*
adaptInfo
,
ElInfo
*
elInfo
)
{
FUNCNAME
(
"ConditionalMarker::markElement()"
);
if
(
decoratedMarker_
)
{
if
(
decoratedMarker_
)
{
PartitionElementData
*
elData
=
dynamic_cast
<
PartitionElementData
*>
(
elInfo
->
getElement
()
->
getElementData
(
PARTITION_ED
));
TEST_EXIT
(
elData
)(
"no partition data
\n
"
);
TEST_EXIT
_DBG
(
elData
)(
"no partition data
\n
"
);
decoratedMarker_
->
markElement
(
adaptInfo
,
elInfo
);
if
(
elData
->
getPartitionStatus
()
==
OUT
)
{
//if(elData->getPartitionStatus() != IN) {
// allow coarsening, forbid refinement
if
(
elData
->
getPartitionStatus
()
==
OUT
)
{
Element
*
element
=
elInfo
->
getElement
();
if
(
element
->
getMark
()
>
0
)
{
if
(
element
->
getMark
()
>
0
)
{
element
->
setMark
(
0
);
}
}
// if(elInfo->getElement()->getMark() != 0) {
// MSG("rank %d , index %d, mark %d\n",
// MPI::COMM_WORLD.Get_rank(), elInfo->getElement()->getIndex(),
// elInfo->getElement()->getMark());
// }
int
minLevel
=
elData
->
getPartitionStatus
()
!=
OUT
?
localCoarseGridLevel_
:
...
...
AMDiS/src/DOFAdmin.cc
View file @
42521b59
...
...
@@ -39,22 +39,20 @@ namespace AMDiS {
DOFAdmin
&
DOFAdmin
::
operator
=
(
const
DOFAdmin
&
src
)
{
int
i
;
if
(
this
!=&
src
)
{
mesh
=
src
.
mesh
;
name
=
src
.
name
;
dofFree
=
src
.
dofFree
;
firstHole
=
src
.
firstHole
;
size
=
src
.
size
;
usedCount
=
src
.
usedCount
;
holeCount
=
src
.
holeCount
;
sizeUsed
=
src
.
sizeUsed
;
for
(
i
=
0
;
i
<
4
;
nrDOF
[
i
]
=
src
.
nrDOF
[
i
++
])
{
nr0DOF
[
i
]
=
src
.
nr0DOF
[
i
];
if
(
this
!=
&
src
)
{
mesh
=
src
.
mesh
;
name
=
src
.
name
;
dofFree
=
src
.
dofFree
;
firstHole
=
src
.
firstHole
;
size
=
src
.
size
;
usedCount
=
src
.
usedCount
;
holeCount
=
src
.
holeCount
;
sizeUsed
=
src
.
sizeUsed
;
for
(
int
i
=
0
;
i
<
4
;
nrDOF
[
i
]
=
src
.
nrDOF
[
i
++
])
{
nr0DOF
[
i
]
=
src
.
nr0DOF
[
i
];
};
dofIndexedList
=
src
.
dofIndexedList
;
dofContainerList
=
src
.
dofContainerList
;
dofIndexedList
=
src
.
dofIndexedList
;
dofContainerList
=
src
.
dofContainerList
;
}
return
*
this
;
}
...
...
@@ -65,8 +63,11 @@ namespace AMDiS {
bool
DOFAdmin
::
operator
==
(
const
DOFAdmin
&
ad
)
const
{
if
(
name
!=
ad
.
name
)
return
false
;
if
(
mesh
!=
ad
.
mesh
)
return
false
;
if
(
name
!=
ad
.
name
)
return
false
;
if
(
mesh
!=
ad
.
mesh
)
return
false
;
return
true
;
}
...
...
@@ -75,10 +76,10 @@ namespace AMDiS {
{}
void
DOFAdmin
::
freeDOFIndex
(
int
dof
)
{
FUNCNAME
(
"DOFAdmin::freeDOFIndex"
);
FUNCNAME
(
"DOFAdmin::freeDOFIndex
()
"
);
TEST_EXIT
(
usedCount
>
0
)(
"no dofs in use
\n
"
);
TEST_EXIT
((
dof
>=
0
)
&&
(
dof
<
size
))(
"invalid dof index %d
\n
"
,
dof
);
TEST_EXIT
_DBG
(
usedCount
>
0
)(
"no dofs in use
\n
"
);
TEST_EXIT
_DBG
((
dof
>=
0
)
&&
(
dof
<
size
))(
"invalid dof index %d
\n
"
,
dof
);
::
std
::
list
<
DOFIndexedBase
*>::
iterator
di
;
::
std
::
list
<
DOFIndexedBase
*>::
iterator
end
=
dofIndexedList
.
end
();
...
...
@@ -107,30 +108,29 @@ namespace AMDiS {
int
DOFAdmin
::
getDOFIndex
()
{
FUNCNAME
(
"DOFAdmin::getDOFIndex"
);
int
i
,
dof
=
0
;
int
dof
=
0
;
// if there is a hole
if
(
firstHole
<
static_cast
<
int
>
(
dofFree
.
size
()))
{
TEST_EXIT
(
dofFree
[
firstHole
])(
"no hole at firstHole!
\n
"
);
TEST_EXIT
_DBG
(
dofFree
[
firstHole
])(
"no hole at firstHole!
\n
"
);
// its no longer a hole
dofFree
[
firstHole
]
=
false
;
dof
=
firstHole
;
// search new hole
int
dfsize
=
static_cast
<
int
>
(
dofFree
.
size
());
for
(
i
=
firstHole
+
1
;
i
<
dfsize
;
i
++
)
{
int
i
=
0
;
for
(
i
=
firstHole
+
1
;
i
<
dfsize
;
i
++
)
{
if
(
dofFree
[
i
])
{
break
;
}
}
firstHole
=
i
;
}
// if there is no hole
else
{
}
else
{
// if there is no hole
// enlarge dof-list
enlargeDOFLists
(
0
);
TEST_EXIT
(
firstHole
<
static_cast
<
int
>
(
dofFree
.
size
()))
TEST_EXIT
_DBG
(
firstHole
<
static_cast
<
int
>
(
dofFree
.
size
()))
(
"no free entry after enlargeDOFLists
\n
"
);
TEST_EXIT
(
dofFree
[
firstHole
])
TEST_EXIT
_DBG
(
dofFree
[
firstHole
])
(
"no free bit at firstHole
\n
"
);
dofFree
[
firstHole
]
=
false
;
dof
=
firstHole
;
...
...
@@ -138,8 +138,9 @@ namespace AMDiS {
}
usedCount
++
;
if
(
holeCount
>
0
)
holeCount
--
;
sizeUsed
=
max
(
sizeUsed
,
dof
+
1
);
if
(
holeCount
>
0
)
holeCount
--
;
sizeUsed
=
max
(
sizeUsed
,
dof
+
1
);
return
(
dof
);
}
...
...
@@ -180,8 +181,8 @@ namespace AMDiS {
}
void
DOFAdmin
::
addDOFIndexed
(
DOFIndexedBase
*
dofIndexed
)
{
FUNCNAME
(
"DOFAdmin::addDOFIndexed"
);
TEST_EXIT
(
dofIndexed
)(
"no dofIndexed
\n
"
);
FUNCNAME
(
"DOFAdmin::addDOFIndexed
()
"
);
TEST_EXIT
_DBG
(
dofIndexed
)(
"no dofIndexed
\n
"
);
if
(
dofIndexed
->
getSize
()
<
size
)
{
dofIndexed
->
resize
(
size
);
...
...
@@ -209,7 +210,7 @@ namespace AMDiS {
void
DOFAdmin
::
addDOFContainer
(
DOFContainer
*
cont
)
{
FUNCNAME
(
"DOFAdmin::addDOFContainer()"
);
TEST_EXIT
(
cont
)(
"no container
\n
"
);
TEST_EXIT
_DBG
(
cont
)(
"no container
\n
"
);
dofContainerList
.
push_back
(
cont
);
}
...
...
@@ -233,8 +234,8 @@ namespace AMDiS {
void
DOFAdmin
::
compress
(
::
std
::
vector
<
DegreeOfFreedom
>
&
new_dof
)
{
FUNCNAME
(
"DOFAdmin::compress"
);
int
i
,
n
,
first
,
last
=
0
;
FUNCNAME
(
"DOFAdmin::compress
()
"
);
int
i
,
n
,
first
,
last
=
0
;
// nothing to do ?
if
(
size
<
1
)
return
;
...
...
@@ -258,7 +259,7 @@ namespace AMDiS {
}
}
TEST_EXIT
(
n
==
usedCount
)(
"count %d != usedCount %d
\n
"
,
n
,
usedCount
);
TEST_EXIT
_DBG
(
n
==
usedCount
)(
"count %d != usedCount %d
\n
"
,
n
,
usedCount
);
// mark used dofs in compressed dofFree
for
(
i
=
0
;
i
<
n
;
i
++
)
{
...
...
@@ -303,19 +304,19 @@ namespace AMDiS {
}
const
int
DOFAdmin
::
getNumberOfPreDOFs
(
int
i
)
const
{
TEST_EXIT
((
0
<=
i
)
&&
(
4
>
i
))(
""
);
TEST_EXIT
_DBG
((
0
<=
i
)
&&
(
4
>
i
))(
""
);
return
nr0DOF
[
i
];
}
void
DOFAdmin
::
setNumberOfDOFs
(
int
i
,
int
v
)
{
TEST_EXIT
((
0
<=
i
)
&&
(
4
>
i
))(
""
);
TEST_EXIT
_DBG
((
0
<=
i
)
&&
(
4
>
i
))(
""
);
nrDOF
[
i
]
=
v
;
}
void
DOFAdmin
::
setNumberOfPreDOFs
(
int
i
,
int
v
)
{
TEST_EXIT
((
0
<=
i
)
&&
(
4
>
i
))(
""
);
TEST_EXIT
_DBG
((
0
<=
i
)
&&
(
4
>
i
))(
""
);
nr0DOF
[
i
]
=
v
;
}
...
...
AMDiS/src/DOFMatrix.cc
View file @
42521b59
...
...
@@ -318,7 +318,9 @@ namespace AMDiS {
int
i
,
freeCol
=
-
1
,
rowSize
=
static_cast
<
int
>
(
row
->
size
());
TEST_EXIT
(
jcol
>=
0
&&
jcol
<
colFESpace
->
getAdmin
()
->
getUsedSize
())(
"Column index %d out of range 0-%d
\n
"
,
jcol
,
colFESpace
->
getAdmin
()
->
getUsedSize
()
-
1
);
TEST_EXIT_DBG
(
jcol
>=
0
&&
jcol
<
colFESpace
->
getAdmin
()
->
getUsedSize
())
(
"Column index %d out of range 0-%d
\n
"
,
jcol
,
colFESpace
->
getAdmin
()
->
getUsedSize
()
-
1
);
// first entry is diagonal entry
if
(
rowFESpace
==
colFESpace
)
...
...
@@ -498,21 +500,18 @@ namespace AMDiS {
WARNING
(
"implementation not finished!!!
\n
"
);
int
i
,
j
;
//TEST_EXIT(bTranspose == NoTranspose)("not yet for transposed matrix b");
TEST_EXIT
(
a
.
getColFESpace
()
==
b
.
getRowFESpace
())
TEST_EXIT_DBG
(
a
.
getColFESpace
()
==
b
.
getRowFESpace
())
(
"a.colFESpace != b.rowFESpace
\n
"
);
TEST_EXIT
(
rowFESpace
==
a
.
getRowFESpace
())
TEST_EXIT
_DBG
(
rowFESpace
==
a
.
getRowFESpace
())
(
"rowFESpace != a.rowFESpace
\n
"
);
TEST_EXIT
(
colFESpace
==
b
.
getColFESpace
())
TEST_EXIT
_DBG
(
colFESpace
==
b
.
getColFESpace
())
(
"colFESpace != b.colFESpace
\n
"
);
clear
();
int
i
,
j
;
if
(
aTranspose
==
NoTranspose
&&
bTranspose
==
NoTranspose
)
{
if
(
aTranspose
==
NoTranspose
&&
bTranspose
==
NoTranspose
)