CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] OpenQBMM compile error (v6,7,8,dev)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2020, 18:40
Question OpenQBMM compile error (v6,7,8,dev)
  #1
Member
 
Rishikesh
Join Date: Apr 2016
Posts: 52
Rep Power: 6
mrishi is on a distinguished road
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
mrishi is offline   Reply With Quote

Old   July 25, 2020, 05:42
Exclamation
  #2
Member
 
Rishikesh
Join Date: Apr 2016
Posts: 52
Rep Power: 6
mrishi is on a distinguished road
To clarify, it can be resolved by changing the return statement from

Code:
return nullPtr;
in moment.C to
Code:
return autoPtr<moment<fieldType, nodeType>>(NULL);
and similarly in quadratureNode.C to
Code:
return autoPtr<moment<scalarType, vectorType>>(NULL);
Infact, the same is done in earlier stable branch of the code (OpenQBMM-4.0.0) built for OF-6 (of course it is very outdated). I am trying to understand why this element was changed subsequently, and how come it has not led to this issue that I encounter.
mrishi is offline   Reply With Quote

Old   July 26, 2020, 21:03
Default
  #3
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 32
alberto will become famous soon enoughalberto will become famous soon enough
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.
alberto is offline   Reply With Quote

Reply

Tags
openqbmm

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[waves2Foam] Compile waves2FoamMooring on OF1912 romainping OpenFOAM Community Contributions 0 May 15, 2020 20:24
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 March 18, 2018 06:05
How to compile OpenFOAM-1.7.x on CrunchBang linux 10 gwierink OpenFOAM Installation 0 April 5, 2011 04:38
PV3FoamReader compile error.... PEM_GUY OpenFOAM Installation 6 April 5, 2010 17:22
Can someone PLEASE document the development version installation bernd OpenFOAM Installation 76 November 14, 2008 21:51


All times are GMT -4. The time now is 17:16.