|
[Sponsors] |
May 22, 2016, 10:15 |
Can not resolve "undefined reference"
|
#1 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hey all,
I am building my own mixed bc. I started my BC on a fixedGradient BC (turbulentHeatFluxTemperature) but the problem is that I need to call the updateCoeffs from the mixedFvPatchField: Code:
mixedFvPatchScalarField::updateCoeffs(); Code:
fixedGradientFvPatchScalarField::updateCoeffs(); Code:
public fixedGradientFvPatchScalarField { Code:
public mixedFvPatchScalarField { Code:
shorty@myTemperatureLaplacianFoam: wmake Making dependency list for source file myTemperatureLaplacianFoam.C SOURCE=myTemperatureLaplacianFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/thermophysicalModels/radiationModels/lnInclude -IaserBC/lnInclude -IlnInclude -I. -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/myTemperatureLaplacianFoam.o g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/thermophysicalModels/radiationModels/lnInclude -IaserBC/lnInclude -IlnInclude -I. -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/home/shorty/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o Make/linux64GccDPOpt/myTemperatureLaplacianFoam.o -L/home/shorty/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib \ -lfiniteVolume -lOpenFOAM -ldl -lm -o /home/shorty/OpenFOAM/shorty-2.3.1/platforms/linux64GccDPOpt/bin/myTemperatureLaplacianFoam Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o: In function `Foam::laserMixedFvPatchScalarField::laserMixedFvPatchScalarField(Foam::laserMixedFvPatchScalarField const&, Foam::DimensionedField<double, Foam::volMesh> const&)': laserMixedFvPatchScalarField.C:(.text+0x67e): undefined reference to `vtable for Foam::laserMixedFvPatchScalarField' Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o: In function `Foam::laserMixedFvPatchScalarField::laserMixedFvPatchScalarField(Foam::laserMixedFvPatchScalarField const&)': laserMixedFvPatchScalarField.C:(.text+0xb5f): undefined reference to `vtable for Foam::laserMixedFvPatchScalarField' Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o: In function `Foam::laserMixedFvPatchScalarField::laserMixedFvPatchScalarField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&)': laserMixedFvPatchScalarField.C:(.text+0xde1): undefined reference to `vtable for Foam::laserMixedFvPatchScalarField' Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o: In function `Foam::laserMixedFvPatchScalarField::laserMixedFvPatchScalarField(Foam::laserMixedFvPatchScalarField const&, Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::fvPatchFieldMapper const&)': laserMixedFvPatchScalarField.C:(.text+0x1761): undefined reference to `vtable for Foam::laserMixedFvPatchScalarField' Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o: In function `Foam::laserMixedFvPatchScalarField::laserMixedFvPatchScalarField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&)': laserMixedFvPatchScalarField.C:(.text+0x1934): undefined reference to `vtable for Foam::laserMixedFvPatchScalarField' Make/linux64GccDPOpt/laserMixedFvPatchScalarField.o: In function `Foam::fvPatchField<double>::addpatchMapperConstructorToTable<Foam::laserMixedFvPatchScalarField>::New(Foam::fvPatchField<double> const&, Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::fvPatchFieldMapper const&)': laserMixedFvPatchScalarField.C:(.text._ZN4Foam12fvPatchFieldIdE32addpatchMapperConstructorToTableINS_28laserMixedFvPatchScalarFieldEE3NewERKS1_RKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_18fvPatchFieldMapperE[_ZN4Foam12fvPatchFieldIdE32addpatchMapperConstructorToTableINS_28laserMixedFvPatchScalarFieldEE3NewERKS1_RKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_18fvPatchFieldMapperE]+0x22): undefined reference to `typeinfo for Foam::laserMixedFvPatchScalarField' collect2: error: ld returned 1 exit status All hints are appreciated.
__________________
Keep foaming, Tobias Holzmann |
|
May 22, 2016, 23:30 |
|
#2 |
New Member
|
Hi Tobias,
I think you used mixedFvPatchField in a wrong way, because it is designed as a middle layer boundary condition hence can not be used directly (updateCoeffs() not implemented or rewritten, so there are 'vtable' in your error message). If your own boundary condition inherit from mixedFvPatchField, you should write your own updateCoeffs() method using methods in mixedFvPatchField if necessary, like in inletOutlet, instead of calling: mixedFvPatchScalarField::updateCoeffs(); but calling: fvPatchScalarField::updateCoeffs(); is OK. Hope this helps. BR |
|
May 23, 2016, 03:38 |
|
#3 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi,
thanks for the replay. I will check it out. I also will check bernhards bc groovy. I need the robin bc ... At the moment everything is in groovybc and it works well but. I have a few new features that are a bit hard in groovy (already talked with bernhard). Thanks again for the replay.
__________________
Keep foaming, Tobias Holzmann |
|
May 23, 2016, 08:01 |
|
#4 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hey,
okay now I debugged a bit more and (I am stupid),... inletOutlet is actually what I was searching for. I will give feedback if I am done.
__________________
Keep foaming, Tobias Holzmann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Many "undefined reference" errors when linking to shared library | cfbaptista | OpenFOAM Programming & Development | 8 | April 15, 2016 06:58 |
[ICEM] ICEM - Need suggestions on how to resolve blocking problem | NPGrad | ANSYS Meshing & Geometry | 6 | January 5, 2015 15:53 |
Proper b.c. for kOmega model to resolve the boundary layers | fumiya | OpenFOAM | 0 | April 5, 2013 11:46 |
???how to resolve 'FLEXlm' error. plz help!??? | rok | FLUENT | 1 | September 28, 2007 14:29 |
how many points to resolve a boundary layer? | Jiaying Xu | Main CFD Forum | 6 | January 30, 2003 12:04 |