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.
109 lines
3.4 KiB
HTML
109 lines
3.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
|
<!--Converted with LaTeX2HTML 2017.2 (Released Jan 23, 2017) -->
|
|
<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 v2017.2">
|
|
<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 >
|
|
|
|
<DIV CLASS="navigation"><!--Navigation Panel-->
|
|
<A NAME="tex2html276"
|
|
HREF="node8.html">
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
|
|
<A NAME="tex2html272"
|
|
HREF="node6.html">
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
|
|
<A NAME="tex2html268"
|
|
HREF="node6.html">
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
|
|
<A NAME="tex2html274"
|
|
HREF="node1.html">
|
|
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
|
|
<BR>
|
|
<B> Next:</B> <A NAME="tex2html277"
|
|
HREF="node8.html">Programming model</A>
|
|
<B> Up:</B> <A NAME="tex2html273"
|
|
HREF="node6.html">Application structure</A>
|
|
<B> Previous:</B> <A NAME="tex2html269"
|
|
HREF="node6.html">Application structure</A>
|
|
<B> <A NAME="tex2html275"
|
|
HREF="node1.html">Contents</A></B>
|
|
<BR>
|
|
<BR></DIV>
|
|
<!--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. <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}$
|
|
-->
|
|
<SPAN CLASS="MATH"><IMG
|
|
WIDTH="77" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
|
|
SRC="img17.png"
|
|
ALT="$1\dots n_{\hbox{row}_i}$"></SPAN>;
|
|
</LI>
|
|
<LI>The set of halo points must be mapped to the set
|
|
<!-- MATH
|
|
$n_{\hbox{row}_i}+1\dots n_{\hbox{col}_i}$
|
|
-->
|
|
<SPAN CLASS="MATH"><IMG
|
|
WIDTH="130" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
|
|
SRC="img18.png"
|
|
ALT="$n_{\hbox{row}_i}+1\dots n_{\hbox{col}_i}$"></SPAN>;
|
|
</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>
|