MOAB: Mesh Oriented datABase
(version 5.4.1)
|
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, 00034 HYPRE_Int num_rowscols_to_elim, 00035 HYPRE_Int* rowscols_to_elim, 00036 hypre_ParVector* X, 00037 hypre_ParVector* B ); 00038 00039 /** Parallel essential BC elimination from matrix A only. The eliminated 00040 elements are stored in a new matrix Ae, so that (A + Ae) equals the original 00041 matrix A. */ 00042 void hypre_ParCSRMatrixEliminateAAe( hypre_ParCSRMatrix* A, 00043 hypre_ParCSRMatrix** Ae, 00044 HYPRE_Int num_rowscols_to_elim, 00045 HYPRE_Int* rowscols_to_elim ); 00046 00047 /** Split matrix 'A' into nr x nc blocks, return nr x nc pointers to 00048 new parallel matrices. The array 'blocks' needs to be preallocated to hold 00049 nr x nc pointers. If 'interleaved' == 0 the matrix is split into contiguous 00050 blocks (AAABBBCCC) otherwise the blocks are interleaved (ABCABCABC). 00051 The local number of rows of A must be divisible by nr. The local number of 00052 columns of A must be divisible by nc. */ 00053 void hypre_ParCSRMatrixSplit( hypre_ParCSRMatrix* A, 00054 HYPRE_Int nr, 00055 HYPRE_Int nc, 00056 hypre_ParCSRMatrix** blocks, 00057 int interleaved_rows, 00058 int interleaved_cols ); 00059 00060 typedef int HYPRE_Bool; 00061 #define HYPRE_MPI_BOOL MPI_INT 00062 00063 /** The "Boolean" analog of y = alpha * A * x + beta * y, where elements in the 00064 sparsity pattern of the CSR matrix A are treated as "true". */ 00065 void hypre_CSRMatrixBooleanMatvec( hypre_CSRMatrix* A, 00066 HYPRE_Bool alpha, 00067 HYPRE_Bool* x, 00068 HYPRE_Bool beta, 00069 HYPRE_Bool* y ); 00070 00071 hypre_ParCSRCommHandle* hypre_ParCSRCommHandleCreate_bool( HYPRE_Int job, 00072 hypre_ParCSRCommPkg* comm_pkg, 00073 HYPRE_Bool* send_data, 00074 HYPRE_Bool* recv_data ); 00075 00076 /** The "Boolean" analog of y = alpha * A * x + beta * y, where elements in the 00077 sparsity pattern of the ParCSR matrix A are treated as "true". */ 00078 void hypre_ParCSRMatrixBooleanMatvec( hypre_ParCSRMatrix* A, 00079 HYPRE_Bool alpha, 00080 HYPRE_Bool* x, 00081 HYPRE_Bool beta, 00082 HYPRE_Bool* y ); 00083 00084 } // namespace internal 00085 00086 } // namespace moab 00087 00088 #endif // MOAB_HAVE_MPI 00089 00090 #endif