Skip to content
Snippets Groups Projects
Commit abe69c4b authored by Nicolas Marsic's avatar Nicolas Marsic
Browse files

Scalar SteadyWave -- Seems Ok with BOTH Lagrange and Zaglmayr ...

parent a0d5ecb5
No related branches found
No related tags found
No related merge requests found
...@@ -13,20 +13,26 @@ BasisScalar::~BasisScalar(void){ ...@@ -13,20 +13,26 @@ BasisScalar::~BasisScalar(void){
string BasisScalar::toString(void) const{ string BasisScalar::toString(void) const{
stringstream stream; stringstream stream;
stream << "Vertex Based:" << endl;
for(int i = 0; i < nVertex; i++) for(int i = 0; i < nVertex; i++)
stream << "f(" << i << ") = " stream << " f(" << i << ") = "
<< (*node)[i]->toString() << endl; << (*node)[i]->toString() << endl;
stream << "Edge Based:" << endl;
for(int i = 0; i < nEdge; i++) for(int i = 0; i < nEdge; i++)
stream << "f(" << i + nVertex << ") = " for(int j = 0; j < nEdgeClosure; j++)
<< (*(*edge)[0])[i]->toString() << endl; stream << " f_" << j << "(" << i << ") = "
<< (*(*edge)[j])[i]->toString() << endl;
stream << "Face Based:" << endl;
for(int i = 0; i < nFace; i++) for(int i = 0; i < nFace; i++)
stream << "f(" << i + nVertex + nEdge << ") = " for(int j = 0; j < nFaceClosure; j++)
<< (*(*face)[0])[i]->toString() << endl; stream << " f_" << j << "(" << i << ") = "
<< (*(*face)[j])[i]->toString() << endl;
stream << "Cell Based:" << endl;
for(int i = 0; i < nCell; i++) for(int i = 0; i < nCell; i++)
stream << "f(" << i + nVertex + nEdge + nFace << ") = " stream << " f(" << i << ") = "
<< (*cell)[i]->toString() << endl; << (*cell)[i]->toString() << endl;
return stream.str(); return stream.str();
......
...@@ -13,29 +13,35 @@ BasisVector::~BasisVector(void){ ...@@ -13,29 +13,35 @@ BasisVector::~BasisVector(void){
string BasisVector::toString(void) const{ string BasisVector::toString(void) const{
stringstream stream; stringstream stream;
stream << "Vertex Based:" << endl;
for(int i = 0; i < nVertex; i++) for(int i = 0; i < nVertex; i++)
stream << "f(" << i << ") = " << endl stream << " f(" << i << ") = " << endl
<< "[ " <<(*(*node)[i])[0].toString() << " ]" << endl << " [ " <<(*(*node)[i])[0].toString() << " ]" << endl
<< "[ " <<(*(*node)[i])[1].toString() << " ]" << endl << " [ " <<(*(*node)[i])[1].toString() << " ]" << endl
<< "[ " <<(*(*node)[i])[2].toString() << " ]" << endl; << " [ " <<(*(*node)[i])[2].toString() << " ]" << endl;
stream << "Edge Based:" << endl;
for(int i = 0; i < nEdge; i++) for(int i = 0; i < nEdge; i++)
stream << "f(" << i + nVertex << ") = " << endl for(int j = 0; j < nEdgeClosure; j++)
<< "[ " << (*(*(*edge)[0])[i])[0].toString() << " ]" << endl stream << " f_" << j << "(" << i << ") = " << endl
<< "[ " << (*(*(*edge)[0])[i])[1].toString() << " ]" << endl << " [ " << (*(*(*edge)[j])[i])[0].toString() << " ]" << endl
<< "[ " << (*(*(*edge)[0])[i])[2].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++) for(int i = 0; i < nFace; i++)
stream << "f(" << i + nVertex + nEdge << ") = " << endl for(int j = 0; j < nFaceClosure; j++)
<< "[ " << (*(*(*face)[0])[i])[0].toString() << " ]" << endl stream << " f_" << j << "(" << i << ") = " << endl
<< "[ " << (*(*(*face)[0])[i])[1].toString() << " ]" << endl << " [ " << (*(*(*face)[j])[i])[0].toString() << " ]" << endl
<< "[ " << (*(*(*face)[0])[i])[2].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++) for(int i = 0; i < nCell; i++)
stream << "f(" << i + nVertex + nEdge + nFace << ") = " stream << " f(" << i << ") = "
<< "[ " << (*(*cell)[i])[0].toString() << " ]" << endl << " [ " << (*(*cell)[i])[0].toString() << " ]" << endl
<< "[ " << (*(*cell)[i])[1].toString() << " ]" << endl << " [ " << (*(*cell)[i])[1].toString() << " ]" << endl
<< "[ " << (*(*cell)[i])[2].toString() << " ]" << endl; << " [ " << (*(*cell)[i])[2].toString() << " ]" << endl;
return stream.str(); return stream.str();
} }
...@@ -60,7 +60,7 @@ void FunctionSpace::build(const GroupOfElement& goe, ...@@ -60,7 +60,7 @@ void FunctionSpace::build(const GroupOfElement& goe,
type = basisType; type = basisType;
basis = BasisGenerator::generate(elementType, basis = BasisGenerator::generate(elementType,
basisType, basisType,
order, "lagrange"); order, "zaglmayr");
// Number of *Per* Entity functions // // Number of *Per* Entity functions //
fPerVertex = basis->getNVertexBased() / nVertex; fPerVertex = basis->getNVertexBased() / nVertex;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment