MFEM  v4.3.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
mesh_extras.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_MESH_EXTRAS
13 #define MFEM_MESH_EXTRAS
14 
15 #include "mfem.hpp"
16 #include <sstream>
17 
18 namespace mfem
19 {
20 
21 namespace common
22 {
23 
24 class ElementMeshStream : public std::stringstream
25 {
26 public:
28 };
29 
30 /// Merges vertices which lie at the same location
31 void MergeMeshNodes(Mesh * mesh, int logging);
32 
33 /// Convert a set of attribute numbers to a marker array
34 /** The marker array will be of size max_attr and it will contain only zeroes
35  and ones. Ones indicate which attribute numbers are present in the attrs
36  array. In the special case when attrs has a single entry equal to -1 the
37  marker array will contain all ones. */
38 void AttrToMarker(int max_attr, const Array<int> &attrs, Array<int> &marker);
39 
40 } // namespace common
41 
42 } // namespace mfem
43 
44 #endif
void AttrToMarker(int max_attr, const Array< int > &attrs, Array< int > &marker)
Convert a set of attribute numbers to a marker array.
ElementMeshStream(Element::Type e)
Definition: mesh_extras.cpp:22
void MergeMeshNodes(Mesh *mesh, int logging)
Merges vertices which lie at the same location.
Type
Constants for the classes derived from Element.
Definition: element.hpp:41