PDL::CCS::IO::PETSc3pm
Petsc-compatible i/o for pdl::ccs::nd
Usage
use PDL;use PDL::CCS::Nd;use PDL::CCS::IO::PETSc;##-- sparse 2d matrix$ccs = PDL::CCS::Nd->newFromWhich($which,$nzvals);ccs_wpetsc($ccs,"ccs.petsc"); # write a sparse binary PETSc file$ccs2 = ccs_rpetsc("ccs.petsc"); # read a sparse binary PETSc file
I/O Utilities
ccs_wpetsc
Write a 2d PDL::CCS::Nd matrix in PETSc sparse binary format.
ccs_wpetsc($ccs,$filename_or_fh)ccs_wpetsc($ccs,$filename_or_fh,\%opts)
Options %opts:
class_id => $int, ##-- PETSc MAT_FILE_CLASSID (default=1211216; see petsc/include/petscmat.h)pack_int => $pack, ##-- pack template for PETSc integers (default='N')pack_val => $pack, ##-- pack template for PETSc values (default='d>')ioblock => $size, ##-- I/O block size (default=8192)
ccs_rpetsc
REad a 2d PDL::CCS::Nd matrix from PETSc sparse binary format.
$ccs = ccs_rpetsc($filename_or_fh)$ccs = ccs_rpetsc($filename_or_fh,\%opts)
Options %opts:
pack_int => $pack, ##-- pack template for PETSc integers (default='N')pack_val => $pack, ##-- pack template for PETSc values (default='d>')ioblock => $size, ##-- I/O block size (default=8192)type => $type, ##-- value type to return (default: double)sorted => $bool, ##-- assume input is lexicographically sorted (only if not transposted; default=do)flags => $flags, ##-- flags for new ccs object (default=$PDL::CCS::Nd::CCSND_FLAGS_DEFAULT)
Acknowledgements
Perl by Larry Wall.
PDL by Karl Glazebrook, Tuomas J. Lukka, Christian Soeller, and others.
Releases
4 releases since Debian 10 (Buster); the text changed 3 times.