19#ifndef LIBMESH_ABAQUS_IO_H
20#define LIBMESH_ABAQUS_IO_H
23#include "libmesh/libmesh_common.h"
24#include "libmesh/mesh_input.h"
58 virtual void read (
const std::string & name)
override;
73 typedef std::map<std::string, std::vector<dof_id_type>>
container_t;
96 void read_elements(std::string upper, std::string elset_name);
105 std::string
parse_label(std::string line, std::string label_name)
const;
161 const std::string & sideset_type,
207 std::unique_ptr<std::istream>
_in;
235 void strip_ws(std::string &line)
const;
The AbaqusIO class is a preliminary implementation for reading Abaqus mesh files in ASCII format.
void read_sideset(const std::string &sideset_name, const std::string &sideset_type, sideset_container_t &container)
This function reads a sideset from the input file.
virtual ~AbaqusIO()
Destructor.
std::map< std::string, std::vector< std::pair< dof_id_type, unsigned > > > sideset_container_t
Type of the data structure for storing the (elem ID, side) pairs defining sidesets.
std::map< std::string, std::vector< dof_id_type > > container_t
The type of data structure used to store Node and Elemset IDs.
void assign_subdomain_ids()
This function is called after all the elements have been read and assigns element subdomain IDs.
void process_and_discard_comments()
Any of the various sections can start with some number of lines of comments, which start with "**".
std::set< ElemType > _elem_types
A set of the different geometric element types detected when reading the mesh.
void assign_boundary_node_ids()
This function assigns boundary IDs to node sets based on the alphabetical order in which the sets are...
virtual void extended_parsing(const std::string &)
Override this callback to implement support for more sections in derived classes.
virtual void read(const std::string &name) override
This method implements reading a mesh from a specified file.
std::unique_ptr< std::istream > _in
Stream object used to interact with the file.
void assign_sideset_ids()
Called at the end of the read() function, assigns any sideset IDs found when reading the file to the ...
std::string parse_label(std::string line, std::string label_name) const
This function parses a label of the form foo=bar from a comma-delimited line of the form ....
bool build_sidesets_from_nodesets
Default false.
void read_nodes(std::string nset_name)
This function parses a block of nodes in the Abaqus file once such a block has been found.
bool string_to_num(const std::string &input, dof_id_type &output) const
Attempts to convert the input string to a numerical value using strtol.
bool detect_generated_set(std::string upper) const
unsigned char max_elem_dimension_seen()
void strip_ws(std::string &line) const
Removes all whitespace characters from "line".
container_t _nodeset_ids
Abaqus writes nodesets and elemsets with labels.
bool _already_seen_part
This flag gets set to true after the first "*PART" section we see.
void read_ids(std::string set_name, container_t &container)
This function reads all the IDs for the current node or element set of the given name,...
void read_elements(std::string upper, std::string elset_name)
This function parses a block of elements in the Abaqus file.
sideset_container_t _sideset_ids
void generate_ids(std::string set_name, container_t &container)
This function handles "generated" nset and elset sections.
This is the MeshBase class.
The libMesh namespace provides an interface to certain functionality in the library.