synthetik-technologies / blastfoam

A CFD solver for multi-component compressible flow with application to high-explosive detonation, explosive safety and air blast
Other
215 stars 96 forks source link

some errors in compilation #27

Closed demonskys closed 3 years ago

demonskys commented 3 years ago

There are some errors in compilation the blastfoam 4.0. The errors list below:

lnInclude/diameterModel.H: In instantiation of ‘static Foam::autoPtr Foam::diameterModel::adddictionaryConstructorToTable::New(const Foam::fvMesh&, const Foam::dictionary&, const Foam::word&) [with diameterModelType = Foam::diameterModels::constantDiameter]’: lnInclude/diameterModel.H:74:9: required from ‘Foam::diameterModel::adddictionaryConstructorToTable::adddictionaryConstructorToTable(const Foam::word&) [with diameterModelType = Foam::diameterModels::constantDiameter]’ constant/constantDiameterModel.C:36:5: required from here /home/zb2211/OpenFOAM/OpenFOAM-7/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:72:38: error: invalid new-expression of abstract class type ‘Foam::diameterModels::constantDiameter’ return autoPtr(new baseType##Type parList); \ lnInclude/diameterModel.H:74:9: note: in expansion of macro ‘declareRunTimeSelectionTable’ declareRunTimeSelectionTable ^~~~~~~~ In file included from constant/constantDiameterModel.C:26:0: constant/constantDiameterModel.H:51:7: note: because the following virtual functions are pure within ‘Foam::diameterModels::constantDiameter’: class constantDiameter ^~~~ In file included from lnInclude/diameterModel.H:44:0, from constant/constantDiameterModel.H:40, from constant/constantDiameterModel.C:26: /home/zb2211/OpenFOAM/blastfoam/src/timeIntegrators/lnInclude/integrationSystem.H:80:22: note: virtual void Foam::integrationSystem::decode() virtual void decode() = 0; ^~ /home/zb2211/OpenFOAM/blastfoam/src/timeIntegrators/lnInclude/integrationSystem.H:83:22: note: virtual void Foam::integrationSystem::encode() virtual void encode() = 0; ^~ /home/zb2211/OpenFOAM/blastfoam/src/timeIntegrators/lnInclude/integrationSystem.H:89:22: note: virtual void Foam::integrationSystem::solve(Foam::label, const scalarList&, const scalarList&) virtual void solve ^~~~~ /home/zb2211/OpenFOAM/blastfoam/src/timeIntegrators/lnInclude/integrationSystem.H:97:22: note: virtual void Foam::integrationSystem::setODEFields(Foam::label, const boolList&, const boolList&) virtual void setODEFields ^~~~ /home/zb2211/OpenFOAM/OpenFOAM-7/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/constant/constantDiameterModel.o' failed make: *** [Make/linux64GccDPInt32Opt/constant/constantDiameterModel.o] Error 1

So how can I solve the errors and complete the compilation?

jheylmun commented 3 years ago

Have you updated from a previous version of blastfoam? It looks like the compiler is looking for old functions that are no longer implemented. From the main blastfoam directory please run ./Allwclean wcleanLnIncludeAll ./Allwmake -j

Let me know if this does not fix the problems.