MatDestroy#

Frees space taken by a matrix.

Synopsis#

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

Collective

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#

Matrices, Mat, MatCreate()

Level#

beginner

Location#

src/mat/interface/matrix.c

Examples#

src/tao/unconstrained/tutorials/rosenbrock3.c
src/tao/bound/tutorials/plate2f.F90
src/tao/complementarity/tutorials/blackscholes.c
src/tao/bound/tutorials/plate2.c
src/tao/complementarity/tutorials/minsurf1.c
src/tao/leastsquares/tutorials/tomography.c
src/tao/unconstrained/tutorials/minsurf2.c
src/tao/leastsquares/tutorials/cs1.c
src/tao/leastsquares/tutorials/chwirut1.c
src/tao/bound/tutorials/jbearing2.c

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_Schur() in src/ksp/pc/impls/hpddm/pchpddm.cxx
MatDestroy_SchurCorrection() in src/ksp/pc/impls/hpddm/pchpddm.cxx
MatDestroy_Harmonic() in src/ksp/pc/impls/hpddm/pchpddm.cxx
MatDestroy_ML() in src/ksp/pc/impls/ml/ml.c
MatDestroy_MPIAdj() in src/mat/impls/adj/mpi/mpiadj.c
MatDestroy_MPIAIJCRL() in src/mat/impls/aij/mpi/crl/mcrl.c
MatDestroy_MPIAIJKokkos() in src/mat/impls/aij/mpi/kokkos/mpiaijkok.kokkos.cxx
MatDestroy_MKL_CPARDISO() in src/mat/impls/aij/mpi/mkl_cpardiso/mkl_cpardiso.c
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_MPIAIJHIPSPARSE() in src/mat/impls/aij/mpi/mpihipsparse/mpiaijhipsparse.hip.c
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_SuperLU_DIST() in src/mat/impls/aij/mpi/superlu_dist/superlu_dist.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_MKL_PARDISO() in src/mat/impls/aij/seq/mkl_pardiso/mkl_pardiso.c
MatDestroy_MatMatCusparse() in src/mat/impls/aij/seq/seqcusparse/aijcusparse.cu
MatDestroy_SeqAIJCUSPARSE() in src/mat/impls/aij/seq/seqcusparse/aijcusparse.cu
MatDestroy_MatMatHipsparse() in src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.c
MatDestroy_SeqAIJHIPSPARSE() in src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.c
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_SeqDense() in src/mat/impls/dense/seq/dense.c
MatDestroy_Diagonal() in src/mat/impls/diagonal/diagonal.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_MPISELLCUDA() in src/mat/impls/sell/mpi/mpicuda/mpisellcuda.cu
MatDestroy_MPISELLHIP() in src/mat/impls/sell/mpi/mpihip/mpisellhip.hip.c
MatDestroy_MPISELL() in src/mat/impls/sell/mpi/mpisell.c
MatDestroy_SeqSELL() in src/mat/impls/sell/seq/sell.c
MatDestroy_SeqSELLCUDA() in src/mat/impls/sell/seq/seqcuda/sellcuda.cu
MatDestroy_SeqSELLHIP() in src/mat/impls/sell/seq/seqhip/sellhip.hip.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


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