$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 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 #ifndef LIBMESH_ABAQUS_IO_H 00020 #define LIBMESH_ABAQUS_IO_H 00021 00022 // Local includes 00023 #include "libmesh/libmesh_common.h" 00024 #include "libmesh/mesh_input.h" 00025 00026 // C++ includes 00027 #include <fstream> 00028 #include <set> 00029 00030 namespace libMesh 00031 { 00038 class AbaqusIO : public MeshInput<MeshBase> 00039 { 00040 public: 00044 explicit 00045 AbaqusIO (MeshBase& mesh); 00046 00050 virtual ~AbaqusIO (); 00051 00055 virtual void read (const std::string& name); 00056 00062 bool build_sidesets_from_nodesets; 00063 00064 private: 00068 typedef std::map<std::string, std::vector<dof_id_type> > container_t; 00069 00075 typedef std::map<std::string, std::vector<std::pair<dof_id_type, unsigned> > > sideset_container_t; 00076 00082 void read_nodes(std::string nset_name); 00083 00091 void read_elements(std::string upper, std::string elset_name); 00092 00100 std::string parse_label(std::string line, std::string label_name); 00101 00107 void read_ids(std::string set_name, container_t& container); 00108 00130 void assign_subdomain_ids(); 00131 00137 void read_sideset(std::string sideset_name, sideset_container_t& container); 00138 00145 void assign_boundary_node_ids(); 00146 00151 void assign_sideset_ids(); 00152 00159 void process_and_discard_comments(); 00160 00166 unsigned char max_elem_dimension_seen(); 00167 00173 container_t _nodeset_ids; 00174 container_t _elemset_ids; 00175 sideset_container_t _sideset_ids; 00176 00180 std::ifstream _in; 00181 00186 std::set<ElemType> _elem_types; 00187 00192 // std::map<dof_id_type, dof_id_type> _libmesh_to_abaqus_elem_mapping; 00193 std::map<dof_id_type, dof_id_type> _abaqus_to_libmesh_elem_mapping; 00194 00202 std::map<dof_id_type, dof_id_type> _abaqus_to_libmesh_node_mapping; 00203 00210 bool _already_seen_part; 00211 }; 00212 00213 } // namespace 00214 00215 #endif // LIBMESH_ABAQUS_IO_H