24小时热门版块排行榜    

查看: 3561  |  回复: 1

longma135

金虫 (小有名气)

[求助] 请教下begin_c_loop和begin_c_loop_all的区别 已有1人参与

搜了一些解释,还是没弄明白,求解答
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

奔跑鱼

新虫 (小有名气)

【答案】应助回帖

★ ★ ★ ★ ★
感谢参与,应助指数 +1
longma135: 金币+5, ★★★★★最佳答案 2014-02-27 08:50:47
特地去查了一下,找到如下解释:
1. begin, end_c_loop macro is used for looping over all the cells in particular thread for serial processing.
2. For parallel processing, the cells inside a partition can be categorized as interior and exterior cells.
3. The macros begin, end_c_loop_int; begin, end_c_loop_ext and begin, end_c_loop_all are used for looping over interior, exterior and all the cells (in a partition) respectively.
4. In parallel simulations, both begin, end_c_loop and begin, end_c_loop_all macros will do the same job.
5. For faces the looping macro in parallel are begin, end_f_loop_int; begin, end_f_loop_ext and begin, end_f_loop for looping over interior, boundary and all faces respectively. For all practical purpose, the user need not separate the interior and boundary faces of a partition. Hence, begin, end_f_loop_int and begin, end_f_loop_ext macros are rarely used.

Please refer to section 10.5.5 of Fluent 6.2 User's guide for more information.
http://www.fluentusers.com/fluent/doc/ori/html/udf/node257.htm
再加上百度知道这个回答(http://zhidao.baidu.com/link?url ... VQkNAruWFO9xV7J32BK
把这个宏展开其实就清楚了
其实串行时,两者是相同的;并行时,host 节点两者相同,node 节点两者不一样,可能是
#if !RP_NODE
# define begin_c_loop_all begin_c_loop
# define end_c_loop_all end_c_loop
#else
# define begin_c_loop(c,t) begin_generic_loop_1(c,t,THREAD_N_ELEMENTS_INT(t)+THREAD_N_ELEMENTS_LAYER(t,LAYER_PRIMARY)){
# define end_c_loop }end_generic_loop_1
# define begin_c_loop_all(c,t) begin_generic_loop_1(c,t,C_THREAD_N_ELEMENTS_ALL(t)){
# define end_c_loop_all }end_generic_loop_1
#endif /* RP_NODE */
应该就明白了
2楼2014-02-26 22:52:33
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 longma135 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[公派出国] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +3 C79jjtjAKjEn 2026-09-15 3/150 2026-09-18 03:42 by cITaGg3p5edr
[找工作] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +3 vZfe6xYu34yj 2026-09-15 3/150 2026-09-18 02:40 by cITaGg3p5edr
[硕博家园] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +4 Aj1rhIDL5ixY 2026-09-14 4/200 2026-09-18 01:54 by cITaGg3p5edr
[找工作] 售SCI一区T0P文章,我:8O.55.1.O.5.4,科目齐全,可+急 +6 s3fFTmArrBt6 2026-09-13 6/300 2026-09-17 23:28 by cuPZTDXS3VOd
[找工作] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +6 LwdutQ8HoqWP 2026-09-13 6/300 2026-09-17 23:05 by cuPZTDXS3VOd
[硕博家园] 售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急 +7 s3fFTmArrBt6 2026-09-13 9/450 2026-09-17 23:05 by cuPZTDXS3VOd
[公派出国] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +8 QUjhNVAcOSff 2026-09-13 12/600 2026-09-17 22:15 by cuPZTDXS3VOd
[基金申请] 国社科系统bug了,是不是要放榜了? +5 kynobel 2026-09-16 6/300 2026-09-17 21:37 by tosogo
[公派出国] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +4 Aj1rhIDL5ixY 2026-09-14 4/200 2026-09-17 14:27 by ObVzqQQh1rrE
[硕博家园] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +4 0pYnUiPDfdnk 2026-09-14 4/200 2026-09-17 14:15 by ObVzqQQh1rrE
[硕博家园] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +6 40ms4Wlo4umh 2026-09-14 6/300 2026-09-17 13:53 by ObVzqQQh1rrE
[硕博家园] 售SCI一区T0P文章,我:8O.55.1.O.54,科目全,可伽急 +6 23jxep3nCNZb 2026-09-14 6/300 2026-09-17 13:27 by ObVzqQQh1rrE
[找工作] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +5 s3fFTmArrBt6 2026-09-14 6/300 2026-09-17 12:29 by ObVzqQQh1rrE
[找工作] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +4 mibUvS8DDCwf 2026-09-15 4/200 2026-09-17 06:26 by k06BKNblrGRH
[公派出国] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +3 23jxep3nCNZb 2026-09-14 3/150 2026-09-17 03:52 by k06BKNblrGRH
[硕博家园] 售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急 +3 6F5UbRU2I5hL 2026-09-14 3/150 2026-09-17 03:16 by Tql5LQhh5rLK
[考研] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +5 6F5UbRU2I5hL 2026-09-14 5/250 2026-09-17 03:14 by Tql5LQhh5rLK
[考研] 售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急 +7 QUjhNVAcOSff 2026-09-13 8/400 2026-09-17 01:16 by Tql5LQhh5rLK
[找工作] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +4 QUjhNVAcOSff 2026-09-13 6/300 2026-09-16 14:27 by i3KBRD19ERkG
[考博] 售SCI一区T0P文章,我:8O.55.1.O.5.4,科目齐全,可+急 +6 s3fFTmArrBt6 2026-09-14 7/350 2026-09-15 16:47 by CgyNCDVNhGVg
信息提示
请填处理意见