MOAB: Mesh Oriented datABase  (version 5.2.1)
hypre_parcsr.hpp
Go to the documentation of this file.
00001 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at
00002 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
00003 // reserved. See file COPYRIGHT for details.
00004 //
00005 // This file is part of the MFEM library. For more information and source code
00006 // availability see http://mfem.org.
00007 //
00008 // MFEM is free software; you can redistribute it and/or modify it under the
00009 // terms of the GNU Lesser General Public License (as published by the Free
00010 // Software Foundation) version 2.1 dated February 1999.
00011 
00012 #ifndef MOAB_HYPRE_PARCSR
00013 #define MOAB_HYPRE_PARCSR
00014 
00015 #include "moab/MOABConfig.h"
00016 
00017 #ifdef MOAB_HAVE_MPI
00018 
00019 #include "_hypre_parcsr_mv.h"
00020 
00021 namespace moab
00022 {
00023 
00024 namespace internal
00025 {
00026 
00027     // This module contains functions that are logically part of HYPRE, and might
00028     // become part of HYPRE at some point. In the meantime the module can be
00029     // thought of as an extension of HYPRE.
00030 
00031     /** Parallel essential BC elimination from the system A*X = B.
00032         (Adapted from hypre_ParCSRMatrixEliminateRowsCols.) */
00033     void hypre_ParCSRMatrixEliminateAXB( hypre_ParCSRMatrix* A, HYPRE_Int num_rowscols_to_elim,
00034                                          HYPRE_Int* rowscols_to_elim, hypre_ParVector* X, hypre_ParVector* B );
00035 
00036     /** Parallel essential BC elimination from matrix A only. The eliminated
00037         elements are stored in a new matrix Ae, so that (A + Ae) equals the original
00038         matrix A. */
00039     void hypre_ParCSRMatrixEliminateAAe( hypre_ParCSRMatrix* A, hypre_ParCSRMatrix** Ae, HYPRE_Int num_rowscols_to_elim,
00040                                          HYPRE_Int* rowscols_to_elim );
00041 
00042     /** Split matrix 'A' into nr x nc blocks, return nr x nc pointers to
00043         new parallel matrices. The array 'blocks' needs to be preallocated to hold
00044         nr x nc pointers. If 'interleaved' == 0 the matrix is split into contiguous
00045         blocks (AAABBBCCC) otherwise the blocks are interleaved (ABCABCABC).
00046         The local number of rows of A must be divisible by nr. The local number of
00047         columns of A must be divisible by nc. */
00048     void hypre_ParCSRMatrixSplit( hypre_ParCSRMatrix* A, HYPRE_Int nr, HYPRE_Int nc, hypre_ParCSRMatrix** blocks,
00049                                   int interleaved_rows, int interleaved_cols );
00050 
00051     typedef int HYPRE_Bool;
00052 #define HYPRE_MPI_BOOL MPI_INT
00053 
00054     /** The "Boolean" analog of y = alpha * A * x + beta * y, where elements in the
00055         sparsity pattern of the CSR matrix A are treated as "true". */
00056     void hypre_CSRMatrixBooleanMatvec( hypre_CSRMatrix* A, HYPRE_Bool alpha, HYPRE_Bool* x, HYPRE_Bool beta,
00057                                        HYPRE_Bool* y );
00058 
00059     hypre_ParCSRCommHandle* hypre_ParCSRCommHandleCreate_bool( HYPRE_Int job, hypre_ParCSRCommPkg* comm_pkg,
00060                                                                HYPRE_Bool* send_data, HYPRE_Bool* recv_data );
00061 
00062     /** The "Boolean" analog of y = alpha * A * x + beta * y, where elements in the
00063         sparsity pattern of the ParCSR matrix A are treated as "true". */
00064     void hypre_ParCSRMatrixBooleanMatvec( hypre_ParCSRMatrix* A, HYPRE_Bool alpha, HYPRE_Bool* x, HYPRE_Bool beta,
00065                                           HYPRE_Bool* y );
00066 
00067 }  // namespace internal
00068 
00069 }  // namespace moab
00070 
00071 #endif  // MOAB_HAVE_MPI
00072 
00073 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines