cloud 编译错误,求提示



  • hi,
    情况是这样,我在kinematiccloud中添加了如下的定义

    template<class CloudType>
    Foam::KinematicCloud<CloudType>::KinematicCloud
    (
        const word& cloudName,
        const volScalarField& rho,
        const volVectorField& U,
        const volScalarField& mu,
        const volScalarField& wallDistance,
        const volScalarField& yPlusP,
        const volScalarField& kP,
        const volScalarField& epsilonP,
        const dimensionedVector& g,
        bool readFields
    )
    :
    

    编译intermediate 文件夹是通过的,但是编译solver的时候就会提示如下错误

    no matching function for call to ‘Foam::KinematicCloud<Foam::Cloud<Foam::SprayParcel<Foam::ReactingParcel<Foam::ThermoParcel<Foam::KinematicParcel<Foam::particle> > > > > >::KinematicCloud(const Foam::word&, const volScalarField&, const volVectorField&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >, const dimensionedVector&, bool)
    

    我是不是可以吧错误信息理解为这个结构,但是我不太懂问题出在哪。。毕竟intermediate 文件夹都编译通过了= =

    no matching function for call to ‘Foam::KinematicCloud
    < Foam::Cloud<Foam::SprayParcel
         <Foam::ReactingParcel
             <Foam::ThermoParcel
                 <Foam::KinematicParcel
                      <Foam::particle>
                  > 
              > 
          >
    >>::KinematicCloud(
    const Foam::word&, 
    const volScalarField&,
    const volVectorField&,
    Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >,
    const dimensionedVector&, bool)
    

    求大神指点迷津


  • 讲师

    模板类函数的继承在子类里面调用需要声明用的是父类的函数,所以你直接改最底层的的那个调用的时候是找不到的



  • @yfclark 谢谢!


Log in to reply
 


CFD中文网 | 东岳流体学术 | 东岳流体商业 | 吉ICP备20003622号-1