CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Compiling modified patchAverage tool

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   October 15, 2009, 10:40
Default Compiling modified patchAverage tool
  #1
Bjw
New Member
 
Björn Westendorf
Join Date: Oct 2009
Location: Stuttgart, Germany
Posts: 9
Rep Power: 16
Bjw is on a distinguished road
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>
#include <fstream>
and adding the following simple code:

Code:
ofstream results;
results.open ("results.dat", ios::out | ios::app);
results<< sumField << endl;
results.close;
should do the job. Howewer, I cannot compile that tool. wmake will produce the following:
Code:
Making dependency list for source file patchAverageToFile.C
SOURCE=patchAverageToFile.C ;  g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3  -DNoRepository -ftemplate-depth-40 -I/home/stss2/OpenFOAM/OpenFOAM-1.5.x/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/stss2/OpenFOAM/OpenFOAM-1.5.x/src/OpenFOAM/lnInclude -I/home/stss2/OpenFOAM/OpenFOAM-1.5.x/src/OSspecific/Unix/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/patchAverageToFile.o
patchAverageToFile.C: In function ‘int main(int, char**)’:
patchAverageToFile.C:96: error: ‘ofstream’ was not declared in this scope
patchAverageToFile.C:96: error: expected `;' before ‘results’
patchAverageToFile.C:97: error: ‘results’ was not declared in this scope
patchAverageToFile.C:97: error: ‘ios’ has not been declared
patchAverageToFile.C:97: error: ‘ios’ has not been declared
make: *** [Make/linux64GccDPOpt/patchAverageToFile.o] Fehler 1
Can somebody tell me how to fix that?

Thanks, Björn
Bjw is offline   Reply With Quote

 

Tags
compile, patchaverage


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems while using the sample post-procesing tool svens OpenFOAM Post-Processing 5 September 2, 2010 11:13
[mesh manipulation] ScalePoints tool cedric_duprat OpenFOAM Meshing & Mesh Conversion 6 September 19, 2008 03:15
tool for approximation of condition number rt Main CFD Forum 6 June 24, 2006 02:42
Parametrical tool? Renaud FLUENT 0 May 25, 2006 04:51
Modified Equation for CFX algorithm Craig Johansen CFX 0 August 27, 2004 23:02


All times are GMT -4. The time now is 08:40.