MatGetOwnershipRange ( Mat A, PetscInt * first_row, PetscInt * last_row ) Creating matrices #Īs with vectors, PETSc has APIs that allow the user to specify the exact details of the matrixĬreation process but also DM based creation routines that handle most of the details automaticallyįor specific families of applications. The application code does not need to know or care about the particular Use the matrix for various computations, and finally destroy the matrix. The use of PETSc matrices involves the following actions: createĪ particular type of matrix, insert values into it, process the matrix, (regardless of the particular format chosen) and discusses tips forĮfficient use of the several simple uniprocess and parallel matrix This chapter describes the basics of using PETSc matrices in general Parallel versions) for CPU and GPU based matrices, as well as several specialized formats. Currently, we supportĭense storage and compressed sparse row storage (both sequential and Matrix format is appropriate for all problems. PETSc provides a variety of matrix implementations because no single
0 Comments
Leave a Reply. |