|
[Sponsors] |
read user input value for post-processing utility |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 31, 2010, 21:37 |
read user's input for post-processing utility
|
#1 |
Member
Pascal
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 17 |
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); } 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])())); .... } 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 Thank you, Pascal Last edited by Pascal_doran; June 3, 2010 at 18:39. Reason: error message update |
|
June 3, 2010, 18:41 |
|
#2 |
Member
Pascal
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 17 |
Somebody has suggestions?
Pascal Last edited by Pascal_doran; June 11, 2010 at 12:42. |
|
June 11, 2010, 13:03 |
|
#3 |
New Member
Pascal Doran
Join Date: Jun 2010
Posts: 1
Rep Power: 0 |
Ideas/suggestions would be greatly appreciate
thank you |
|
Tags |
input value, utility |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Incorrect utility names in User Guide | schoon | OpenFOAM Bugs | 1 | October 23, 2008 12: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 23:14 |
Transient user input table | Bart | Siemens | 0 | January 10, 2005 02:27 |