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

Error: no matching function for call ... rho

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By quarkz

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 19, 2022, 22:09
Default Error: no matching function for call ... rho
  #1
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 402
Rep Power: 19
quarkz is on a distinguished road
Hi,

I'm trying to compile a code from another author (https://github.com/krajit/sixDoFDynamicMotion). It is a code which allows the use of 6dof in solidBodyMotionFunction.

It works for OF1812 but not later versions. I'm trying to use it on v1912 and v2112.

The error line is :

Code:
rhoName_(SBMFCoeffs.lookupOrDefault<word>("rho", "rho"))
and the compiling error is:

Code:
sixDoFDynamicMotion.C: In constructor ‘Foam::solidBodyMotionFunctions::sixDoFDynamicMotion::sixDoFDynamicMotion(const Foam::dictionary&, const Foam::Time&)’:
sixDoFDynamicMotion.C:72:66: error: no matching function for call to ‘Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion(const Foam::dictionary&, const Foam::dictionary&)’
   72 |           rhoName_(SBMFCoeffs.lookupOrDefault<word>("rho", "rho"))
      |                                                                  ^
In file included from sixDoFDynamicMotion.H:47,
                 from sixDoFDynamicMotion.C:31:
/usr/lib/openfoam/openfoam2112/src/sixDoFRigidBodyMotion/lnInclude/sixDoFRigidBodyMotion.H:225:9: note: candidate: ‘Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion(const Foam::sixDoFRigidBodyMotion&)’
  225 |         sixDoFRigidBodyMotion(const sixDoFRigidBodyMotion&);
      |         ^~~~~~~~~~~~~~~~~~~~~
/usr/lib/openfoam/openfoam2112/src/sixDoFRigidBodyMotion/lnInclude/sixDoFRigidBodyMotion.H:225:9: note:   candidate expects 1 argument, 2 provided
/usr/lib/openfoam/openfoam2112/src/sixDoFRigidBodyMotion/lnInclude/sixDoFRigidBodyMotion.H:217:9: note: candidate: ‘Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion(const Foam::dictionary&, const Foam::dictionary&, const Foam::Time&)’
  217 |         sixDoFRigidBodyMotion
      |         ^~~~~~~~~~~~~~~~~~~~~
/usr/lib/openfoam/openfoam2112/src/sixDoFRigidBodyMotion/lnInclude/sixDoFRigidBodyMotion.H:217:9: note:   candidate expects 3 arguments, 2 provided
/usr/lib/openfoam/openfoam2112/src/sixDoFRigidBodyMotion/lnInclude/sixDoFRigidBodyMotion.H:214:9: note: candidate: ‘Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion(const Foam::Time&)’
  214 |         sixDoFRigidBodyMotion(const Time&);
      |         ^~~~~~~~~~~~~~~~~~~~~
/usr/lib/openfoam/openfoam2112/src/sixDoFRigidBodyMotion/lnInclude/sixDoFRigidBodyMotion.H:214:9: note:   candidate expects 1 argument, 2 provided
make: *** [/usr/lib/openfoam/openfoam2112/wmake/rules/General/transform:35: Make/linux64GccDPInt32Opt/sixDoFDynamicMotion.o] Error 1
Can someone help? My C++ knowledge is rather poor and I tried to subsitute rho in different ways but it just won't work.
quarkz is offline   Reply With Quote

 


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
[mesh manipulation] RefineMesh Error and Foam warning jiahui_93 OpenFOAM Meshing & Mesh Conversion 4 March 3, 2018 11:32
[mesh manipulation] refineMesh Error mohsen.boojari OpenFOAM Meshing & Mesh Conversion 3 March 1, 2018 22:07
Warning message C4133 while compiling Arminius Fluent UDF and Scheme Programming 0 October 2, 2017 11:44
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21


All times are GMT -4. The time now is 10:29.