You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
psblas3/docs/html/node9.html

243 lines
8.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2017.2 (Released Jan 23, 2017) -->
<HTML>
<HEAD>
<TITLE>Data Structures and Classes</TITLE>
<META NAME="description" CONTENT="Data Structures and Classes">
<META NAME="keywords" CONTENT="userhtml">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="LaTeX2HTML v2017.2">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="userhtml.css">
<LINK REL="next" HREF="node52.html">
<LINK REL="previous" HREF="node3.html">
<LINK REL="up" HREF="userhtml.html">
<LINK REL="next" HREF="node10.html">
</HEAD>
<BODY >
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html299"
HREF="node10.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html295"
HREF="userhtml.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html289"
HREF="node8.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<A NAME="tex2html297"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html300"
HREF="node10.html">Descriptor data structure</A>
<B> Up:</B> <A NAME="tex2html296"
HREF="userhtml.html">userhtml</A>
<B> Previous:</B> <A NAME="tex2html290"
HREF="node8.html">Programming model</A>
&nbsp; <B> <A NAME="tex2html298"
HREF="node1.html">Contents</A></B>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION00040000000000000000"></A>
<A NAME="sec:datastruct"></A>
<BR>
Data Structures and Classes
</H1>
<P>
In this chapter we illustrate the data structures used for definition of
routines interfaces. They include data structures for sparse matrices,
communication descriptors and preconditioners.
<P>
All the data types and the basic subroutine interfaces related to
descriptors and sparse matrices are defined in
the module <code>psb_base_mod</code>; this will have to be included by every
user subroutine that makes use of the library. The preconditioners are
defined in the module <code>psb_prec_mod</code>
<P>
Integer, real and complex data types are parametrized with a kind type
defined in the library as follows:
<DL>
<DT><STRONG>psb_spk_</STRONG></DT>
<DD>Kind parameter for short precision real and complex
data; corresponds to a <code>REAL</code> declaration and is
normally 4 bytes;
</DD>
<DT><STRONG>psb_dpk_</STRONG></DT>
<DD>Kind parameter for long precision real and complex
data; corresponds to a <code>DOUBLE PRECISION</code> declaration and is
normally 8 bytes;
</DD>
<DT><STRONG>psb_ipk_</STRONG></DT>
<DD>Kind parameter for integer data;
with default build options this is a 4 bytes integer, but there is
(highly) experimental support for 8-bytes integers;
</DD>
<DT><STRONG>psb_mpik_</STRONG></DT>
<DD>Kind parameter for 4-bytes integer data, as is
always used by MPI;
</DD>
<DT><STRONG>psb_long_int_k_</STRONG></DT>
<DD>Kind parameter for long (8 bytes) integers,
which are always used by the <code>sizeof</code> methods.
</DD>
</DL>
Together with the classes attributes we also discuss their
methods. Most methods detailed here only act on the local variable,
i.e. their action is purely local and asynchronous unless otherwise
stated.
The list of methods here is not completely exhaustive; many methods,
especially those that alter the contents of the various objects, are
usually not needed by the end-user, and therefore are described in the
developer's documentation.
<P>
<BR><HR>
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL CLASS="ChildLinks">
<LI><A NAME="tex2html301"
HREF="node10.html">Descriptor data structure</A>
<UL>
<LI><A NAME="tex2html302"
HREF="node11.html">Descriptor Methods</A>
<LI><A NAME="tex2html303"
HREF="node12.html">get_local_rows -- Get number of local rows</A>
<LI><A NAME="tex2html304"
HREF="node13.html">get_local_cols -- Get number of local cols</A>
<LI><A NAME="tex2html305"
HREF="node14.html">get_global_rows -- Get number of global rows</A>
<LI><A NAME="tex2html306"
HREF="node15.html">get_global_cols -- Get number of global cols</A>
<LI><A NAME="tex2html307"
HREF="node16.html">get_global_indices -- Get vector of global indices</A>
<LI><A NAME="tex2html308"
HREF="node17.html">get_context -- Get communication context</A>
<LI><A NAME="tex2html309"
HREF="node18.html">Clone -- clone current object</A>
<LI><A NAME="tex2html310"
HREF="node19.html">CNV -- convert internal storage format</A>
<LI><A NAME="tex2html311"
HREF="node20.html">psb_cd_get_large_threshold -- Get threshold for
index mapping switch</A>
<LI><A NAME="tex2html312"
HREF="node21.html">psb_cd_set_large_threshold -- Set threshold for
index mapping switch</A>
<LI><A NAME="tex2html313"
HREF="node22.html">Named Constants</A>
</UL>
<BR>
<LI><A NAME="tex2html314"
HREF="node23.html">Sparse Matrix class</A>
<UL>
<LI><A NAME="tex2html315"
HREF="node24.html">Sparse Matrix Methods</A>
<LI><A NAME="tex2html316"
HREF="node25.html">get_nrows -- Get number of rows in a sparse matrix</A>
<LI><A NAME="tex2html317"
HREF="node26.html">get_ncols -- Get number of columns in a sparse
matrix</A>
<LI><A NAME="tex2html318"
HREF="node27.html">get_nnzeros -- Get number of nonzero elements
in a sparse matrix</A>
<LI><A NAME="tex2html319"
HREF="node28.html">get_size -- Get maximum number of nonzero elements
in a sparse matrix</A>
<LI><A NAME="tex2html320"
HREF="node29.html">sizeof -- Get memory occupation in bytes
of a sparse matrix</A>
<LI><A NAME="tex2html321"
HREF="node30.html">get_fmt -- Short description of the dynamic type</A>
<LI><A NAME="tex2html322"
HREF="node31.html">is_bld, is_upd, is_asb -- Status check</A>
<LI><A NAME="tex2html323"
HREF="node32.html">is_lower, is_upper, is_triangle, is_unit --
Format check</A>
<LI><A NAME="tex2html324"
HREF="node33.html">cscnv -- Convert to a different storage format</A>
<LI><A NAME="tex2html325"
HREF="node34.html">csclip -- Reduce to a submatrix</A>
<LI><A NAME="tex2html326"
HREF="node35.html">clean_zeros -- Eliminate zero coefficients</A>
<LI><A NAME="tex2html327"
HREF="node36.html">get_diag -- Get main diagonal</A>
<LI><A NAME="tex2html328"
HREF="node37.html">clip_diag -- Cut out main diagonal</A>
<LI><A NAME="tex2html329"
HREF="node38.html">tril -- Return the lower triangle</A>
<LI><A NAME="tex2html330"
HREF="node39.html">triu -- Return the upper triangle</A>
<LI><A NAME="tex2html331"
HREF="node40.html">psb_set_mat_default -- Set default storage format</A>
<LI><A NAME="tex2html332"
HREF="node41.html">clone -- Clone current object</A>
<LI><A NAME="tex2html333"
HREF="node42.html">Named Constants</A>
</UL>
<BR>
<LI><A NAME="tex2html334"
HREF="node43.html">Dense Vector Data Structure</A>
<UL>
<LI><A NAME="tex2html335"
HREF="node44.html">Vector Methods</A>
<LI><A NAME="tex2html336"
HREF="node45.html">get_nrows -- Get number of rows in a dense vector</A>
<LI><A NAME="tex2html337"
HREF="node46.html">sizeof -- Get memory occupation in bytes
of a dense vector</A>
<LI><A NAME="tex2html338"
HREF="node47.html">set -- Set contents of the vector</A>
<LI><A NAME="tex2html339"
HREF="node48.html">get_vect -- Get a copy of the vector contents</A>
<LI><A NAME="tex2html340"
HREF="node49.html">clone -- Clone current object</A>
</UL>
<BR>
<LI><A NAME="tex2html341"
HREF="node50.html">Preconditioner data structure</A>
<LI><A NAME="tex2html342"
HREF="node51.html">Heap data structure</A>
</UL>
<!--End of Table of Child-Links-->
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html299"
HREF="node10.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html295"
HREF="userhtml.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html289"
HREF="node8.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<A NAME="tex2html297"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html300"
HREF="node10.html">Descriptor data structure</A>
<B> Up:</B> <A NAME="tex2html296"
HREF="userhtml.html">userhtml</A>
<B> Previous:</B> <A NAME="tex2html290"
HREF="node8.html">Programming model</A>
&nbsp; <B> <A NAME="tex2html298"
HREF="node1.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
</BODY>
</HTML>