PDL::CCS::IO::PETSc(3pm)

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.

  1. 10
  2. 11
  3. 12
  4. 13

Author

Bryan Jurish <[email protected]>

Copyright Policy

Copyright (C) 2015-2024, Bryan Jurish. All rights reserved.

This package is free software, and entirely without warranty. You may redistribute it and/or modify it under the same terms as Perl itself.

From libpdl-ccs-perl 1.24.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.