\begin{frame}
\frametitle{Introduction}

This section shows how to enter the matrix coefficients.\\
The different ways to do it will be presented.\\
The most efficient way to use the solver is to respect its internal unknowns distribution.
This avoids communications (redistribution).

\end{frame}

\begin{frame}[fragile]
  \frametitle{Defining value by value}
  \lstset{language=C}
  \lstset{emph={INTS, REAL, COEF},emphstyle=\bfseries}
  \begin{tiny}
    \begin{block}{}
      \begin{type-func-type-mod-var}
        \murgefct{MatrixReset}); \mycomment{/* optional */}\\
      \end{type-func-type-mod-var}

      \begin{type-func-type-mod-var}
        \murgefct{AssemblyBegin},\\
        \tv{INTL}{coefnbr},\\
        \tv{INTS}{op},     \\
        \tv{INTS}{mode},   \\
        \tv{INTS}{sym});   \\
      \end{type-func-type-mod-var}

      \begin{type-func-type-mod-var}
        \mycomment{/* foreach value */}
        \murgefct{AssemblySetValue},\\
        \tv{INTS}{ROW},\\
        \tv{INTS}{COL},\\
        \tv{COEF}{value});\\
      \end{type-func-type-mod-var}

      \begin{type-func-type-mod-var}
        \murgefct{AssemblyEnd});\\
      \end{type-func-type-mod-var}
    \end{block}
  \end{tiny}

  \begin{itemize}
  \item[op]   Indicate the operation to perform with coefficients
    appearing twice. 
  \item[mode] Indicate if the user respect the new solver
    distribution.
  \item[sym]  Indicate if the user gives the coefficient have to be symmetrized
  \end{itemize}
\end{frame}

\begin{frame}[fragile]
  \frametitle{Inputs : value by value with several degrees of freedom}
  \lstset{language=C}
  \lstset{emph={INTS, REAL, COEF},emphstyle=\bfseries}
  \begin{tiny}
    \begin{block}{}
      \begin{type-func-type-mod-var}
        \murgefct{MatrixReset}); \mycomment{/* optional */}\\
      \end{type-func-type-mod-var}

      \begin{type-func-type-mod-var}
        \murgefct{AssemblyBegin},\\
        \tv{INTL}{coefnbr},\\
        \tv{INTS}{op},\\
        \tv{INTS}{mode},\\
        \tv{INTS}{sym});\\
      \end{type-func-type-mod-var}

      \begin{type-func-type-mod-var}
        \mycomment{/* foreach value */}\\
        \murgefct{AssemblySetNodeValues},\\
        \tv{INTS}{ROW},\\
        \tv{INTS}{COL},\\
        \tmv{COEF}{\st{}}{values});\\
      \end{type-func-type-mod-var}

      \begin{type-func-type-mod-var}
        \murgefct{AssemblyEnd});\\
      \end{type-func-type-mod-var}
    \end{block}
  \end{tiny}
\end{frame}

\begin{frame}[fragile]
  \frametitle{Inputs : elementary matrices}
  \begin{tiny}
    \begin{block}{}
      \begin{type-func-type-mod-var}
        \murgefct{MatrixReset}); \mycomment{/* optional */}
      \end{type-func-type-mod-var}

      \begin{type-func-type-mod-var}
        \murgefct{AssemblyBegin},\\
        \tv{INTL}{coefnbr},\\
        \tv{INTS}{op},\\
        \tv{INTS}{mode},\\
        \tv{INTS}{sym});\\
      \end{type-func-type-mod-var}

      \begin{type-func-type-mod-var}
        \mycomment{/* foreach value */}
        \murgefct{AssemblySetBlockValues},\\
        \tmv{INTS}{   }{nROW},   \\
        \tmv{INTS}{\st{}}{ROWlist},\\
        \tmv{INTS}{   }{nCOL},   \\
        \tmv{INTS}{\st{}}{COLlist},\\
        \tmv{COEF}{\st{}}{values});\\
      \end{type-func-type-mod-var}

      \begin{type-func-type-mod-var}
        \murgefct{AssemblyEnd});\\
      \end{type-func-type-mod-var}
    \end{block}
  \end{tiny}
\end{frame}


\begin{frame}[fragile]
  \frametitle{Inputs : a global matrix (I)}
    \begin{tiny}
      \begin{block}{}
        \begin{type-func-type-mod-var}
          \murgefct{MatrixGlobalIJV},\\
          \tmv{INTS}{   }{N},     \\
	  \tmv{INTS}{\st{}}{ROWS},  \\
	  \tmv{INTS}{\st{}}{COLS},  \\
	  \tmv{COEF}{\st{}}{values},\\
	  \tmv{INTS}{   }{root},  \\
	  \tmv{INTS}{   }{op},    \\
	  \tmv{INTS}{   }{sym});  \\
      \end{type-func-type-mod-var}
    \end{block}  
  \end{tiny}
  The whole matrix is given by the processor root, 
  the solver is in charge to distribute it onto processes.
\end{frame}

\begin{frame}[fragile]
  \frametitle{Inputs : a global matrix (II)}
  \begin{tiny}
    \begin{block}{}
      \begin{type-func-type-mod-var}
        \murgefct{MatrixGlobalCSR},\\
        \tmv{INTS}{   }{N},     \\
        \tmv{INTL}{\st{}}{rowptr},\\
        \tmv{INTS}{\st{}}{COLS},  \\
	\tmv{COEF}{\st{}}{values},\\
	\tmv{INTS}{   }{root},  \\
	\tmv{INTS}{   }{op},    \\
	\tmv{INTS}{   }{sym});  \\
      \end{type-func-type-mod-var} 
    \end{block}
    \begin{block}{}
      \begin{type-func-type-mod-var}
        \murgefct{MatrixGlobalCSC},\\
        \tmv{INTS}{   }{N},     \\
        \tmv{INTL}{\st{}}{colptr},\\
        \tmv{INTS}{\st{}}{ROWS},  \\
	\tmv{COEF}{\st{}}{values},\\
	\tmv{INTS}{   }{root},  \\
	\tmv{INTS}{   }{op},    \\
	\tmv{INTS}{   }{sym});  \\
      \end{type-func-type-mod-var}
    \end{block}  
  \end{tiny}
\end{frame}
