24小时热门版块排行榜    

查看: 3475  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 085700资源与环境308求调剂 +3 墨墨漠 2026-03-18 3/150 2026-03-18 22:35 by bingxueer79
[考研] 354求调剂 +4 Tyoumou 2026-03-18 7/350 2026-03-18 21:45 by Tyoumou
[考研] 材料专业求调剂 +5 hanamiko 2026-03-18 5/250 2026-03-18 20:19 by 星空星月
[考研] 一志愿天津大学化学工艺专业(081702)315分求调剂 +10 yangfz 2026-03-17 10/500 2026-03-18 20:14 by walc
[考研] 化学工程321分求调剂 +15 大米饭! 2026-03-15 18/900 2026-03-18 14:52 by haxia
[考研] 307求调剂 +3 冷笙123 2026-03-17 3/150 2026-03-18 09:55 by macy2011
[考研] 265求调剂 +3 梁梁校校 2026-03-17 3/150 2026-03-18 09:12 by zhukairuo
[考研] 268求调剂 +8 一定有学上- 2026-03-14 9/450 2026-03-17 17:47 by laoshidan
[考研] 有没有道铁/土木的想调剂南林,给自己招师弟中~ +3 TqlXswl 2026-03-16 7/350 2026-03-17 15:23 by TqlXswl
[考研] 275求调剂 +4 太阳花天天开心 2026-03-16 4/200 2026-03-17 10:53 by 功夫疯狂
[基金申请] 国自科面上基金字体 +6 iwuli 2026-03-12 7/350 2026-03-16 21:18 by sculhf
[考研] 304求调剂 +5 素年祭语 2026-03-15 5/250 2026-03-16 17:00 by 我的船我的海
[考研] 一志愿211 0703方向310分求调剂 +3 努力奋斗112 2026-03-15 3/150 2026-03-16 16:44 by houyaoxu
[考研] 318求调剂 +3 Yanyali 2026-03-15 3/150 2026-03-16 16:41 by houyaoxu
[考研] 085600调剂 +5 漾漾123sun 2026-03-12 6/300 2026-03-16 15:58 by 漾漾123sun
[考研] 265求调剂 +4 威化饼07 2026-03-12 4/200 2026-03-14 17:23 by userper
[考研] 复试调剂 +4 z1z2z3879 2026-03-14 5/250 2026-03-14 16:30 by JourneyLucky
[考研] 304求调剂 +6 Mochaaaa 2026-03-12 7/350 2026-03-13 22:18 by 星空星月
[考研] 0856材料与化工301求调剂 +5 奕束光 2026-03-13 5/250 2026-03-13 22:00 by 星空星月
[考研] 0703化学求调剂 +7 绿豆芹菜汤 2026-03-12 7/350 2026-03-13 17:25 by njzyff
信息提示
请填处理意见