|
[Sponsors] |
an Error in compiling:Foam::zeroField Foam::fvm::Sp(const Foam::zero&, const Foam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 25, 2013, 13:04 |
an Error in compiling:Foam::zeroField Foam::fvm::Sp(const Foam::zero&, const Foam
|
#1 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
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. |
|
May 25, 2013, 13:17 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
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.
__________________
|
|
May 25, 2013, 15:53 |
|
#3 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
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
__________________
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. |
|
May 25, 2013, 16:03 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
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)
__________________
|
|
May 25, 2013, 16:23 |
|
#5 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
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. |
|
|
|
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 |