Action at a distance source term
Hi! I am trying to write a DEFINE_SOURCE macro that calculates a source for one cell based on the current (or previous time step) value of variables in other cells (not just the cell's neighbors.) An example of this is a fluid with a charge distribution where the fluid in one cell is electrostatically forced by the charge in other cells.
The problem is I don't know how to access the data in other cells within the DEFINE_SOURCE function. I tried a begin_c_loop ... end_c_loop structure, initializing a different cell pointer and a different thread (also tried using the same thread) but that didn't work. Any ideas?
Thanks in advance for your help.
|All times are GMT -4. The time now is 15:13.|