Ignore:
Timestamp:
11/02/12 14:42:38 (12 years ago)
Author:
Mathieu Morlighem
Message:

NEW: added AllocationInfo method for matrices

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscMat.cpp

    r13868 r13869  
    4040}
    4141/*}}}*/
    42 /*FUNCTION PetscMat(IssmDouble* serial_mat,int M,int N,IssmDouble sparsity){{{*/
     42/*FUNCTION PetscMat::PetscMat(IssmDouble* serial_mat,int M,int N,IssmDouble sparsity){{{*/
    4343PetscMat::PetscMat(IssmDouble* serial_mat,int M,int N,IssmDouble sparsity){
    4444
     
    7777
    7878/*PetscMat specific routines: */
     79/*FUNCTION PetscMat::AllocationInfo{{{*/
     80void PetscMat::AllocationInfo(void){
     81
     82        MatInfo info;
     83        MatGetInfo(this->matrix,MAT_GLOBAL_SUM,&info);
     84        _pprintLine_("=========================== Stiffness matrix allocation info ===========================");
     85        _pprintLine_("");
     86        _pprintLine_(" nz_allocated: "<<info.nz_allocated);
     87        _pprintLine_(" nz_used     : "<<info.nz_used);
     88        _pprintLine_(" nz_unneeded : "<<info.nz_unneeded<<" ("<<double(info.nz_unneeded)/double(info.nz_allocated)*100.<<"%)");
     89        _pprintLine_("");
     90        _pprintLine_("========================================================================================");
     91}
     92/*}}}*/
    7993/*FUNCTION PetscMat::Echo{{{*/
    8094void PetscMat::Echo(void){
Note: See TracChangeset for help on using the changeset viewer.