Commit 9f8cd49d authored by Siqi Ling's avatar Siqi Ling

fix ArhWriter that only get result from fespace[0]

parent 453ae98b
......@@ -29,13 +29,14 @@ namespace AMDiS { namespace io {
if (!macroElement) {
Element *mEl = elInfo->getMacroElement()->getElement();
for (int i = 0; i < mesh->getGeo(VERTEX); i++)
(*vec)[mEl->getDof(i, 0)] = values[valuePos++];
(*vec)[mEl->getDof(i, vec->getFeSpace()->getAdmin()->getNumberOfPreDofs(VERTEX))] = values[valuePos++];
macroElement = true;
}
Element *el = elInfo->getElement();
if (!el->isLeaf())
(*vec)[el->getChild(0)->getDof(mesh->getDim(), 0)] = values[valuePos++];
(*vec)[el->getChild(0)->getDof(mesh->getDim(),
vec->getFeSpace()->getAdmin()->getNumberOfPreDofs(VERTEX))] = values[valuePos++];
elInfo = stack.traverseNext(elInfo);
}
......
......@@ -74,7 +74,7 @@ namespace AMDiS { namespace io {
MeshStructure elementStructure;
vector<vector<double> > values(vecs.size());
int32_t macroElIndex = -1;
elInfo = stack.traverseFirst(mesh, -1, Mesh::CALL_EVERY_EL_PREORDER);
while (elInfo) {
if (elInfo->getLevel() == 0) {
......@@ -89,7 +89,9 @@ namespace AMDiS { namespace io {
values[i].clear();
for (int j = 0; j < mesh->getGeo(VERTEX); j++)
values[i].push_back((*vecs[i])[elInfo->getElement()->getDof(j, 0)]);
values[i].push_back((*vecs[i])[elInfo->getElement()->getDof(
j, vecs[i]->getFeSpace()->getAdmin()->getNumberOfPreDofs(VERTEX)
)]);
}
}
......@@ -97,7 +99,9 @@ namespace AMDiS { namespace io {
if (!elInfo->getElement()->isLeaf()) {
for (size_t i = 0; i < vecs.size(); i++)
values[i].push_back((*vecs[i])[elInfo->getElement()->getChild(0)->getDof(mesh->getDim(), 0)]);
values[i].push_back((*vecs[i])[elInfo->getElement()->getChild(0)->getDof(
mesh->getDim(), vecs[i]->getFeSpace()->getAdmin()->getNumberOfPreDofs(VERTEX)
)]);
}
elInfo = stack.traverseNext(elInfo);
......
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