Commit 6020c0d7 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

* And again the stupid getGradient bug :)

parent 09b09438
...@@ -555,6 +555,7 @@ namespace AMDiS { ...@@ -555,6 +555,7 @@ namespace AMDiS {
} else { } else {
if (!result) { if (!result) {
result = NEW WorldVector<DOFVector<double>*>; result = NEW WorldVector<DOFVector<double>*>;
result->set(NULL); result->set(NULL);
} }
for (int i = 0; i < dow; i++) { for (int i = 0; i < dow; i++) {
...@@ -586,8 +587,9 @@ namespace AMDiS { ...@@ -586,8 +587,9 @@ namespace AMDiS {
numNodes += numPositionNodes; numNodes += numPositionNodes;
} }
TEST_EXIT_DBG(numNodes == mesh->getNumberOfNodes()) // TEST_EXIT_DBG(numNodes == mesh->getNumberOfNodes())
("invalid number of nodes\n"); // ("invalid number of nodes\n");
TEST_EXIT_DBG(numDOFs == basFcts->getNumber()) TEST_EXIT_DBG(numDOFs == basFcts->getNumber())
("number of dofs != number of basis functions\n"); ("number of dofs != number of basis functions\n");
...@@ -598,7 +600,7 @@ namespace AMDiS { ...@@ -598,7 +600,7 @@ namespace AMDiS {
// traverse mesh // traverse mesh
std::vector<bool> visited(getUsedSize(), false); std::vector<bool> visited(getUsedSize(), false);
TraverseStack stack; TraverseStack stack;
Flag fillFlag = Mesh::CALL_LEAF_EL | Mesh::FILL_GRD_LAMBDA; Flag fillFlag = Mesh::CALL_LEAF_EL | Mesh::FILL_GRD_LAMBDA | Mesh::FILL_COORDS;
ElInfo *elInfo = stack.traverseFirst(mesh, -1, fillFlag); ElInfo *elInfo = stack.traverseFirst(mesh, -1, fillFlag);
WorldVector<double> grd; WorldVector<double> grd;
...@@ -614,11 +616,10 @@ namespace AMDiS { ...@@ -614,11 +616,10 @@ namespace AMDiS {
DegreeOfFreedom dofIndex = dof[i][numNodePreDOFs[localDOFNr] + j]; DegreeOfFreedom dofIndex = dof[i][numNodePreDOFs[localDOFNr] + j];
if (!visited[dofIndex]) { if (!visited[dofIndex]) {
basFcts->evalGrdUh(*(bary[localDOFNr]), grdLambda, basFcts->evalGrdUh(*(bary[localDOFNr]), grdLambda, localUh, &grd);
localUh, &grd);
for (int k = 0; k < dow; k++) { for (int k = 0; k < dow; k++) {
(*result)[k][dofIndex] = grd[k]; (*(*result)[k])[dofIndex] = grd[k];
} }
visited[dofIndex] = true; visited[dofIndex] = true;
......
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