.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PETSc 3pm" .TH PETSc 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME PDL::CCS::IO::PETSc \- PETSc\-compatible I/O for PDL::CCS::Nd .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 3 \& 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 .Ve .SH "I/O Utilities" .IX Header "I/O Utilities" .SS ccs_wpetsc .IX Subsection "ccs_wpetsc" Write a 2d PDL::CCS::Nd matrix in PETSc sparse binary format. .PP .Vb 2 \& ccs_wpetsc($ccs,$filename_or_fh) \& ccs_wpetsc($ccs,$filename_or_fh,\e%opts) .Ve .PP Options \f(CW%opts:\fR .PP .Vb 4 \& class_id => $int, ##\-\- PETSc MAT_FILE_CLASSID (default=1211216; see petsc/include/petscmat.h) \& pack_int => $pack, ##\-\- pack template for PETSc integers (default=\*(AqN\*(Aq) \& pack_val => $pack, ##\-\- pack template for PETSc values (default=\*(Aqd>\*(Aq) \& ioblock => $size, ##\-\- I/O block size (default=8192) .Ve .SS ccs_rpetsc .IX Subsection "ccs_rpetsc" REad a 2d PDL::CCS::Nd matrix from PETSc sparse binary format. .PP .Vb 2 \& $ccs = ccs_rpetsc($filename_or_fh) \& $ccs = ccs_rpetsc($filename_or_fh,\e%opts) .Ve .PP Options \f(CW%opts:\fR .PP .Vb 6 \& pack_int => $pack, ##\-\- pack template for PETSc integers (default=\*(AqN\*(Aq) \& pack_val => $pack, ##\-\- pack template for PETSc values (default=\*(Aqd>\*(Aq) \& 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) .Ve .SH ACKNOWLEDGEMENTS .IX Header "ACKNOWLEDGEMENTS" Perl by Larry Wall. .PP PDL by Karl Glazebrook, Tuomas J. Lukka, Christian Soeller, and others. .SH AUTHOR .IX Header "AUTHOR" Bryan Jurish .SS "Copyright Policy" .IX Subsection "Copyright Policy" Copyright (C) 2015\-2022, Bryan Jurish. All rights reserved. .PP This package is free software, and entirely without warranty. You may redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" perl, PDL, PDL::CCS::Nd, PDL::CCS::IO::FastRaw, PDL::CCS::IO::FITS, PDL::CCS::IO::MatrixMarket, PDL::CCS::IO::LDAC, the PETSc binary matrix format definition at , the PETSc homepage at . \&...