Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Aland, Sebastian
amdis
Commits
739be0ef
Commit
739be0ef
authored
Nov 25, 2010
by
Thomas Witkowski
Browse files
A lot of work on mesh repartitioning in parallel computations.
parent
dd514ad5
Changes
46
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
850 additions
and
563 deletions
+850
-563
AMDiS/libtool
AMDiS/libtool
+11
-11
AMDiS/src/AMDiS.h
AMDiS/src/AMDiS.h
+0
-1
AMDiS/src/ArhReader.cc
AMDiS/src/ArhReader.cc
+3
-2
AMDiS/src/ArhWriter.cc
AMDiS/src/ArhWriter.cc
+3
-2
AMDiS/src/CoarseningManager1d.cc
AMDiS/src/CoarseningManager1d.cc
+6
-6
AMDiS/src/CoarseningManager2d.cc
AMDiS/src/CoarseningManager2d.cc
+14
-14
AMDiS/src/CoarseningManager3d.cc
AMDiS/src/CoarseningManager3d.cc
+20
-20
AMDiS/src/DOFAdmin.h
AMDiS/src/DOFAdmin.h
+2
-2
AMDiS/src/DOFVector.cc
AMDiS/src/DOFVector.cc
+6
-6
AMDiS/src/DataCollector.cc
AMDiS/src/DataCollector.cc
+3
-3
AMDiS/src/Debug.cc
AMDiS/src/Debug.cc
+6
-6
AMDiS/src/ElInfo.h
AMDiS/src/ElInfo.h
+2
-2
AMDiS/src/ElInfo2d.cc
AMDiS/src/ElInfo2d.cc
+13
-5
AMDiS/src/ElInfo3d.cc
AMDiS/src/ElInfo3d.cc
+13
-13
AMDiS/src/Element.cc
AMDiS/src/Element.cc
+5
-6
AMDiS/src/Element.h
AMDiS/src/Element.h
+7
-8
AMDiS/src/ElementDofIterator.cc
AMDiS/src/ElementDofIterator.cc
+1
-1
AMDiS/src/ElementDofIterator.h
AMDiS/src/ElementDofIterator.h
+1
-1
AMDiS/src/Lagrange.cc
AMDiS/src/Lagrange.cc
+103
-103
AMDiS/src/MacroInfo.cc
AMDiS/src/MacroInfo.cc
+1
-3
AMDiS/src/MacroReader.cc
AMDiS/src/MacroReader.cc
+53
-51
AMDiS/src/Mesh.cc
AMDiS/src/Mesh.cc
+56
-37
AMDiS/src/Mesh.h
AMDiS/src/Mesh.h
+6
-5
AMDiS/src/MeshStructure.cc
AMDiS/src/MeshStructure.cc
+31
-17
AMDiS/src/MeshStructure.h
AMDiS/src/MeshStructure.h
+12
-2
AMDiS/src/Parametric.cc
AMDiS/src/Parametric.cc
+2
-2
AMDiS/src/PeriodicBC.cc
AMDiS/src/PeriodicBC.cc
+1
-1
AMDiS/src/RCNeighbourList.cc
AMDiS/src/RCNeighbourList.cc
+36
-36
AMDiS/src/Recovery.cc
AMDiS/src/Recovery.cc
+5
-5
AMDiS/src/RefinementManager.cc
AMDiS/src/RefinementManager.cc
+18
-17
AMDiS/src/RefinementManager.h
AMDiS/src/RefinementManager.h
+1
-1
AMDiS/src/RefinementManager1d.cc
AMDiS/src/RefinementManager1d.cc
+8
-8
AMDiS/src/RefinementManager2d.cc
AMDiS/src/RefinementManager2d.cc
+21
-26
AMDiS/src/RefinementManager3d.cc
AMDiS/src/RefinementManager3d.cc
+58
-58
AMDiS/src/TecPlotWriter.cc
AMDiS/src/TecPlotWriter.cc
+2
-2
AMDiS/src/TecPlotWriter.hh
AMDiS/src/TecPlotWriter.hh
+1
-1
AMDiS/src/Tetrahedron.cc
AMDiS/src/Tetrahedron.cc
+4
-4
AMDiS/src/Traverse.cc
AMDiS/src/Traverse.cc
+10
-10
AMDiS/src/Triangle.cc
AMDiS/src/Triangle.cc
+6
-6
AMDiS/src/parallel/MeshDistributor.cc
AMDiS/src/parallel/MeshDistributor.cc
+263
-33
AMDiS/src/parallel/MeshDistributor.h
AMDiS/src/parallel/MeshDistributor.h
+4
-6
AMDiS/src/parallel/ParMetisPartitioner.cc
AMDiS/src/parallel/ParMetisPartitioner.cc
+13
-12
AMDiS/src/parallel/ParMetisPartitioner.h
AMDiS/src/parallel/ParMetisPartitioner.h
+3
-3
AMDiS/src/parallel/PetscSolver.cc
AMDiS/src/parallel/PetscSolver.cc
+10
-0
AMDiS/src/parallel/StdMpi.cc
AMDiS/src/parallel/StdMpi.cc
+3
-3
AMDiS/src/parallel/StdMpi.h
AMDiS/src/parallel/StdMpi.h
+3
-2
No files found.
AMDiS/libtool
View file @
739be0ef
...
...
@@ -85,7 +85,7 @@ NM="/usr/bin/nm -B"
LN_S
=
"ln -s"
# What is the maximum length of a command?
max_cmd_len
=
9830
4
max_cmd_len
=
157286
4
# Object file suffix (normally "o").
objext
=
o
...
...
@@ -128,7 +128,7 @@ old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
old_postuninstall_cmds
=
""
# A C compiler.
LTCC
=
"/
licsoft/libraries/openmpi/1.2.6/64bit
/bin/mpicc"
LTCC
=
"/
usr/lib64/mpi/gcc/openmpi/
/bin/mpicc"
# LTCC compiler flags.
LTCFLAGS
=
"-g -O2"
...
...
@@ -233,10 +233,10 @@ finish_eval=""
hardcode_into_libs
=
yes
# Compile-time system search path for libraries.
sys_lib_search_path_spec
=
"/usr/lib64/gcc/x86_64-suse-linux/4.
1.2
/usr/lib64 /lib64
/fastfs/wir/local/lib
/usr/x86_64-suse-linux/lib"
sys_lib_search_path_spec
=
"/usr/lib64/gcc/x86_64-suse-linux/4.
5
/usr/lib64 /lib64 /usr/x86_64-suse-linux/lib"
# Run-time system search path for libraries.
sys_lib_dlsearch_path_spec
=
"/lib /usr/lib /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/x86_64-suse-linux/lib /usr/local/lib
64 /usr/local/lib /opt/kde3/lib64 /opt/kde3/lib /opt/gnome/lib64 /opt/gnome/lib /lib64 /lib /usr/lib64 /usr/lib /opt/cluster/intel/cce/9.1.042/lib /opt/cluster/intel/fce/9.1.036/lib /opt/cluster/Pathscale3.0/lib/2.9.99 /opt/cluster/Pathscale3.0/lib/2.9.99/32 /work/licsoft/compilers/pgi/linux86-64/6.2/lib /work/licsoft/compilers/pgi/linux86-64/6.2/libso
"
sys_lib_dlsearch_path_spec
=
"/lib /usr/lib /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64
/usr/lib64/Xaw3d
/usr/X11R6/lib/Xaw3d /usr/X11R6/lib
/usr/lib/Xaw3d
/usr/x86_64-suse-linux/lib /usr/local/lib
/opt/kde3/lib /lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /opt/kde3/lib64 /usr/lib64/graphviz /usr/lib64/graphviz/sharp /usr/lib64/graphviz/java /usr/lib64/graphviz/perl /usr/lib64/graphviz/php /usr/lib64/graphviz/ocaml /usr/lib64/graphviz/python /usr/lib64/graphviz/lua /usr/lib64/graphviz/tcl /usr/lib64/graphviz/guile /usr/lib64/graphviz/ruby /usr/lib64/octave-3.2.4
"
# Whether dlopen is supported.
dlopen_support
=
unknown
...
...
@@ -259,7 +259,7 @@ LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
old_archive_cmds
=
"
\$
AR
\$
AR_FLAGS
\$
oldlib
\$
oldobjs~
\$
RANLIB
\$
oldlib"
# A language specific compiler.
CC
=
"/
licsoft/libraries/openmpi/1.2.6/64bit
/bin/mpicc"
CC
=
"/
usr/lib64/mpi/gcc/openmpi/
/bin/mpicc"
# Is the compiler the GNU compiler?
with_gcc
=
yes
...
...
@@ -8914,7 +8914,7 @@ LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
old_archive_cmds
=
"
\$
AR
\$
AR_FLAGS
\$
oldlib
\$
oldobjs~
\$
RANLIB
\$
oldlib"
# A language specific compiler.
CC
=
"/
licsoft/libraries/openmpi/1.2.6/64bit
/bin/mpicxx"
CC
=
"/
usr/lib64/mpi/gcc/openmpi/
/bin/mpicxx"
# Is the compiler the GNU compiler?
with_gcc
=
yes
...
...
@@ -9039,17 +9039,17 @@ file_list_spec=""
hardcode_action
=
immediate
# The directories searched by this compiler when creating a shared library.
compiler_lib_search_dirs
=
"/usr/lib64
/licsoft/libraries/openmpi/1.2.6/64bit
/lib /usr/lib64/gcc/x86_64-suse-linux/4.
1.2
/usr/lib64/gcc/x86_64-suse-linux/4.
1.2
/../../../../lib64 /lib/../lib64 /usr/lib/../lib64
/fastfs/wir/local/lib
/usr/lib64/gcc/x86_64-suse-linux/4.
1.2
/../../../../x86_64-suse-linux/lib /usr/lib64/gcc/x86_64-suse-linux/4.
1.2
/../../.."
compiler_lib_search_dirs
=
"/usr/lib64
/mpi/gcc/openmpi
/lib
64
/usr/lib64/gcc/x86_64-suse-linux/4.
5
/usr/lib64/gcc/x86_64-suse-linux/4.
5
/../../../../lib64 /lib/../lib64 /usr/lib/../lib64 /usr/lib64/gcc/x86_64-suse-linux/4.
5
/../../../../x86_64-suse-linux/lib /usr/lib64/gcc/x86_64-suse-linux/4.
5
/../../.."
# Dependencies to place before and after the objects being linked to
# create a shared library.
predep_objects
=
"/usr/lib64/gcc/x86_64-suse-linux/4.
1.2
/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.
1.2
/crtbeginS.o"
postdep_objects
=
"/usr/lib64/gcc/x86_64-suse-linux/4.
1.2
/crtendS.o /usr/lib64/gcc/x86_64-suse-linux/4.
1.2
/../../../../lib64/crtn.o"
predep_objects
=
"/usr/lib64/gcc/x86_64-suse-linux/4.
5
/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.
5
/crtbeginS.o"
postdep_objects
=
"/usr/lib64/gcc/x86_64-suse-linux/4.
5
/crtendS.o /usr/lib64/gcc/x86_64-suse-linux/4.
5
/../../../../lib64/crtn.o"
predeps
=
""
postdeps
=
"-lmpi_cxx -lmpi -lopen-rte -lopen-pal
-libverbs -lrt -lnuma
-ldl -lnsl -lutil -ldl -lstdc++ -lm -lgcc_s -lpthread -lc -lgcc_s"
postdeps
=
"-lmpi_cxx -lmpi -lopen-rte -lopen-pal -ldl -lnsl -lutil -ldl -lstdc++ -lm -lgcc_s -lpthread -lc -lgcc_s"
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path
=
"-L/usr/lib64
-L/licsoft/libraries/openmpi/1.2.6/64bit
/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.
1.2
-L/usr/lib64/gcc/x86_64-suse-linux/4.
1.2
/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64
-L/fastfs/wir/local/lib
-L/usr/lib64/gcc/x86_64-suse-linux/4.
1.2
/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.
1.2
/../../.."
compiler_lib_search_path
=
"-L/usr/lib64
/mpi/gcc/openmpi
/lib
64
-L/usr/lib64/gcc/x86_64-suse-linux/4.
5
-L/usr/lib64/gcc/x86_64-suse-linux/4.
5
/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.
5
/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.
5
/../../.."
# ### END LIBTOOL TAG CONFIG: CXX
AMDiS/src/AMDiS.h
View file @
739be0ef
#ifndef AMDIS_H
#define AMDIS_H
#include "stdint.h"
#include "AbstractFunction.h"
#include "AdaptInfo.h"
#include "AdaptInstationary.h"
...
...
AMDiS/src/ArhReader.cc
View file @
739be0ef
#include <fstream>
#include <stdint.h>
#include "ArhReader.h"
#include "Mesh.h"
...
...
@@ -107,13 +108,13 @@ namespace AMDiS {
if
(
!
macroElement
)
{
Element
*
mEl
=
elInfo
->
getMacroElement
()
->
getElement
();
for
(
int
i
=
0
;
i
<=
mesh
->
getDim
();
i
++
)
(
*
vec
)[
mEl
->
getD
OF
(
i
,
0
)]
=
values
[
valuePos
++
];
(
*
vec
)[
mEl
->
getD
of
(
i
,
0
)]
=
values
[
valuePos
++
];
macroElement
=
true
;
}
Element
*
el
=
elInfo
->
getElement
();
if
(
!
el
->
isLeaf
())
(
*
vec
)[
el
->
getChild
(
0
)
->
getD
OF
(
mesh
->
getDim
(),
0
)]
=
values
[
valuePos
++
];
(
*
vec
)[
el
->
getChild
(
0
)
->
getD
of
(
mesh
->
getDim
(),
0
)]
=
values
[
valuePos
++
];
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
...
...
AMDiS/src/ArhWriter.cc
View file @
739be0ef
#include <fstream>
#include <stdint.h>
#include "ArhWriter.h"
#include "Mesh.h"
...
...
@@ -73,7 +74,7 @@ namespace AMDiS {
values
[
i
].
clear
();
for
(
int
j
=
0
;
j
<=
mesh
->
getDim
();
j
++
)
values
[
i
].
push_back
((
*
vecs
[
i
])[
elInfo
->
getElement
()
->
getD
OF
(
j
,
0
)]);
values
[
i
].
push_back
((
*
vecs
[
i
])[
elInfo
->
getElement
()
->
getD
of
(
j
,
0
)]);
}
}
...
...
@@ -81,7 +82,7 @@ namespace AMDiS {
if
(
!
elInfo
->
getElement
()
->
isLeaf
())
{
for
(
unsigned
int
i
=
0
;
i
<
vecs
.
size
();
i
++
)
values
[
i
].
push_back
((
*
vecs
[
i
])[
elInfo
->
getElement
()
->
getChild
(
0
)
->
getD
OF
(
mesh
->
getDim
(),
0
)]);
values
[
i
].
push_back
((
*
vecs
[
i
])[
elInfo
->
getElement
()
->
getChild
(
0
)
->
getD
of
(
mesh
->
getDim
(),
0
)]);
}
elInfo
=
stack
.
traverseNext
(
elInfo
);
...
...
AMDiS/src/CoarseningManager1d.cc
View file @
739be0ef
...
...
@@ -70,12 +70,12 @@ namespace AMDiS {
if
(
mesh
->
getNumberOfDOFs
(
VERTEX
)
&&
!
mesh
->
queryCoarseDOFs
())
{
int
node
=
mesh
->
getNode
(
VERTEX
);
parent
->
setD
OF
(
node
+
0
,
const_cast
<
int
*>
(
child
[
0
]
->
getD
OF
(
node
+
0
)));
parent
->
setD
OF
(
node
+
1
,
const_cast
<
int
*>
(
child
[
1
]
->
getD
OF
(
node
+
1
)));
parent
->
setD
of
(
node
+
0
,
const_cast
<
int
*>
(
child
[
0
]
->
getD
of
(
node
+
0
)));
parent
->
setD
of
(
node
+
1
,
const_cast
<
int
*>
(
child
[
1
]
->
getD
of
(
node
+
1
)));
}
if
(
mesh
->
getNumberOfDOFs
(
CENTER
)
&&
!
mesh
->
queryCoarseDOFs
())
{
parent
->
setD
OF
(
mesh
->
getNode
(
CENTER
),
mesh
->
getDof
(
CENTER
));
parent
->
setD
of
(
mesh
->
getNode
(
CENTER
),
mesh
->
getDof
(
CENTER
));
}
/*--------------------------------------------------------------------------*/
...
...
@@ -102,13 +102,13 @@ namespace AMDiS {
if
(
mesh
->
getNumberOfDOFs
(
VERTEX
))
/*--- midpoint of parent ---*/
{
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
1
]
->
getD
OF
(
mesh
->
getNode
(
VERTEX
))),
VERTEX
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
1
]
->
getD
of
(
mesh
->
getNode
(
VERTEX
))),
VERTEX
);
}
if
(
mesh
->
getNumberOfDOFs
(
CENTER
))
/*--- center of the children ---*/
{
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
0
]
->
getD
OF
(
mesh
->
getNode
(
CENTER
))),
CENTER
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
1
]
->
getD
OF
(
mesh
->
getNode
(
CENTER
))),
CENTER
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
0
]
->
getD
of
(
mesh
->
getNode
(
CENTER
))),
CENTER
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
1
]
->
getD
of
(
mesh
->
getNode
(
CENTER
))),
CENTER
);
}
parent
->
coarsenElementData
(
child
[
0
],
child
[
1
]);
...
...
AMDiS/src/CoarseningManager2d.cc
View file @
739be0ef
...
...
@@ -31,14 +31,14 @@ namespace AMDiS {
// remove dof from common edge of child[0] and child[1]
if
(
mesh
->
getNumberOfDOFs
(
EDGE
))
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
0
]
->
getD
OF
(
4
)),
EDGE
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
0
]
->
getD
of
(
4
)),
EDGE
);
// remove dof from the barycenters of child[0] and child[1]
if
(
mesh
->
getNumberOfDOFs
(
CENTER
))
{
int
node
=
mesh
->
getNode
(
CENTER
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
0
]
->
getD
OF
(
node
)),
CENTER
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
1
]
->
getD
OF
(
node
)),
CENTER
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
0
]
->
getD
of
(
node
)),
CENTER
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
1
]
->
getD
of
(
node
)),
CENTER
);
}
el
->
coarsenElementData
(
child
[
0
],
child
[
1
]);
...
...
@@ -71,10 +71,10 @@ namespace AMDiS {
dynamic_cast
<
Triangle
*>
(
const_cast
<
Element
*>
(
coarsenList
->
getElement
(
1
)));
DegreeOfFreedom
*
dof
[
3
];
dof
[
0
]
=
const_cast
<
int
*>
(
el
->
getChild
(
0
)
->
getD
OF
(
2
));
dof
[
0
]
=
const_cast
<
int
*>
(
el
->
getChild
(
0
)
->
getD
of
(
2
));
if
(
mesh
->
getNumberOfDOFs
(
EDGE
))
{
dof
[
1
]
=
const_cast
<
int
*>
(
el
->
getChild
(
0
)
->
getD
OF
(
3
));
dof
[
2
]
=
const_cast
<
int
*>
(
el
->
getChild
(
1
)
->
getD
OF
(
4
));
dof
[
1
]
=
const_cast
<
int
*>
(
el
->
getChild
(
0
)
->
getD
of
(
3
));
dof
[
2
]
=
const_cast
<
int
*>
(
el
->
getChild
(
1
)
->
getD
of
(
4
));
}
else
{
dof
[
1
]
=
dof
[
2
]
=
0
;
}
...
...
@@ -83,10 +83,10 @@ namespace AMDiS {
int
node
=
mesh
->
getNode
(
EDGE
);
// get new dof on el at the midpoint of the coarsening edge
if
(
!
el
->
getD
OF
(
node
+
2
))
{
el
->
setD
OF
(
node
+
2
,
mesh
->
getDof
(
EDGE
));
if
(
!
el
->
getD
of
(
node
+
2
))
{
el
->
setD
of
(
node
+
2
,
mesh
->
getDof
(
EDGE
));
if
(
neigh
)
neigh
->
setD
OF
(
node
+
2
,
const_cast
<
int
*>
(
el
->
getD
OF
(
node
+
2
)));
neigh
->
setD
of
(
node
+
2
,
const_cast
<
int
*>
(
el
->
getD
of
(
node
+
2
)));
}
}
...
...
@@ -149,12 +149,12 @@ namespace AMDiS {
// give the refinement edge the right orientation
if
(
el
->
getD
OF
(
0
,
0
)
<
el
->
getD
OF
(
1
,
0
))
{
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getD
OF
(
0
));
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getD
OF
(
1
));
if
(
el
->
getD
of
(
0
,
0
)
<
el
->
getD
of
(
1
,
0
))
{
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getD
of
(
0
));
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getD
of
(
1
));
}
else
{
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getD
OF
(
0
));
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getD
OF
(
1
));
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getD
of
(
0
));
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getD
of
(
1
));
}
coarse_list
.
setElement
(
0
,
el
,
true
);
...
...
AMDiS/src/CoarseningManager3d.cc
View file @
739be0ef
...
...
@@ -47,12 +47,12 @@ namespace AMDiS {
/* give the refinement edge the right orientation */
/****************************************************************************/
if
(
el
->
getD
OF
(
0
,
0
)
<
el
->
getD
OF
(
1
,
0
))
{
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getD
OF
(
0
));
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getD
OF
(
1
));
if
(
el
->
getD
of
(
0
,
0
)
<
el
->
getD
of
(
1
,
0
))
{
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getD
of
(
0
));
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getD
of
(
1
));
}
else
{
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getD
OF
(
0
));
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getD
OF
(
1
));
edge
[
1
]
=
const_cast
<
int
*>
(
el
->
getD
of
(
0
));
edge
[
0
]
=
const_cast
<
int
*>
(
el
->
getD
of
(
1
));
}
coarsenList
->
setElement
(
0
,
el
,
true
);
...
...
@@ -135,13 +135,13 @@ namespace AMDiS {
if
(
mesh
->
getNumberOfDOFs
(
EDGE
))
{
node
=
mesh
->
getNode
(
EDGE
)
+
Tetrahedron
::
nChildEdge
[
el_type
][
0
][
dir
];
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
0
]
->
getD
OF
(
node
)),
EDGE
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
0
]
->
getD
of
(
node
)),
EDGE
);
}
if
(
mesh
->
getNumberOfDOFs
(
FACE
))
{
node
=
mesh
->
getNode
(
FACE
)
+
Tetrahedron
::
nChildFace
[
el_type
][
0
][
dir
];
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
0
]
->
getD
OF
(
node
)),
FACE
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
0
]
->
getD
of
(
node
)),
FACE
);
node
=
mesh
->
getNode
(
FACE
)
+
Tetrahedron
::
nChildFace
[
el_type
][
1
][
dir
];
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
1
]
->
getD
OF
(
node
)),
FACE
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
1
]
->
getD
of
(
node
)),
FACE
);
}
}
}
...
...
@@ -153,14 +153,14 @@ namespace AMDiS {
if
(
mesh
->
getNumberOfDOFs
(
FACE
))
{
node
=
mesh
->
getNode
(
FACE
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
0
]
->
getD
OF
(
node
)),
FACE
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
0
]
->
getD
of
(
node
)),
FACE
);
}
if
(
mesh
->
getNumberOfDOFs
(
CENTER
))
{
node
=
mesh
->
getNode
(
CENTER
);
for
(
i
=
0
;
i
<
2
;
i
++
)
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
i
]
->
getD
OF
(
node
)),
CENTER
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
child
[
i
]
->
getD
of
(
node
)),
CENTER
);
}
/****************************************************************************/
...
...
@@ -238,20 +238,20 @@ namespace AMDiS {
while
(
neigh
!=
el
)
{
for
(
j
=
0
;
j
<
n_vertices
;
j
++
)
if
(
neigh
->
getD
OF
(
j
)
==
edge
[
0
])
break
;
if
(
neigh
->
getD
of
(
j
)
==
edge
[
0
])
break
;
for
(
k
=
0
;
k
<
n_vertices
;
k
++
)
if
(
neigh
->
getD
OF
(
k
)
==
edge
[
1
])
break
;
if
(
neigh
->
getD
of
(
k
)
==
edge
[
1
])
break
;
if
(
j
>
3
||
k
>
3
)
{
for
(
j
=
0
;
j
<
n_vertices
;
j
++
)
if
(
mesh
->
associated
(
neigh
->
getD
OF
(
j
,
0
),
edge
[
0
][
0
]))
break
;
if
(
mesh
->
associated
(
neigh
->
getD
of
(
j
,
0
),
edge
[
0
][
0
]))
break
;
for
(
k
=
0
;
k
<
n_vertices
;
k
++
)
if
(
mesh
->
associated
(
neigh
->
getD
OF
(
k
,
0
),
edge
[
1
][
0
]))
break
;
if
(
mesh
->
associated
(
neigh
->
getD
of
(
k
,
0
),
edge
[
1
][
0
]))
break
;
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
->
getD
OF
(
0
,
0
),
neigh
->
getD
OF
(
1
,
0
),
neigh
->
getD
OF
(
2
,
0
),
neigh
->
getD
OF
(
3
,
0
));
edge
[
0
][
0
],
edge
[
1
][
0
],
neigh
->
getIndex
(),
neigh
->
getD
of
(
0
,
0
),
neigh
->
getD
of
(
1
,
0
),
neigh
->
getD
of
(
2
,
0
),
neigh
->
getD
of
(
3
,
0
));
}
edge_no
=
Tetrahedron
::
edgeOfDofs
[
j
][
k
];
coarsenList
->
setCoarsePatch
(
*
n_neigh
,
edge_no
==
0
);
...
...
@@ -323,7 +323,7 @@ namespace AMDiS {
/* get dof for coarsening edge */
/****************************************************************************/
node
=
mesh
->
getNode
(
EDGE
);
if
(
!
(
dof
=
const_cast
<
int
*>
(
el
->
getD
OF
(
node
))))
if
(
!
(
dof
=
const_cast
<
int
*>
(
el
->
getD
of
(
node
))))
dof
=
mesh
->
getDof
(
EDGE
);
}
else
{
dof
=
NULL
;
...
...
@@ -356,13 +356,13 @@ namespace AMDiS {
/* remove dof's of the coarsening edge */
/****************************************************************************/
mesh
->
freeDof
(
const_cast
<
int
*>
(
el
->
getChild
(
0
)
->
getD
OF
(
3
)),
VERTEX
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
el
->
getChild
(
0
)
->
getD
of
(
3
)),
VERTEX
);
mesh
->
incrementNumberOfVertices
(
-
1
);
if
(
mesh
->
getNumberOfDOFs
(
EDGE
))
{
node
=
mesh
->
getNode
(
EDGE
)
+
2
;
mesh
->
freeDof
(
const_cast
<
int
*>
(
el
->
getChild
(
0
)
->
getD
OF
(
node
)),
EDGE
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
el
->
getChild
(
1
)
->
getD
OF
(
node
)),
EDGE
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
el
->
getChild
(
0
)
->
getD
of
(
node
)),
EDGE
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
el
->
getChild
(
1
)
->
getD
of
(
node
)),
EDGE
);
}
if
(
coarsenList
->
getElement
(
0
)
->
isNewCoordSet
())
...
...
AMDiS/src/DOFAdmin.h
View file @
739be0ef
...
...
@@ -257,12 +257,12 @@ namespace AMDiS {
void
init
();
/** \brief
* Adds one index to all DOF lists. Used by Mesh::getD
OF
() to provide
* Adds one index to all DOF lists. Used by Mesh::getD
of
() to provide
* DOFS for a specific position
*/
int
getDOFIndex
();
/// Frees index dof. Used by Mesh::getD
OF
()
/// Frees index dof. Used by Mesh::getD
of
()
void
freeDofIndex
(
int
dof
);
///
...
...
AMDiS/src/DOFVector.cc
View file @
739be0ef
...
...
@@ -46,9 +46,9 @@ namespace AMDiS {
Element
*
el
=
list
.
getElement
(
0
);
int
n0
=
feSpace
->
getAdmin
()
->
getNumberOfPreDOFs
(
VERTEX
);
DegreeOfFreedom
dof0
=
el
->
getD
OF
(
0
,
n0
);
DegreeOfFreedom
dof1
=
el
->
getD
OF
(
1
,
n0
);
DegreeOfFreedom
dof_new
=
el
->
getChild
(
0
)
->
getD
OF
(
feSpace
->
getMesh
()
->
getDim
(),
n0
);
DegreeOfFreedom
dof0
=
el
->
getD
of
(
0
,
n0
);
DegreeOfFreedom
dof1
=
el
->
getD
of
(
1
,
n0
);
DegreeOfFreedom
dof_new
=
el
->
getChild
(
0
)
->
getD
of
(
feSpace
->
getMesh
()
->
getDim
(),
n0
);
vec
[
dof_new
]
=
vec
[
dof0
];
vec
[
dof_new
]
+=
vec
[
dof1
];
vec
[
dof_new
]
*=
0.5
;
...
...
@@ -114,7 +114,7 @@ namespace AMDiS {
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
mesh
,
-
1
,
fillFlag
);
while
(
elInfo
)
{
const
DegreeOfFreedom
**
dof
=
elInfo
->
getElement
()
->
getD
OF
();
const
DegreeOfFreedom
**
dof
=
elInfo
->
getElement
()
->
getD
of
();
const
DimVec
<
WorldVector
<
double
>
>
&
grdLambda
=
elInfo
->
getGrdLambda
();
getLocalVector
(
elInfo
->
getElement
(),
localUh
);
...
...
@@ -186,7 +186,7 @@ namespace AMDiS {
while
(
elInfo
)
{
double
det
=
elInfo
->
getDet
();
const
DegreeOfFreedom
**
dof
=
elInfo
->
getElement
()
->
getD
OF
();
const
DegreeOfFreedom
**
dof
=
elInfo
->
getElement
()
->
getD
of
();
const
DimVec
<
WorldVector
<
double
>
>
&
grdLambda
=
elInfo
->
getGrdLambda
();
getLocalVector
(
elInfo
->
getElement
(),
localUh
);
basFcts
->
evalGrdUh
(
bary
,
grdLambda
,
localUh
,
&
grd
);
...
...
@@ -674,7 +674,7 @@ namespace AMDiS {
ElementVector
localUh
(
basFcts
->
getNumber
());
while
(
elInfo
)
{
const
DegreeOfFreedom
**
dof
=
elInfo
->
getElement
()
->
getD
OF
();
const
DegreeOfFreedom
**
dof
=
elInfo
->
getElement
()
->
getD
of
();
getLocalVector
(
elInfo
->
getElement
(),
localUh
);
const
DimVec
<
WorldVector
<
double
>
>
&
grdLambda
=
elInfo
->
getGrdLambda
();
...
...
AMDiS/src/DataCollector.cc
View file @
739be0ef
...
...
@@ -204,7 +204,7 @@ namespace AMDiS {
{
FUNCNAME
(
"DataCollector::addElementData()"
);
const
DegreeOfFreedom
**
dof
=
elInfo
->
getElement
()
->
getD
OF
();
const
DegreeOfFreedom
**
dof
=
elInfo
->
getElement
()
->
getD
of
();
DegreeOfFreedom
vertexDOF
;
WorldVector
<
double
>
vertexCoords
;
...
...
@@ -384,13 +384,13 @@ namespace AMDiS {
int
index1
=
elInfo
->
getElement
()
->
getVertexOfPosition
(
INDEX_OF_DIM
(
dim
-
1
,
dim
),
it
->
elementSide
,
i
);
int
dof1
=
elInfo
->
getElement
()
->
getD
OF
(
index1
,
nPreDofs
);
int
dof1
=
elInfo
->
getElement
()
->
getD
of
(
index1
,
nPreDofs
);
for
(
int
j
=
0
;
j
<
dim
;
j
++
)
{
int
index2
=
elInfo
->
getElement
()
->
getVertexOfPosition
(
INDEX_OF_DIM
(
dim
-
1
,
dim
),
elInfo
->
getOppVertex
(
it
->
elementSide
),
j
);
int
dof2
=
elInfo
->
getNeighbour
(
it
->
elementSide
)
->
getD
OF
(
index2
,
nPreDofs
);
int
dof2
=
elInfo
->
getNeighbour
(
it
->
elementSide
)
->
getD
of
(
index2
,
nPreDofs
);
if
((
dof1
==
dof2
)
||
(
mesh
->
associated
(
dof1
,
dof2
)))
{
periodicInfo
.
vertexMap
[
index1
]
=
index2
;
...
...
AMDiS/src/Debug.cc
View file @
739be0ef
...
...
@@ -265,7 +265,7 @@ namespace AMDiS {
Mesh
*
mesh
=
feSpace
->
getMesh
();
for
(
int
i
=
0
;
i
<=
mesh
->
getDim
();
i
++
)
{
DegreeOfFreedom
dof
=
el
->
getD
OF
(
i
,
0
);
DegreeOfFreedom
dof
=
el
->
getD
of
(
i
,
0
);
WorldVector
<
double
>
coords
;
mesh
->
getDofIndexCoords
(
dof
,
feSpace
,
coords
);
MSG
(
"%d-th DOF of element %d: %f %f %f
\n
"
,
...
...
@@ -357,7 +357,7 @@ namespace AMDiS {
Element
*
el
=
elInfo
->
getElement
();
for
(
int
i
=
0
;
i
<=
feSpace
->
getMesh
()
->
getDim
();
i
++
)
{
MSG
(
"Coords for DOF %d = %f %f
\n
"
,
*
(
el
->
getD
OF
(
i
)),
(
elInfo
->
getCoord
(
i
))[
0
],
(
elInfo
->
getCoord
(
i
))[
1
]);
*
(
el
->
getD
of
(
i
)),
(
elInfo
->
getCoord
(
i
))[
0
],
(
elInfo
->
getCoord
(
i
))[
1
]);
}
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
...
...
@@ -665,10 +665,10 @@ namespace AMDiS {
Element
*
el
=
elInfo
->
getElement
();
switch
(
dim
)
{
case
2
:
sortDofs
(
el
->
getD
OF
(
0
),
el
->
getD
OF
(
1
),
el
->
getD
OF
(
2
),
elMap
[
el
->
getIndex
()]);
sortDofs
(
el
->
getD
of
(
0
),
el
->
getD
of
(
1
),
el
->
getD
of
(
2
),
elMap
[
el
->
getIndex
()]);
break
;
case
3
:
sortDofs
(
el
->
getD
OF
(
0
),
el
->
getD
OF
(
1
),
el
->
getD
OF
(
2
),
el
->
getD
OF
(
3
),
elMap
[
el
->
getIndex
()]);
sortDofs
(
el
->
getD
of
(
0
),
el
->
getD
of
(
1
),
el
->
getD
of
(
2
),
el
->
getD
of
(
3
),
elMap
[
el
->
getIndex
()]);
break
;
default:
ERROR_EXIT
(
"What is this?
\n
"
);
...
...
@@ -693,10 +693,10 @@ namespace AMDiS {
switch
(
dim
)
{
case
2
:
sortDofs
(
el
->
getD
OF
(
0
),
el
->
getD
OF
(
1
),
el
->
getD
OF
(
2
),
vec
);
sortDofs
(
el
->
getD
of
(
0
),
el
->
getD
of
(
1
),
el
->
getD
of
(
2
),
vec
);
break
;
case
3
:
sortDofs
(
el
->
getD
OF
(
0
),
el
->
getD
OF
(
1
),
el
->
getD
OF
(
2
),
el
->
getD
OF
(
3
),
vec
);
sortDofs
(
el
->
getD
of
(
0
),
el
->
getD
of
(
1
),
el
->
getD
of
(
2
),
el
->
getD
of
(
3
),
vec
);
break
;
default:
ERROR_EXIT
(
"What is this?
\n
"
);
...
...
AMDiS/src/ElInfo.h
View file @
739be0ef
...
...
@@ -200,7 +200,7 @@ namespace AMDiS {
}
/// Get ElInfo's \ref oppVertex[i]
inline
unsigned
char
getOppVertex
(
int
i
)
const
inline
int
getOppVertex
(
int
i
)
const
{
return
oppVertex
[
i
];
}
...
...
@@ -524,7 +524,7 @@ namespace AMDiS {
* Otherwise it is the local index of the neighbour's vertex opposite the
* common edge/face.
*/
FixVec
<
unsigned
char
,
NEIGH
>
oppVertex
;
FixVec
<
int
,
NEIGH
>
oppVertex
;
/// Elements determinant.
double
det
;
...
...
AMDiS/src/ElInfo2d.cc
View file @
739be0ef
...
...
@@ -250,10 +250,10 @@ namespace AMDiS {
break
;
case
2
:
if
(
*
(
macroNeighbour
->
getElement
()
->
getD
OF
(
2
))
==
*
(
element
->
getD
OF
(
0
)))
{
if
(
*
(
macroNeighbour
->
getElement
()
->
getD
of
(
2
))
==
*
(
element
->
getD
of
(
0
)))
{
neighbourCoord
[
i
][
0
]
=
macroNeighbour
->
coord
[
2
];
neighbourCoord
[
i
][
1
]
=
macroNeighbour
->
coord
[
1
];
}
else
if
(
*
(
macroNeighbour
->
getElement
()
->
getD
OF
(
2
))
==
*
(
element
->
getD
OF
(
1
)))
{
}
else
if
(
*
(
macroNeighbour
->
getElement
()
->
getD
of
(
2
))
==
*
(
element
->
getD
of
(
1
)))
{
neighbourCoord
[
i
][
0
]
=
macroNeighbour
->
coord
[
0
];
neighbourCoord
[
i
][
1
]
=
macroNeighbour
->
coord
[
2
];
}
else
{
...
...
@@ -411,9 +411,17 @@ namespace AMDiS {
Element
*
nb
=
elInfoOld
->
neighbour
[
2
];
if
(
nb
)
{
TEST
(
elInfoOld
->
oppVertex
[
2
]
==
2
)(
"invalid neighbour
\n
"
);
TEST_EXIT_DBG
(
nb
->
getFirstChild
())(
"missing first child?
\n
"
);
TEST_EXIT_DBG
(
nb
->
getSecondChild
())(
"missing second child?
\n
"
);
TEST_EXIT_DBG
(
elInfoOld
->
oppVertex
[
2
]
==
2
)
(
"Fill child %d of element %d (mel %d): Invalid neighbour %d!
\n
"
,
ichild
,
elInfoOld
->
getElement
()
->
getIndex
(),
elInfoOld
->
getMacroElement
()
->
getIndex
(),
nb
->
getIndex
());
TEST_EXIT_DBG
(
nb
->
getFirstChild
())
(
"Missing first child in element %d!
\n
"
,
nb
->
getIndex
());
TEST_EXIT_DBG
(
nb
->
getSecondChild
())
(
"Missing second child in element %d!
\n
"
,
nb
->
getIndex
());
nb
=
nb
->
getSecondChild
();
...
...
AMDiS/src/ElInfo3d.cc
View file @
739be0ef
...
...
@@ -414,12 +414,12 @@ namespace AMDiS {
if
(
fill_opp_coords
!=
Flag
(
0
))
{
int
k
=
-
1
;
for
(
int
j
=
0
;
j
<
vertices
;
j
++
)
if
(
element
->
getD
OF
(
j
)
==
nb
->
getD
OF
(
1
-
ov
))
if
(
element
->
getD
of
(
j
)
==
nb
->
getD
of
(
1
-
ov
))
k
=
j
;
if
(
k
==
-
1
)
{
for
(
int
j
=
0
;
j
<
vertices
;
j
++
)
if
(
mesh
->
associated
(
element
->
getD
OF
(
j
,
0
),
nb
->
getD
OF
(
1
-
ov
,
0
)))
if
(
mesh
->
associated
(
element
->
getD
of
(
j
,
0
),
nb
->
getD
of
(
1
-
ov
,
0
)))
k
=
j
;
}
TEST_EXIT_DBG
(
k
>=
0
)(
"neighbour dof not found
\n
"
);
...
...
@@ -585,11 +585,11 @@ namespace AMDiS {
int
k
;
for
(
k
=
0
;
k
<
2
;
k
++
)
{
/* look at both childs of old neighbour */
nbk
=
const_cast
<
Element
*>
(
nb
->
getChild
(
k
));
if
(
nbk
->
getD
OF
(
0
)
==
el_old
->
getD
OF
(
ichild
))
{
if
(
nbk
->
getD
of
(
0
)
==
el_old
->
getD
of
(
ichild
))
{
/* opp. vertex */
dof
=
const_cast
<
int
*>
(
nb
->
getD
OF
(
elInfoOld
->
oppVertex
[
cv
[
i
]]));
dof
=
const_cast
<
int
*>
(
nb
->
getD
of
(
elInfoOld
->
oppVertex
[
cv
[
i
]]));
if
(
dof
==
nbk
->
getD
OF
(
1
))
{
if
(
dof
==
nbk
->
getD
of
(
1
))
{
ov
=
1
;
if
(
nbk
->
getChild
(
0
))
{
if
(
fill_opp_coords
.
isAnySet
())
{
...
...
@@ -606,7 +606,7 @@ namespace AMDiS {
break
;
}
}
else
{
if
(
dof
!=
nbk
->
getD
OF
(
2
))
{
if
(
dof
!=
nbk
->
getD
of
(
2
))
{
ov
=
-
1
;
break
;
}
...
...
@@ -628,13 +628,13 @@ namespace AMDiS {
if
(
k
==
2
||
ov
==
-
1
)
{
for
(
k
=
0
;
k
<
2
;
k
++
)
{
/* look at both childs of old neighbour */
nbk
=
const_cast
<
Element
*>
(
nb
->
getChild
(
k
));
if
(
nbk
->
getD
OF
(
0
)
==
el_old
->
getD
OF
(
ichild
)
||
mesh
->
associated
(
nbk
->
getD
OF
(
0
,
0
),
el_old
->
getD
OF
(
ichild
,
0
)))
{
if
(
nbk
->
getD
of
(
0
)
==
el_old
->
getD
of
(
ichild
)
||
mesh
->
associated
(
nbk
->
getD
of
(
0
,
0
),
el_old
->
getD
of
(
ichild
,
0
)))
{
/* opp. vertex */
dof
=
const_cast
<
int
*>
(
nb
->
getD
OF
(
elInfoOld
->
oppVertex
[
cv
[
i
]]));
dof
=
const_cast
<
int
*>
(
nb
->
getD
of
(
elInfoOld
->
oppVertex
[
cv
[
i
]]));
if
(
dof
==
nbk
->
getD
OF
(
1
)
||
mesh
->
associated
(
dof
[
0
],
nbk
->
getD
OF
(
1
,
0
)))
{
if
(
dof
==
nbk
->
getD
of
(
1
)
||
mesh
->
associated
(
dof
[
0
],
nbk
->
getD
of
(
1
,
0
)))
{
ov
=
1
;
if
(
nbk
->
getChild
(
0
))
{
if
(
fill_opp_coords
.
isAnySet
())
{
...
...
@@ -651,8 +651,8 @@ namespace AMDiS {
break
;
}
}
else
{
TEST_EXIT_DBG
(
dof
==
nbk
->
getD
OF
(
2
)
||
mesh
->
associated
(
dof
[
0
],
nbk
->
getD
OF
(
2
,
0
)))
TEST_EXIT_DBG
(
dof
==
nbk
->
getD
of
(
2
)
||
mesh
->
associated
(
dof
[
0
],
nbk
->
getD
of
(
2
,
0
)))
(
"opp_vertex not found
\n
"
);
ov
=
2
;
}
...
...
AMDiS/src/Element.cc
View file @
739be0ef