Commit 231692b5 authored by Thomas Witkowski's avatar Thomas Witkowski

Work on arh reader-writer.

parent 733b3e73
...@@ -128,7 +128,7 @@ old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" ...@@ -128,7 +128,7 @@ old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
old_postuninstall_cmds="" old_postuninstall_cmds=""
# A C compiler. # A C compiler.
LTCC="/usr/lib64/mpi/gcc/openmpi//bin/mpicc" LTCC="gcc"
# LTCC compiler flags. # LTCC compiler flags.
LTCFLAGS="-g -O2" LTCFLAGS="-g -O2"
...@@ -259,7 +259,7 @@ LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64" ...@@ -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" old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
# A language specific compiler. # A language specific compiler.
CC="/usr/lib64/mpi/gcc/openmpi//bin/mpicc" CC="gcc"
# Is the compiler the GNU compiler? # Is the compiler the GNU compiler?
with_gcc=yes with_gcc=yes
...@@ -274,7 +274,7 @@ wl="-Wl," ...@@ -274,7 +274,7 @@ wl="-Wl,"
pic_flag=" -fPIC -DPIC" pic_flag=" -fPIC -DPIC"
# Compiler flag to prevent dynamic linking. # Compiler flag to prevent dynamic linking.
link_static_flag="" link_static_flag="-static"
# Does compiler simultaneously support -c and -o options? # Does compiler simultaneously support -c and -o options?
compiler_c_o="yes" compiler_c_o="yes"
...@@ -8914,7 +8914,7 @@ LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64" ...@@ -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" old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
# A language specific compiler. # A language specific compiler.
CC="/usr/lib64/mpi/gcc/openmpi//bin/mpicxx" CC="g++"
# Is the compiler the GNU compiler? # Is the compiler the GNU compiler?
with_gcc=yes with_gcc=yes
...@@ -8929,7 +8929,7 @@ wl="-Wl," ...@@ -8929,7 +8929,7 @@ wl="-Wl,"
pic_flag=" -fPIC -DPIC" pic_flag=" -fPIC -DPIC"
# Compiler flag to prevent dynamic linking. # Compiler flag to prevent dynamic linking.
link_static_flag="" link_static_flag="-static"
# Does compiler simultaneously support -c and -o options? # Does compiler simultaneously support -c and -o options?
compiler_c_o="yes" compiler_c_o="yes"
...@@ -9039,17 +9039,17 @@ file_list_spec="" ...@@ -9039,17 +9039,17 @@ file_list_spec=""
hardcode_action=immediate hardcode_action=immediate
# The directories searched by this compiler when creating a shared library. # The directories searched by this compiler when creating a shared library.
compiler_lib_search_dirs="/usr/lib64/mpi/gcc/openmpi/lib64 /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/../../.." compiler_lib_search_dirs="/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 # Dependencies to place before and after the objects being linked to
# create a shared library. # create a shared library.
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" 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" 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="" predeps=""
postdeps="-lmpi_cxx -lmpi -lopen-rte -lopen-pal -ldl -lnsl -lutil -ldl -lstdc++ -lm -lgcc_s -lpthread -lc -lgcc_s" 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/usr/lib64/mpi/gcc/openmpi/lib64 -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/../../.." 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/../../.."
# ### END LIBTOOL TAG CONFIG: CXX # ### END LIBTOOL TAG CONFIG: CXX
...@@ -51,7 +51,8 @@ namespace AMDiS { ...@@ -51,7 +51,8 @@ namespace AMDiS {
MeshStructure elementStructure; MeshStructure elementStructure;
elementStructure.init(structureCode, codeSize); elementStructure.init(structureCode, codeSize);
elementStructure.fitMeshToStructure(mesh, refManager, false, false, elIndex); elementStructure.fitMeshToStructure(mesh, refManager,
false, false, elIndex, true);
long nValuesPerVector = 0; long nValuesPerVector = 0;
file.read(reinterpret_cast<char*>(&nValuesPerVector), 4); file.read(reinterpret_cast<char*>(&nValuesPerVector), 4);
......
...@@ -500,9 +500,9 @@ namespace AMDiS { ...@@ -500,9 +500,9 @@ namespace AMDiS {
} }
void printElementRefinementSequenz(Mesh *mesh, Element *el) void printElementRefinementSequence(Mesh *mesh, Element *el)
{ {
FUNCNAME("printElementRefinementSequenz()"); FUNCNAME("printElementRefinementSequence()");
int elIndex = el->getIndex(); int elIndex = el->getIndex();
std::vector<int> refSeq; std::vector<int> refSeq;
......
...@@ -137,7 +137,7 @@ namespace AMDiS { ...@@ -137,7 +137,7 @@ namespace AMDiS {
void printElementHierarchie(Mesh *mesh, int elIndex); void printElementHierarchie(Mesh *mesh, int elIndex);
void printElementRefinementSequenz(Mesh *mesh, Element *el); void printElementRefinementSequence(Mesh *mesh, Element *el);
int getLocalNeighbourIndex(Mesh *mesh, int elIndex, int neighIndex); int getLocalNeighbourIndex(Mesh *mesh, int elIndex, int neighIndex);
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "Traverse.h" #include "Traverse.h"
#include "ElInfo.h" #include "ElInfo.h"
#include "RefinementManager.h" #include "RefinementManager.h"
#include "Debug.h"
namespace AMDiS { namespace AMDiS {
...@@ -227,7 +228,8 @@ namespace AMDiS { ...@@ -227,7 +228,8 @@ namespace AMDiS {
RefinementManager *manager, RefinementManager *manager,
bool checkPartition, bool checkPartition,
bool debugMode, bool debugMode,
int macroElIndex) int macroElIndex,
bool ignoreFinerMesh)
{ {
FUNCNAME("MeshStructure::fitMeshToStructure()"); FUNCNAME("MeshStructure::fitMeshToStructure()");
...@@ -249,8 +251,16 @@ namespace AMDiS { ...@@ -249,8 +251,16 @@ namespace AMDiS {
TEST_EXIT(cont)("unexpected structure code end!\n"); TEST_EXIT(cont)("unexpected structure code end!\n");
if (isLeafElement()) { if (isLeafElement()) {
TEST_EXIT(element->isLeaf())("mesh finer than code\n"); if (ignoreFinerMesh && !element->isLeaf()) {
} int level = elInfo->getLevel();
while (elInfo && level >= elInfo->getLevel())
elInfo = stack.traverseNext(elInfo);
} else {
TEST_EXIT(element->isLeaf())
("Mesh is finer than strucutre code! (Element index: %d\n",
element->getIndex());
}
}
if (element->isLeaf() && !isLeafElement()) { if (element->isLeaf() && !isLeafElement()) {
MeshStructure *structure = new MeshStructure(); MeshStructure *structure = new MeshStructure();
...@@ -278,7 +288,8 @@ namespace AMDiS { ...@@ -278,7 +288,8 @@ namespace AMDiS {
cont = nextElement(); cont = nextElement();
} }
elInfo = stack.traverseNext(elInfo); if (elInfo)
elInfo = stack.traverseNext(elInfo);
} }
// refine mesh // refine mesh
......
...@@ -111,7 +111,8 @@ namespace AMDiS { ...@@ -111,7 +111,8 @@ namespace AMDiS {
RefinementManager *manager, RefinementManager *manager,
bool checkPartition = false, bool checkPartition = false,
bool debugMode = false, bool debugMode = false,
int macroElIndex = -1); int macroElIndex = -1,
bool ignoreFinerMesh = false);
/// Prints the mesh structure code. /// Prints the mesh structure code.
void print(bool resetCode = true); void print(bool resetCode = true);
......
...@@ -93,7 +93,6 @@ namespace AMDiS { ...@@ -93,7 +93,6 @@ namespace AMDiS {
Mesh::CALL_LEAF_EL | Mesh::FILL_NEIGH | Mesh::FILL_BOUND); Mesh::CALL_LEAF_EL | Mesh::FILL_NEIGH | Mesh::FILL_BOUND);
while (elInfo) { while (elInfo) {
if (elInfo->getElement() == el) { if (elInfo->getElement() == el) {
MSG("REFINE EL IN HERE\n");
refineFunction(elInfo); refineFunction(elInfo);
TEST_EXIT(!doMoreRecursiveRefine)("Okay, this will not work in that way!\n"); TEST_EXIT(!doMoreRecursiveRefine)("Okay, this will not work in that way!\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment