Hi,
I understand that I need to use
call DMDAVecGetArrayF90(da,u_local,u_array,ierr)
if I want to access the u_local values.
And then DMDAVecRestoreArrayF90 once it's done.
I need to access the u_local values many times for each time step. So
must I restore the array after each access?
Or do I only have to do it when I need to call some routines like
DMLocalToGlobalBegin, DMDALocalToLocalBegin etc?
Thank you
Yours sincerely,
TAY wee-beng
On 6/4/2014 10:54 PM, Jed Brown wrote:
TAY wee-beng <[email protected]> writes:
Hi,
I have questions abt DM and DMDALocalToLocalBegin / End.
I have 3 dof for u,v,w using DMDACreate3d.
Currently I'm using the topology of DM to help update the ghost values
on each processor.
I found that to update the ghost values, I only need to use
DMDALocalToLocalBegin / End.
It is common for explicit methods to be implemented using only local
vectors. I recommend using global vectors if you might want to use
implicit methods.
Another thing is updating ghost values of only a single variable e.g. u.
Is that possible if my DMDACreate3d has 3 dof u,v,w?
Or must I create DMDACreate3d with only 1 dof u?
Just update all variables. It is usually not very wasteful. If
profiling and performance analysis shows that your method is limited by
network bandwidth (as opposed to latency or local compute and bandwidth)
then you can profile the same operations having extracted the single
variable. It is usually not worth it and you're better off structuring
your code to work with all variables.