|
[Sponsors] |
April 19, 2022, 23:09 |
Error: no matching function for call ... rho
|
#1 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19 |
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")) 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 |
|
April 28, 2022, 02:57 |
|
#2 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19 |
Hi,
I tried to compare sixDoFRigidBodyMotion.H between v1812 and v2112. One key difference is: v2112 Code:
// Constructors //- Construct null sixDoFRigidBodyMotion(const Time&); //- Construct from constant and state dictionaries sixDoFRigidBodyMotion ( const dictionary& dict, const dictionary& stateDict, const Time& time ); //- Construct as copy sixDoFRigidBodyMotion(const sixDoFRigidBodyMotion&); v1812 Code:
// Constructors //- Construct null sixDoFRigidBodyMotion(); //- Construct from constant and state dictionaries sixDoFRigidBodyMotion ( const dictionary& dict, const dictionary& stateDict ); //- Construct as copy sixDoFRigidBodyMotion(const sixDoFRigidBodyMotion&); Thanks |
|
April 28, 2022, 06:24 |
|
#3 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19 |
After some trial and error, and some luck, I think I finally got it working
Code:
motion_(SBMFCoeffs,SBMFCoeffs), Code:
motion_(SBMFCoeffs,SBMFCoeffs,time_.time()), |
|
|
|
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 12:32 |
[mesh manipulation] refineMesh Error | mohsen.boojari | OpenFOAM Meshing & Mesh Conversion | 3 | March 1, 2018 23:07 |
Warning message C4133 while compiling | Arminius | Fluent UDF and Scheme Programming | 0 | October 2, 2017 12:44 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 02:47 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |