MFEM  v4.3.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
prestriction.hpp
Go to the documentation of this file.
1 // Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
2 // at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3 // LICENSE and NOTICE for details. LLNL-CODE-806117.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability visit https://mfem.org.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the BSD-3 license. We welcome feedback and contributions, see file
10 // CONTRIBUTING.md for details.
11 
12 #ifndef MFEM_PRESTRICTION
13 #define MFEM_PRESTRICTION
14 
15 #include "../config/config.hpp"
16 
17 #ifdef MFEM_USE_MPI
18 
19 #include "restriction.hpp"
20 
21 namespace mfem
22 {
23 
24 class ParFiniteElementSpace;
25 
26 /// Operator that extracts Face degrees of freedom in parallel.
27 /** Objects of this type are typically created and owned by FiniteElementSpace
28  objects, see FiniteElementSpace::GetFaceRestriction(). */
30 {
31 public:
33  FaceType type,
35  void Mult(const Vector &x, Vector &y) const;
36  /** Fill the I array of SparseMatrix corresponding to the sparsity pattern
37  given by this L2FaceRestriction. */
38  virtual void FillI(SparseMatrix &mat, const bool keep_nbr_block = false) const;
39  /** Fill the I array of SparseMatrix corresponding to the sparsity pattern
40  given by this L2FaceRestriction. @a mat contains the interior dofs
41  contribution, the @a face_mat contains the shared dofs contribution.*/
42  virtual void FillI(SparseMatrix &mat, SparseMatrix &face_mat) const;
43  /** Fill the J and Data arrays of SparseMatrix corresponding to the sparsity
44  pattern given by this L2FaceRestriction, and the values of ea_data.
45  @a mat contains the interior dofs contribution, the @a face_mat contains
46  the shared dofs contribution.*/
47  virtual void FillJAndData(const Vector &ea_data,
48  SparseMatrix &mat,
49  SparseMatrix &face_mat) const;
50 
51  virtual void FillJAndData(const Vector &ea_data,
52  SparseMatrix &mat,
53  const bool keep_nbr_block = false) const;
54 };
55 
56 }
57 
58 #endif // MFEM_USE_MPI
59 
60 #endif // MFEM_PRESTRICTION
Operator that extracts Face degrees of freedom in parallel.
Abstract parallel finite element space.
Definition: pfespace.hpp:28
const L2FaceValues m
FaceType
Definition: mesh.hpp:45
Data type sparse matrix.
Definition: sparsemat.hpp:41
Operator that extracts Face degrees of freedom on L2 FiniteElementSpaces.
void Mult(const Vector &x, Vector &y) const
Extract the face degrees of freedom from x into y.
virtual void FillI(SparseMatrix &mat, const bool keep_nbr_block=false) const
ElementDofOrdering
Constants describing the possible orderings of the DOFs in one element.
Definition: fespace.hpp:65
ParL2FaceRestriction(const ParFiniteElementSpace &, ElementDofOrdering, FaceType type, L2FaceValues m=L2FaceValues::DoubleValued)
Vector data type.
Definition: vector.hpp:60
virtual void FillJAndData(const Vector &ea_data, SparseMatrix &mat, SparseMatrix &face_mat) const