1 /****************************************************************************** 2 * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other 3 * HYPRE Project Developers. See the top-level COPYRIGHT file for details. 4 * 5 * SPDX-License-Identifier: (Apache-2.0 OR MIT) 6 ******************************************************************************/ 7 8 #ifndef hypre_ND1_AMGE_INTERPOLATION 9 #define hypre_ND1_AMGE_INTERPOLATION 10 11 /* 12 Function: hypre_ND1AMGeInterpolation 13 14 Defines an operator-dependent (AMGe) interpolation for the fine interior 15 edges, given the (e.g. geometric) interpolation for the fine edges on the 16 boundaries of coarse elements. The parameters are: 17 18 Aee [input] 19 The stiffness matrix for lowest order Nedelec elements on the fine level. 20 21 ELEM_iedge, FACE_iedge, EDGE_iedge [input] 22 coarse grid elements, faces and edges. 23 24 ELEM_FACE, ELEM_EDGE [input] 25 26 edge_EDGE [input/output] 27 The interpolation from coarse to fine edges. This is a partially filled 28 matrix, with set (and fixed) nonzero pattern. We assume that the rows 29 corresponding to fine edges on the boundary of a coarse element are 30 given and complete the construction by computing the rest of the entries. 31 32 Note: If FACE_iedge == EDGE_iedge the input should describe a 2D problem. 33 */ 34 HYPRE_Int hypre_ND1AMGeInterpolation (hypre_ParCSRMatrix * Aee, 35 hypre_ParCSRMatrix * ELEM_iedge, 36 hypre_ParCSRMatrix * FACE_iedge, 37 hypre_ParCSRMatrix * EDGE_iedge, 38 hypre_ParCSRMatrix * ELEM_FACE, 39 hypre_ParCSRMatrix * ELEM_EDGE, 40 HYPRE_Int num_OffProcRows, 41 hypre_MaxwellOffProcRow ** OffProcRows, 42 hypre_IJMatrix * edge_EDGE); 43 44 /* 45 Function: hypre_HarmonicExtension 46 47 Defines the interpolation operator Pi:DOF->idof by harmonically extending 48 Pb:DOF->bdof based on the operator A. Specifically, 49 A = [Aii,Aib] is idof x (idof+bdof) 50 P = [-Pi;Pb] is (idof+bdof) x DOF 51 and the function computes 52 Pi = Aii^{-1} Aib Pb. 53 The columns in A and P use global numbering, while the rows are numbered 54 according to the arrays idof and bdof. The only output parameter is Pi. 55 */ 56 HYPRE_Int hypre_HarmonicExtension (hypre_CSRMatrix *A, 57 hypre_CSRMatrix *P, 58 HYPRE_Int num_DOF, HYPRE_BigInt *DOF, 59 HYPRE_Int num_idof, HYPRE_BigInt *idof, 60 HYPRE_Int num_bdof, HYPRE_BigInt *bdof); 61 62 #endif 63