Skip to main content
This class represents a part (block of mesh). Inherits from:
  • IPart

Members

Friends

Friend Reader

Public functions

Function num_nodes

num_nodes The number of nodes in this part in the current timestep Parameters:
  • std::size_t: & num_coords The number of nodes
  • int32_t: rank The rank number to return values for. Unimplemented, use 0.
Returns: ErrorCode Parameters:
  • std::size_t & num_coords
  • int32_t rank = 0
Return type: ErrorCode

Function nodes

nodes Get the coordinates of the nodes. Note: the xyz array needs to be allocated to num_coords()*3 floats. Parameters:
  • float: * xyz [x1,y1,z1,x2,y2,z2,…]
  • int32_t: rank The rank number to return values for. Unimplemented, use 0.
Returns: ErrorCode Parameters:
  • float * xyz
  • int32_t rank = 0
Return type: ErrorCode

Function num_elements

num_elements Generate a map of the count of the number of elements of each supported type. Parameters:
  • std::map<ElementType std::size_t>: & elements For a given element type, how many elements are there
  • int32_t: rank The rank number to return values for. Unimplemented, use 0.
Returns: ErrorCode Parameters:
  • std::map< ElementType, std::size_t > & elements
  • int32_t rank = 0
Return type: ErrorCode

Function element_conn

element_conn For all element types other than NFACED and NSIDED, return the connectivity (0-based node indices). Note: connectivity must be allocated to at least:
integers. Parameters:
  • ElementType: elem_type The element type to get the connectivity for
  • uint32_t: * connectivity The output connectivity values
  • int32_t: rank The rank number to return values for. Unimplemented, use 0.
Returns: ErrorCode Parameters:
  • ElementType elem_type
  • uint32_t * connectivity
  • int32_t rank = 0
Return type: ErrorCode

Function element_conn_nsided_size

element_conn_nsided_size Before an NSIDED mesh can be read, the size of the nodes_per_polygon array and nodes array need to be determined. This methods computes the required size of these arrays so that element_conn_nsided() can be called with the proper I/O buffers. Parameters:
  • ElementType: elem_type The element type: NSIDED or NSIDED_GHOST
  • size_t: & nodes_per_polygon_size The number of uint32_t values in the nodes_per_polygon buffer
  • size_t: & nodes_size The number of uint32_t values in the nodes buffer
  • int32_t: rank The rank number to return values for. Unimplemented, use 0.
Returns: ErrorCode Parameters:
  • ElementType elem_type
  • size_t & nodes_per_polygon_size
  • size_t & nodes_size
  • int32_t rank = 0
Return type: ErrorCode

Function element_conn_nsided

element_conn_nsided Retrieve the nodal indices for a collection of NSIDED elements. Parameters:
  • ElementType: elem_type The element type: NSIDED or NSIDED_GHOST
  • uint32_t: & nodes_per_polygon Count of the number of nodes to consume for each polygon
  • uint32_t: & nodes The list of nodes.
  • int32_t: rank The rank number to return values for. Unimplemented, use 0.
Returns: ErrorCode Parameters:
  • ElementType elem_type
  • uint32_t * nodes_per_polygon
  • uint32_t * nodes
  • int32_t rank = 0
Return type: ErrorCode

Function element_conn_nfaced_size

element_conn_nfaced_size Before an NFACED mesh can be read, the size of the faces_per_element, nodes_per_face and nodes arrays need to be determined. This methods computes the required size of these arrays so that element_conn_nfaced() can be called with the proper I/O buffers. Parameters:
  • ElementType: elem_type The element type: NFACED or NFACED_GHOST
  • size_t: & faces_per_element_size The number of uint32_t values in the faces_per_element buffer
  • size_t: & nodes_per_face_size The number of uint32_t values in the nodes_per_face buffer
  • size_t: & indices_size The number of uint32_t values in the nodes buffer
  • int32_t: rank The rank number to return values for. Unimplemented, use 0.
Returns: ErrorCode Parameters:
  • ElementType elem_type
  • size_t & faces_per_element_size
  • size_t & nodes_per_face_size
  • size_t & indices_size
  • int32_t rank = 0
Return type: ErrorCode

Function element_conn_nfaced

element_conn_nfaced Retrieve the nodal indices for a collection of NFACED elements. Parameters:
  • ElementType: elem_type The element type: NFACED or NFACED_GHOST
  • uint32_t: * faces_per_element For each element, the number of faces to be consumed
  • uint32_t: * nodes_per_face For each face, the number of nodes to be consumed
  • uint32_t: * nodes The list of nodes.
  • int32_t: rank The rank number to return values for. Unimplemented, use 0.
Returns: ErrorCode Parameters:
  • ElementType elem_type
  • uint32_t * faces_per_element
  • uint32_t * nodes_per_face
  • uint32_t * nodes
  • int32_t rank = 0
Return type: ErrorCode

Function variable_values

variable_values Get the variable values for the current node, element or constant. Note: array needs to be at least the number of nodes or elements (for the specified variable and elem_type). For part constants, only a single value is returned. Parameters:
  • const: Variable * var The variable to get the values for
  • ElementType: elem_type The element type
  • bool: complex If the variable supports complex, pick the real or complex portion
  • uint32_t: component For vector and tensor variables, the component to return
  • float: * array the returned values
  • int32_t: rank The rank number to return values for. Unimplemented, use 0.
Returns: ErrorCode Parameters:
  • IVariable * var
  • ElementType elem_type
  • bool complex
  • uint32_t component
  • float * array
  • int32_t rank = 0
Return type: ErrorCode

Function rigid_body_transform

rigid_body_transform The rotation, translation, scale to be applied to this part at this timestep. Parameters:
  • struct: RigidBodyTransform & transform The current transformation
Returns: ErrorCode will return UNAVAILABLE if it does not exist (and a “unity” transform is returned) Parameters:
  • struct RigidBodyTransform & transform
Return type: ErrorCode

Private functions

Function Part

Parameters:
  • const uint32_t index
  • const uint32_t id
  • const uint32_t reader_id
  • const std::string & name
  • const std::map< const std::string, std::string > & metadata
  • const PartHints hints
Return type: