MFEM  v4.3.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
marking.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_MARKING_HPP
13 #define MFEM_MARKING_HPP
14 
15 #include "mfem.hpp"
16 
17 namespace mfem
18 {
19 
20 // Marking operations for elements, faces, dofs, etc, related to shifted
21 // boundary and interface methods.
23 {
24 protected:
29 
30  // Marking of face dofs by using an averaged continuous GridFunction.
31  const bool func_dof_marking = false;
32 
33  // Alternative implementation of ListShiftedFaceDofs().
34  void ListShiftedFaceDofs2(const Array<int> &elem_marker,
35  Array<int> &sface_dof_list) const;
36 
37 public:
38  /// Element type related to shifted boundaries (not interfaces).
40 
42  ParFiniteElementSpace &space_sltn,
43  bool include_cut_cell_)
44  : pmesh(pm), ls_func(ls), pfes_sltn(space_sltn),
45  include_cut_cell(include_cut_cell_) { }
46 
47  /// Mark all the elements in the mesh using the @a SBElementType
48  void MarkElements(Array<int> &elem_marker) const;
49 
50  /// List dofs associated with the surrogate boundary.
51  /// If @a include_cut_cell = false, the surrogate boundary includes faces
52  /// between elements cut by the true boundary and the elements that are
53  /// located inside the true domain.
54  /// If @a include_cut_cell = true, the surrogate boundary is the faces
55  /// between elements outside the true domain and the elements cut by the true
56  /// boundary.
57  void ListShiftedFaceDofs(const Array<int> &elem_marker,
58  Array<int> &sface_dof_list) const;
59 
60  /// List the dofs that will be inactive for the computation on the surrogate
61  /// domain. This includes dofs for the elements located outside the true
62  /// domain (and optionally, for the elements cut by the true boundary, if
63  /// @a include_cut_cell = false) minus the dofs that are located on the
64  /// surrogate boundary.
65  void ListEssentialTDofs(const Array<int> &elem_marker,
66  const Array<int> &sface_dof_list,
67  Array<int> &ess_tdof_list,
68  Array<int> &ess_shift_bdr) const;
69 };
70 
71 } // namespace mfem
72 
73 #endif
ParFiniteElementSpace & pfes_sltn
Definition: marking.hpp:27
SBElementType
Element type related to shifted boundaries (not interfaces).
Definition: marking.hpp:39
void MarkElements(Array< int > &elem_marker) const
Mark all the elements in the mesh using the SBElementType.
Definition: marking.cpp:17
Abstract parallel finite element space.
Definition: pfespace.hpp:28
void ListShiftedFaceDofs(const Array< int > &elem_marker, Array< int > &sface_dof_list) const
Definition: marking.cpp:84
void ListEssentialTDofs(const Array< int > &elem_marker, const Array< int > &sface_dof_list, Array< int > &ess_tdof_list, Array< int > &ess_shift_bdr) const
Definition: marking.cpp:180
void ListShiftedFaceDofs2(const Array< int > &elem_marker, Array< int > &sface_dof_list) const
Definition: marking.cpp:283
const bool func_dof_marking
Definition: marking.hpp:31
ParGridFunction & ls_func
Definition: marking.hpp:26
Class for parallel grid function.
Definition: pgridfunc.hpp:32
ShiftedFaceMarker(ParMesh &pm, ParGridFunction &ls, ParFiniteElementSpace &space_sltn, bool include_cut_cell_)
Definition: marking.hpp:41
Class for parallel meshes.
Definition: pmesh.hpp:32