unstructured_mesh.h
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 #ifndef LIBMESH_UNSTRUCTURED_MESH_H 00021 #define LIBMESH_UNSTRUCTURED_MESH_H 00022 00023 // Local Includes ----------------------------------- 00024 #include "libmesh/mesh_base.h" 00025 00026 // C++ Includes ----------------------------------- 00027 #include <cstddef> 00028 00029 namespace libMesh 00030 { 00031 00032 // Forward Declarations 00033 class MeshData; 00034 00035 00049 // ------------------------------------------------------------ 00050 // UnstructuredMesh class definition 00051 class UnstructuredMesh : public MeshBase 00052 { 00053 public: 00054 00060 explicit 00061 UnstructuredMesh (unsigned int dim=1); 00062 00066 virtual ~UnstructuredMesh(); 00067 00081 void read (const std::string& name, 00082 MeshData* mesh_data=NULL, 00083 bool skip_renumber_nodes_and_elements=false); 00092 void write (const std::string& name, 00093 MeshData* mesh_data=NULL); 00094 00099 void write (const std::string& name, 00100 const std::vector<Number>& values, 00101 const std::vector<std::string>& variable_names); 00102 00109 virtual void all_first_order (); 00110 00122 virtual void all_second_order (const bool full_ordered=true); 00123 00130 void create_pid_mesh (UnstructuredMesh& pid_mesh, 00131 const processor_id_type pid) const; 00132 00138 void create_submesh (UnstructuredMesh& new_mesh, 00139 const_element_iterator& it, 00140 const const_element_iterator& it_end) const; 00141 00142 00147 virtual void copy_nodes_and_elements(const UnstructuredMesh& other_mesh); 00148 00149 00153 virtual void find_neighbors (const bool reset_remote_elements = false, 00154 const bool reset_current_list = true); 00155 00156 #ifdef LIBMESH_ENABLE_AMR 00157 00162 virtual bool contract (); 00163 #endif // #ifdef LIBMESH_ENABLE_AMR 00164 00165 }; 00166 00167 00168 } // namespace libMesh 00169 00170 #endif // LIBMESH_UNSTRUCTURED_MESH_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:49 UTC
Hosted By: