[petsc-users] Concatenating DM vectors
Randall Mackie
rlmackie862 at gmail.com
Wed Aug 11 14:47:54 CDT 2021
Hi Alfredo
Take a look at VecStrideGather and VecStrideScatter….maybe these are what you want?
https://petsc.org/release/docs/manualpages/Vec/VecStrideGather.html <https://petsc.org/release/docs/manualpages/Vec/VecStrideGather.html>
https://petsc.org/release/docs/manualpages/Vec/VecStrideScatter.html <https://petsc.org/release/docs/manualpages/Vec/VecStrideScatter.html>
Randy M.
> On Aug 11, 2021, at 12:33 PM, Alfredo J Duarte Gomez <aduarteg at utexas.edu> wrote:
>
> Good morning,
>
> I am currently handling a structured dmda object with more than one field.
>
> In some intermediate operations, I have to create and handle vectors of a size that corresponds to the same dmda with one field only.
>
> After that, it would be very useful to concatenate these vectors and then use them with matrices of the size of the original dmda (more than one field), I hope the vectors keep their i,j structure from the dmda.
>
> I tried using VecConcatenate but it seems to be scrambling the vector without the i,j arrangement, and the only other way I can think of is using a for loop over every grid point which seems cumbersome.
>
> Any suggestions for this problem?
>
> -Alfredo
>
> --
> Alfredo Duarte
> Graduate Research Assistant
> The University of Texas at Austin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210811/4c3b88c8/attachment.html>
More information about the petsc-users
mailing list