Both small and large matrix are sparse matrix.
I will try following comments.
Thanks,
Hyung Kim
2023년 2월 1일 (수) 오후 11:30, Jed Brown 님이 작성:
> Is the small matrix dense? Then you can use MatSetValues. If the small
> matrix is sparse, you can assemble it with larger dimension (empty rows and
>
Is the small matrix dense? Then you can use MatSetValues. If the small matrix
is sparse, you can assemble it with larger dimension (empty rows and columns)
and use MatAXPY.
김성익 writes:
> Hello,
>
>
> I want to put small matrix to large matrix.
> The schematic of operation is as below.
>
Maybe create the large matrix and use
https://www.mcs.anl.gov/petsc/petsc-3.7/docs/manualpages/Mat/MatGetSubMatrix.html
with MAT_REUSE_MATRIX.
Or pad the IS arguments to MatGetSubMatrix with -1, so the size is correct
and PETSc should ignore -1, and use MAT_INITIAL_MATRIX.
Others may know what
Hello,
I want to put small matrix to large matrix.
The schematic of operation is as below.
[image: image.png]
Is there any function for put small matrix to large matrix at once?
Thanks,
Hyung Kim