|
[Sponsors] |
August 17, 2020, 13:19 |
undefined reference_ linking error
|
#1 |
Member
Nikhil
Join Date: May 2020
Location: Freiburg
Posts: 43
Rep Power: 6 |
Hallo,
I am trying to edit reactingFoam solver, to add porous capability. In the process, i got a error "temporary deallocated error", so, as to clear that error, i did some changes in the code. Now, deallocation error is gone, but getting a new error, which says "undefined reference to `trTU()'". trTU() is a tmp variable created in Ueqn.H. By some research, i came to know its a linker error, but dont know how to resolve it. Please have a look at the UEqn.H code and the error msg, and let me know, your views. Thanks. Code:
MRF.correctBoundaryVelocity(U); tmp<fvVectorMatrix> tUEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) + MRF.DDt(rho, U) + turbulence->divDevTau(U) == fvOptions(rho, U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); tmp<volScalarField> trAU(); //trAU; tmp<volTensorField> trTU(); //trTU; if (pressureImplicitPorosity) { tmp<volTensorField> tTU = tensor(I)*UEqn.A(); pZones.addResistance(UEqn, tTU.ref()); trTU() = inv(tTU()); trTU().ref().rename("rAU"); fvOptions.constrain(UEqn); volVectorField gradp(fvc::reconstruct ( ( - ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh) )*mesh.magSf() ) ); for (int UCorr=0; UCorr<nUCorr; UCorr++) { U = trTU() & (UEqn.H() - gradp); } U.correctBoundaryConditions(); fvOptions.correct(U); K = 0.5*magSqr(U); } else { pZones.addResistance(UEqn); fvOptions.constrain(UEqn); if(pimple.momentumPredictor()) { solve ( UEqn == fvc::reconstruct ( ( - ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh) )*mesh.magSf() ) ); fvOptions.correct(U); K = 0.5*magSqr(U); trAU() = 1.0/UEqn.A(); trAU().ref().rename("rAU"); "UEqn.H" 88L, 1820C nm. Last edited by nikhil108; August 17, 2020 at 14:21. Reason: correction |
|
August 17, 2020, 14:12 |
|
#2 |
Senior Member
Join Date: Jul 2009
Posts: 358
Rep Power: 19 |
Is the programming language case-sensitive? You use two different variables in your post if so.
|
|
August 17, 2020, 14:25 |
|
#3 |
Member
Nikhil
Join Date: May 2020
Location: Freiburg
Posts: 43
Rep Power: 6 |
my mistake (in the post). yah! prog language is case senstitive. But in the code, there is nothing wrong with the variable case.
|
|
Tags |
c++, linking, openfoam, solver compilation |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam openfoam 7 installation problem | Andrea23 | OpenFOAM Community Contributions | 1 | February 17, 2020 19:11 |
[blockMesh] blockMesh with double grading. | spwater | OpenFOAM Meshing & Mesh Conversion | 92 | January 12, 2019 10:00 |
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 | Attesz | OpenFOAM Installation | 45 | January 13, 2012 13:38 |
How to install CGNS under windows xp? | lzgwhy | Main CFD Forum | 1 | January 11, 2011 19:44 |
checking the system setup and Qt version | vivek070176 | OpenFOAM Installation | 22 | June 1, 2010 13:34 |