diff --git a/AMDiS/libtool b/AMDiS/libtool index f2a0b780d5a912cf85cb8ff00f9509bae793c265..b33f6facfb716d83064ca34a3cdb5143df8c7bb2 100755 --- a/AMDiS/libtool +++ b/AMDiS/libtool @@ -44,7 +44,7 @@ available_tags=" CXX F77" # ### BEGIN LIBTOOL CONFIG -# Libtool was configured on host p2q055: +# Libtool was configured on host p1s122: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -6760,7 +6760,7 @@ build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # End: # ### BEGIN LIBTOOL TAG CONFIG: CXX -# Libtool was configured on host p2q055: +# Libtool was configured on host p1s122: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -7065,7 +7065,7 @@ include_expsyms="" # ### BEGIN LIBTOOL TAG CONFIG: F77 -# Libtool was configured on host p2q055: +# Libtool was configured on host p1s122: # Shell to use when invoking shell scripts. SHELL="/bin/sh" diff --git a/AMDiS/src/Debug.cc b/AMDiS/src/Debug.cc index cbf8a68b07c2ad44ca14668a977014cf2d0873c7..7f6cae6aab8d8539fe23a2d294a71934c9a7ea85 100644 --- a/AMDiS/src/Debug.cc +++ b/AMDiS/src/Debug.cc @@ -3,6 +3,7 @@ #include "DOFVector.h" #include "MacroElement.h" #include "VtkWriter.h" +#include "ElementFileWriter.h" namespace AMDiS { @@ -175,6 +176,21 @@ namespace AMDiS { << it->second << std::endl; } + void writeElementIndexMesh(FiniteElemSpace *feSpace, std::string filename) + { + std::map<int, double> vec; + TraverseStack stack; + ElInfo *elInfo = stack.traverseFirst(feSpace->getMesh(), -1, Mesh::CALL_LEAF_EL); + + while (elInfo) { + int index = elInfo->getElement()->getIndex(); + vec[index] = index; + elInfo = stack.traverseNext(elInfo); + } + + ElementFileWriter::writeFile(vec, feSpace, filename); + } + } // namespace debug } // namespace AMDiS diff --git a/AMDiS/src/Debug.h b/AMDiS/src/Debug.h index 42cc34db13731652096a50141b88805524411dec..07e30a8354a0e8a880051b0c8f8f2b6fc7d2f054 100644 --- a/AMDiS/src/Debug.h +++ b/AMDiS/src/Debug.h @@ -49,6 +49,8 @@ namespace AMDiS { void printInfoByDof(FiniteElemSpace *feSpace, DegreeOfFreedom dof); void printMatValuesStatistics(Matrix<DOFMatrix*> *mat); + + void writeElementIndexMesh(FiniteElemSpace *feSpace, std::string filename); } } diff --git a/AMDiS/src/PeriodicBC.cc b/AMDiS/src/PeriodicBC.cc index 35396e73bcaac1566a711eb4f985e183e2622ee2..3e989034a915baa6ce44e8eb9fcf5178cc5e6257 100644 --- a/AMDiS/src/PeriodicBC.cc +++ b/AMDiS/src/PeriodicBC.cc @@ -107,9 +107,6 @@ namespace AMDiS { TEST_EXIT(associated)("No associations for periodic boundary condition %d!\n", boundaryType); - - const BasisFunction *basFcts = rowFESpace->getBasisFcts(); - neighIndices = new DegreeOfFreedom[basFcts->getNumber()]; } } @@ -119,6 +116,8 @@ namespace AMDiS { const BoundaryType *localBound, int nBasFcts) { + FUNCNAME("PeriodicBC::fillBoundaryCondition()"); + if (matrix == masterMatrix) { int dim = rowFESpace->getMesh()->getDim(); @@ -132,6 +131,7 @@ namespace AMDiS { Element *element = elInfo->getElement(); DimVec<DegreeOfFreedom> periodicDOFs(dim - 1, NO_INIT); GeoIndex sideGeoIndex = INDEX_OF_DIM(dim - 1, dim); + std::vector<DegreeOfFreedom> neighIndices(num); for (int side = 0; side < dim + 1; side++) { @@ -143,6 +143,8 @@ namespace AMDiS { } Element *neigh = elInfo->getNeighbour(side); + TEST_EXIT_DBG(neigh)("Wrong neighbour information at side %d!\n", side); + basFcts->getLocalIndices(neigh, admin, neighIndices); int oppVertex = 0; @@ -185,10 +187,8 @@ namespace AMDiS { TEST_EXIT(matrix)("no matrix\n"); - if (matrix == masterMatrix) { - delete [] neighIndices; - masterMatrix = NULL; - } + if (matrix == masterMatrix) + masterMatrix = NULL; using namespace mtl; diff --git a/AMDiS/src/PeriodicBC.h b/AMDiS/src/PeriodicBC.h index c58cb8ba2c65f53df94c3f49847f2cf5d1e06355..31a001164100c4c8866d98f9e618cd8ae60bd29e 100644 --- a/AMDiS/src/PeriodicBC.h +++ b/AMDiS/src/PeriodicBC.h @@ -107,8 +107,6 @@ namespace AMDiS { PeriodicDOFMapping *periodicDOFMapping; - DegreeOfFreedom *neighIndices; - DOFMatrix *masterMatrix; }; diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc index b041512558a38b699023fd9c29aa1f6f5cfb23db..b9d69f2871ade675f938aaa861770cfcefe31245 100644 --- a/AMDiS/src/ProblemVec.cc +++ b/AMDiS/src/ProblemVec.cc @@ -641,7 +641,7 @@ namespace AMDiS { if (useGetBound) assembleFlag |= Mesh::FILL_BOUND; - + traverseInfo.updateStatus(); // Used to calculate the overall number of non zero entries.