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);
125 std::vector<unsigned int> && nodes_in);
187 out.emplace(eledef.
type, eledef);
188 in.emplace(std::make_tuple(eledef.
dyna_type, eledef.
dim, eledef.
p), eledef);
191 std::map<ElemType, ElementDefinition>
out;
193 typedef std::tuple<dyna_int_type, dyna_int_type, dyna_int_type>
Key;
195 std::map<Key, ElementDefinition>
in;
This class handles the numbering of degrees of freedom on a mesh.
Reading and writing meshes in (a subset of) LS-DYNA format.
void read_mesh(std::istream &in)
Implementation of the read() function.
static const int max_fps_per_line
How many can we find on a line?
static const int max_ints_per_line
How many can we find on a line?
double dyna_fp_type
The floating-point type DYNA uses.
static ElementMaps _element_maps
A static ElementMaps object that is built statically and used by all instances of this class.
static const ElementDefinition & find_elem_definition(ElemType libmesh_elem, int dim, int p)
std::vector< Node * > spline_node_ptrs
bool _keep_spline_nodes
Whether to keep or eventually discard spline nodes.
int32_t dyna_int_type
The integer type DYNA uses.
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...
virtual void read(const std::string &name) override
Reads in a mesh in the Dyna format from the ASCII file given by name.
std::unordered_map< Node *, Elem * > spline_nodeelem_ptrs
static const ElementDefinition & find_elem_definition(dyna_int_type dyna_elem, int dim, int p)
Finds the ElementDefinition corresponding to a particular element type.
static ElementMaps build_element_maps()
A static function used to construct the _element_maps struct, statically.
This is the MeshBase class.
The libMesh namespace provides an interface to certain functionality in the library.
ElemType
Defines an enum for geometric element types.
Defines mapping from libMesh element types to LS-DYNA element types or vice-versa.
std::vector< unsigned int > nodes
struct which holds a map from LS-DYNA to libMesh element numberings and vice-versa.
std::map< ElemType, ElementDefinition > out
std::map< Key, ElementDefinition > in
void add_def(const ElementDefinition &eledef)
std::tuple< dyna_int_type, dyna_int_type, dyna_int_type > Key