<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 10/11/2015 8:27 PM, Matthew Knepley
wrote:<br>
</div>
<blockquote
cite="mid:CAMYG4Gmw0Twv+q70Nwn9k8mYNjbxS6DhXw9MywBvX4a6YDVe_Q@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Tue, Nov 10, 2015 at 3:27 AM, TAY
wee-beng <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Inside my subroutine, I need to access the DA variable
cu_types_array frequently.<br>
<br>
So I need to call DMDAVecGetArrayF90 and
DMDAVecRestoreArrayF90 before and after frequently.<br>
<br>
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?<br>
<br>
Will this cause memory corruption?<br>
</blockquote>
<div><br>
</div>
<div>You cannot use any other vector operations before you
have called Restore.</div>
</div>
</div>
</div>
</blockquote>
<br>
Hi,<br>
<br>
What do you mean by vector operations? I will just be doing some
maths operation to change the values in cu_types_array. Is that
fine?<br>
<blockquote
cite="mid:CAMYG4Gmw0Twv+q70Nwn9k8mYNjbxS6DhXw9MywBvX4a6YDVe_Q@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Also, must the array be restored using
DMDAVecRestoreArrayF90 before calling
DMLocalToLocalBegin,DMLocalToLocalEnd?</blockquote>
<div><br>
</div>
<div>Yes.</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><span
class="HOEnZb"><font color="#888888"><br>
-- <br>
Thank you.<br>
<br>
Yours sincerely,<br>
<br>
TAY wee-beng<br>
<br>
</font></span></blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">What most experimenters take for
granted before they begin their experiments is infinitely
more interesting than any results to which their experiments
lead.<br>
-- Norbert Wiener</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>