Commit ad9d130f authored by Thomas Witkowski's avatar Thomas Witkowski

Added some debug information and functions.

parent ee6ddcac
......@@ -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"
......
......@@ -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
......@@ -49,6 +49,8 @@ namespace AMDiS {
void printInfoByDof(FiniteElemSpace *feSpace, DegreeOfFreedom dof);
void printMatValuesStatistics(Matrix<DOFMatrix*> *mat);
void writeElementIndexMesh(FiniteElemSpace *feSpace, std::string filename);
}
}
......
......@@ -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;
......
......@@ -107,8 +107,6 @@ namespace AMDiS {
PeriodicDOFMapping *periodicDOFMapping;
DegreeOfFreedom *neighIndices;
DOFMatrix *masterMatrix;
};
......
......@@ -641,7 +641,7 @@ namespace AMDiS {
if (useGetBound)
assembleFlag |= Mesh::FILL_BOUND;
traverseInfo.updateStatus();
// 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