Bug 349: precision set properly when dumping system matrix

git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1723 e10b68d5-8a6e-419e-a041-bce267b0401d
This commit is contained in:
kjetijo
2012-06-06 12:16:49 +00:00
committed by Knut Morten Okstad
parent 6e4cc5f951
commit 172bc10bc9

View File

@@ -363,8 +363,9 @@ bool SIMbase::parseOutputTag (const TiXmlElement* elem)
if (elem->FirstChild() && noDumpDataYet) {
DumpData dmp;
std::string format;
utl::getAttribute(elem,"step",dmp.step);
utl::getAttribute(elem,"format",format);
if(! utl::getAttribute(elem,"step",dmp.step) )
dmp.step = 1;
dmp.format = format[0];
dmp.fname = elem->FirstChild()->Value();
if (toupper(elem->Value()[5]) == 'R')
@@ -1433,6 +1434,7 @@ bool SIMbase::solveSystem (Vector& solution, int printSol,
if (it->doDump()) {
std::cout <<"\nDumping system matrix to file "<< it->fname << std::endl;
std::ofstream os(it->fname.c_str());
os << std::setprecision(17);
A->dump(os,it->format,"A");
}
@@ -1441,6 +1443,7 @@ bool SIMbase::solveSystem (Vector& solution, int printSol,
if (it->doDump()) {
std::cout <<"\nDumping RHS vector to file "<< it->fname << std::endl;
std::ofstream os(it->fname.c_str());
os << std::setprecision(17);
b->dump(os,it->format,"b");
}