CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

read user input value for post-processing utility

Register Blogs Community New Posts Updated Threads Search

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

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

Code:
int main(int argc, char *argv[])  
{  
 
  argList::validArgs.append("value_h");
  argList::validArgs.append("value_b");
  argList::validArgs.append("value_r_c");
  argList::validArgs.append("value_alpha");

# 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])())); 
 
.....
 
return(0);  
}
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:
Code:
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:

Code:
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,

Pascal

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
Default
  #2
Member
 
Pascal
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 16
Pascal_doran is on a distinguished road
Somebody has suggestions?

Pascal

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

Old   June 11, 2010, 12:03
Default
  #3
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

Reply

Tags
input value, utility


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
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 14:37
time dependent velocity input by user subroutine shohel mahmud Siemens 4 December 18, 2007 11: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 01:27


All times are GMT -4. The time now is 22:05.