20 #ifndef LIBMESH_DYNA_IO_H 21 #define LIBMESH_DYNA_IO_H 24 #include "libmesh/libmesh_common.h" 25 #include "libmesh/mesh_input.h" 26 #include "libmesh/mesh_output.h" 68 bool keep_spline_nodes =
true);
91 virtual void read (
const std::string &
name)
override;
100 unsigned int var_num);
102 #ifdef LIBMESH_ENABLE_DEPRECATED 111 #endif // LIBMESH_ENABLE_DEPRECATED 136 std::vector<unsigned int> && nodes_in);
198 out.emplace(eledef.
type, eledef);
199 in.emplace(std::make_tuple(eledef.
dyna_type, eledef.
dim, eledef.
p), eledef);
202 std::map<ElemType, ElementDefinition>
out;
204 typedef std::tuple<dyna_int_type, dyna_int_type, dyna_int_type>
Key;
206 std::map<Key, ElementDefinition>
in;
225 #endif // LIBMESH_DYNA_IO_H std::string name(const ElemQuality q)
This function returns a string containing some name for q.
ElemType
Defines an enum for geometric element types.
virtual void read(const std::string &name) override
Reads in a mesh in the Dyna format from the ASCII file given by name.
std::vector< Node * > spline_node_ptrs
int32_t dyna_int_type
The integer type DYNA uses.
Reading and writing meshes in (a subset of) LS-DYNA format.
double dyna_fp_type
The floating-point type DYNA uses.
void read_mesh(std::istream &in)
Implementation of the read() function.
Defines mapping from libMesh element types to LS-DYNA element types or vice-versa.
void clear_spline_nodes()
Removes any spline nodes (both NodeElem and Node), leaving only the FE mesh generated from those spli...
void add_def(const ElementDefinition &eledef)
bool _keep_spline_nodes
Whether to keep or eventually discard spline nodes.
The libMesh namespace provides an interface to certain functionality in the library.
This is the MeshBase class.
void add_spline_constraints(DofMap &dof_map, unsigned int sys_num, unsigned int var_num)
Constrains finite element degrees of freedom in terms of spline degrees of freedom by adding user-def...
This class handles the numbering of degrees of freedom on a mesh.
static const ElementDefinition & find_elem_definition(dyna_int_type dyna_elem, int dim, int p)
Finds the ElementDefinition corresponding to a particular element type.
std::map< ElemType, ElementDefinition > out
static ElementMaps build_element_maps()
A static function used to construct the _element_maps struct, statically.
static const int max_fps_per_line
How many can we find on a line?
DynaIO(MeshBase &mesh, bool keep_spline_nodes=true)
Constructor.
std::tuple< dyna_int_type, dyna_int_type, dyna_int_type > Key
std::unordered_map< Node *, Elem * > spline_nodeelem_ptrs
static ElementMaps _element_maps
A static ElementMaps object that is built statically and used by all instances of this class...
static const int max_ints_per_line
How many can we find on a line?
struct which holds a map from LS-DYNA to libMesh element numberings and vice-versa.
std::vector< unsigned int > nodes
std::map< Key, ElementDefinition > in
ElementDefinition(ElemType type_in, dyna_int_type dyna_type_in, dyna_int_type dim_in, dyna_int_type p_in)