diff --git a/FunctionSpace/BasisScalar.cpp b/FunctionSpace/BasisScalar.cpp index 1e792ed9365c7a2c5314cb0db87800cc5253bb2e..3c00e67d27e3ccad70e86f46a1f82c769d944c12 100644 --- a/FunctionSpace/BasisScalar.cpp +++ b/FunctionSpace/BasisScalar.cpp @@ -13,20 +13,26 @@ BasisScalar::~BasisScalar(void){ string BasisScalar::toString(void) const{ stringstream stream; + stream << "Vertex Based:" << endl; for(int i = 0; i < nVertex; i++) - stream << "f(" << i << ") = " + stream << " f(" << i << ") = " << (*node)[i]->toString() << endl; + stream << "Edge Based:" << endl; for(int i = 0; i < nEdge; i++) - stream << "f(" << i + nVertex << ") = " - << (*(*edge)[0])[i]->toString() << endl; + for(int j = 0; j < nEdgeClosure; j++) + stream << " f_" << j << "(" << i << ") = " + << (*(*edge)[j])[i]->toString() << endl; + stream << "Face Based:" << endl; for(int i = 0; i < nFace; i++) - stream << "f(" << i + nVertex + nEdge << ") = " - << (*(*face)[0])[i]->toString() << endl; + for(int j = 0; j < nFaceClosure; j++) + stream << " f_" << j << "(" << i << ") = " + << (*(*face)[j])[i]->toString() << endl; + stream << "Cell Based:" << endl; for(int i = 0; i < nCell; i++) - stream << "f(" << i + nVertex + nEdge + nFace << ") = " + stream << " f(" << i << ") = " << (*cell)[i]->toString() << endl; return stream.str(); diff --git a/FunctionSpace/BasisVector.cpp b/FunctionSpace/BasisVector.cpp index abec04f83eff009d28a168509eb79793f1ee4c4d..7b13188de7c5a084fd5dc92efc84f358deb375cc 100644 --- a/FunctionSpace/BasisVector.cpp +++ b/FunctionSpace/BasisVector.cpp @@ -13,29 +13,35 @@ BasisVector::~BasisVector(void){ string BasisVector::toString(void) const{ stringstream stream; + stream << "Vertex Based:" << endl; for(int i = 0; i < nVertex; i++) - stream << "f(" << i << ") = " << endl - << "[ " <<(*(*node)[i])[0].toString() << " ]" << endl - << "[ " <<(*(*node)[i])[1].toString() << " ]" << endl - << "[ " <<(*(*node)[i])[2].toString() << " ]" << endl; + stream << " f(" << i << ") = " << endl + << " [ " <<(*(*node)[i])[0].toString() << " ]" << endl + << " [ " <<(*(*node)[i])[1].toString() << " ]" << endl + << " [ " <<(*(*node)[i])[2].toString() << " ]" << endl; + stream << "Edge Based:" << endl; for(int i = 0; i < nEdge; i++) - stream << "f(" << i + nVertex << ") = " << endl - << "[ " << (*(*(*edge)[0])[i])[0].toString() << " ]" << endl - << "[ " << (*(*(*edge)[0])[i])[1].toString() << " ]" << endl - << "[ " << (*(*(*edge)[0])[i])[2].toString() << " ]" << endl; + for(int j = 0; j < nEdgeClosure; j++) + stream << " f_" << j << "(" << i << ") = " << endl + << " [ " << (*(*(*edge)[j])[i])[0].toString() << " ]" << endl + << " [ " << (*(*(*edge)[j])[i])[1].toString() << " ]" << endl + << " [ " << (*(*(*edge)[j])[i])[2].toString() << " ]" << endl; + stream << "Face Based:" << endl; for(int i = 0; i < nFace; i++) - stream << "f(" << i + nVertex + nEdge << ") = " << endl - << "[ " << (*(*(*face)[0])[i])[0].toString() << " ]" << endl - << "[ " << (*(*(*face)[0])[i])[1].toString() << " ]" << endl - << "[ " << (*(*(*face)[0])[i])[2].toString() << " ]" << endl; - + for(int j = 0; j < nFaceClosure; j++) + stream << " f_" << j << "(" << i << ") = " << endl + << " [ " << (*(*(*face)[j])[i])[0].toString() << " ]" << endl + << " [ " << (*(*(*face)[j])[i])[1].toString() << " ]" << endl + << " [ " << (*(*(*face)[j])[i])[2].toString() << " ]" << endl; + + stream << "Cell Based:" << endl; for(int i = 0; i < nCell; i++) - stream << "f(" << i + nVertex + nEdge + nFace << ") = " - << "[ " << (*(*cell)[i])[0].toString() << " ]" << endl - << "[ " << (*(*cell)[i])[1].toString() << " ]" << endl - << "[ " << (*(*cell)[i])[2].toString() << " ]" << endl; + stream << " f(" << i << ") = " + << " [ " << (*(*cell)[i])[0].toString() << " ]" << endl + << " [ " << (*(*cell)[i])[1].toString() << " ]" << endl + << " [ " << (*(*cell)[i])[2].toString() << " ]" << endl; return stream.str(); } diff --git a/FunctionSpace/FunctionSpace.cpp b/FunctionSpace/FunctionSpace.cpp index 93cea8990b72a938aadd3493ad6e206f97b46076..ffbce1bc6cf39fc7d6dc20b3fd79110b87c7bd64 100644 --- a/FunctionSpace/FunctionSpace.cpp +++ b/FunctionSpace/FunctionSpace.cpp @@ -60,7 +60,7 @@ void FunctionSpace::build(const GroupOfElement& goe, type = basisType; basis = BasisGenerator::generate(elementType, basisType, - order, "lagrange"); + order, "zaglmayr"); // Number of *Per* Entity functions // fPerVertex = basis->getNVertexBased() / nVertex;