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

an Error in compiling:Foam::zeroField Foam::fvm::Sp(const Foam::zero&, const Foam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 25, 2013, 13:04
Default an Error in compiling:Foam::zeroField Foam::fvm::Sp(const Foam::zero&, const Foam
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
this error occurred while compiling pimpleFoam:
Code:
ehsan@Ehsan-com:~/Desktop/Solvers/pimpleFoamModified$ wclean
ehsan@Ehsan-com:~/Desktop/Solvers/pimpleFoamModified$ wmake
Making dependency list for source file pimpleFoamModified.C
SOURCE=pimpleFoamModified.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam220/src/transportModels -I/opt/openfoam220/src/transportModels/incompressible/singlePhaseTransportModel -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/fvOptions/lnInclude -I/opt/openfoam220/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/pimpleFoamModified.o
In file included from pimpleFoamModified.C:89:0:
gasEqn.H: In function ‘int main(int, char**)’:
gasEqn.H:6:22: error: no matching function for call to ‘Sp(Foam::volScalarField&)’
gasEqn.H:6:22: note: candidates are:
/opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:100:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const Foam::DimensionedField<double, Foam::volMesh>&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&)
/opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:126:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const Foam::tmp<Foam::DimensionedField<double, Foam::volMesh> >&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&)
/opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:140:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&)
/opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:154:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const dimensionedScalar&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&)
/opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:180:1: note: template<class Type> Foam::zeroField Foam::fvm::Sp(const Foam::zero&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&)
make: *** [Make/linux64GccDPOpt/pimpleFoamModified.o] Error 1
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 25, 2013, 13:17
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
You didn't show the lines of code around the actual error, "gasEqn.H:6", namely from the file "gasEqn.H", around line 6.

The error indicates that you tried to use "Sp(something)", namely only used one argument, when it actually needs 2 or more arguments.
__________________
wyldckat is offline   Reply With Quote

Old   May 25, 2013, 15:53
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
I copied the whole message!
Code:
ehsan@Ehsan-com:~/Desktop/Solvers/pimpleFoamModified$ wclean
ehsan@Ehsan-com:~/Desktop/Solvers/pimpleFoamModified$ wmake
Making dependency list for source file pimpleFoamModified.C
SOURCE=pimpleFoamModified.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam220/src/transportModels -I/opt/openfoam220/src/transportModels/incompressible/singlePhaseTransportModel -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/fvOptions/lnInclude -I/opt/openfoam220/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/pimpleFoamModified.o
In file included from pimpleFoamModified.C:89:0:
gasEqn.H: In function ‘int main(int, char**)’:
gasEqn.H:6:22: error: no matching function for call to ‘Sp(Foam::volScalarField&)’
gasEqn.H:6:22: note: candidates are:
/opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:100:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const Foam::DimensionedField<double, Foam::volMesh>&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&)
/opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:126:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const Foam::tmp<Foam::DimensionedField<double, Foam::volMesh> >&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&)
/opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:140:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&)
/opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:154:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const dimensionedScalar&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&)
/opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:180:1: note: template<class Type> Foam::zeroField Foam::fvm::Sp(const Foam::zero&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&)
make: *** [Make/linux64GccDPOpt/pimpleFoamModified.o] Error 1
I removed rho because of your saying that this solver hasn't rho field,then should remove SP line totally?
Attached Files
File Type: gz gasEqn.H.tar.gz (311 Bytes, 9 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   May 25, 2013, 16:03
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Here we go, this is the line I wanted to see, since it's the one the compiler is complaining about, on line 6:
Code:
-fvm::Sp(gas)
Well, if you don't know what else to use as reference for this line, then I can only guess that you should remove it...
__________________
wyldckat is offline   Reply With Quote

Old   May 25, 2013, 16:23
Default
  #5
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
thanks.I now asked it in passive scalar thread to write the equation for an incompressible flow.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Reply


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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11
LiftDrag coefficient in LES fabian_korn OpenFOAM Post-Processing 1 September 22, 2008 02:34
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


All times are GMT -4. The time now is 07:59.