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/node7.html

112 lines
3.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>User-defined index mappings</TITLE>
<META NAME="description" CONTENT="User-defined index mappings">
<META NAME="keywords" CONTENT="userhtml">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="LaTeX2HTML v2012">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="userhtml.css">
<LINK REL="previous" HREF="node6.html">
<LINK REL="up" HREF="node6.html">
<LINK REL="next" HREF="node8.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html270"
HREF="node8.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html266"
HREF="node6.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html262"
HREF="node6.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<A NAME="tex2html268"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html271"
HREF="node8.html">Programming model</A>
<B> Up:</B> <A NAME="tex2html267"
HREF="node6.html">Application structure</A>
<B> Previous:</B> <A NAME="tex2html263"
HREF="node6.html">Application structure</A>
&nbsp; <B> <A NAME="tex2html269"
HREF="node1.html">Contents</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H3><A NAME="SECTION00033100000000000000"></A>
<A NAME="sec:usermaps"></A>
<BR>
User-defined index mappings
</H3>
PSBLAS supports user-defined global to local index mappings, subject
to the constraints outlined in sec.&nbsp;<A HREF="node6.html#sec:appstruct">2.3</A>:
<OL>
<LI>The set of indices owned locally must be mapped to the set
<!-- MATH
$1\dots n_{\hbox{row}_i}$
-->
<IMG
WIDTH="77" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img17.png"
ALT="$1\dots n_{\hbox{row}_i}$">;
</LI>
<LI>The set of halo points must be mapped to the set
<!-- MATH
$n_{\hbox{row}_i}+1\dots n_{\hbox{col}_i}$
-->
<IMG
WIDTH="130" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img18.png"
ALT="$n_{\hbox{row}_i}+1\dots n_{\hbox{col}_i}$">;
</LI>
</OL>
but otherwise the mapping is arbitrary. The user application is
responsible to ensure consistency of this mapping; some errors may be
caught by the library, but this is not guaranteed.
The application structure to
support this usage is as follows:
<OL>
<LI>Initialize index space with
<code>psb_cdall(ictx,desc,info,vl=vl,lidx=lidx)</code> passing the vectors
<code>vl(:)</code> containing the set of global indices owned by the
current process and <code>lidx(:)</code> containing the corresponding
local indices;
</LI>
<LI>Add the halo points <code>ja(:)</code> and their associated local
indices <code>lidx(:)</code> with a(some) call(s) to
<code>psb_cdins(nz,ja,desc,info,lidx=lidx)</code>;
</LI>
<LI>Assemble the descriptor with <code>psb_cdasb</code>;
</LI>
<LI>Build the sparse matrices and vectors, optionally making use in
<code>psb_spins</code> and <code>psb_geins</code> of the <code>local</code> argument
specifying that the indices in <code>ia</code>, <code>ja</code> and <code>irw</code>,
respectively, are already local indices.
</LI>
</OL>
<P>
<BR><HR>
</BODY>
</HTML>