|
[Sponsors] |
May 4, 2018, 12:12 |
RP_Get_List_Ref_Real exists?
|
#1 |
New Member
DS
Join Date: May 2016
Posts: 28
Rep Power: 10 |
Goodmorning,
I'm writing an UDF where I need to read and modify the value store in a rp real list created as follow: Code:
(make-new-rpvar 'average_list '() 'real-list) (rpsetvar 'average_list ()) (rpsetvar 'average_list (list-add(rpgetvar 'average_list) 1.1)) (rpsetvar 'average_list (list-add(rpgetvar 'average_list) 2.2)) (rpsetvar 'average_list (list-add(rpgetvar 'average_list) 3.3)) (rpgetvar 'average_list ) Code:
RP_Get_List_Ref_Real("average_list",0) Code:
RP_Set_List_Ref_Real("average_list",0) Can someone help me to solve this problem? Thank you really much Best regards Denis |
|
May 5, 2018, 19:40 |
|
#2 |
Senior Member
Join Date: Sep 2017
Posts: 246
Rep Power: 12 |
Hi Denis,
Please could you post the UDF code that does not work? We know from the Fluent header file var.h that the function you mentioned should exist -- here it is (unless it has changed in recent versions): Code:
FLUENT_EXPORT double RP_Get_List_Ref_Float(char *s, int n); Code:
FLUENT_EXPORT cxboolean RP_Variable_Exists_P(char *s); FLUENT_EXPORT int RP_Get_List_Length(char *s); FLUENT_EXPORT void RP_Set_List_of_Float(char *s, double *a, int length); Code:
#include "udf.h" DEFINE_ON_DEMAND(read0) { double value0; value0 = RP_Get_List_Ref_Float("average_list",0); Message0("value0 from average_list = %16.8g\n",value0); } DEFINE_ON_DEMAND(set4) { double my_array[] = {0.,111.,222.,333.}; int len_my_array; len_my_array = sizeof(my_array)/sizeof(my_array[0]); RP_Set_List_of_Float("average_list",my_array,len_my_array); } Good luck! Ed |
|
Tags |
rp_get_list_ref_real |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cell_Function_Values: No post-processing value exists. | jypark | FLUENT | 4 | November 18, 2020 03:40 |
Cell_Function_Values: No post-processing value exists | lixinjun | Main CFD Forum | 0 | December 13, 2016 23:44 |
The CFX Setup case file no longer exists. Continuing in an initial state. | ced30 | CFX | 1 | November 13, 2015 13:00 |
[GAMBIT] ERROR: The key, 0XAF8A, already exists in this HashTool | fluent-user | ANSYS Meshing & Geometry | 2 | February 11, 2013 20:17 |
exists minimum grid size for Ansys calculation? | sooh2121 | ANSYS | 2 | March 7, 2012 11:34 |