Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    cloud 编译错误,求提示

    OpenFOAM
    2
    3
    570
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 星
      星星星星晴 讲师 last edited by

      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)
      

      求大神指点迷津

      m.sui20@foxmail.com

      1 Reply Last reply Reply Quote
      • Y
        yfclark 讲师 last edited by

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

        星 1 Reply Last reply Reply Quote
        • 星
          星星星星晴 讲师 @yfclark last edited by

          @yfclark 谢谢!

          m.sui20@foxmail.com

          1 Reply Last reply Reply Quote
          • First post
            Last post

          CFD中文网 | 东岳流体 | 京ICP备15017992号-2