Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    关于==符号的用法

    OpenFOAM
    2
    3
    500
    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.
    • T
      Tens 讲师 last edited by

      最近在看compressibleInterFoam时遇到一个问题,在compressibleAlphaEqnSubCycle.H文件中有这样一句话

      rho == alpha1*rho1 + alpha2*rho2;
      

      C++中==不是判断是否相等的一个运算符吗,如果是赋值,那这里不应该是用=吗

      李东岳 1 Reply Last reply Reply Quote
      • 李东岳
        李东岳 管理员 @Tens last edited by

        @tens 操作符重载了。你可以简单的理解为就是等号。但是==对边界条件也会更正。你可以简单的理解为就是等号。

        CFD课程 改成线上了 http://dyfluid.com/class.html
        CFD高性能服务器 http://dyfluid.com/servers.html

        T 1 Reply Last reply Reply Quote
        • T
          Tens 讲师 @李东岳 last edited by

          @李东岳 谢谢东岳老师

          1 Reply Last reply Reply Quote
          • First post
            Last post

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