OGS
MeshLib::detail Namespace Reference

Functions

template<class T_ELEMENT >
MeshLib::ElementcreateElementWithSameNodeOrder (const std::vector< MeshLib::Node * > &nodes, vtkIdList *const node_ids, std::size_t const element_id)
 

Function Documentation

◆ createElementWithSameNodeOrder()

template<class T_ELEMENT >
MeshLib::Element * MeshLib::detail::createElementWithSameNodeOrder ( const std::vector< MeshLib::Node * > & nodes,
vtkIdList *const node_ids,
std::size_t const element_id )

Definition at line 52 of file VtkMeshConverter.cpp.

55{
56 auto** ele_nodes = new MeshLib::Node*[T_ELEMENT::n_all_nodes];
57 for (unsigned k(0); k < T_ELEMENT::n_all_nodes; k++)
58 {
59 ele_nodes[k] = nodes[node_ids->GetId(k)];
60 }
61 return new T_ELEMENT(ele_nodes, element_id);
62}

Referenced by MeshLib::VtkMeshConverter::convertUnstructuredGrid().