Commit a71670c0 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed bug when coarsening periodic DOFs.

parent 5ee37e42
#! /bin/bash #! /bin/sh
# libtoolT - Provide generalized library-building support services. # libtoolT - Provide generalized library-building support services.
# Generated automatically by (GNU AMDiS 0.1) # Generated automatically by (GNU AMDiS 0.1)
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
# the same distribution terms that you use for the rest of that program. # the same distribution terms that you use for the rest of that program.
# A sed program that does not truncate output. # A sed program that does not truncate output.
SED="/bin/sed" SED="/usr/bin/sed"
# Sed that helps us avoid accidentally triggering echo(1) options like -n. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
Xsed="/bin/sed -e 1s/^X//" Xsed="/usr/bin/sed -e 1s/^X//"
# The HP-UX ksh and POSIX shell print the target directory to stdout # The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set. # if CDPATH is set.
...@@ -44,10 +44,10 @@ available_tags=" CXX F77" ...@@ -44,10 +44,10 @@ available_tags=" CXX F77"
# ### BEGIN LIBTOOL CONFIG # ### BEGIN LIBTOOL CONFIG
# Libtool was configured on host laptop: # Libtool was configured on host linux-dxyz.site:
# Shell to use when invoking shell scripts. # Shell to use when invoking shell scripts.
SHELL="/bin/bash" SHELL="/bin/sh"
# Whether or not to build shared libraries. # Whether or not to build shared libraries.
build_libtool_libs=yes build_libtool_libs=yes
...@@ -66,12 +66,12 @@ fast_install=yes ...@@ -66,12 +66,12 @@ fast_install=yes
# The host system. # The host system.
host_alias= host_alias=
host=i686-pc-linux-gnu host=x86_64-unknown-linux-gnu
host_os=linux-gnu host_os=linux-gnu
# The build system. # The build system.
build_alias= build_alias=
build=i686-pc-linux-gnu build=x86_64-unknown-linux-gnu
build_os=linux-gnu build_os=linux-gnu
# An echo program that does not interpret backslashes. # An echo program that does not interpret backslashes.
...@@ -97,7 +97,7 @@ with_gcc=yes ...@@ -97,7 +97,7 @@ with_gcc=yes
EGREP="grep -E" EGREP="grep -E"
# The linker used to build libraries. # The linker used to build libraries.
LD="/usr/bin/ld" LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
# Whether we need hard or soft links. # Whether we need hard or soft links.
LN_S="ln -s" LN_S="ln -s"
...@@ -325,10 +325,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM ...@@ -325,10 +325,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM
link_all_deplibs=unknown link_all_deplibs=unknown
# Compile-time system search path for libraries # Compile-time system search path for libraries
sys_lib_search_path_spec=" =./i486-linux-gnu/4.4.3/ ./../lib/ /opt/petsc/lib/i486-linux-gnu/4.4.3/ /opt/petsc/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.4.3/ /usr/lib/gcc/i486-linux-gnu/4.4.3/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../i486-linux-gnu/lib/i486-linux-gnu/4.4.3/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../i486-linux-gnu/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../i486-linux-gnu/4.4.3/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/ /lib/i486-linux-gnu/4.4.3/ /lib/../lib/ /usr/lib/i486-linux-gnu/4.4.3/ /usr/lib/../lib/ /usr/lib/i486-linux-gnu/i486-linux-gnu/4.4.3/ /usr/lib/i486-linux-gnu/../lib/ ./ /opt/petsc/lib/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../i486-linux-gnu/lib/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../ /lib/ /usr/lib/ /usr/lib/i486-linux-gnu/" sys_lib_search_path_spec=" /usr/lib64/gcc/x86_64-suse-linux/4.5/ /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/lib/x86_64-suse-linux/4.5/ /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../x86_64-suse-linux/4.5/ /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../lib64/ /lib/x86_64-suse-linux/4.5/ /lib/../lib64/ /usr/lib/x86_64-suse-linux/4.5/ /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/../../../ /lib/ /usr/lib/"
# Run-time system search path for libraries # Run-time system search path for libraries
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/nvidia-current /usr/lib/atlas /opt/cuda/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /opt/kde3/lib/ /usr/lib/alsa-lib /usr/local/lib " 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 "
# Fix the shell variable $srcfile for the compiler. # Fix the shell variable $srcfile for the compiler.
fix_srcfile_path="" fix_srcfile_path=""
...@@ -7263,10 +7263,10 @@ disable_libs=static ...@@ -7263,10 +7263,10 @@ disable_libs=static
# End: # End:
# ### BEGIN LIBTOOL TAG CONFIG: CXX # ### BEGIN LIBTOOL TAG CONFIG: CXX
# Libtool was configured on host laptop: # Libtool was configured on host linux-dxyz.site:
# Shell to use when invoking shell scripts. # Shell to use when invoking shell scripts.
SHELL="/bin/bash" SHELL="/bin/sh"
# Whether or not to build shared libraries. # Whether or not to build shared libraries.
build_libtool_libs=yes build_libtool_libs=yes
...@@ -7285,12 +7285,12 @@ fast_install=yes ...@@ -7285,12 +7285,12 @@ fast_install=yes
# The host system. # The host system.
host_alias= host_alias=
host=i686-pc-linux-gnu host=x86_64-unknown-linux-gnu
host_os=linux-gnu host_os=linux-gnu
# The build system. # The build system.
build_alias= build_alias=
build=i686-pc-linux-gnu build=x86_64-unknown-linux-gnu
build_os=linux-gnu build_os=linux-gnu
# An echo program that does not interpret backslashes. # An echo program that does not interpret backslashes.
...@@ -7316,7 +7316,7 @@ with_gcc=yes ...@@ -7316,7 +7316,7 @@ with_gcc=yes
EGREP="grep -E" EGREP="grep -E"
# The linker used to build libraries. # The linker used to build libraries.
LD="/usr/bin/ld" LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
# Whether we need hard or soft links. # Whether we need hard or soft links.
LN_S="ln -s" LN_S="ln -s"
...@@ -7445,11 +7445,11 @@ striplib="strip --strip-unneeded" ...@@ -7445,11 +7445,11 @@ striplib="strip --strip-unneeded"
# Dependencies to place before the objects being linked to create a # Dependencies to place before the objects being linked to create a
# shared library. # shared library.
predep_objects="/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.4.3/crtbeginS.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"
# Dependencies to place after the objects being linked to create a # Dependencies to place after the objects being linked to create a
# shared library. # shared library.
postdep_objects="/usr/lib/gcc/i486-linux-gnu/4.4.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crtn.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"
# Dependencies to place before the objects being linked to create a # Dependencies to place before the objects being linked to create a
# shared library. # shared library.
...@@ -7461,7 +7461,7 @@ postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" ...@@ -7461,7 +7461,7 @@ postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
# The library search path used internally by the compiler when linking # The library search path used internally by the compiler when linking
# a shared library. # a shared library.
compiler_lib_search_path="-L/opt/petsc/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.4.3 -L/usr/lib/gcc/i486-linux-gnu/4.4.3 -L/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L. -L/opt/petsc/lib -L/usr/lib/gcc/i486-linux-gnu/4.4.3/../../.. -L/usr/lib/i486-linux-gnu" compiler_lib_search_path="-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/../../.."
# Method to check whether dependent libraries are shared objects. # Method to check whether dependent libraries are shared objects.
deplibs_check_method="pass_all" deplibs_check_method="pass_all"
...@@ -7541,10 +7541,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM ...@@ -7541,10 +7541,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM
link_all_deplibs=unknown link_all_deplibs=unknown
# Compile-time system search path for libraries # Compile-time system search path for libraries
sys_lib_search_path_spec=" =./i486-linux-gnu/4.4.3/ ./../lib/ /opt/petsc/lib/i486-linux-gnu/4.4.3/ /opt/petsc/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.4.3/ /usr/lib/gcc/i486-linux-gnu/4.4.3/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../i486-linux-gnu/lib/i486-linux-gnu/4.4.3/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../i486-linux-gnu/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../i486-linux-gnu/4.4.3/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/ /lib/i486-linux-gnu/4.4.3/ /lib/../lib/ /usr/lib/i486-linux-gnu/4.4.3/ /usr/lib/../lib/ /usr/lib/i486-linux-gnu/i486-linux-gnu/4.4.3/ /usr/lib/i486-linux-gnu/../lib/ ./ /opt/petsc/lib/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../i486-linux-gnu/lib/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../ /lib/ /usr/lib/ /usr/lib/i486-linux-gnu/" sys_lib_search_path_spec=" /usr/lib64/gcc/x86_64-suse-linux/4.5/ /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/lib/x86_64-suse-linux/4.5/ /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../x86_64-suse-linux/4.5/ /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../lib64/ /lib/x86_64-suse-linux/4.5/ /lib/../lib64/ /usr/lib/x86_64-suse-linux/4.5/ /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/../../../ /lib/ /usr/lib/"
# Run-time system search path for libraries # Run-time system search path for libraries
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/nvidia-current /usr/lib/atlas /opt/cuda/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /opt/kde3/lib/ /usr/lib/alsa-lib /usr/local/lib " 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 "
# Fix the shell variable $srcfile for the compiler. # Fix the shell variable $srcfile for the compiler.
fix_srcfile_path="" fix_srcfile_path=""
...@@ -7568,10 +7568,10 @@ include_expsyms="" ...@@ -7568,10 +7568,10 @@ include_expsyms=""
# ### BEGIN LIBTOOL TAG CONFIG: F77 # ### BEGIN LIBTOOL TAG CONFIG: F77
# Libtool was configured on host laptop: # Libtool was configured on host linux-dxyz.site:
# Shell to use when invoking shell scripts. # Shell to use when invoking shell scripts.
SHELL="/bin/bash" SHELL="/bin/sh"
# Whether or not to build shared libraries. # Whether or not to build shared libraries.
build_libtool_libs=yes build_libtool_libs=yes
...@@ -7590,12 +7590,12 @@ fast_install=yes ...@@ -7590,12 +7590,12 @@ fast_install=yes
# The host system. # The host system.
host_alias= host_alias=
host=i686-pc-linux-gnu host=x86_64-unknown-linux-gnu
host_os=linux-gnu host_os=linux-gnu
# The build system. # The build system.
build_alias= build_alias=
build=i686-pc-linux-gnu build=x86_64-unknown-linux-gnu
build_os=linux-gnu build_os=linux-gnu
# An echo program that does not interpret backslashes. # An echo program that does not interpret backslashes.
...@@ -7612,7 +7612,7 @@ LTCC="gcc" ...@@ -7612,7 +7612,7 @@ LTCC="gcc"
LTCFLAGS="-g -O2" LTCFLAGS="-g -O2"
# A language-specific compiler. # A language-specific compiler.
CC="f95" CC="gfortran"
# Is the compiler the GNU C compiler? # Is the compiler the GNU C compiler?
with_gcc=yes with_gcc=yes
...@@ -7621,7 +7621,7 @@ with_gcc=yes ...@@ -7621,7 +7621,7 @@ with_gcc=yes
EGREP="grep -E" EGREP="grep -E"
# The linker used to build libraries. # The linker used to build libraries.
LD="/usr/bin/ld" LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
# Whether we need hard or soft links. # Whether we need hard or soft links.
LN_S="ln -s" LN_S="ln -s"
...@@ -7849,10 +7849,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM ...@@ -7849,10 +7849,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM
link_all_deplibs=unknown link_all_deplibs=unknown
# Compile-time system search path for libraries # Compile-time system search path for libraries
sys_lib_search_path_spec=" =./i486-linux-gnu/4.4.3/ ./../lib/ /opt/petsc/lib/i486-linux-gnu/4.4.3/ /opt/petsc/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.4.3/ /usr/lib/gcc/i486-linux-gnu/4.4.3/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../i486-linux-gnu/lib/i486-linux-gnu/4.4.3/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../i486-linux-gnu/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../i486-linux-gnu/4.4.3/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/ /lib/i486-linux-gnu/4.4.3/ /lib/../lib/ /usr/lib/i486-linux-gnu/4.4.3/ /usr/lib/../lib/ /usr/lib/i486-linux-gnu/i486-linux-gnu/4.4.3/ /usr/lib/i486-linux-gnu/../lib/ ./ /opt/petsc/lib/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../i486-linux-gnu/lib/ /usr/lib/gcc/i486-linux-gnu/4.4.3/../../../ /lib/ /usr/lib/ /usr/lib/i486-linux-gnu/" sys_lib_search_path_spec=" /usr/lib64/gcc/x86_64-suse-linux/4.5/ /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/lib/x86_64-suse-linux/4.5/ /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../x86_64-suse-linux/4.5/ /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../lib64/ /lib/x86_64-suse-linux/4.5/ /lib/../lib64/ /usr/lib/x86_64-suse-linux/4.5/ /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/../../../ /lib/ /usr/lib/"
# Run-time system search path for libraries # Run-time system search path for libraries
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/nvidia-current /usr/lib/atlas /opt/cuda/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /opt/kde3/lib/ /usr/lib/alsa-lib /usr/local/lib " 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 "
# Fix the shell variable $srcfile for the compiler. # Fix the shell variable $srcfile for the compiler.
fix_srcfile_path="" fix_srcfile_path=""
......
...@@ -102,13 +102,13 @@ namespace AMDiS { ...@@ -102,13 +102,13 @@ namespace AMDiS {
if (mesh->getNumberOfDOFs(VERTEX)) /*--- midpoint of parent ---*/ if (mesh->getNumberOfDOFs(VERTEX)) /*--- midpoint of parent ---*/
{ {
mesh->freeDOF(const_cast<int*>( child[1]->getDOF(mesh->getNode(VERTEX))), VERTEX); mesh->freeDof(const_cast<int*>( child[1]->getDOF(mesh->getNode(VERTEX))), VERTEX);
} }
if (mesh->getNumberOfDOFs(CENTER)) /*--- center of the children ---*/ if (mesh->getNumberOfDOFs(CENTER)) /*--- center of the children ---*/
{ {
mesh->freeDOF(const_cast<int*>( child[0]->getDOF(mesh->getNode(CENTER))), CENTER); mesh->freeDof(const_cast<int*>( child[0]->getDOF(mesh->getNode(CENTER))), CENTER);
mesh->freeDOF(const_cast<int*>( child[1]->getDOF(mesh->getNode(CENTER))), CENTER); mesh->freeDof(const_cast<int*>( child[1]->getDOF(mesh->getNode(CENTER))), CENTER);
} }
parent->coarsenElementData(child[0], child[1]); parent->coarsenElementData(child[0], child[1]);
......
...@@ -31,14 +31,14 @@ namespace AMDiS { ...@@ -31,14 +31,14 @@ namespace AMDiS {
// remove dof from common edge of child[0] and child[1] // remove dof from common edge of child[0] and child[1]
if (mesh->getNumberOfDOFs(EDGE)) if (mesh->getNumberOfDOFs(EDGE))
mesh->freeDOF(const_cast<int*>(child[0]->getDOF(4)), EDGE); mesh->freeDof(const_cast<int*>(child[0]->getDOF(4)), EDGE);
// remove dof from the barycenters of child[0] and child[1] // remove dof from the barycenters of child[0] and child[1]
if (mesh->getNumberOfDOFs(CENTER)) { if (mesh->getNumberOfDOFs(CENTER)) {
int node = mesh->getNode(CENTER); int node = mesh->getNode(CENTER);
mesh->freeDOF(const_cast<int*>(child[0]->getDOF(node)), CENTER); mesh->freeDof(const_cast<int*>(child[0]->getDOF(node)), CENTER);
mesh->freeDOF(const_cast<int*>(child[1]->getDOF(node)), CENTER); mesh->freeDof(const_cast<int*>(child[1]->getDOF(node)), CENTER);
} }
el->coarsenElementData(child[0], child[1]); el->coarsenElementData(child[0], child[1]);
...@@ -110,16 +110,17 @@ namespace AMDiS { ...@@ -110,16 +110,17 @@ namespace AMDiS {
// now, remove those dofs in the coarcening edge // now, remove those dofs in the coarcening edge
mesh->freeDOF(dof[0], VERTEX); mesh->freeDof(dof[0], VERTEX);
if (mesh->getNumberOfDOFs(EDGE)) { if (mesh->getNumberOfDOFs(EDGE)) {
mesh->freeDOF(dof[1], EDGE); mesh->freeDof(dof[1], EDGE);
mesh->freeDOF(dof[2], EDGE); mesh->freeDof(dof[2], EDGE);
} }
mesh->incrementNumberOfVertices(-1); mesh->incrementNumberOfVertices(-1);
mesh->incrementNumberOfEdges(-1); mesh->incrementNumberOfEdges(-1);
} }
int CoarseningManager2d::coarsenFunction(ElInfo *el_info) 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()));
......
...@@ -12,7 +12,7 @@ namespace AMDiS { ...@@ -12,7 +12,7 @@ namespace AMDiS {
int CoarseningManager3d::coarsenFunction(ElInfo *el_info) int CoarseningManager3d::coarsenFunction(ElInfo *el_info)
{ {
Tetrahedron *el = dynamic_cast<Tetrahedron*>(const_cast<Element*>( el_info->getElement())); Tetrahedron *el = dynamic_cast<Tetrahedron*>(const_cast<Element*>(el_info->getElement()));
DegreeOfFreedom *edge[2]; DegreeOfFreedom *edge[2];
int n_neigh, bound = 0; int n_neigh, bound = 0;
ElInfo *elinfo = el_info; ElInfo *elinfo = el_info;
...@@ -77,9 +77,7 @@ namespace AMDiS { ...@@ -77,9 +77,7 @@ namespace AMDiS {
if (coarsenList->doCoarsePatch(n_neigh)) { if (coarsenList->doCoarsePatch(n_neigh)) {
int n_neigh_periodic; int n_neigh_periodic;
DegreeOfFreedom *next_edge[2]; DegreeOfFreedom *next_edge[2];
RCNeighbourList *periodicList; RCNeighbourList *periodicList;
while (edge[0] != NULL) { while (edge[0] != NULL) {
...@@ -110,14 +108,15 @@ namespace AMDiS { ...@@ -110,14 +108,15 @@ namespace AMDiS {
/*****************************************************************************/ /*****************************************************************************/
void CoarseningManager3d::coarsenTetrahedron(RCNeighbourList *coarsenList, void CoarseningManager3d::coarsenTetrahedron(RCNeighbourList *coarsenList,
int index) int index)
{ {
Tetrahedron *el = dynamic_cast<Tetrahedron*>(const_cast<Element*>( coarsenList->getElement(index))), *child[2]; Tetrahedron *el = dynamic_cast<Tetrahedron*>(const_cast<Element*>(coarsenList->getElement(index)));
Tetrahedron *child[2];
Tetrahedron *neigh; Tetrahedron *neigh;
int dir, el_type, i, node, opp_v; int dir, el_type, i, node, opp_v;
child[0] = dynamic_cast<Tetrahedron*>(const_cast<Element*>( el->getChild(0))); child[0] = dynamic_cast<Tetrahedron*>(const_cast<Element*>(el->getChild(0)));
child[1] = dynamic_cast<Tetrahedron*>(const_cast<Element*>( el->getChild(1))); child[1] = dynamic_cast<Tetrahedron*>(const_cast<Element*>(el->getChild(1)));
el_type = coarsenList->getType(index); el_type = coarsenList->getType(index);
/****************************************************************************/ /****************************************************************************/
...@@ -136,15 +135,14 @@ namespace AMDiS { ...@@ -136,15 +135,14 @@ namespace AMDiS {
if (mesh->getNumberOfDOFs(EDGE)) { if (mesh->getNumberOfDOFs(EDGE)) {
node = mesh->getNode(EDGE) + Tetrahedron::nChildEdge[el_type][0][dir]; node = mesh->getNode(EDGE) + Tetrahedron::nChildEdge[el_type][0][dir];
mesh->freeDOF(const_cast<int*>( child[0]->getDOF(node)), EDGE); mesh->freeDof(const_cast<int*>( child[0]->getDOF(node)), EDGE);
}
if (mesh->getNumberOfDOFs(FACE)) {
node = mesh->getNode(FACE) + Tetrahedron::nChildFace[el_type][0][dir];
mesh->freeDof(const_cast<int*>( child[0]->getDOF(node)), FACE);
node = mesh->getNode(FACE) + Tetrahedron::nChildFace[el_type][1][dir];
mesh->freeDof(const_cast<int*>( child[1]->getDOF(node)), FACE);
} }
if (mesh->getNumberOfDOFs(FACE))
{
node = mesh->getNode(FACE) + Tetrahedron::nChildFace[el_type][0][dir];
mesh->freeDOF(const_cast<int*>( child[0]->getDOF(node)), FACE);
node = mesh->getNode(FACE) + Tetrahedron::nChildFace[el_type][1][dir];
mesh->freeDOF(const_cast<int*>( child[1]->getDOF(node)), FACE);
}
} }
} }
...@@ -155,14 +153,14 @@ namespace AMDiS { ...@@ -155,14 +153,14 @@ namespace AMDiS {
if (mesh->getNumberOfDOFs(FACE)) { if (mesh->getNumberOfDOFs(FACE)) {
node = mesh->getNode(FACE); node = mesh->getNode(FACE);
mesh->freeDOF(const_cast<int*>( child[0]->getDOF(node)), FACE); mesh->freeDof(const_cast<int*>( child[0]->getDOF(node)), FACE);
} }
if (mesh->getNumberOfDOFs(CENTER)) { if (mesh->getNumberOfDOFs(CENTER)) {
node = mesh->getNode(CENTER); node = mesh->getNode(CENTER);
for (i = 0; i < 2; i++) for (i = 0; i < 2; i++)
mesh->freeDOF(const_cast<int*>( child[i]->getDOF(node)), CENTER); mesh->freeDof(const_cast<int*>( child[i]->getDOF(node)), CENTER);
} }
/****************************************************************************/ /****************************************************************************/
...@@ -181,8 +179,6 @@ namespace AMDiS { ...@@ -181,8 +179,6 @@ namespace AMDiS {
mesh->incrementNumberOfLeaves(-1); mesh->incrementNumberOfLeaves(-1);
mesh->incrementNumberOfElements(-2); mesh->incrementNumberOfElements(-2);
return;
} }
/****************************************************************************/ /****************************************************************************/
...@@ -201,16 +197,16 @@ namespace AMDiS { ...@@ -201,16 +197,16 @@ namespace AMDiS {
/* the starting element before we return */ /* the starting element before we return */
/****************************************************************************/ /****************************************************************************/
bool CoarseningManager3d::getCoarsenPatch(ElInfo *el_info, bool CoarseningManager3d::getCoarsenPatch(ElInfo *el_info,
DegreeOfFreedom *edge[2], DegreeOfFreedom *edge[2],
int dir, int dir,
RCNeighbourList *coarsenList, RCNeighbourList *coarsenList,
int *n_neigh) int *n_neigh)
{ {
FUNCNAME("CoarseningManager3d::getCoarsenPatch"); FUNCNAME("CoarseningManager3d::getCoarsenPatch");
ElInfo *neigh_info; ElInfo *neigh_info;
Tetrahedron *el, *neigh; Tetrahedron *el, *neigh;
int i, j, k, opp_v, edge_no; int i, j, k, opp_v, edge_no;
static unsigned char next_el[6][2] = {{3,2}, static unsigned char next_el[6][2] = {{3,2},
{1,3}, {1,3},
...@@ -246,7 +242,7 @@ namespace AMDiS { ...@@ -246,7 +242,7 @@ namespace AMDiS {
for (k = 0; k < n_vertices; k++) for (k = 0; k < n_vertices; k++)
if (neigh->getDOF(k) == edge[1]) break; if (neigh->getDOF(k) == edge[1]) break;
if(j > 3 || k > 3) { if (j > 3 || k > 3) {
for (j = 0; j < n_vertices; j++) for (j = 0; j < n_vertices; j++)
if (mesh->associated(neigh->getDOF(j, 0), edge[0][0])) break; if (mesh->associated(neigh->getDOF(j, 0), edge[0][0])) break;
for (k = 0; k < n_vertices; k++) for (k = 0; k < n_vertices; k++)
...@@ -315,11 +311,11 @@ namespace AMDiS { ...@@ -315,11 +311,11 @@ namespace AMDiS {
/****************************************************************************/ /****************************************************************************/
void CoarseningManager3d::coarsenPatch(RCNeighbourList *coarsenList, void CoarseningManager3d::coarsenPatch(RCNeighbourList *coarsenList,
int n_neigh, int n_neigh,
int bound) int bound)
{ {
Tetrahedron *el = dynamic_cast<Tetrahedron*>(const_cast<Element*>( coarsenList->getElement(0))); Tetrahedron *el = dynamic_cast<Tetrahedron*>(const_cast<Element*>( coarsenList->getElement(0)));
int i, node; int i, node;
DegreeOfFreedom *dof; DegreeOfFreedom *dof;
if (mesh->getNumberOfDOFs(EDGE)) { if (mesh->getNumberOfDOFs(EDGE)) {
...@@ -329,28 +325,28 @@ namespace AMDiS { ...@@ -329,28 +325,28 @@ namespace AMDiS {
node = mesh->getNode(EDGE); node = mesh->getNode(EDGE);
if (!(dof = const_cast<int*>( el->getDOF(node)))) if (!(dof = const_cast<int*>( el->getDOF(node))))
dof = mesh->getDOF(EDGE); dof = mesh->getDOF(EDGE);
} else } else {
dof = NULL; dof = NULL;
}
if (mesh->getNumberOfDOFs(EDGE) || if (mesh->getNumberOfDOFs(EDGE) ||
mesh->getNumberOfDOFs(FACE) || mesh->getNumberOfDOFs(FACE) ||
mesh->getNumberOfDOFs(CENTER)) mesh->getNumberOfDOFs(CENTER)) {
{ for (i = 0; i < n_neigh; i++)
for (i = 0; i < n_neigh; i++) coarsenList->addDOFParent(i, dof);
coarsenList->addDOFParent(i, dof); }
}
/****************************************************************************/ /****************************************************************************/
/* restrict dof vectors to the parents on the patch */ /* restrict dof vectors to the parents on the patch */
/****************************************************************************/ /****************************************************************************/
int iadmin;
int nrAdmin = mesh->getNumberOfDOFAdmin(); int nrAdmin = mesh->getNumberOfDOFAdmin();
for(iadmin = 0; iadmin < nrAdmin; iadmin++) { for (int iadmin = 0; iadmin < nrAdmin; iadmin++) {
std::list<DOFIndexedBase*>::iterator it; std::list<DOFIndexedBase*>::iterator it;
DOFAdmin* admin = const_cast<DOFAdmin*>(&mesh->getDOFAdmin(iadmin)); DOFAdmin* admin = const_cast<DOFAdmin*>(&mesh->getDOFAdmin(iadmin));
std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed(); std::list<DOFIndexedBase*>::iterator end = admin->endDOFIndexed();
for(it = admin->beginDOFIndexed(); it != end; ++it) for (it = admin->beginDOFIndexed(); it != end; ++it)