CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   host_to_node data transfer (http://www.cfd-online.com/Forums/fluent-udf/64647-host_to_node-data-transfer.html)

EllenW May 18, 2009 13:32

host_to_node data transfer
 
Hi,

I need to transfer a 2-d array from the host to nodes, but I didn't find any such examples in the udf manual. suppose my array is A[20][4], how should I write for this: host_to_node_real(A, 20,4)?
could anyone please help me on this? Thank you so much.

ellen

coglione May 19, 2009 05:33

Hello Ellen,

i guess you have to split your multi-dimensional array into e.g. 4 1-d arrays of length 20 and use the common host-to-node macros. Each node will have to resemble the full array again.
This is really nasty, thus if you find a more elegant way let me know.

cheers

gemini May 19, 2009 13:46

Hi,

I think serial data transfer method using standard macros located inside a loop structure can be used. If you dont have a solution yet you can try this.:cool:

regards

EllenW May 19, 2009 17:37

thank you for your reply, coglione. There seems to be no direct way for this transfer operation... I'll convert my 2d array as you suggested then.

thanks,
ellen

EllenW May 19, 2009 17:41

I just saw your reply, gemini, thanks. but I'm not quite sure how to carry out your suggested method, could you elaborate more or give an example?

thank you.

gemini May 30, 2009 12:34

Quote:

Originally Posted by EllenW (Post 216647)
I just saw your reply, gemini, thanks. but I'm not quite sure how to carry out your suggested method, could you elaborate more or give an example?

thank you.


Hi ElllenW,

I'm sorry, I don't have a ready example for you, however, you can start with the section titled as "7.5.8 Message Passing Macros" in UDF manual (/help/html/udf/node214.htm) in which low-level message passing macros are described and there is an example about data transfer between nodes and between node0 and host. I think that section will be helpful. Btw, if I reach any example about your case, I'll write here.

Good luck


All times are GMT -4. The time now is 04:56.