MatDestroy#

Frees space taken by a matrix.

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatDestroy(Mat *A)

Collective on A

Input Parameter#

  • A - the matrix

Developer Note#

Some special arrays of matrices are not destroyed in this routine but instead by the routines called by MatDestroySubMatrices(). Thus one must be sure that any changes here must also be made in those routines. MatHeaderMerge() and MatHeaderReplace() also manipulate the data in the Mat object and likely need changes if changes are needed here.

See Also#

Mat, MatCreate()

Level#

beginner

Location#

src/mat/interface/matrix.c

Examples#

src/mat/tutorials/ex10.c.html
src/mat/tutorials/ex11.c.html
src/mat/tutorials/ex12.c.html
src/mat/tutorials/ex15.c.html
src/mat/tutorials/ex15f.F90.html
src/mat/tutorials/ex16.c.html
src/mat/tutorials/ex17.c.html
src/mat/tutorials/ex17f.F90.html
src/mat/tutorials/ex18.c.html
src/mat/tutorials/ex1.c.html
src/mat/tutorials/ex2.c.html

Implementations#

MatDestroy_HYPREStruct in src/dm/impls/da/hypre/mhyp.c
{ MatDestroy_HYPRESStruct in src/dm/impls/da/hypre/mhyp.c
{ MatDestroy_SeqUSFFT in src/dm/impls/da/usfft/matusfft.c
MatDestroy_ML in src/ksp/pc/impls/ml/ml.c
{ MatDestroy_MPIAdj in src/mat/impls/adj/mpi/mpiadj.c
{ MatDestroy_SparseElemental in src/mat/impls/aij/mpi/clique/clique.cxx
{ MatDestroy_MPIAIJCRL in src/mat/impls/aij/mpi/crl/mcrl.c
{ MatDestroy_MPIAIJKokkos in src/mat/impls/aij/mpi/kokkos/mpiaijkok.kokkos.cxx
{ MatDestroy_MPIAIJ in src/mat/impls/aij/mpi/mpiaij.c
{ MatDestroy_MatMatMPIAIJBACKEND in src/mat/impls/aij/mpi/mpiaij.c
{ MatDestroy_MPIAIJCUSPARSE in src/mat/impls/aij/mpi/mpicusparse/mpiaijcusparse.cu
{ MatDestroy_MPIAIJViennaCL in src/mat/impls/aij/mpi/mpiviennacl/mpiaijviennacl.cxx
{ MatDestroy_MUMPS in src/mat/impls/aij/mpi/mumps/mumps.c
{ MatDestroy_Pastix in src/mat/impls/aij/mpi/pastix/pastix.c
{ MatDestroy_STRUMPACK in src/mat/impls/aij/mpi/strumpack/strumpack.c
{ MatDestroy_SeqAIJ in src/mat/impls/aij/seq/aij.c
{ MatDestroy_SeqAIJMKL in src/mat/impls/aij/seq/aijmkl/aijmkl.c
{ MatDestroy_SeqAIJPERM in src/mat/impls/aij/seq/aijperm/aijperm.c
{ MatDestroy_SeqAIJSELL in src/mat/impls/aij/seq/aijsell/aijsell.c
{ MatDestroy_SeqAIJCRL in src/mat/impls/aij/seq/crl/crl.c
{ MatDestroy_Essl in src/mat/impls/aij/seq/essl/essl.c
{ MatDestroy_KLU in src/mat/impls/aij/seq/klu/klu.c
{ MatDestroy_SeqAIJKokkos in src/mat/impls/aij/seq/kokkos/aijkok.kokkos.cxx
{ MatDestroy_LUSOL in src/mat/impls/aij/seq/lusol/lusol.c
{ MatDestroy_matlab in src/mat/impls/aij/seq/matlab/aijmatlab.c
{ MatDestroy_MatMatCusparse in src/mat/impls/aij/seq/seqcusparse/aijcusparse.cu
{ MatDestroy_SeqAIJCUSPARSE in src/mat/impls/aij/seq/seqcusparse/aijcusparse.cu
{ MatDestroy_SeqAIJViennaCL in src/mat/impls/aij/seq/seqviennacl/aijviennacl.cxx
{ MatDestroy_SuperLU in src/mat/impls/aij/seq/superlu/superlu.c
{ MatDestroy_UMFPACK in src/mat/impls/aij/seq/umfpack/umfpack.c
{ MatDestroy_MPIBAIJ in src/mat/impls/baij/mpi/mpibaij.c
{ MatDestroy_SeqBAIJ in src/mat/impls/baij/seq/baij.c
{ MatDestroy_SeqBAIJMKL in src/mat/impls/baij/seq/baijmkl/baijmkl.c
{ MatDestroy_BlockMat in src/mat/impls/blockmat/seq/blockmat.c
{ MatDestroy_ConstantDiagonal in src/mat/impls/cdiagonal/cdiagonal.c
{ MatDestroy_Composite in src/mat/impls/composite/mcomposite.c
{ MatDestroy_SeqCUFFT in src/mat/impls/cufft/cufft.cu
{ MatDestroy_MPIDense in src/mat/impls/dense/mpi/mpidense.c
{ MatDestroy_SeqDenseCUDA in src/mat/impls/dense/seq/cuda/densecuda.cu
{ MatDestroy_SeqDense in src/mat/impls/dense/seq/dense.c
{ MatDestroy_Dummy in src/mat/impls/dummy/matdummy.c
{ MatDestroy_Elemental in src/mat/impls/elemental/matelem.cxx
{ MatDestroy_FFT in src/mat/impls/fft/fft.c
{ MatDestroy_FFTW in src/mat/impls/fft/fftw/fftw.c
{ MatDestroy_H2OPUS in src/mat/impls/h2opus/cuda/math2opus.cu
{ MatDestroy_Htool in src/mat/impls/htool/htool.cxx
{ MatDestroy_HYPRE in src/mat/impls/hypre/mhypre.c
{ MatDestroy_IS in src/mat/impls/is/matis.c
{ MatDestroy_SeqKAIJ in src/mat/impls/kaij/kaij.c
{ MatDestroy_MPIKAIJ in src/mat/impls/kaij/kaij.c
{ MatDestroy_LocalRef in src/mat/impls/localref/mlocalref.c
{ MatDestroy_LRC in src/mat/impls/lrc/lrc.c
{ MatDestroy_SeqMAIJ in src/mat/impls/maij/maij.c
{ MatDestroy_MPIMAIJ in src/mat/impls/maij/maij.c
{ MatDestroy_MFFD in src/mat/impls/mffd/mffd.c
{ MatDestroy_Nest in src/mat/impls/nest/matnest.c
{ MatDestroy_Normal in src/mat/impls/normal/normm.c
{ MatDestroy_NormalHermitian in src/mat/impls/normal/normmh.c
{ MatDestroy_Preallocator in src/mat/impls/preallocator/matpreallocator.c
{ MatDestroy_MPISBAIJ in src/mat/impls/sbaij/mpi/mpisbaij.c
{ MatDestroy_CHOLMOD in src/mat/impls/sbaij/seq/cholmod/sbaijcholmod.c
{ MatDestroy_SeqSBAIJ in src/mat/impls/sbaij/seq/sbaij.c
{ MatDestroy_ScaLAPACK in src/mat/impls/scalapack/matscalapack.c
{ MatDestroy_Scatter in src/mat/impls/scatter/mscatter.c
{ MatDestroy_MPISELL in src/mat/impls/sell/mpi/mpisell.c
{ MatDestroy_SeqSELL in src/mat/impls/sell/seq/sell.c
{ MatDestroy_Shell in src/mat/impls/shell/shell.c
{ MatDestroy_CF in src/mat/impls/shell/shellcnv.c
{ MatDestroy_SubMatrix in src/mat/impls/submat/submat.c
{ MatDestroy_HT in src/mat/impls/transpose/htransm.c
{ MatDestroy_Transpose in src/mat/impls/transpose/transm.c
{


Edit on GitLab

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages