|
[Sponsors] |
[OpenFOAM.org] OpenQBMM compile error (v6,7,8,dev) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 24, 2020, 19:40 |
OpenQBMM compile error (v6,7,8,dev)
|
#1 |
Member
Rishikesh
Join Date: Apr 2016
Posts: 63
Rep Power: 10 |
I encounter the following error trying to compile the OpenQBMM code pulled from github (https://github.com/OpenQBMM).
It appears across versions 6 through 8 and dev. It should be noted that 8 and dev have consolidated the transportModel and TurbulenceModel libraries into one (MomentumTransportModel), so the Make/options has to be changed accordingly. What is puzzling me is that such a trivial compilation issue (type conversion) could not have survived as part of the code, and further no issue has been raised on the project git, so I am not sure what I am doing wrong here - I merely downloaded and compiled on docker images in macOS (6,7,8 and dev) as well as a built from source OF-6 on Ubuntu 18.04 and encountered the same error. Code:
In file included from ../quadratureNode/lnInclude/quadratureNode.H:316:0, from ../quadratureNode/lnInclude/quadratureNodes.H:43, from ../fieldMomentInversion/lnInclude/fieldMomentInversion.H:45, from lnInclude/quadratureApproximation.H:53, from monoKineticQuadratureApproximation/monoKineticQuadratureApproximation.H:47, from monoKineticQuadratureApproximation/monoKineticQuadratureApproximation.C:31: ../quadratureNode/lnInclude/quadratureNode.C: In instantiation of 'Foam::autoPtr<Foam::quadratureNode<scalarType, vectorType> > Foam::quadratureNode<scalarType, vectorType>::clone() const [with scalarType = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>; vectorType = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>]': /opt/openfoam-dev/src/OpenFOAM/lnInclude/PtrListIO.C:86:24: required from 'void Foam::PtrList<T>::read(Foam::Istream&, const INew&) [with INew = Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >::iNew; T = Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >]' /opt/openfoam-dev/src/OpenFOAM/lnInclude/PtrListIO.C:162:9: required from 'Foam::PtrList<T>::PtrList(Foam::Istream&, const INew&) [with INew = Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >::iNew; T = Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >]' ../../mappedPtrList/mappedPtrList.C:153:13: required from 'Foam::mappedPtrList<mappedType>::mappedPtrList(Foam::Istream&, const INew&) [with INew = Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >::iNew; mappedType = Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >]' lnInclude/quadratureApproximation.C:142:9: required from 'Foam::quadratureApproximation<momentType, nodeType>::quadratureApproximation(const Foam::word&, const Foam::fvMesh&, const Foam::word&) [with momentType = Foam::moment<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> > >; nodeType = Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >]' monoKineticQuadratureApproximation/monoKineticQuadratureApproximation.C:67:68: required from here ../quadratureNode/lnInclude/quadratureNode.C:509:12: error: could not convert 'nullptr' from 'std::nullptr_t' to 'Foam::autoPtr<Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> > >' return nullptr; ^~~~~~~ In file included from ../moments/moment.H:226:0, from ../moments/moments.H:43, from ../moments/momentFieldSets.H:43, from ../fieldMomentInversion/lnInclude/fieldMomentInversion.H:48, from lnInclude/quadratureApproximation.H:53, from monoKineticQuadratureApproximation/monoKineticQuadratureApproximation.H:47, from monoKineticQuadratureApproximation/monoKineticQuadratureApproximation.C:31: ../moments/moment.C: In instantiation of 'Foam::autoPtr<Foam::moment<fieldType, nodeType> > Foam::moment<fieldType, nodeType>::clone() const [with fieldType = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>; nodeType = Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >]': /opt/openfoam-dev/src/OpenFOAM/lnInclude/PtrListIO.C:86:24: required from 'void Foam::PtrList<T>::read(Foam::Istream&, const INew&) [with INew = Foam::moment<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> > >::iNew; T = Foam::moment<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> > >]' /opt/openfoam-dev/src/OpenFOAM/lnInclude/PtrListIO.C:162:9: required from 'Foam::PtrList<T>::PtrList(Foam::Istream&, const INew&) [with INew = Foam::moment<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> > >::iNew; T = Foam::moment<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> > >]' ../../mappedPtrList/mappedPtrList.C:153:13: required from 'Foam::mappedPtrList<mappedType>::mappedPtrList(Foam::Istream&, const INew&) [with INew = Foam::moment<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> > >::iNew; mappedType = Foam::moment<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> > >]' ../moments/momentFieldSet.C:59:21: required from 'Foam::momentFieldSet<momentType, nodeType>::momentFieldSet(const Foam::word&, const Foam::dictionary&, const Foam::fvMesh&, const Foam::autoPtr<Foam::mappedPtrList<nodeType> >&, const Foam::word&) [with momentType = Foam::moment<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> > >; nodeType = Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >]' lnInclude/quadratureApproximation.C:89:26: required from 'Foam::quadratureApproximation<momentType, nodeType>::quadratureApproximation(const Foam::word&, const Foam::fvMesh&, const Foam::word&) [with momentType = Foam::moment<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> > >; nodeType = Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >]' monoKineticQuadratureApproximation/monoKineticQuadratureApproximation.C:67:68: required from here ../moments/moment.C:158:12: error: could not convert 'nullptr' from 'std::nullptr_t' to 'Foam::autoPtr<Foam::moment<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::quadratureNode<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> > > >' return nullptr; ^~~~~~~ /opt/openfoam-dev/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Opt/monoKineticQuadratureApproximation/monoKineticQuadratureApproximation.o' failed |
|
July 25, 2020, 06:42 |
|
#2 |
Member
Rishikesh
Join Date: Apr 2016
Posts: 63
Rep Power: 10 |
To clarify, it can be resolved by changing the return statement from
Code:
return nullPtr; Code:
return autoPtr<moment<fieldType, nodeType>>(NULL); Code:
return autoPtr<moment<scalarType, vectorType>>(NULL); |
|
July 26, 2020, 22:03 |
|
#3 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
Hi Rishi,
you are probably using OpenFOAM-dev, while the master branch requires ESI-OpenFOAM v2006. Due to the repeated breaking changes in OpenFOAM-dev, this is not our version of reference anymore. See here http://www.openqbmm.org/2020/05/17/n...nch-structure/ The code that compiles against OpenFOAM 7 is still available in the development-openfoam.org branch ( https://github.com/OpenQBMM/OpenQBMM...t-openfoam.org ). At the moment, a port to OpenFOAM 8 is not being considered, so I would suggest you use the ESI release, of which OpenQBMM has become a module (https://www.openfoam.com/releases/op...erics-OpenQBMM) and will continue being supported in the future. P.S. This is an issue specific to OpenQBMM, so please, in the future, report on our issue tracker: https://github.com/OpenQBMM/OpenQBMM/issues not in two different forums, one of which we do not monitor. Best, AP
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
Tags |
openqbmm |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[waves2Foam] Compile waves2FoamMooring on OF1912 | romainping | OpenFOAM Community Contributions | 5 | October 11, 2021 17:52 |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
How to compile OpenFOAM-1.7.x on CrunchBang linux 10 | gwierink | OpenFOAM Installation | 0 | April 5, 2011 05:38 |
PV3FoamReader compile error.... | PEM_GUY | OpenFOAM Installation | 6 | April 5, 2010 18:22 |
Can someone PLEASE document the development version installation | bernd | OpenFOAM Installation | 76 | November 14, 2008 22:51 |