|
[Sponsors] |
Compilation Error: "no matching function for call to ‘div(Foam::volScalarField&)’" |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 29, 2015, 20:49 |
Compilation Error: "no matching function for call to ‘div(Foam::volScalarField&)’"
|
#1 |
New Member
Join Date: Sep 2015
Location: California, US
Posts: 3
Rep Power: 10 |
Hi, I am compiling a new solver for a set of equations for weak gas discharge and I am getting this error.
Making dependency list for source file weakdischargeFoam.C SOURCE=weakdischargeFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude -I/home/OpenFOAM/OpenFOAM-2.4.0/src/meshTools/lnInclude -IlnInclude -I. -I/home/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude -I/home/OpenFOAM/OpenFOAM-2.4.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/weakdischargeFoam.o weakdischargeFoam.C: In function ‘int main(int, char**)’: weakdischargeFoam.C:54:22: error: no matching function for call to ‘div(Foam::volScalarField&)’ fvm::div(Ji) + alpha*Je ^ weakdischargeFoam.C:54:22: note: candidates are: In file included from /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvmDiv.H:94:0, from /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvm.H:45, from /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvCFD.H:10, from weakdischargeFoam.C:32: /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvmDiv.C:45:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::div(const surfaceScalarField&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, const Foam::word&) div ^ /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvmDiv.C:45:1: note: template argument deduction/substitution failed: weakdischargeFoam.C:54:22: note: cannot convert ‘Ji’ (type ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’) to type ‘const surfaceScalarField& {aka const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&}’ fvm::div(Ji) + alpha*Je ^ In file included from /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvmDiv.H:94:0, from /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvm.H:45, from /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvCFD.H:10, from weakdischargeFoam.C:32: /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvmDiv.C:62:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::div(const Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> >&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, const Foam::word&) div ^ /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvmDiv.C:62:1: note: template argument deduction/substitution failed: weakdischargeFoam.C:54:22: note: cannot convert ‘Ji’ (type ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’) to type ‘const Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> >&’ fvm::div(Ji) + alpha*Je ^ In file included from /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvmDiv.H:94:0, from /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvm.H:45, from /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvCFD.H:10, from weakdischargeFoam.C:32: /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvmDiv.C:77:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::div(const surfaceScalarField&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) div ^ /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvmDiv.C:77:1: note: template argument deduction/substitution failed: weakdischargeFoam.C:54:22: note: cannot convert ‘Ji’ (type ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’) to type ‘const surfaceScalarField& {aka const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&}’ fvm::div(Ji) + alpha*Je ^ In file included from /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvmDiv.H:94:0, from /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvm.H:45, from /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvCFD.H:10, from weakdischargeFoam.C:32: /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvmDiv.C:88:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::div(const Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> >&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) div ^ /home/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/fvmDiv.C:88:1: note: template argument deduction/substitution failed: weakdischargeFoam.C:54:22: note: cannot convert ‘Ji’ (type ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’) to type ‘const Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> >&’ fvm::div(Ji) + alpha*Je ^ I have checked parameters mentioned in createFields.H and also in the weakdischargeFoam.C but couldn't find much. I would be thankful for help. Last edited by abhiv; September 29, 2015 at 23:05. |
|
September 30, 2015, 02:47 |
|
#2 |
Senior Member
|
Hi,
If you look into documentation (http://foam.sourceforge.net/docs/cpp...8d576632b33d25 and below), there is no fvm::div function that has single volume field as argument. First argument should always be flux as surface field. Solution to the problem depends on what exactly you are trying to achieve. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
foamToTecplot360 | thomasduerr | OpenFOAM Post-Processing | 121 | June 11, 2021 10:05 |
[blockMesh] non-orthogonal faces and incorrect orientation? | nennbs | OpenFOAM Meshing & Mesh Conversion | 7 | April 17, 2013 05:42 |
LiencubiclowRemodel | nzy102 | OpenFOAM Bugs | 14 | January 10, 2012 08:53 |
Elements that limit the Courant number | skabilan | OpenFOAM Running, Solving & CFD | 9 | July 3, 2008 12:07 |
No matching function multiplying tensors for BC | Erik | OpenFOAM | 3 | March 20, 2008 13:05 |