abaqus_io.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 #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 <set> 00028 00029 namespace libMesh 00030 { 00037 class AbaqusIO : public MeshInput<MeshBase> 00038 { 00039 public: 00043 explicit 00044 AbaqusIO (MeshBase& mesh); 00045 00049 virtual ~AbaqusIO (); 00050 00054 virtual void read (const std::string& name); 00055 00061 bool build_sidesets_from_nodesets; 00062 00063 private: 00067 typedef std::map<std::string, std::vector<dof_id_type> > container_t; 00068 00074 typedef std::map<std::string, std::vector<std::pair<dof_id_type, unsigned> > > sideset_container_t; 00075 00080 void read_nodes(); 00081 00089 void read_elements(std::string upper); 00090 00098 std::string parse_label(std::string line, std::string label_name); 00099 00105 void read_ids(std::string set_name, container_t& container); 00106 00128 void assign_subdomain_ids(); 00129 00135 void read_sideset(std::string sideset_name, sideset_container_t& container); 00136 00143 void assign_boundary_node_ids(); 00144 00149 void assign_sideset_ids(); 00150 00157 void process_and_discard_comments(); 00158 00164 container_t _nodeset_ids; 00165 container_t _elemset_ids; 00166 sideset_container_t _sideset_ids; 00167 00171 std::ifstream _in; 00172 00177 std::set<ElemType> _elem_types; 00178 00183 // std::map<dof_id_type, dof_id_type> _libmesh_to_abaqus_elem_mapping; 00184 std::map<dof_id_type, dof_id_type> _abaqus_to_libmesh_elem_mapping; 00185 00193 std::map<dof_id_type, dof_id_type> _abaqus_to_libmesh_node_mapping; 00194 00201 bool _already_seen_part; 00202 }; 00203 00204 } // namespace 00205 00206 #endif // LIBMESH_ABAQUS_IO_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:45 UTC
Hosted By: