Compiling modified patchAverage tool
I'm trying to modify the patchAverage tool, so that the calculation result will be written into a simple text file. In a simple C++ app, including
Code:
#include <iostream> Code:
ofstream results; Code:
Making dependency list for source file patchAverageToFile.C Thanks, Björn |
what's your object ?
what's the object of your modified patchAverage file? the original patchAverage tool already has the ability to produce data.If you want to get a data file,you just run the tool,
just like this: patchAverage fieldName patchName > dataFileName then you can get the data file So I don't know your real object.If the object is just to get a data file,you can do as above, jingjing |
Well, I need to parse the calculation result with another application for automated post-processing. So it would be nice to just write out the result rather than writing the whole screen output to file.
|
Try sticking 'std::' in front of ofstream, or 'using namespace std' before main.
|
Great, that worked, thank you very much! ofstream and ios are obviously not declared in the foam namespace.
|
All times are GMT -4. The time now is 05:16. |