| 9 | 1/1 | 返回列表 |
| 查看: 1572 | 回復(fù): 8 | ||
duoraeman銀蟲 (小有名氣)
|
[求助]
麻煩大家給看看這個(gè)UDF該怎么寫
|
|
我想把球周圍的溫度值賦值給球面,寫了個(gè)udf總是出錯(cuò),麻煩高手給看看應(yīng)該怎么修改啊~ #include "udf.h" DEFINE_PROFILE(temperature_profile,thread,index) { face_t f; cell_t c; Thread *t0=NULL; begin_f_loop(f,thread) { c=F_C0(f, thread); t0=THREAD_T0(thread); real temp; temp=C_T(c,t0); F_PROFILE(f,thread,index)=temp; } end_f_loop(f,thread) } |
|
DEFINE_PROFILE(temperature_profile,thread,index) { face_t f; cell_t c; Thread *t0=NULL; real temp2=0.0; begin_f_loop(f,thread) { c=F_C0(f,thread); t0=THREAD_T0(thread); temp2=C_T(c,t0); F_PROFILE(f,thread,index)=temp2; } end_f_loop(f,thread) } |
銀蟲 (小有名氣)
銀蟲 (小有名氣)
|
/* You should use these only if you are dealing with *both* * parent and child faces. For most of the solver loops, you should * probably cache the t->t0 or t->t1 pointer instead of using this macro. */ #define F_C0_THREAD(f,t)\ (SV_C0_THREAD_P(t) ? F_STORAGE(f,t,SV_C0_THREAD,Thread **) : THREAD_T0(t)) #define F_C1_THREAD(f,t)\ (SV_C1_THREAD_P(t) ? F_STORAGE(f,t,SV_C1_THREAD,Thread **) : THREAD_T1(t)) |

銅蟲 (小有名氣)
| 9 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 083200學(xué)碩321分一志愿暨南大學(xué)求調(diào)劑 +3 | innocenceF 2026-03-17 | 3/150 |
|
|---|---|---|---|---|
|
[考研]
|
.6lL 2026-03-18 | 8/400 |
|
|
[考研] 296求調(diào)劑 +6 | www_q 2026-03-18 | 10/500 |
|
|
[考研] 294求調(diào)劑材料與化工專碩 +15 | 陌の森林 2026-03-18 | 15/750 |
|
|
[考研] 一志愿武理材料工程348求調(diào)劑 +3 |  ̄^ ̄゜汗 2026-03-19 | 4/200 |
|
|
[考研] 一志愿北京化工大學(xué)0703化學(xué)318分,有科研經(jīng)歷,求調(diào)劑 +4 | 一瓶苯甲酸 2026-03-14 | 4/200 |
|
|
[考研] 260求調(diào)劑 +3 | 朱芷琳 2026-03-20 | 3/150 |
|
|
[考研] 求調(diào)劑 +3 | @taotao 2026-03-20 | 3/150 |
|
|
[考研] 求調(diào)劑 +3 | eation27 2026-03-20 | 3/150 |
|
|
[考研] 環(huán)境工程調(diào)劑 +9 | 大可digkids 2026-03-16 | 9/450 |
|
|
[考研] 298-一志愿中國農(nóng)業(yè)大學(xué)-求調(diào)劑 +9 | 手機(jī)用戶 2026-03-17 | 9/450 |
|
|
[考研] 材料學(xué)碩318求調(diào)劑 +5 | February_Feb 2026-03-19 | 5/250 |
|
|
[考研] 一志愿中國海洋大學(xué),生物學(xué),301分,求調(diào)劑 +5 | 1孫悟空 2026-03-17 | 6/300 |
|
|
[考研] 326求調(diào)劑 +5 | 上岸的小葡 2026-03-15 | 6/300 |
|
|
[考研] 考研化學(xué)學(xué)碩調(diào)劑,一志愿985 +4 | 張vvvv 2026-03-15 | 6/300 |
|
|
[考研] 085601求調(diào)劑 +4 | Du.11 2026-03-16 | 4/200 |
|
|
[考研] 290求調(diào)劑 +3 | p asserby. 2026-03-15 | 4/200 |
|
|
[考研] 有沒有道鐵/土木的想調(diào)劑南林,給自己招師弟中~ +3 | TqlXswl 2026-03-16 | 7/350 |
|
|
[考研] 275求調(diào)劑 +4 | 太陽花天天開心 2026-03-16 | 4/200 |
|
|
[考研] 一志愿211 0703方向310分求調(diào)劑 +3 | 努力奮斗112 2026-03-15 | 3/150 |
|