CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Post-Processing

read user input value for post-processing utility

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   May 31, 2010, 20:37
Default read user's input for post-processing utility
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 10
Pascal_doran is on a distinguished road
Hi all,

I've been able to read input value for a pre-processing utility:

int main(int argc, char *argv[])  

# include "setRootCase.H"  
# include "createTime.H"  
# include "createMesh.H"  
# include "createFields.H" 

  const scalar h(readScalar(IStringStream(args.args()[1])()));
  const scalar b(readScalar(IStringStream(args.args()[2])()));
  const scalar r_c(readScalar(IStringStream(args.args()[3])()));
  const scalar alpha(readScalar(IStringStream(args.args()[4])())); 
but when I do the same thing for a post-processing utility named 'trace_max_vor_droite' (based on 'vorticity' utility) it doesn't work.

Here's what I tried:
void Foam::calc(int argc, char *argv[], const Time& runTime, const fvMesh& mesh)  // Line 41

    argList::validArgs.append("valeur Z");
    # include "setRootCase.H"
    const scalar coord_z(readScalar(IStringStream(args.args()[1])()));


The error message:

SOURCE=trace_max_vor_droite.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/postProcessing/postCalc -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/trace_max_vor_droite.o
trace_max_vor_droite.C:41: error: ‘void Foam::calc(int, char**, const Foam::argList&, const Foam::Time&, const Foam::fvMesh&)’ should have been declared inside ‘Foam’
make: *** [Make/linux64GccDPOpt/trace_max_vor_droite.o] Error 1
I'm very interested to learn how OpenFOAM works! Help would be very appreciated

Thank you,


Last edited by Pascal_doran; June 3, 2010 at 17:39. Reason: error message update
Pascal_doran is offline   Reply With Quote

Old   June 3, 2010, 17:41
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 10
Pascal_doran is on a distinguished road
Somebody has suggestions?


Last edited by Pascal_doran; June 11, 2010 at 11:42.
Pascal_doran is offline   Reply With Quote

Old   June 11, 2010, 12:03
New Member
Pascal Doran
Join Date: Jun 2010
Posts: 1
Rep Power: 0
Newtein is on a distinguished road
Ideas/suggestions would be greatly appreciate

thank you
Newtein is offline   Reply With Quote


input value, utility

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Incorrect utility names in User Guide schoon OpenFOAM Bugs 1 October 23, 2008 11:32
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 15:37
time dependent velocity input by user subroutine shohel mahmud Siemens 4 December 18, 2007 12:40
Ist it only me that cant read the user guide pdf olle53 OpenFOAM 5 April 5, 2006 22:14
Transient user input table Bart Siemens 0 January 10, 2005 02:27

All times are GMT -4. The time now is 04:09.