61 #include "Phalanx_KokkosDeviceTypes.hpp"
63 #include "Teuchos_Assert.hpp"
65 #include "Tpetra_Import.hpp"
66 #include "Tpetra_CrsMatrix.hpp"
67 #include "Tpetra_RowMatrixTransposer.hpp"
72 #include <unordered_set>
84 template <
typename LO,
typename GO>
87 Kokkos::View<GO*> & globals)
90 std::vector<shards::CellTopology> elementBlockTopologies;
92 const shards::CellTopology & topology = elementBlockTopologies[0];
95 for(
const auto & other_topology : elementBlockTopologies){
100 if(topology.getDimension() == 1){
102 }
else if(topology.getDimension() == 2){
104 }
else if(topology.getDimension() == 3){
112 std::vector<std::string> block_ids;
115 std::size_t totalSize = 0;
116 for (std::size_t which_blk=0;which_blk<block_ids.size();which_blk++) {
118 const std::vector<LO> & localIDs = conn.
getElementBlock(block_ids[which_blk]);
119 totalSize += localIDs.size();
121 globals = Kokkos::View<GO*>(
"global_cells",totalSize);
123 for (std::size_t
id=0;
id<totalSize; ++id) {
129 globals(
id) = connectivity[0];
138 template <
typename LO,
typename GO>
143 std::vector<shards::CellTopology> elementBlockTopologies;
145 const shards::CellTopology & topology = elementBlockTopologies[0];
148 for(
const auto & other_topology : elementBlockTopologies){
156 std::vector<std::string> block_ids;
160 std::size_t totalCells=0, maxNodes=0;
161 for (std::size_t which_blk=0;which_blk<block_ids.size();which_blk++) {
163 const std::vector<LO> & localIDs = conn.
getElementBlock(block_ids[which_blk]);
164 if ( localIDs.size() == 0 )
168 totalCells += localIDs.size();
169 maxNodes = maxNodes<Teuchos::as<std::size_t>(thisSize) ? Teuchos::as<std::size_t>(thisSize) : maxNodes;
171 globals = Kokkos::View<GO**>(
"cell_to_node",totalCells,maxNodes);
174 for (std::size_t
id=0;
id<totalCells; ++id) {
178 for(
int n=0;n<nodeCnt;n++)
179 globals(
id,n) = connectivity[n];
185 template <
typename LO,
typename GO>
188 Kokkos::View<const GO**> cells_to_nodes)
205 typedef Tpetra::Map<LO,GO,panzer::TpetraNodeType> map_type;
208 std::set<GO> global_nodes;
209 for(
unsigned int i=0;i<cells_to_nodes.extent(0);i++)
210 for(
unsigned int j=0;j<cells_to_nodes.extent(1);j++)
211 global_nodes.insert(cells_to_nodes(i,j));
214 Kokkos::View<GO*> node_ids(
"global_nodes",global_nodes.size());
216 for(
auto itr=global_nodes.begin();itr!=global_nodes.end();++itr,++i)
222 return rcp(
new map_type(-1,node_ids,0,comm));
228 template <
typename LO,
typename GO>
231 Kokkos::View<const GO*> owned_cells,
232 Kokkos::View<const GO**> owned_cells_to_nodes)
237 typedef Tpetra::Map<LO,GO,panzer::TpetraNodeType> map_type;
238 typedef Tpetra::CrsMatrix<LO,LO,GO,panzer::TpetraNodeType> crs_type;
239 typedef Tpetra::Import<LO,GO,panzer::TpetraNodeType> import_type;
242 PANZER_FUNC_TIME_MONITOR_DIFF(
"panzer_stk::buildNodeToCellMatrix",BNTCM);
244 TEUCHOS_ASSERT(owned_cells.extent(0)==owned_cells_to_nodes.extent(0));
249 auto node_map = buildNodeMap<LO,GO>(comm,owned_cells_to_nodes);
252 auto unique_node_map = Tpetra::createOneToOne(node_map);
255 RCP<map_type> cell_map =
rcp(
new map_type(-1,owned_cells,0,comm));
259 RCP<crs_type> cell_to_node;
261 PANZER_FUNC_TIME_MONITOR_DIFF(
"Build matrix",BuildMatrix);
263 cell_to_node =
rcp(
new crs_type(cell_map,0));
266 const unsigned int num_local_cells = owned_cells_to_nodes.extent(0);
267 const unsigned int num_nodes_per_cell = owned_cells_to_nodes.extent(1);
268 std::vector<LO> local_node_indexes(num_nodes_per_cell);
269 std::vector<GO> global_node_indexes(num_nodes_per_cell);
270 for(
unsigned int i=0;i<num_local_cells;i++) {
271 const GO global_cell_index = owned_cells(i);
274 for(
unsigned int j=0;j<num_nodes_per_cell;j++) {
277 local_node_indexes[j] = Teuchos::as<LO>(j);
278 global_node_indexes[j] = owned_cells_to_nodes(i,j);
282 cell_to_node->insertGlobalValues(global_cell_index,global_node_indexes,local_node_indexes);
284 cell_to_node->fillComplete(unique_node_map,cell_map);
289 RCP<crs_type> node_to_cell;
291 PANZER_FUNC_TIME_MONITOR_DIFF(
"Tranpose matrix",TransposeMatrix);
294 Tpetra::RowMatrixTransposer<LO,LO,GO,panzer::TpetraNodeType> transposer(cell_to_node);
297 auto trans = transposer.createTranspose();
301 RCP<import_type>
import =
rcp(
new import_type(unique_node_map,node_map));
305 node_to_cell =
rcp(
new crs_type(node_map,0));
308 node_to_cell->doImport(*trans,*
import,Tpetra::INSERT);
312 node_to_cell->fillComplete(cell_map,unique_node_map);
321 template <
typename GO>
322 Kokkos::View<const GO*>
324 Kokkos::View<const GO*> cells,
325 Kokkos::View<const GO**> cells_to_nodes)
328 PANZER_FUNC_TIME_MONITOR_DIFF(
"panzer_stk::buildGhostedCellOneRing",BGCOR);
329 typedef Tpetra::CrsMatrix<int,int,GO,panzer::TpetraNodeType> crs_type;
361 std::unordered_set<GO> unique_cells;
365 for(
size_t i=0;i<cells.extent(0);i++) {
366 unique_cells.insert(cells(i));
370 std::set<GO> ghstd_cells_set;
374 auto node_map = node_to_cell->getMap()->getMyGlobalIndices();
377 for(
size_t i=0;i<node_map.extent(0);i++) {
378 const GO global_node_index = node_map(i);
379 size_t numEntries = node_to_cell->getNumEntriesInGlobalRow(node_map(i));
384 node_to_cell->getGlobalRowCopy(global_node_index,indices,values,numEntries);
386 for(
auto index : indices) {
389 if(unique_cells.find(index)==unique_cells.end()) {
390 ghstd_cells_set.insert(index);
391 unique_cells.insert(index);
398 Kokkos::View<GO*> ghstd_cells(
"ghstd_cells",ghstd_cells_set.size());
399 for(
auto global_cell_index : ghstd_cells_set) {
400 ghstd_cells(indx) = global_cell_index;
412 template <
typename GO>
413 Kokkos::DynRankView<double,PHX::Device>
414 buildGhostedVertices(
const Tpetra::Import<int,GO,panzer::TpetraNodeType> & importer,
415 Kokkos::DynRankView<const double,PHX::Device> owned_vertices)
420 typedef Tpetra::MultiVector<double,int,GO,panzer::TpetraNodeType> mvec_type;
421 typedef typename mvec_type::dual_view_type dual_view_type;
423 size_t owned_cell_cnt = importer.getSourceMap()->getNodeNumElements();
424 size_t ghstd_cell_cnt = importer.getTargetMap()->getNodeNumElements();
425 int vertices_per_cell = owned_vertices.extent(1);
426 int space_dim = owned_vertices.extent(2);
431 RCP<mvec_type> owned_vertices_mv =
rcp(
new mvec_type(importer.getSourceMap(),vertices_per_cell*space_dim));
432 RCP<mvec_type> ghstd_vertices_mv =
rcp(
new mvec_type(importer.getTargetMap(),vertices_per_cell*space_dim));
435 auto owned_vertices_view = owned_vertices_mv->template getLocalView<dual_view_type>();
436 for(
size_t i=0;i<owned_cell_cnt;i++) {
438 for(
int j=0;j<vertices_per_cell;j++)
439 for(
int k=0;k<space_dim;k++,l++)
440 owned_vertices_view(i,l) = owned_vertices(i,j,k);
445 ghstd_vertices_mv->doImport(*owned_vertices_mv,importer,Tpetra::INSERT);
448 Kokkos::DynRankView<double,PHX::Device> ghstd_vertices(
"ghstd_vertices",ghstd_cell_cnt,vertices_per_cell,space_dim);
450 auto ghstd_vertices_view = ghstd_vertices_mv->template getLocalView<dual_view_type>();
451 for(
size_t i=0;i<ghstd_cell_cnt;i++) {
453 for(
int j=0;j<vertices_per_cell;j++)
454 for(
int k=0;k<space_dim;k++,l++)
455 ghstd_vertices(i,j,k) = ghstd_vertices_view(i,l);
459 return ghstd_vertices;
462 template<
typename LO,
typename GO>
467 const std::string & element_block_name,
478 const shards::CellTopology & topology = *(mesh.
getCellTopology(element_block_name));
480 if(topology.getDimension() == 1){
482 }
else if(topology.getDimension() == 2){
484 }
else if(topology.getDimension() == 3){
489 PANZER_FUNC_TIME_MONITOR(
"Build connectivity");
494 std::vector<LO> owned_block_cells;
495 for(
int parent_owned_cell=0;parent_owned_cell<num_parent_owned_cells;++parent_owned_cell){
496 const LO local_cell = mesh_info.
local_cells(parent_owned_cell);
497 const bool is_in_block = conn.
getBlockId(local_cell) == element_block_name;
500 owned_block_cells.push_back(parent_owned_cell);
505 if ( owned_block_cells.size() == 0 )
511 PANZER_FUNC_TIME_MONITOR(
"panzer::partitioning_utilities::setupSubLocalMeshInfo");
512 panzer::partitioning_utilities::setupSubLocalMeshInfo<LO,GO>(mesh_info, owned_block_cells, block_info);
517 template<
typename LO,
typename GO>
522 const std::string & element_block_name,
523 const std::string & sideset_name,
530 const size_t face_subcell_dimension = mesh.
getCellTopology(element_block_name)->getDimension()-1;
532 Kokkos::DynRankView<double,PHX::Device> data_allocation;
535 std::vector<stk::mesh::Entity> side_entities;
541 mesh.
getMySides(sideset_name, element_block_name, side_entities);
543 }
catch(STK_Interface::SidesetException & e) {
544 std::stringstream ss;
545 std::vector<std::string> sideset_names;
549 ss << e.what() <<
"\nChoose existing sideset:\n";
550 for(
const auto & optional_sideset_name : sideset_names){
551 ss <<
"\t\"" << optional_sideset_name <<
"\"\n";
556 }
catch(STK_Interface::ElementBlockException & e) {
557 std::stringstream ss;
558 std::vector<std::string> element_block_names;
562 ss << e.what() <<
"\nChoose existing element block:\n";
563 for(
const auto & optional_element_block_name : element_block_names){
564 ss <<
"\t\"" << optional_element_block_name <<
"\"\n";
569 }
catch(std::logic_error & e) {
570 std::stringstream ss;
571 ss << e.what() <<
"\nUnrecognized logic error.\n";
580 std::map<std::pair<size_t,size_t>, std::vector<size_t> > local_cell_indexes_by_subcell;
589 std::vector<stk::mesh::Entity> elements;
590 std::vector<size_t> subcell_indexes;
591 std::vector<size_t> subcell_dimensions;
593 const LO num_elements = subcell_dimensions.size();
596 for(LO element_index=0; element_index<num_elements; ++element_index) {
597 const size_t subcell_dimension = subcell_dimensions[element_index];
598 const size_t subcell_index = subcell_indexes[element_index];
599 const size_t element_local_index = mesh.
elementLocalId(elements[element_index]);
602 local_cell_indexes_by_subcell[std::pair<size_t,size_t>(subcell_dimension, subcell_index)].push_back(element_local_index);
610 std::unordered_set<LO> owned_parent_cells_set;
611 std::map<LO,std::vector<LO> > owned_parent_cell_index_map;
614 for(
const auto & cell_subcell_pair : local_cell_indexes_by_subcell){
615 const std::pair<size_t,size_t> & subcell_definition = cell_subcell_pair.first;
616 const LO subcell_index = LO(subcell_definition.second);
617 if(subcell_definition.first == face_subcell_dimension){
618 const std::vector<size_t> & local_cell_indexes_for_subcell = cell_subcell_pair.second;
619 for(
const size_t & local_cell_index : local_cell_indexes_for_subcell){
622 for(LO i=0;i<LO(mesh_info.
local_cells.extent(0)); ++i){
623 if(mesh_info.
local_cells(i) == LO(local_cell_index)){
624 owned_parent_cell_index_map[i].push_back(subcell_index);
631 for(
const auto & pair : owned_parent_cell_index_map){
632 owned_parent_cells_set.insert(pair.first);
637 const LO num_owned_cells = owned_parent_cell_index_map.size();
646 face_t(LO c0, LO c1, LO sc0, LO sc1)
661 std::unordered_set<LO> ghstd_parent_cells_set, virtual_parent_cells_set;
662 std::vector<face_t> faces;
665 for(
const auto & local_cell_index_pair : owned_parent_cell_index_map){
666 const LO local_cell = local_cell_index_pair.first;
667 const std::vector<LO> & subcell_indexes_vec = local_cell_index_pair.second;
669 for(
const LO & subcell_index : subcell_indexes_vec){
671 const LO face = mesh_info.
cell_to_faces(local_cell, subcell_index);
672 const LO face_other_side = (mesh_info.
face_to_cells(face,0) == local_cell) ? 1 : 0;
676 const LO other_side_cell = mesh_info.
face_to_cells(face, face_other_side);
677 const LO other_side_subcell_index = mesh_info.
face_to_lidx(face, face_other_side);
679 faces.push_back(face_t(local_cell, other_side_cell, subcell_index, other_side_subcell_index));
681 if(other_side_cell >= parent_virtual_cell_offset){
682 virtual_parent_cells_set.insert(other_side_cell);
684 ghstd_parent_cells_set.insert(other_side_cell);
690 std::vector<LO> all_cells;
691 all_cells.insert(all_cells.end(),owned_parent_cells_set.begin(),owned_parent_cells_set.end());
692 all_cells.insert(all_cells.end(),ghstd_parent_cells_set.begin(),ghstd_parent_cells_set.end());
693 all_cells.insert(all_cells.end(),virtual_parent_cells_set.begin(),virtual_parent_cells_set.end());
700 const LO num_vertices_per_cell = mesh_info.
cell_vertices.extent(1);
703 sideset_info.
global_cells = Kokkos::View<GO*>(
"global_cells", num_total_cells);
704 sideset_info.
local_cells = Kokkos::View<LO*>(
"local_cells", num_total_cells);
705 sideset_info.
cell_vertices = Kokkos::View<double***,PHX::Device>(
"cell_vertices", num_total_cells, num_vertices_per_cell, num_dims);
708 for(LO i=0; i<num_total_cells; ++i){
709 const LO parent_cell = all_cells[i];
712 for(LO j=0; j<num_vertices_per_cell; ++j){
713 for(LO k=0; k<num_dims; ++k){
721 const LO num_faces = faces.size();
722 const LO num_faces_per_cell = mesh_info.
cell_to_faces.extent(1);
724 sideset_info.
face_to_cells = Kokkos::View<LO*[2]>(
"face_to_cells", num_faces);
725 sideset_info.
face_to_lidx = Kokkos::View<LO*[2]>(
"face_to_lidx", num_faces);
726 sideset_info.
cell_to_faces = Kokkos::View<LO**>(
"cell_to_faces", num_total_cells, num_faces_per_cell);
731 for(
int face_index=0;face_index<num_faces;++face_index){
732 const face_t & face = faces[face_index];
733 const LO & cell_0 = face.cell_0;
734 const LO & cell_1 = face.cell_1;
737 const LO sideset_cell_0 = std::distance(all_cells.begin(), std::find(all_cells.begin(), all_cells.end(), cell_0));
738 const LO sideset_cell_1 = std::distance(all_cells.begin(), std::find(all_cells.begin()+num_owned_cells, all_cells.end(), cell_1));
743 sideset_info.
face_to_lidx(face_index,0) = face.subcell_index_0;
744 sideset_info.
face_to_lidx(face_index,1) = face.subcell_index_1;
746 sideset_info.
cell_to_faces(sideset_cell_0,face.subcell_index_0) = face_index;
747 sideset_info.
cell_to_faces(sideset_cell_1,face.subcell_index_1) = face_index;
755 template <
typename LO,
typename GO>
764 typedef Tpetra::Map<LO,GO,panzer::TpetraNodeType> map_type;
765 typedef Tpetra::Import<LO,GO,panzer::TpetraNodeType> import_type;
788 Kokkos::View<GO**> owned_cell_to_nodes;
789 buildCellToNodes(conn, owned_cell_to_nodes);
793 Kokkos::View<GO*> owned_cells;
794 buildCellGlobalIDs(conn, owned_cells);
798 Kokkos::View<const GO*> ghstd_cells = buildGhostedCellOneRing<GO>(comm,owned_cells,owned_cell_to_nodes);
807 RCP<import_type> cellimport_own2ghst =
rcp(
new import_type(owned_cell_map,ghstd_cell_map));
811 std::vector<std::size_t> localCells(owned_cells.extent(0),-1);
812 for(
size_t i=0;i<localCells.size();i++){
817 std::vector<std::string> element_block_names;
820 const shards::CellTopology & cell_topology = *(mesh.
getCellTopology(element_block_names[0]));
822 const int space_dim = cell_topology.getDimension();
823 const int vertices_per_cell = cell_topology.getVertexCount();
824 const int faces_per_cell = cell_topology.getSubcellCount(space_dim-1);
827 Kokkos::DynRankView<double,PHX::Device> owned_vertices(
"owned_vertices",localCells.size(),vertices_per_cell,space_dim);
831 Kokkos::DynRankView<double,PHX::Device> ghstd_vertices = buildGhostedVertices(*cellimport_own2ghst,owned_vertices);
836 std::unordered_map<GO,int> global_to_local;
837 global_to_local[-1] = -1;
838 for(
size_t i=0;i<owned_cells.extent(0);i++)
839 global_to_local[owned_cells(i)] = i;
840 for(
size_t i=0;i<ghstd_cells.extent(0);i++)
841 global_to_local[ghstd_cells(i)] = i+Teuchos::as<int>(owned_cells.extent(0));
845 faceToElement->initialize(conn);
846 auto elems_by_face = faceToElement->getFaceToElementsMap();
847 auto face_to_lidx = faceToElement->getFaceToCellLocalIdxMap();
849 const int num_owned_cells =owned_cells.extent(0);
850 const int num_ghstd_cells =ghstd_cells.extent(0);
863 std::vector<int> all_boundary_faces;
864 const int num_faces = elems_by_face.extent(0);
865 for(
int face=0;face<num_faces;++face){
866 if(elems_by_face(face,0) < 0 or elems_by_face(face,1) < 0){
867 all_boundary_faces.push_back(face);
870 const LO num_virtual_cells = all_boundary_faces.size();
873 const LO num_real_cells = num_owned_cells + num_ghstd_cells;
874 const LO num_total_cells = num_real_cells + num_virtual_cells;
875 const LO num_total_faces = elems_by_face.extent(0);
879 Kokkos::View<GO*> virtual_cells = Kokkos::View<GO*>(
"virtual_cells",num_virtual_cells);
881 PANZER_FUNC_TIME_MONITOR_DIFF(
"Initial global index creation",InitialGlobalIndexCreation);
883 const int num_ranks = comm->getSize();
884 const int rank = comm->getRank();
886 std::vector<GO> owned_cell_distribution(num_ranks,0);
888 std::vector<GO> my_owned_cell_distribution(num_ranks,0);
889 my_owned_cell_distribution[rank] = num_owned_cells;
894 std::vector<GO> virtual_cell_distribution(num_ranks,0);
896 std::vector<GO> my_virtual_cell_distribution(num_ranks,0);
897 my_virtual_cell_distribution[rank] = num_virtual_cells;
902 GO num_global_real_cells=0;
903 for(
int i=0;i<num_ranks;++i){
904 num_global_real_cells+=owned_cell_distribution[i];
907 GO global_virtual_start_idx = num_global_real_cells;
908 for(
int i=0;i<rank;++i){
909 global_virtual_start_idx += virtual_cell_distribution[i];
912 for(
int i=0;i<num_virtual_cells;++i){
913 virtual_cells(i) = global_virtual_start_idx + GO(i);
919 Kokkos::View<LO*[2]> face_to_cells = Kokkos::View<LO*[2]>(
"face_to_cells",num_total_faces);
922 Kokkos::View<LO*[2]> face_to_localidx = Kokkos::View<LO*[2]>(
"face_to_localidx",num_total_faces);
925 Kokkos::View<LO**> cell_to_face = Kokkos::View<LO**>(
"cell_to_face",num_total_cells,faces_per_cell);
928 Kokkos::deep_copy(cell_to_face,-1);
932 PANZER_FUNC_TIME_MONITOR_DIFF(
"Transer faceToElement to local",TransferFaceToElementLocal);
934 int virtual_cell_index = num_real_cells;
935 for(
size_t f=0;f<elems_by_face.extent(0);f++) {
937 const GO global_c0 = elems_by_face(f,0);
938 const GO global_c1 = elems_by_face(f,1);
941 TEUCHOS_ASSERT(global_to_local.find(global_c0)!=global_to_local.end());
942 TEUCHOS_ASSERT(global_to_local.find(global_c1)!=global_to_local.end());
944 auto c0 = global_to_local[global_c0];
945 auto lidx0 = face_to_lidx(f,0);
946 auto c1 = global_to_local[global_c1];
947 auto lidx1 = face_to_lidx(f,1);
954 c0 = virtual_cell_index++;
961 cell_to_face(c0,lidx0) = f;
967 c1 = virtual_cell_index++;
974 cell_to_face(c1,lidx1) = f;
978 face_to_cells(f,0) = c0;
979 face_to_localidx(f,0) = lidx0;
980 face_to_cells(f,1) = c1;
981 face_to_localidx(f,1) = lidx1;
983 face_to_cells(f,0) = c1;
984 face_to_localidx(f,0) = lidx1;
985 face_to_cells(f,1) = c0;
986 face_to_localidx(f,1) = lidx0;
1000 PANZER_FUNC_TIME_MONITOR_DIFF(
"Assign Indices",AssignIndices);
1009 mesh_info.
global_cells = Kokkos::View<GO*>(
"global_cell_indices",num_total_cells);
1010 mesh_info.
local_cells = Kokkos::View<LO*>(
"local_cell_indices",num_total_cells);
1012 for(
int i=0;i<num_owned_cells;++i){
1017 for(
int i=0;i<num_ghstd_cells;++i){
1018 mesh_info.
global_cells(i+num_owned_cells) = ghstd_cells(i);
1019 mesh_info.
local_cells(i+num_owned_cells) = i+num_owned_cells;
1022 for(
int i=0;i<num_virtual_cells;++i){
1023 mesh_info.
global_cells(i+num_real_cells) = virtual_cells(i);
1024 mesh_info.
local_cells(i+num_real_cells) = i+num_real_cells;
1027 mesh_info.
cell_vertices = Kokkos::View<double***, PHX::Device>(
"cell_vertices",num_total_cells,vertices_per_cell,space_dim);
1032 for(
int i=0;i<num_owned_cells;++i){
1033 for(
int j=0;j<vertices_per_cell;++j){
1034 for(
int k=0;k<space_dim;++k){
1040 for(
int i=0;i<num_ghstd_cells;++i){
1041 for(
int j=0;j<vertices_per_cell;++j){
1042 for(
int k=0;k<space_dim;++k){
1043 mesh_info.
cell_vertices(i+num_owned_cells,j,k) = ghstd_vertices(i,j,k);
1051 PANZER_FUNC_TIME_MONITOR_DIFF(
"Assign geometry traits",AssignGeometryTraits);
1052 for(
int i=0;i<num_virtual_cells;++i){
1054 const LO virtual_cell = i+num_real_cells;
1055 bool exists =
false;
1056 for(
int local_face=0; local_face<faces_per_cell; ++local_face){
1057 const LO face = cell_to_face(virtual_cell, local_face);
1060 const LO other_side = (face_to_cells(face, 0) == virtual_cell) ? 1 : 0;
1061 const LO real_cell = face_to_cells(face,other_side);
1063 for(
int j=0;j<vertices_per_cell;++j){
1064 for(
int k=0;k<space_dim;++k){
1077 std::vector<std::string> sideset_names;
1080 for(
const std::string & element_block_name : element_block_names){
1081 PANZER_FUNC_TIME_MONITOR_DIFF(
"Set up setupLocalMeshBlockInfo",SetupLocalMeshBlockInfo);
1083 setupLocalMeshBlockInfo(mesh, conn, mesh_info, element_block_name, block_info);
1086 for(
const std::string & sideset_name : sideset_names){
1087 PANZER_FUNC_TIME_MONITOR_DIFF(
"Setup LocalMeshSidesetInfo",SetupLocalMeshSidesetInfo);
1089 setupLocalMeshSidesetInfo(mesh, conn, mesh_info, element_block_name, sideset_name, sideset_info);
1104 #ifndef PANZER_ORDINAL64_IS_INT
Teuchos::RCP< const shards::CellTopology > cell_topology
void getSidesetNames(std::vector< std::string > &name) const
void getElementVerticesNoResize(const std::vector< std::size_t > &localIds, ArrayT &vertices) const
void getElementBlockNames(std::vector< std::string > &names) const
virtual void getElementBlockIds(std::vector< std::string > &elementBlockIds) const =0
virtual std::string getBlockId(LocalOrdinal localElmtId) const =0
std::map< std::string, LocalMeshBlockInfo< LO, GO > > element_blocks
Kokkos::View< GO * > global_cells
Teuchos::RCP< const shards::CellTopology > cell_topology
virtual void getElementBlockTopologies(std::vector< shards::CellTopology > &elementBlockTopologies) const =0
void getMySides(const std::string &sideName, std::vector< stk::mesh::Entity > &sides) const
std::map< std::string, std::map< std::string, LocalMeshSidesetInfo< LO, GO > > > sidesets
Kokkos::View< LO * > local_cells
std::size_t elementLocalId(stk::mesh::Entity elmt) const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual LocalOrdinal getConnectivitySize(LocalOrdinal localElmtId) const =0
#define TEUCHOS_TEST_FOR_EXCEPT_MSG(throw_exception_test, msg)
virtual const GlobalOrdinal * getConnectivity(LocalOrdinal localElmtId) const =0
std::string element_block_name
TEUCHOS_DEPRECATED void reduceAll(const Comm< Ordinal > &comm, const EReductionType reductType, const Packet &send, Packet *globalReduct)
Kokkos::View< LO *[2]> face_to_cells
virtual const std::vector< LocalOrdinal > & getElementBlock(const std::string &blockID) const =0
Kokkos::View< double ***, PHX::Device > cell_vertices
bool isInitialized() const
Has initialize been called on this mesh object?
Kokkos::View< LO ** > cell_to_faces
Kokkos::View< LO *[2]> face_to_lidx
virtual void buildConnectivity(const FieldPattern &fp)=0
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
get the comm associated with this mesh
std::string element_block_name
void generateLocalMeshInfo(const panzer_stk::STK_Interface &mesh, panzer::LocalMeshInfo< LO, GO > &mesh_info)
#define TEUCHOS_ASSERT(assertion_test)
void getSideElementCascade(const panzer_stk::STK_Interface &mesh, const std::string &blockId, const std::vector< stk::mesh::Entity > &sides, std::vector< std::size_t > &localSubcellDim, std::vector< std::size_t > &localSubcellIds, std::vector< stk::mesh::Entity > &elements)
Teuchos::RCP< const shards::CellTopology > getCellTopology(const std::string &eBlock) const
#define TEUCHOS_FUNC_TIME_MONITOR_DIFF(FUNCNAME, DIFF)
#define TEUCHOS_TEST_FOR_EXCEPTION_PURE_MSG(throw_exception_test, Exception, msg)