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

Added some debug information and functions.

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