<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> [1] Suppose my body moves, and the positions of the body points change,<br>
> will I have to completely deallocate C^T and reallocate the new rows on<br>
> each process? It's possible that the number of non-zeros on each process<br>
> can change. What would you suggest as the best strategy to do this?<br>
<br>
</div>Just create a new matrix.<br></blockquote><div><br></div><div>Is this done using MatDestroy and MatCreate? I would need to do this at every timestep. And suppose C^T was part of a bigger matrix Q = [G C^T], and I only needed to change C^T (which has much fewer columns and non-zeros compared to G) at every time step, is it possible to handle that separately?<br>

 <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I would have interlaced the bx and by (dof=2) so you can index it as one<br>
vector.  Splitting components at collocated points is confusing and bad<br>
for performance.<br>
<div class="im"><br>
> Also, is it possible to create a composite vector of two vectors that are<br>
> not distributed arrays?<br>
<br>
</div>You can do anything with VecScatter.<br>
</blockquote></div><br></div><div class="gmail_extra">Jed, thanks again for patiently answering my questions. They've been very helpful.<br><br>Anush<br></div></div>