Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    OpenFOAM中的forAll什么意思

    OpenFOAM
    4
    5
    4744
    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

      forAll ( , celli)
      是什么意思,有知道的吗?

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

        Hi,

        very simple.

        OpenFOAM经常需要对场进行处理,举例:对每个网格的值+1,那么就可以这样写:

        forAll(U, i)
        {对每个网格的值+1}

        其中U表示要对U注册的网格遍历~i表示具体的网格的值。其中i可以随意更改,比如改成celli

        线上CFD课程 7月1日报名截止 http://dyfluid.com/class.html
        CFD高性能服务器 http://dyfluid.com/servers.html

        M 1 Reply Last reply Reply Quote
        • J
          jzheng last edited by

          forAll()的定义在UList.H的第421行,实际上是一个宏

          0_1460588743315_upload-4cf7de45-da34-410f-a915-f5d2a53c9e83

          它实际是在执行for语句。

          1 Reply Last reply Reply Quote
          • M
            Mr.H @李东岳 last edited by

            @东岳 @jzheng forAll 循环是不是无法对边界 上的场量进行操作?

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

              @mr-h http://www.cfd-china.com/topic/1199 看这个,通过forAll操作边界

              线上CFD课程 7月1日报名截止 http://dyfluid.com/class.html
              CFD高性能服务器 http://dyfluid.com/servers.html

              1 Reply Last reply Reply Quote
              • First post
                Last post

              CFD中文网 | 东岳流体 | 京ICP备15017992号-2
              论坛登录问题反馈可联系 li.dy@dyfluid.com