bawfuls |
July 1, 2010 14:27 |
reading "global" variables in a UDF macro?
I'm not sure if what I want to do is possible. I'm using the DEFINE_SOURCE macro, and I'd like to read source terms from a pre-existing data file. I understand I could use DEFINE_RW_FILE to read the entire file into an array, and search the array for the term I need. However, this would be reading in the file to a large array every time the UDF gets called (i.e. for every cell in the mesh) and feels like an inefficient programing method. What I'd rather do is have fluent read in the data file to an array once, and then have the DEFINE_SOURCE macro search that array for the proper value each time it's called.
Is there any way to do this?
|