phorgue / porousMultiphaseFoam

A porous multiphase toolbox for OpenFOAM
Other
124 stars 64 forks source link

Compilation error #4

Closed renardf closed 6 years ago

renardf commented 6 years ago

Hello, I've tried to install porousMultiphaseFoam but get the following compilation error :

g++ -std=c++11 -m64 -DOPENFOAM_PLUS=1712 -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 -Wno-attributes -O3  -DNoRepository -ftemplate-depth-100 -I/cea/home/b5/renardf/OpenFOAM/OpenFOAM-v1712/src/finiteVolume/lnInclude  -I/cea/home/b5/renardf/OpenFOAM/OpenFOAM-v1712/src/meshTools/lnInclude -IlnInclude -I. -I/cea/home/b5/renardf/OpenFOAM/OpenFOAM-v1712/src/OpenFOAM/lnInclude -I/cea/home/b5/renardf/OpenFOAM/OpenFOAM-v1712/src/OSspecific/POSIX/lnInclude   -fPIC -c darcyGradPressureAniso/darcyGradPressureAniso.C -o Make/linux64GccDPInt32Opt/darcyGradPressureAniso/darcyGradPressureAniso.o
darcyGradPressure/darcyGradPressure.C: Dans la fonction membre ‘virtual void Foam::darcyGradPressure::write(Foam::Ostream&) const’:
darcyGradPressure/darcyGradPressure.C:134:5: erreur : ‘writeEntryIfDifferent’ was not declared in this scope
     writeEntryIfDifferent<word>(os, "Mf", "Mf", MfName_);
     ^~~~~~~~~~~~~~~~~~~~~
darcyGradPressure/darcyGradPressure.C:134:31: erreur : expected primary-expression before ‘>’ token
     writeEntryIfDifferent<word>(os, "Mf", "Mf", MfName_);
                               ^

I've installed the latest 1712 OpenFoam version and the latest git porousMultiphaseFoam version. I'm using gcc-6.2.0 compilator.

Thank you

phorgue commented 6 years ago

Hello,

I'm not sure but it seems that OpenFOAM+ has removed the function "writeEntryIfDifferent" so the source code cannot compile correctly (or maybe it just a name change).

The first solution is to compile the toolbox using openfoam 5.0 or foam-extend 4.0 (using the foam-extend branch of the repository) since the compatibility is tested in theses configurations.

The second solution consists in removing the concerned lines (useless for the computation because it just writes informations in files) in darcyGradPressure.C and anisoDarcyGradPressure.C (but maybe there are other issues using openfoam+)

Sincerely,

renardf commented 6 years ago

OK, thank you, I reinstalled OpenFAOM-5.0 and porousMultiphaseFOAM and it's working.