|
[Sponsors] |
Using PtrList<volScalarField> as an inline function |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 26, 2020, 14:59 |
Using PtrList<volScalarField> as an inline function
|
#1 |
Senior Member
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 8 |
Dear Friends
I have a problem in defining PtrList<volScalarField> in KinematicCloudI.H and KinematicCloud.H. When I define Yi() in KinematicCloudI.H as below Code:
template<class CloudType> inline Foam::PtrList<Foam::volScalarField>& Foam::KinematicCloud<CloudType>::Yi() const { return Yi_; } Code:
inline const Foam::PtrList<Foam::volScalarField>& Yi() const; Code:
lnInclude/KinematicCloudI.H:123:45: error: prototype for ‘Foam::PtrList<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >& Foam::KinematicCloud<CloudType>::Yi() const’ does not match any in class ‘Foam::KinematicCloud<CloudType>’ inline Foam::PtrList<Foam::volScalarField>& Foam::KinematicCloud<CloudType>::Yi() const ^ In file included from lnInclude/basicKinematicCloud.H:36:0, from parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C:26: lnInclude/KinematicCloud.H:409:66: error: candidate is: const Foam::PtrList<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >& Foam::KinematicCloud<CloudType>::Yi() const inline const Foam::PtrList<Foam::volScalarField>& Yi() const; ^ In file included from lnInclude/KinematicCloud.H:677:0, from lnInclude/basicKinematicCloud.H:36, from parcels/derived/basicKinematicParcel/makeBasicKinematicParcelSubmodels.C:26: lnInclude/KinematicCloudI.H:136:1: error: ‘PtrList’ does not name a type PtrList<volScalarField>& Y Thanks, Farzad Farajidizaji |
|
January 26, 2020, 20:17 |
answer, yet another error
|
#2 |
Senior Member
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 8 |
Dear Friends
I have solved above error using below piece of codes; in KinematicCloudI.H as below Code:
template<class CloudType> inline const Foam::PtrList<Foam::volScalarField>& Foam::KinematicCloud<CloudType>::Yi() const { return Yi_; } And in KinematicCloud.H as below; Code:
inline const PtrList<volScalarField>& Yi() const; Code:
./../../../../src/lagrangian/intermediateBFD/lnInclude/KinematicParcelTrackingDataI.H:63:9: error: no matching function for call to ‘Foam::interpolation<double>::New(const Foam::dictionary&, const Foam::PtrList<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >&)’ Code:
YiInterp_ ( interpolation<scalar>::New ( cloud.solution().interpolationSchemes(), cloud.Yi() ) ), Thanks, Farzad Farajidizaji |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 12:04 |
is internalField(U) equivalent to zeroGradient? | immortality | OpenFOAM Running, Solving & CFD | 7 | March 29, 2013 02:27 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 14:06 |
latest OpenFOAM-1.6.x from git failed to compile | phsieh2005 | OpenFOAM Bugs | 25 | February 9, 2010 05:37 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |