<div dir="ltr">Okay that makes a lot of sense, I was confused because I thought the word cache referred to computer hardware caches. Thanks everyone for your input<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 26, 2015 at 8:58 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
The word cache here is not directly related to computer hardware caches. It comes from the meaning "store away in hiding or for future use." We also use the term stash "store (something) safely and secretly in a specified place". It is used to mean store temporarily (out of sight or knowledge) until we build the final matrix/vector data structure. For example if one sets a value into a matrix on one process that actually belongs on a different process we "stash it away" until the MatAssemblyBegin/End() when we move the data to the correct process and put it into its final resting place". As Patrick notes sometimes you may even want to stash values that that will eventually be stored locally.<br>
<br>
Barry<br>
<br>
The reason we use stash or cache with the "secret or hiding" status is that once the values are stashed the user doesn't have direct access to them at that time, it is only after the MatAssemblyBegin/End that you get that direct access again.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> On Apr 26, 2015, at 6:49 PM, Justin Chang <<a href="mailto:jychang48@gmail.com">jychang48@gmail.com</a>> wrote:<br>
><br>
> Hello everyone,<br>
><br>
> Pardon me if this might be a PETSc 101 question, but what exactly is meant when routines like MatSetValues() "caches the values"? Specifically, what happens say, after I iterate through each element within the ComputeJacobian() routine, when I call MatAssemblyBegin/End(). If there's documentation or a paper somewhere that explains this that would be very helpful, because I can't seem to find anything in the PETSc manual describing this process in detail.<br>
><br>
> Thanks,<br>
> Justin<br>
<br>
</div></div></blockquote></div><br></div>