libMesh
Public Member Functions | Public Attributes | List of all members
libMesh::DynaIO::ElementDefinition Struct Reference

Defines mapping from libMesh element types to LS-DYNA element types or vice-versa. More...

#include <dyna_io.h>

Public Member Functions

 ElementDefinition (ElemType type_in, dyna_int_type dyna_type_in, dyna_int_type dim_in, dyna_int_type p_in)
 
 ElementDefinition (ElemType type_in, dyna_int_type dyna_type_in, dyna_int_type dim_in, dyna_int_type p_in, std::vector< unsigned int > &&nodes_in)
 

Public Attributes

ElemType type
 
dyna_int_type dyna_type
 
dyna_int_type dim
 
dyna_int_type p
 
std::vector< unsigned intnodes
 

Detailed Description

Defines mapping from libMesh element types to LS-DYNA element types or vice-versa.

For the foreseeable future only isotropic p elements, with the same polynomial degree in every direction, are supported.

Definition at line 125 of file dyna_io.h.

Constructor & Destructor Documentation

◆ ElementDefinition() [1/2]

libMesh::DynaIO::ElementDefinition::ElementDefinition ( ElemType  type_in,
dyna_int_type  dyna_type_in,
dyna_int_type  dim_in,
dyna_int_type  p_in 
)

Definition at line 98 of file dyna_io.C.

References libMesh::invalid_uint, libMesh::Utility::iota(), n_nodes, and libMesh::Elem::type_to_n_nodes_map.

101  :
102  type(type_in),
103  dyna_type(dyna_type_in),
104  dim(dim_in),
105  p(p_in)
106 {
107  const unsigned int n_nodes = Elem::type_to_n_nodes_map[type_in];
108  if (n_nodes == invalid_uint)
109  libmesh_not_implemented_msg("Support for Polygons/Polyhedra not yet implemented");
110  nodes.resize(n_nodes);
111  std::iota(nodes.begin(), nodes.end(), 0);
112 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
Definition: libmesh.h:310
static const unsigned int type_to_n_nodes_map[INVALID_ELEM]
This array maps the integer representation of the ElemType enum to the number of nodes in the element...
Definition: elem.h:650
void iota(ForwardIter first, ForwardIter last, T value)
Utility::iota was created back when std::iota was just an SGI STL extension.
Definition: utility.h:229
const dof_id_type n_nodes
Definition: tecplot_io.C:67
std::vector< unsigned int > nodes
Definition: dyna_io.h:142

◆ ElementDefinition() [2/2]

libMesh::DynaIO::ElementDefinition::ElementDefinition ( ElemType  type_in,
dyna_int_type  dyna_type_in,
dyna_int_type  dim_in,
dyna_int_type  p_in,
std::vector< unsigned int > &&  nodes_in 
)

Definition at line 116 of file dyna_io.C.

120  :
121  type(type_in),
122  dyna_type(dyna_type_in),
123  dim(dim_in),
124  p(p_in),
125  nodes(nodes_in)
126 {}
std::vector< unsigned int > nodes
Definition: dyna_io.h:142

Member Data Documentation

◆ dim

dyna_int_type libMesh::DynaIO::ElementDefinition::dim

Definition at line 140 of file dyna_io.h.

Referenced by libMesh::DynaIO::ElementMaps::add_def().

◆ dyna_type

dyna_int_type libMesh::DynaIO::ElementDefinition::dyna_type

Definition at line 139 of file dyna_io.h.

Referenced by libMesh::DynaIO::ElementMaps::add_def().

◆ nodes

std::vector<unsigned int> libMesh::DynaIO::ElementDefinition::nodes

Definition at line 142 of file dyna_io.h.

Referenced by libMesh::ExodusII_IO::read(), and libMesh::DynaIO::read_mesh().

◆ p

dyna_int_type libMesh::DynaIO::ElementDefinition::p

Definition at line 141 of file dyna_io.h.

Referenced by libMesh::DynaIO::ElementMaps::add_def().

◆ type

ElemType libMesh::DynaIO::ElementDefinition::type

Definition at line 138 of file dyna_io.h.

Referenced by libMesh::DynaIO::ElementMaps::add_def(), and libMesh::DynaIO::read_mesh().


The documentation for this struct was generated from the following files: