Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    一个库的成员函数怎样在另一个库里使用?

    OpenFOAM
    2
    5
    2917
    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.
    • M
      mark last edited by

      0_1460077816322_2016-04-08 09_05_49____________.png

      M 1 Reply Last reply Reply Quote
      • M
        mark @mark last edited by

        0_1460077839524_QQ截图20160408091614.png

        1 Reply Last reply Reply Quote
        • M
          mark last edited by

          在twoPhaseMixtureThermo这个库中定义了rho1() rho2() , 在compressibleTwoPhaseMixture中需要定义rho1() rho2() , 怎样实现呢? 可否指点一下...

          1 Reply Last reply Reply Quote
          • W
            wwzhao 教授 last edited by

            更正一下问题:一个类的成员函数怎样在另一个类里使用?

            可以通过对象实例+成员访问运算符.或->调用。

            如:compressibleTwoPhaseMixture类中定义了一个变量twoPhaseMixtureThermo& mixture,那么可以通过mixture.rho1()及mixture.rho2()访问mixture这个对象的相应成员函数。

            1 Reply Last reply Reply Quote
            • M
              mark last edited by

              很感谢!!!

              1 Reply Last reply Reply Quote
              • First post
                Last post

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