Skip to content
Snippets Groups Projects
Commit 5424371a authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent a578e7d2
No related branches found
No related tags found
No related merge requests found
// $Id: PViewDataIO.cpp,v 1.2 2008-02-24 21:37:46 geuzaine Exp $
// $Id: PViewDataIO.cpp,v 1.3 2008-02-24 21:43:17 geuzaine Exp $
//
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
......@@ -83,7 +83,7 @@ bool PViewData::writeSTL(std::string name)
return true;
}
bool PViewDataList::writeTXT(std::string name)
bool PViewData::writeTXT(std::string name)
{
FILE *fp = fopen(name.c_str(), "w");
if(!fp){
......@@ -96,18 +96,19 @@ bool PViewDataList::writeTXT(std::string name)
for(int nod = 0; nod < getNumNodes(ent, ele); nod++){
double x, y, z;
getNode(ent, ele, nod, x, y, z);
fprintf(file, "%.16g %.16g %.16g ", x, y, z);
fprintf(fp, "%.16g %.16g %.16g ", x, y, z);
for(int step = 0; step < getNumTimeSteps(); step++){
for(int comp = 0; comp < getNumComponents(ent, ele); comp++){
double val;
getValue(ent, ele, nod, comp, step, val);
fprintf(file, "%.16g ", val);
fprintf(fp, "%.16g ", val);
}
}
fprintf(fp, "\n");
}
fprintf(file, "\n");
fprintf(fp, "\n");
}
fprintf(file, "\n");
fprintf(fp, "\n");
}
fclose(fp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment