unstructured_mesh.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_UNSTRUCTURED_MESH_H
21 #define LIBMESH_UNSTRUCTURED_MESH_H
22 
23 // Local Includes -----------------------------------
24 #include "libmesh/mesh_base.h"
25 
26 // C++ Includes -----------------------------------
27 #include <cstddef>
28 
29 namespace libMesh
30 {
31 
32 // Forward Declarations
33 class MeshData;
34 
35 
49 // ------------------------------------------------------------
50 // UnstructuredMesh class definition
51 class UnstructuredMesh : public MeshBase
52 {
53  public:
54 
60  explicit
62  unsigned int dim=1);
63 
64 #ifndef LIBMESH_DISABLE_COMMWORLD
65 
70  UnstructuredMesh (unsigned int dim=1);
71 #endif
72 
76  virtual ~UnstructuredMesh();
77 
91  void read (const std::string& name,
92  MeshData* mesh_data=NULL,
93  bool skip_renumber_nodes_and_elements=false);
102  void write (const std::string& name,
103  MeshData* mesh_data=NULL);
104 
109  void write (const std::string& name,
110  const std::vector<Number>& values,
111  const std::vector<std::string>& variable_names);
112 
119  virtual void all_first_order ();
120 
132  virtual void all_second_order (const bool full_ordered=true);
133 
140  void create_pid_mesh (UnstructuredMesh& pid_mesh,
141  const processor_id_type pid) const;
142 
148  void create_submesh (UnstructuredMesh& new_mesh,
150  const const_element_iterator& it_end) const;
151 
152 
157  virtual void copy_nodes_and_elements(const UnstructuredMesh& other_mesh);
158 
159 
163  virtual void find_neighbors (const bool reset_remote_elements = false,
164  const bool reset_current_list = true);
165 
166 #ifdef LIBMESH_ENABLE_AMR
167 
172  virtual bool contract ();
173 #endif // #ifdef LIBMESH_ENABLE_AMR
174 
175 };
176 
177 
178 } // namespace libMesh
179 
180 #endif // LIBMESH_UNSTRUCTURED_MESH_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:07 UTC

Hosted By:
SourceForge.net Logo