|
[Sponsors] |
compile error when playing with OpenFOAM test cases |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 14, 2016, 14:13 |
compile error when playing with OpenFOAM test cases
|
#1 |
New Member
Zheng Liu
Join Date: Oct 2016
Posts: 6
Rep Power: 10 |
Dear OpenFoam users,
I was just playing with some test cases in the OpenFOAM directory $WM_PROJECT_DIR/applications/test/mesh. When I was trying to compile the Test-mesh.C file by typing wmake in the terminal. It gives me a lot of errors (see attached compile log). I am quite a new user of OpenFoam and I don't know how to solve this problem. Can anyone help me ? Many Thanks, Zheng /opt/openfoam4/applications/test/mesh g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam4/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam4/src/OpenFOAM/lnInclude -I/opt/openfoam4/src/OSspecific/POSIX/lnInclude -fPIC -c Test-mesh.C -o /opt/openfoam4/platforms/linux64GccDPInt32Opt/applications/test/mesh/Test-mesh.o In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricScalarField.H:38:0, from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFields.H:34, from /opt/openfoam4/src/finiteVolume/lnInclude/volFields.H:37, from Test-mesh.C:28: /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.H:81:1: error: template class without a name class ^ In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.H:649:0, from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricScalarField.H:38, from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFields.H:34, from /opt/openfoam4/src/finiteVolume/lnInclude/volFields.H:37, from Test-mesh.C:28: /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFieldI.H:30:55: error: invalid use of incomplete type ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’ Foam::GeometricField<Type, PatchField, GeoMesh>::null() ^ In file included from /opt/openfoam4/src/finiteVolume/lnInclude/surfaceInterpolation.H:40:0, from /opt/openfoam4/src/finiteVolume/lnInclude/fvMesh.H:54, from Test-mesh.C:27: /opt/openfoam4/src/finiteVolume/lnInclude/volFieldsFwd.H:52:7: note: declaration of ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’ class GeometricField; ^ In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.H:649:0, from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricScalarField.H:38, from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFields.H:34, from /opt/openfoam4/src/finiteVolume/lnInclude/volFields.H:37, from Test-mesh.C:28: /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFieldI.H:41:17: error: invalid use of incomplete type ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’ internalField() const ^ In file included from /opt/openfoam4/src/finiteVolume/lnInclude/surfaceInterpolation.H:40:0, from /opt/openfoam4/src/finiteVolume/lnInclude/fvMesh.H:54, from Test-mesh.C:27: /opt/openfoam4/src/finiteVolume/lnInclude/volFieldsFwd.H:52:7: note: declaration of ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’ class GeometricField; ^ In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.H:649:0, from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricScalarField.H:38, from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFields.H:34, from /opt/openfoam4/src/finiteVolume/lnInclude/volFields.H:37, from Test-mesh.C:28: /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFieldI.H:51:67: error: invalid use of incomplete type ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’ Foam::GeometricField<Type, PatchField, GeoMesh>:rimitiveField() const ^ In file included from /opt/openfoam4/src/finiteVolume/lnInclude/surfaceInterpolation.H:40:0, from /opt/openfoam4/src/finiteVolume/lnInclude/fvMesh.H:54, from Test-mesh.C:27: /opt/openfoam4/src/finiteVolume/lnInclude/volFieldsFwd.H:52:7: note: declaration of ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’ class GeometricField; ^ In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.H:649:0, from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricScalarField.H:38, from /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFields.H:34, from /opt/openfoam4/src/finiteVolume/lnInclude/volFields.H:37, from Test-mesh.C:28: /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricFieldI.H:60:66: error: invalid use of incomplete type ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’ Foam::GeometricField<Type, PatchField, GeoMesh>::boundaryField() const ^ In file included from /opt/openfoam4/src/finiteVolume/lnInclude/surfaceInterpolation.H:40:0, from /opt/openfoam4/src/finiteVolume/lnInclude/fvMesh.H:54, from Test-mesh.C:27: /opt/openfoam4/src/finiteVolume/lnInclude/volFieldsFwd.H:52:7: note: declaration of ‘class Foam::GeometricField<Type, PatchField, GeoMesh>’ class GeometricField; ^ ... ... ... /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.C: In instantiation of ‘Foam::Ostream& Foam:perator<<(Foam::Ostream&, const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::Vector<double>; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh]’: Test-mesh.C:56:19: required from here /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.C:1271:7: error: no match for call to ‘(const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>) ()’ gf().writeData(os, "internalField"); ^ /opt/openfoam4/src/OpenFOAM/lnInclude/GeometricField.C:1273:5: error: invalid use of incomplete type ‘const class Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>’ gf.boundaryField().writeEntry("boundaryField", os); ^ In file included from /opt/openfoam4/src/finiteVolume/lnInclude/surfaceInterpolation.H:40:0, from /opt/openfoam4/src/finiteVolume/lnInclude/fvMesh.H:54, from Test-mesh.C:27: /opt/openfoam4/src/finiteVolume/lnInclude/volFieldsFwd.H:52:7: note: declaration of ‘class Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>’ class GeometricField; ^ make: *** [/opt/openfoam4/platforms/linux64GccDPInt32Opt/applications/test/mesh/Test-mesh.o] Error 1 |
|
November 14, 2016, 15:35 |
|
#2 |
New Member
Zheng Liu
Join Date: Oct 2016
Posts: 6
Rep Power: 10 |
I solved this problem by simply reinstall the OpenFOAM.
|
|
Tags |
compile error |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology | wyldckat | OpenFOAM | 17 | November 10, 2017 16:54 |
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | September 14, 2016 04:19 |
[OpenFOAM.org] Failed to compile OpenFOAM 3.0.1 with icc | xuegy | OpenFOAM Installation | 1 | July 13, 2016 17:03 |
New OpenFOAM Forum Structure | jola | OpenFOAM | 2 | October 19, 2011 07:55 |
Free OpenFOAM CHT Report and Cases (No Catch!) | m.nichols19 | OpenFOAM | 6 | August 23, 2010 22:40 |