[petsc-users] Calculating the PETSc index of a DMComposite vector
Anush Krishnan
anush at bu.edu
Wed Nov 13 16:29:08 CST 2013
>
> > [1] Suppose my body moves, and the positions of the body points change,
> > will I have to completely deallocate C^T and reallocate the new rows on
> > each process? It's possible that the number of non-zeros on each process
> > can change. What would you suggest as the best strategy to do this?
>
> Just create a new matrix.
>
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?
> I would have interlaced the bx and by (dof=2) so you can index it as one
> vector. Splitting components at collocated points is confusing and bad
> for performance.
>
> > Also, is it possible to create a composite vector of two vectors that are
> > not distributed arrays?
>
> You can do anything with VecScatter.
>
Jed, thanks again for patiently answering my questions. They've been very
helpful.
Anush
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131113/fc4c4d43/attachment-0001.html>
More information about the petsc-users
mailing list