Hi,

Inside my subroutine, I need to access the DA variable cu_types_array frequently.

So I need to call DMDAVecGetArrayF90 and DMDAVecRestoreArrayF90 before and after frequently.

Is this necessary? Can I call DMDAVecGetArrayF90 at the start and only call DMDAVecRestoreArrayF90 towards the end, where I don't need to modify the values of cu_types_array anymore?

Will this cause memory corruption?

Also, must the array be restored using DMDAVecRestoreArrayF90 before calling DMLocalToLocalBegin,DMLocalToLocalEnd?

--
Thank you.

Yours sincerely,

TAY wee-beng

Reply via email to