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
Backofen, Rainer
amdis
Commits
a71670c0
Commit
a71670c0
authored
Sep 19, 2010
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug when coarsening periodic DOFs.
parent
5ee37e42
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
111 additions
and
109 deletions
+111
-109
AMDiS/libtool
AMDiS/libtool
+28
-28
AMDiS/src/CoarseningManager1d.cc
AMDiS/src/CoarseningManager1d.cc
+3
-3
AMDiS/src/CoarseningManager2d.cc
AMDiS/src/CoarseningManager2d.cc
+7
-6
AMDiS/src/CoarseningManager3d.cc
AMDiS/src/CoarseningManager3d.cc
+45
-54
AMDiS/src/DOFAdmin.cc
AMDiS/src/DOFAdmin.cc
+3
-3
AMDiS/src/MacroReader.cc
AMDiS/src/MacroReader.cc
+1
-1
AMDiS/src/Mesh.cc
AMDiS/src/Mesh.cc
+7
-6
AMDiS/src/Mesh.h
AMDiS/src/Mesh.h
+1
-1
AMDiS/src/RCNeighbourList.cc
AMDiS/src/RCNeighbourList.cc
+4
-4
AMDiS/src/RefinementManager1d.cc
AMDiS/src/RefinementManager1d.cc
+1
-1
AMDiS/src/RefinementManager2d.cc
AMDiS/src/RefinementManager2d.cc
+1
-1
AMDiS/src/RefinementManager3d.cc
AMDiS/src/RefinementManager3d.cc
+1
-1
AMDiS/src/VertexVector.h
AMDiS/src/VertexVector.h
+9
-0
No files found.
AMDiS/libtool
View file @
a71670c0
#! /bin/
ba
sh
#! /bin/sh
# libtoolT - Provide generalized library-building support services.
# Generated automatically by (GNU AMDiS 0.1)
...
...
@@ -30,10 +30,10 @@
# the same distribution terms that you use for the rest of that program.
# 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.
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
# if CDPATH is set.
...
...
@@ -44,10 +44,10 @@ available_tags=" CXX F77"
# ### BEGIN LIBTOOL CONFIG
# Libtool was configured on host l
aptop
:
# Libtool was configured on host l
inux-dxyz.site
:
# Shell to use when invoking shell scripts.
SHELL
=
"/bin/
ba
sh"
SHELL
=
"/bin/sh"
# Whether or not to build shared libraries.
build_libtool_libs
=
yes
...
...
@@ -66,12 +66,12 @@ fast_install=yes
# The host system.
host_alias
=
host
=
i686-pc
-linux-gnu
host
=
x86_64-unknown
-linux-gnu
host_os
=
linux-gnu
# The build system.
build_alias
=
build
=
i686-pc
-linux-gnu
build
=
x86_64-unknown
-linux-gnu
build_os
=
linux-gnu
# An echo program that does not interpret backslashes.
...
...
@@ -97,7 +97,7 @@ with_gcc=yes
EGREP
=
"grep -E"
# 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.
LN_S
=
"ln -s"
...
...
@@ -325,10 +325,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM
link_all_deplibs
=
unknown
# 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/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../
x86_64-suse
-linux/lib/
x86_64-suse-linux/4.5
/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../
x86_64-suse
-linux/lib/../lib
64
/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5/../../../x86_64-suse-linux/4.5
/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../lib
64
/ /lib/
x86_64-suse-linux/4.5/
/lib/../lib
64
/ /usr/lib/
x86_64-suse-linux/4.5/ /usr/lib/../lib64
/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../
x86_64-suse
-linux/lib/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../ /lib/ /usr/lib/"
# 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/l
ib/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/l
ocal/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_srcfile_path
=
""
...
...
@@ -7263,10 +7263,10 @@ disable_libs=static
# End:
# ### BEGIN LIBTOOL TAG CONFIG: CXX
# Libtool was configured on host l
aptop
:
# Libtool was configured on host l
inux-dxyz.site
:
# Shell to use when invoking shell scripts.
SHELL
=
"/bin/
ba
sh"
SHELL
=
"/bin/sh"
# Whether or not to build shared libraries.
build_libtool_libs
=
yes
...
...
@@ -7285,12 +7285,12 @@ fast_install=yes
# The host system.
host_alias
=
host
=
i686-pc
-linux-gnu
host
=
x86_64-unknown
-linux-gnu
host_os
=
linux-gnu
# The build system.
build_alias
=
build
=
i686-pc
-linux-gnu
build
=
x86_64-unknown
-linux-gnu
build_os
=
linux-gnu
# An echo program that does not interpret backslashes.
...
...
@@ -7316,7 +7316,7 @@ with_gcc=yes
EGREP
=
"grep -E"
# 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.
LN_S
=
"ln -s"
...
...
@@ -7445,11 +7445,11 @@ striplib="strip --strip-unneeded"
# Dependencies to place before the objects being linked to create a
# 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/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../lib
64
/crti.o /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/crtbeginS.o"
# Dependencies to place after the objects being linked to create a
# 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/lib
64
/gcc/
x86_64-suse-linux/4.5
/crtendS.o /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../lib
64
/crtn.o"
# Dependencies to place before the objects being linked to create a
# shared library.
...
...
@@ -7461,7 +7461,7 @@ postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
# The library search path used internally by the compiler when linking
# 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/lib
64
/gcc/
x86_64-suse-linux/4.5
-L/usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../lib
64
-L/lib/../lib
64
-L/usr/lib/../lib
64
-L/usr/lib
64
/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.
deplibs_check_method
=
"pass_all"
...
...
@@ -7541,10 +7541,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM
link_all_deplibs
=
unknown
# 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/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../
x86_64-suse
-linux/lib/
x86_64-suse-linux/4.5
/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../
x86_64-suse
-linux/lib/../lib
64
/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5/../../../x86_64-suse-linux/4.5
/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../lib
64
/ /lib/
x86_64-suse-linux/4.5/
/lib/../lib
64
/ /usr/lib/
x86_64-suse-linux/4.5/ /usr/lib/../lib64
/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../
x86_64-suse
-linux/lib/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../ /lib/ /usr/lib/"
# 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/l
ib/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/l
ocal/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_srcfile_path
=
""
...
...
@@ -7568,10 +7568,10 @@ include_expsyms=""
# ### BEGIN LIBTOOL TAG CONFIG: F77
# Libtool was configured on host l
aptop
:
# Libtool was configured on host l
inux-dxyz.site
:
# Shell to use when invoking shell scripts.
SHELL
=
"/bin/
ba
sh"
SHELL
=
"/bin/sh"
# Whether or not to build shared libraries.
build_libtool_libs
=
yes
...
...
@@ -7590,12 +7590,12 @@ fast_install=yes
# The host system.
host_alias
=
host
=
i686-pc
-linux-gnu
host
=
x86_64-unknown
-linux-gnu
host_os
=
linux-gnu
# The build system.
build_alias
=
build
=
i686-pc
-linux-gnu
build
=
x86_64-unknown
-linux-gnu
build_os
=
linux-gnu
# An echo program that does not interpret backslashes.
...
...
@@ -7612,7 +7612,7 @@ LTCC="gcc"
LTCFLAGS
=
"-g -O2"
# A language-specific compiler.
CC
=
"
f95
"
CC
=
"
gfortran
"
# Is the compiler the GNU C compiler?
with_gcc
=
yes
...
...
@@ -7621,7 +7621,7 @@ with_gcc=yes
EGREP
=
"grep -E"
# 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.
LN_S
=
"ln -s"
...
...
@@ -7849,10 +7849,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM
link_all_deplibs
=
unknown
# 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/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../
x86_64-suse
-linux/lib/
x86_64-suse-linux/4.5
/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../
x86_64-suse
-linux/lib/../lib
64
/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5/../../../x86_64-suse-linux/4.5
/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../lib
64
/ /lib/
x86_64-suse-linux/4.5/
/lib/../lib
64
/ /usr/lib/
x86_64-suse-linux/4.5/ /usr/lib/../lib64
/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../../
x86_64-suse
-linux/lib/ /usr/lib
64
/gcc/
x86_64-suse-linux/4.5
/../../../ /lib/ /usr/lib/"
# 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/l
ib/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/l
ocal/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_srcfile_path
=
""
...
...
AMDiS/src/CoarseningManager1d.cc
View file @
a71670c0
...
...
@@ -102,13 +102,13 @@ namespace AMDiS {
if
(
mesh
->
getNumberOfDOFs
(
VERTEX
))
/*--- midpoint of parent ---*/
{
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
child
[
1
]
->
getDOF
(
mesh
->
getNode
(
VERTEX
))),
VERTEX
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
child
[
1
]
->
getDOF
(
mesh
->
getNode
(
VERTEX
))),
VERTEX
);
}
if
(
mesh
->
getNumberOfDOFs
(
CENTER
))
/*--- center of the children ---*/
{
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
child
[
0
]
->
getDOF
(
mesh
->
getNode
(
CENTER
))),
CENTER
);
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
child
[
1
]
->
getDOF
(
mesh
->
getNode
(
CENTER
))),
CENTER
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
child
[
0
]
->
getDOF
(
mesh
->
getNode
(
CENTER
))),
CENTER
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
child
[
1
]
->
getDOF
(
mesh
->
getNode
(
CENTER
))),
CENTER
);
}
parent
->
coarsenElementData
(
child
[
0
],
child
[
1
]);
...
...
AMDiS/src/CoarseningManager2d.cc
View file @
a71670c0
...
...
@@ -31,14 +31,14 @@ namespace AMDiS {
// remove dof from common edge of child[0] and child[1]
if
(
mesh
->
getNumberOfDOFs
(
EDGE
))
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
child
[
0
]
->
getDOF
(
4
)),
EDGE
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
child
[
0
]
->
getDOF
(
4
)),
EDGE
);
// remove dof from the barycenters of child[0] and child[1]
if
(
mesh
->
getNumberOfDOFs
(
CENTER
))
{
int
node
=
mesh
->
getNode
(
CENTER
);
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
child
[
0
]
->
getDOF
(
node
)),
CENTER
);
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
child
[
1
]
->
getDOF
(
node
)),
CENTER
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
child
[
0
]
->
getDOF
(
node
)),
CENTER
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
child
[
1
]
->
getDOF
(
node
)),
CENTER
);
}
el
->
coarsenElementData
(
child
[
0
],
child
[
1
]);
...
...
@@ -110,16 +110,17 @@ namespace AMDiS {
// now, remove those dofs in the coarcening edge
mesh
->
freeD
OF
(
dof
[
0
],
VERTEX
);
mesh
->
freeD
of
(
dof
[
0
],
VERTEX
);
if
(
mesh
->
getNumberOfDOFs
(
EDGE
))
{
mesh
->
freeD
OF
(
dof
[
1
],
EDGE
);
mesh
->
freeD
OF
(
dof
[
2
],
EDGE
);
mesh
->
freeD
of
(
dof
[
1
],
EDGE
);
mesh
->
freeD
of
(
dof
[
2
],
EDGE
);
}
mesh
->
incrementNumberOfVertices
(
-
1
);
mesh
->
incrementNumberOfEdges
(
-
1
);
}
int
CoarseningManager2d
::
coarsenFunction
(
ElInfo
*
el_info
)
{
Triangle
*
el
=
dynamic_cast
<
Triangle
*>
(
const_cast
<
Element
*>
(
el_info
->
getElement
()));
...
...
AMDiS/src/CoarseningManager3d.cc
View file @
a71670c0
...
...
@@ -12,7 +12,7 @@ namespace AMDiS {
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
];
int
n_neigh
,
bound
=
0
;
ElInfo
*
elinfo
=
el_info
;
...
...
@@ -77,9 +77,7 @@ namespace AMDiS {
if
(
coarsenList
->
doCoarsePatch
(
n_neigh
))
{
int
n_neigh_periodic
;
DegreeOfFreedom
*
next_edge
[
2
];
RCNeighbourList
*
periodicList
;
while
(
edge
[
0
]
!=
NULL
)
{
...
...
@@ -110,14 +108,15 @@ namespace AMDiS {
/*****************************************************************************/
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
;
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
[
1
]
=
dynamic_cast
<
Tetrahedron
*>
(
const_cast
<
Element
*>
(
el
->
getChild
(
1
)));
child
[
0
]
=
dynamic_cast
<
Tetrahedron
*>
(
const_cast
<
Element
*>
(
el
->
getChild
(
0
)));
child
[
1
]
=
dynamic_cast
<
Tetrahedron
*>
(
const_cast
<
Element
*>
(
el
->
getChild
(
1
)));
el_type
=
coarsenList
->
getType
(
index
);
/****************************************************************************/
...
...
@@ -136,15 +135,14 @@ namespace AMDiS {
if
(
mesh
->
getNumberOfDOFs
(
EDGE
))
{
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 {
if
(
mesh
->
getNumberOfDOFs
(
FACE
))
{
node
=
mesh
->
getNode
(
FACE
);
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
child
[
0
]
->
getDOF
(
node
)),
FACE
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
child
[
0
]
->
getDOF
(
node
)),
FACE
);
}
if
(
mesh
->
getNumberOfDOFs
(
CENTER
))
{
node
=
mesh
->
getNode
(
CENTER
);
for
(
i
=
0
;
i
<
2
;
i
++
)
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
child
[
i
]
->
getDOF
(
node
)),
CENTER
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
child
[
i
]
->
getDOF
(
node
)),
CENTER
);
}
/****************************************************************************/
...
...
@@ -181,8 +179,6 @@ namespace AMDiS {
mesh
->
incrementNumberOfLeaves
(
-
1
);
mesh
->
incrementNumberOfElements
(
-
2
);
return
;
}
/****************************************************************************/
...
...
@@ -201,16 +197,16 @@ namespace AMDiS {
/* the starting element before we return */
/****************************************************************************/
bool
CoarseningManager3d
::
getCoarsenPatch
(
ElInfo
*
el_info
,
bool
CoarseningManager3d
::
getCoarsenPatch
(
ElInfo
*
el_info
,
DegreeOfFreedom
*
edge
[
2
],
int
dir
,
int
dir
,
RCNeighbourList
*
coarsenList
,
int
*
n_neigh
)
int
*
n_neigh
)
{
FUNCNAME
(
"CoarseningManager3d::getCoarsenPatch"
);
ElInfo
*
neigh_info
;
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
},
{
1
,
3
},
...
...
@@ -246,7 +242,7 @@ namespace AMDiS {
for
(
k
=
0
;
k
<
n_vertices
;
k
++
)
if
(
neigh
->
getDOF
(
k
)
==
edge
[
1
])
break
;
if
(
j
>
3
||
k
>
3
)
{
if
(
j
>
3
||
k
>
3
)
{
for
(
j
=
0
;
j
<
n_vertices
;
j
++
)
if
(
mesh
->
associated
(
neigh
->
getDOF
(
j
,
0
),
edge
[
0
][
0
]))
break
;
for
(
k
=
0
;
k
<
n_vertices
;
k
++
)
...
...
@@ -315,11 +311,11 @@ namespace AMDiS {
/****************************************************************************/
void
CoarseningManager3d
::
coarsenPatch
(
RCNeighbourList
*
coarsenList
,
int
n_neigh
,
int
bound
)
int
n_neigh
,
int
bound
)
{
Tetrahedron
*
el
=
dynamic_cast
<
Tetrahedron
*>
(
const_cast
<
Element
*>
(
coarsenList
->
getElement
(
0
)));
int
i
,
node
;
int
i
,
node
;
DegreeOfFreedom
*
dof
;
if
(
mesh
->
getNumberOfDOFs
(
EDGE
))
{
...
...
@@ -329,28 +325,28 @@ namespace AMDiS {
node
=
mesh
->
getNode
(
EDGE
);
if
(
!
(
dof
=
const_cast
<
int
*>
(
el
->
getDOF
(
node
))))
dof
=
mesh
->
getDOF
(
EDGE
);
}
else
}
else
{
dof
=
NULL
;
}
if
(
mesh
->
getNumberOfDOFs
(
EDGE
)
||
mesh
->
getNumberOfDOFs
(
FACE
)
||
mesh
->
getNumberOfDOFs
(
CENTER
))
{
for
(
i
=
0
;
i
<
n_neigh
;
i
++
)
coarsenList
->
addDOFParent
(
i
,
dof
);
}
mesh
->
getNumberOfDOFs
(
CENTER
))
{
for
(
i
=
0
;
i
<
n_neigh
;
i
++
)
coarsenList
->
addDOFParent
(
i
,
dof
);
}
/****************************************************************************/
/* restrict dof vectors to the parents on the patch */
/****************************************************************************/
int
iadmin
;
int
nrAdmin
=
mesh
->
getNumberOfDOFAdmin
();
for
(
iadmin
=
0
;
iadmin
<
nrAdmin
;
iadmin
++
)
{
for
(
int
iadmin
=
0
;
iadmin
<
nrAdmin
;
iadmin
++
)
{
std
::
list
<
DOFIndexedBase
*>::
iterator
it
;
DOFAdmin
*
admin
=
const_cast
<
DOFAdmin
*>
(
&
mesh
->
getDOFAdmin
(
iadmin
));
std
::
list
<
DOFIndexedBase
*>::
iterator
end
=
admin
->
endDOFIndexed
();
for
(
it
=
admin
->
beginDOFIndexed
();
it
!=
end
;
++
it
)
for
(
it
=
admin
->
beginDOFIndexed
();
it
!=
end
;
++
it
)
(
*
it
)
->
coarseRestrict
(
*
coarsenList
,
n_neigh
);
}
...
...
@@ -360,25 +356,22 @@ namespace AMDiS {
/* remove dof's of the coarsening edge */
/****************************************************************************/
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
el
->
getChild
(
0
)
->
getDOF
(
3
)),
VERTEX
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
el
->
getChild
(
0
)
->
getDOF
(
3
)),
VERTEX
);
mesh
->
incrementNumberOfVertices
(
-
1
);
if
(
mesh
->
getNumberOfDOFs
(
EDGE
))
{
node
=
mesh
->
getNode
(
EDGE
)
+
2
;
mesh
->
freeDOF
(
const_cast
<
int
*>
(
el
->
getChild
(
0
)
->
getDOF
(
node
)),
EDGE
);
mesh
->
freeDOF
(
const_cast
<
int
*>
(
el
->
getChild
(
1
)
->
getDOF
(
node
)),
EDGE
);
}
if
(
coarsenList
->
getElement
(
0
)
->
isNewCoordSet
())
{
coarsenList
->
getElement
(
0
)
->
eraseNewCoord
();
if
(
mesh
->
getNumberOfDOFs
(
EDGE
))
{
node
=
mesh
->
getNode
(
EDGE
)
+
2
;
mesh
->
freeDof
(
const_cast
<
int
*>
(
el
->
getChild
(
0
)
->
getDOF
(
node
)),
EDGE
);
mesh
->
freeDof
(
const_cast
<
int
*>
(
el
->
getChild
(
1
)
->
getDOF
(
node
)),
EDGE
);
}
for
(
i
=
0
;
i
<
n_neigh
;
i
++
)
{
coarsenList
->
getElement
(
i
)
->
setNewCoord
(
NULL
);
coarsenTetrahedron
(
coarsenList
,
i
);
}
if
(
coarsenList
->
getElement
(
0
)
->
isNewCoordSet
())
coarsenList
->
getElement
(
0
)
->
eraseNewCoord
();
for
(
i
=
0
;
i
<
n_neigh
;
i
++
)
{
coarsenList
->
getElement
(
i
)
->
setNewCoord
(
NULL
);
coarsenTetrahedron
(
coarsenList
,
i
);
}
/****************************************************************************/
/* if the coarsening edge is an interior edge there are n_neigh + 1 edges */
...
...
@@ -393,8 +386,6 @@ namespace AMDiS {
mesh
->
incrementNumberOfEdges
(
-
(
n_neigh
+
1
));
mesh
->
incrementNumberOfFaces
(
-
(
2
*
n_neigh
));
}
return
;
}
}
AMDiS/src/DOFAdmin.cc
View file @
a71670c0
...
...
@@ -97,7 +97,7 @@ namespace AMDiS {
FUNCNAME
(
"DOFAdmin::freeDofIndex()"
);
TEST_EXIT_DBG
(
usedCount
>
0
)(
"no dofs in use
\n
"
);
TEST_EXIT_DBG
(
(
dof
>=
0
)
&&
(
dof
<
size
)
)
(
"invalid dof index %d
\n
"
,
dof
);
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
();
...
...
@@ -273,7 +273,7 @@ namespace AMDiS {
// mark used dofs
DOFIteratorBase
it
(
this
,
USED_DOFS
);
for
(
it
.
reset
();
!
it
.
end
();
++
it
)
new_dof
[
it
.
getDOFIndex
()]
=
1
;
new_dof
[
it
.
getDOFIndex
()]
=
1
;
int
n
=
0
,
last
=
0
;
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
/* create a MONOTONE compress */
...
...
@@ -315,7 +315,7 @@ namespace AMDiS {
std
::
list
<
DOFContainer
*>::
iterator
dc
;
std
::
list
<
DOFContainer
*>::
iterator
endc
=
dofContainerList
.
end
();
for
(
dc
=
dofContainerList
.
begin
();
dc
!=
endc
;
++
dc
)
(
*
dc
)
->
compressDofContainer
(
n
,
new_dof
);
(
*
dc
)
->
compressDofContainer
(
n
,
new_dof
);
}
...
...
AMDiS/src/MacroReader.cc
View file @
a71670c0
...
...
@@ -170,7 +170,7 @@ namespace AMDiS {
// change periodic vertex dofs
for
(
int
i
=
0
;
i
<
mesh
->
getNumberOfVertices
();
i
++
)
{
if
(
periodicMap
.
getEntry
(
i
)
!=
-
1
)
{
mesh
->
freeD
OF
(
dof
[
i
],
VERTEX
);
mesh
->
freeD
of
(
dof
[
i
],
VERTEX
);
dof
[
i
]
=
dof
[
periodicMap
.
getEntry
(
i
)];
std
::
map
<
BoundaryType
,
VertexVector
*>::
iterator
assoc
;
...
...
AMDiS/src/Mesh.cc
View file @
a71670c0
...
...
@@ -352,7 +352,7 @@ namespace AMDiS {
}
if
(
deleteDof
)
freeD
OF
(
const_cast
<
DegreeOfFreedom
*>
(
dofsIt
->
first
),
freeD
of
(
const_cast
<
DegreeOfFreedom
*>
(
dofsIt
->
first
),
dofsPosIndex
[
dofsIt
->
first
]);
else
nRemainDofs
++
;
...
...
@@ -518,7 +518,7 @@ namespace AMDiS {
{
FUNCNAME
(
"Mesh::freeDOFPtrs()"
);
TEST_EXIT_DBG
(
ptrs
)(
"ptrs
=
NULL
\n
"
);
TEST_EXIT_DBG
(
ptrs
)(
"ptrs
is
NULL
!
\n
"
);
if
(
nNodeEl
<=
0
)
return
;
...
...
@@ -559,9 +559,9 @@ namespace AMDiS {
}
void
Mesh
::
freeD
OF
(
DegreeOfFreedom
*
dof
,
GeoIndex
position
)
void
Mesh
::
freeD
of
(
DegreeOfFreedom
*
dof
,
GeoIndex
position
)
{
FUNCNAME
(
"Mesh::freeD
OF
()"
);
FUNCNAME
(
"Mesh::freeD
of
()"
);
TEST_EXIT_DBG
(
position
>=
CENTER
&&
position
<=
FACE
)
(
"unknown position %d
\n
"
,
position
);
...
...
@@ -587,10 +587,11 @@ namespace AMDiS {
int
n
=
localAdmin
->
getNumberOfDOFs
(
position
);
int
n0
=
localAdmin
->
getNumberOfPreDOFs
(
position
);
TEST_EXIT_DBG
(
n
+
n0
<=
ndof
)(
"n=%d, n0=%d too large: ndof=%d
\n
"
,
n
,
n0
,
ndof
);
TEST_EXIT_DBG
(
n
+
n0
<=
ndof
)
(
"n = %d, n0 = %d too large: ndof = %d
\n
"
,
n
,
n0
,
ndof
);
for
(
int
j
=
0
;
j
<
n
;
j
++
)
localAdmin
->
freeDofIndex
(
dof
[
n0
+
j
]);
localAdmin
->
freeDofIndex
(
dof
[
n0
+
j
]);
}
delete
[]
dof
;
...
...
AMDiS/src/Mesh.h
View file @
a71670c0
...
...
@@ -375,7 +375,7 @@ namespace AMDiS {
ElInfo
*
createNewElInfo
();
/// Frees DOFs at the given position pointed by dof
void
freeD
OF
(
DegreeOfFreedom
*
dof
,
GeoIndex
position
);
void
freeD
of
(
DegreeOfFreedom
*
dof
,
GeoIndex
position
);
/// Frees memory for the given element el
void
freeElement
(
Element
*
el
);
...
...
AMDiS/src/RCNeighbourList.cc
View file @
a71670c0
...
...
@@ -253,7 +253,7 @@ namespace AMDiS {
if
(
mesh
->
getNumberOfDOFs
(
CENTER
))
{
int
node
=
mesh
->
getNode
(
CENTER
);
for
(
int
i
=
0
;
i
<
n_neigh
;
i
++
)
{
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
rclist
[
i
]
->
el
->
getDOF
(
node
)),
CENTER
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
rclist
[
i
]
->
el
->
getDOF
(
node
)),
CENTER
);
rclist
[
i
]
->
el
->
setDOF
(
node
,
NULL
);
}
}
...
...
@@ -280,12 +280,12 @@ namespace AMDiS {
// face 2
if
(
!
neigh
||
neigh
>
rclist
[
index
])
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
el
->
getDOF
(
node
+
2
)),
FACE
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
el
->
getDOF
(
node
+
2
)),
FACE
);
neigh
=
rclist
[
index
]
->
neigh
[
1
];
// face 3
if
(
!
neigh
||
neigh
>
rclist
[
index
])
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
el
->
getDOF
(
node
+
3
)),
FACE
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
el
->
getDOF
(
node
+
3
)),
FACE
);
for
(
int
j
=
0
;
j
<
faces
;
j
++
)
el
->
setDOF
(
node
+
j
,
NULL
);
...
...
@@ -293,7 +293,7 @@ namespace AMDiS {
if
(
mesh
->
getNumberOfDOFs
(
CENTER
))
{
int
node
=
mesh
->
getNode
(
CENTER
);
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
el
->
getDOF
(
node
)),
CENTER
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
el
->
getDOF
(
node
)),
CENTER
);
el
->
setDOF
(
node
,
NULL
);
}
}
...
...
AMDiS/src/RefinementManager1d.cc
View file @
a71670c0
...
...
@@ -90,7 +90,7 @@ namespace AMDiS {
}
if
(
!
mesh
->
queryCoarseDOFs
()
&&
mesh
->
getNumberOfDOFs
(
CENTER
))
{
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
el
->
getDOF
(
mesh
->
getNode
(
CENTER
))),
CENTER
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
el
->
getDOF
(
mesh
->
getNode
(
CENTER
))),
CENTER
);
el
->
setDOF
(
mesh
->
getNode
(
CENTER
),
NULL
);
}
}
...
...
AMDiS/src/RefinementManager2d.cc
View file @
a71670c0
...
...
@@ -220,7 +220,7 @@ namespace AMDiS {
// === The only DOF that can be freed is that in the refinement edge; all ===
// === other DOFs are handed on the children. ===
mesh
->
freeD
OF
(
const_cast
<
int
*>
(
el
->
getDOF
(
node
+
2
)),
EDGE
);
mesh
->
freeD
of
(
const_cast
<
int
*>
(
el
->
getDOF
(
node
+
2
)),
EDGE
);
}
if
(
mesh
->
getNumberOfDOFs
(
EDGE
)
||
mesh
->
getNumberOfDOFs
(
CENTER
))
refineList
->
removeDOFParents
(
n_neigh
);