Skip to content
Snippets Groups Projects
Commit c9b5e4c3 authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

use new method RodWriter::writeBinary

[[Imported from SVN: r6905]]
parent 82dc65b3
No related branches found
No related tags found
No related merge requests found
...@@ -486,22 +486,8 @@ int main (int argc, char *argv[]) try ...@@ -486,22 +486,8 @@ int main (int argc, char *argv[]) try
// Then the rod // Then the rod
iSolFilename = resultPath + "tmp/intermediateRodSolution_" + iAsAscii.str(); iSolFilename = resultPath + "tmp/intermediateRodSolution_" + iAsAscii.str();
FILE* fpRod = fopen(iSolFilename.c_str(), "wb"); RodWriter::writeBinary(rodX, iSolFilename);
if (!fpRod)
DUNE_THROW(SolverError, "Couldn't open file " << iSolFilename << " for writing");
for (int j=0; j<rodX.size(); j++) {
for (int k=0; k<dim; k++)
fwrite(&rodX[j].r[k], sizeof(double), 1, fpRod);
for (int k=0; k<4; k++) // 3d hardwired here!
fwrite(&rodX[j].q[k], sizeof(double), 1, fpRod);
}
fclose(fpRod);
// //////////////////////////////////////////// // ////////////////////////////////////////////
// Compute error in the energy norm // Compute error in the energy norm
// //////////////////////////////////////////// // ////////////////////////////////////////////
......
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