14 #include "Teuchos_Comm.hpp"
15 #include "Teuchos_Assert.hpp"
17 #include "Tpetra_CrsMatrix.hpp"
18 #include "Tpetra_RowMatrixTransposer.hpp"
29 #include "Panzer_Workset_Builder.hpp"
32 #include "Phalanx_KokkosDeviceTypes.hpp"
35 #include <unordered_set>
36 #include <unordered_map>
49 PHX::View<panzer::GlobalOrdinal*> & globals)
52 std::vector<shards::CellTopology> elementBlockTopologies;
54 const shards::CellTopology & topology = elementBlockTopologies[0];
57 for(
const auto & other_topology : elementBlockTopologies){
62 if(topology.getDimension() == 1){
64 }
else if(topology.getDimension() == 2){
66 }
else if(topology.getDimension() == 3){
74 std::vector<std::string> block_ids;
77 std::size_t totalSize = 0;
78 for (std::size_t which_blk=0;which_blk<block_ids.size();which_blk++) {
80 const std::vector<int> & localIDs = conn.
getElementBlock(block_ids[which_blk]);
81 totalSize += localIDs.size();
83 globals = PHX::View<panzer::GlobalOrdinal*>(
"global_cells",totalSize);
84 auto globals_h = Kokkos::create_mirror_view(globals);
86 for (std::size_t
id=0;
id<totalSize; ++id) {
92 globals_h(
id) = connectivity[0];
94 Kokkos::deep_copy(globals, globals_h);
106 std::vector<shards::CellTopology> elementBlockTopologies;
108 const shards::CellTopology & topology = elementBlockTopologies[0];
111 for(
const auto & other_topology : elementBlockTopologies){
119 std::vector<std::string> block_ids;
123 std::size_t totalCells=0, maxNodes=0;
124 for (std::size_t which_blk=0;which_blk<block_ids.size();which_blk++) {
126 const std::vector<int> & localIDs = conn.
getElementBlock(block_ids[which_blk]);
127 if ( localIDs.size() == 0 )
131 totalCells += localIDs.size();
132 maxNodes = maxNodes<Teuchos::as<std::size_t>(thisSize) ? Teuchos::as<std::size_t>(thisSize) : maxNodes;
134 globals = PHX::View<panzer::GlobalOrdinal**>(
"cell_to_node",totalCells,maxNodes);
135 auto globals_h = Kokkos::create_mirror_view(globals);
138 for (std::size_t
id=0;
id<totalCells; ++id) {
142 for(
int n=0;n<nodeCnt;n++)
143 globals_h(
id,n) = connectivity[n];
145 Kokkos::deep_copy(globals, globals_h);
152 PHX::View<const panzer::GlobalOrdinal**> cells_to_nodes)
169 typedef Tpetra::Map<panzer::LocalOrdinal,panzer::GlobalOrdinal,panzer::TpetraNodeType> map_type;
172 auto cells_to_nodes_h = Kokkos::create_mirror_view(cells_to_nodes);
173 Kokkos::deep_copy(cells_to_nodes_h, cells_to_nodes);
174 std::set<panzer::GlobalOrdinal> global_nodes;
175 for(
unsigned int i=0;i<cells_to_nodes.extent(0);i++)
176 for(
unsigned int j=0;j<cells_to_nodes.extent(1);j++)
177 global_nodes.insert(cells_to_nodes_h(i,j));
180 PHX::View<panzer::GlobalOrdinal*> node_ids(
"global_nodes",global_nodes.size());
181 auto node_ids_h = Kokkos::create_mirror_view(node_ids);
183 for(
auto itr=global_nodes.begin();itr!=global_nodes.end();++itr,++i)
184 node_ids_h(i) = *itr;
185 Kokkos::deep_copy(node_ids, node_ids_h);
198 PHX::View<const panzer::GlobalOrdinal*> owned_cells,
199 PHX::View<const panzer::GlobalOrdinal**> owned_cells_to_nodes)
204 typedef Tpetra::Map<panzer::LocalOrdinal,panzer::GlobalOrdinal,panzer::TpetraNodeType> map_type;
205 typedef Tpetra::CrsMatrix<panzer::LocalOrdinal,panzer::LocalOrdinal,panzer::GlobalOrdinal,panzer::TpetraNodeType> crs_type;
206 typedef Tpetra::Import<panzer::LocalOrdinal,panzer::GlobalOrdinal,panzer::TpetraNodeType> import_type;
209 PANZER_FUNC_TIME_MONITOR_DIFF(
"panzer_stk::buildNodeToCellMatrix",BNTCM);
211 TEUCHOS_ASSERT(owned_cells.extent(0)==owned_cells_to_nodes.extent(0));
216 auto node_map = buildNodeMap(comm,owned_cells_to_nodes);
219 auto unique_node_map = Tpetra::createOneToOne(node_map);
226 RCP<crs_type> cell_to_node;
228 PANZER_FUNC_TIME_MONITOR_DIFF(
"Build matrix",BuildMatrix);
231 const unsigned int num_local_cells = owned_cells_to_nodes.extent(0);
232 const unsigned int num_nodes_per_cell = owned_cells_to_nodes.extent(1);
235 cell_to_node =
rcp(
new crs_type(cell_map,num_nodes_per_cell));
237 std::vector<panzer::LocalOrdinal> local_node_indexes(num_nodes_per_cell);
238 std::vector<panzer::GlobalOrdinal> global_node_indexes(num_nodes_per_cell);
239 auto owned_cells_h = Kokkos::create_mirror_view(owned_cells);
240 auto owned_cells_to_nodes_h = Kokkos::create_mirror_view(owned_cells_to_nodes);
241 Kokkos::deep_copy(owned_cells_h, owned_cells);
242 Kokkos::deep_copy(owned_cells_to_nodes_h, owned_cells_to_nodes);
243 for(
unsigned int i=0;i<num_local_cells;i++) {
244 const panzer::GlobalOrdinal global_cell_index = owned_cells_h(i);
245 for(
unsigned int j=0;j<num_nodes_per_cell;j++) {
246 local_node_indexes[j] = Teuchos::as<panzer::LocalOrdinal>(j);
247 global_node_indexes[j] = owned_cells_to_nodes_h(i,j);
251 cell_to_node->insertGlobalValues(global_cell_index,global_node_indexes,local_node_indexes);
253 cell_to_node->fillComplete(unique_node_map,cell_map);
258 RCP<crs_type> node_to_cell;
260 PANZER_FUNC_TIME_MONITOR_DIFF(
"Tranpose matrix",TransposeMatrix);
263 Tpetra::RowMatrixTransposer<panzer::LocalOrdinal,panzer::LocalOrdinal,panzer::GlobalOrdinal,panzer::TpetraNodeType> transposer(cell_to_node);
266 auto trans = transposer.createTranspose();
270 RCP<import_type>
import =
rcp(
new import_type(unique_node_map,node_map));
274 node_to_cell =
rcp(
new crs_type(node_map,0));
277 node_to_cell->doImport(*trans,*
import,Tpetra::INSERT);
281 node_to_cell->fillComplete(cell_map,unique_node_map);
290 PHX::View<panzer::GlobalOrdinal*>
292 PHX::View<const panzer::GlobalOrdinal*> cells,
293 PHX::View<const panzer::GlobalOrdinal**> cells_to_nodes)
296 PANZER_FUNC_TIME_MONITOR_DIFF(
"panzer_stk::buildGhostedCellOneRing",BGCOR);
297 typedef Tpetra::CrsMatrix<int,int,panzer::GlobalOrdinal,panzer::TpetraNodeType> crs_type;
329 std::unordered_set<panzer::GlobalOrdinal> unique_cells;
333 auto cells_h = Kokkos::create_mirror_view(cells);
334 Kokkos::deep_copy(cells_h, cells);
335 for(
size_t i=0;i<cells.extent(0);i++) {
336 unique_cells.insert(cells_h(i));
340 std::set<panzer::GlobalOrdinal> ghstd_cells_set;
344 auto node_map = node_to_cell->getMap()->getMyGlobalIndices();
347 for(
size_t i=0;i<node_map.extent(0);i++) {
348 const panzer::GlobalOrdinal global_node_index = node_map(i);
349 size_t numEntries = node_to_cell->getNumEntriesInGlobalRow(node_map(i));
350 typename crs_type::nonconst_global_inds_host_view_type indices(
"indices", numEntries);
351 typename crs_type::nonconst_values_host_view_type values(
"values", numEntries);
354 node_to_cell->getGlobalRowCopy(global_node_index,indices,values,numEntries);
356 for(
size_t j=0; j<indices.extent(0); ++j) {
357 auto index = indices(j);
360 if(unique_cells.find(index)==unique_cells.end()) {
361 ghstd_cells_set.insert(index);
362 unique_cells.insert(index);
369 PHX::View<panzer::GlobalOrdinal*> ghstd_cells(
"ghstd_cells",ghstd_cells_set.size());
370 auto ghstd_cells_h = Kokkos::create_mirror_view(ghstd_cells);
371 for(
auto global_cell_index : ghstd_cells_set) {
372 ghstd_cells_h(indx) = global_cell_index;
377 Kokkos::deep_copy(ghstd_cells, ghstd_cells_h);
383 namespace partitioning_utilities
389 const std::vector<panzer::LocalOrdinal> & owned_parent_cells,
392 using GO = panzer::GlobalOrdinal;
393 using LO = panzer::LocalOrdinal;
395 PANZER_FUNC_TIME_MONITOR_DIFF(
"panzer::partitioning_utilities::setupSubLocalMeshInfo",setupSLMI);
409 const int num_owned_cells = owned_parent_cells.size();
410 TEUCHOS_TEST_FOR_EXCEPT_MSG(num_owned_cells == 0,
"panzer::partitioning_utilities::setupSubLocalMeshInfo : Input parent subcells must exist (owned_parent_cells)");
413 TEUCHOS_TEST_FOR_EXCEPT_MSG(num_parent_owned_cells <= 0,
"panzer::partitioning_utilities::setupSubLocalMeshInfo : Input parent info must contain owned cells");
421 const int num_faces_per_cell = parent_info.
cell_to_faces.extent(1);
425 std::vector<LO> ghstd_parent_cells;
426 std::vector<LO> virtual_parent_cells;
428 PANZER_FUNC_TIME_MONITOR_DIFF(
"Construct parent cell vector",ParentCell);
431 std::unordered_set<LO> owned_parent_cells_set(owned_parent_cells.begin(), owned_parent_cells.end());
438 const int virtual_parent_cell_offset = num_parent_owned_cells + num_parent_ghstd_cells;
440 std::unordered_set<LO> ghstd_parent_cells_set;
441 std::unordered_set<LO> virtual_parent_cells_set;
442 auto cell_to_faces_h = Kokkos::create_mirror_view(parent_info.
cell_to_faces);
443 auto face_to_cells_h = Kokkos::create_mirror_view(parent_info.
face_to_cells);
444 Kokkos::deep_copy(cell_to_faces_h, parent_info.
cell_to_faces);
445 Kokkos::deep_copy(face_to_cells_h, parent_info.
face_to_cells);
446 for(
int i=0;i<num_owned_cells;++i){
447 const LO parent_cell_index = owned_parent_cells[i];
448 for(
int local_face_index=0;local_face_index<num_faces_per_cell;++local_face_index){
449 const LO parent_face = cell_to_faces_h(parent_cell_index, local_face_index);
457 const LO neighbor_parent_side = (face_to_cells_h(parent_face,0) == parent_cell_index) ? 1 : 0;
460 const LO neighbor_parent_cell = face_to_cells_h(parent_face, neighbor_parent_side);
466 if(neighbor_parent_cell >= virtual_parent_cell_offset){
467 virtual_parent_cells_set.insert(neighbor_parent_cell);
468 }
else if(neighbor_parent_cell >= num_parent_owned_cells){
471 ghstd_parent_cells_set.insert(neighbor_parent_cell);
475 if(owned_parent_cells_set.find(neighbor_parent_cell) == owned_parent_cells_set.end()){
477 ghstd_parent_cells_set.insert(neighbor_parent_cell);
486 ghstd_parent_cells.assign(ghstd_parent_cells_set.begin(), ghstd_parent_cells_set.end());
487 virtual_parent_cells.assign(virtual_parent_cells_set.begin(), virtual_parent_cells_set.end());
491 const int num_ghstd_cells = ghstd_parent_cells.size();
492 const int num_virtual_cells = virtual_parent_cells.size();
493 const int num_real_cells = num_owned_cells + num_ghstd_cells;
494 const int num_total_cells = num_real_cells + num_virtual_cells;
496 std::vector<std::pair<LO, LO> > all_parent_cells(num_total_cells);
497 for (std::size_t i=0; i< owned_parent_cells.size(); ++i)
498 all_parent_cells[i] = std::pair<LO, LO>(owned_parent_cells[i], i);
500 for (std::size_t i=0; i< ghstd_parent_cells.size(); ++i) {
501 LO insert = owned_parent_cells.size()+i;
502 all_parent_cells[insert] = std::pair<LO, LO>(ghstd_parent_cells[i], insert);
505 for (std::size_t i=0; i< virtual_parent_cells.size(); ++i) {
506 LO insert = owned_parent_cells.size()+ ghstd_parent_cells.size()+i;
507 all_parent_cells[insert] = std::pair<LO, LO>(virtual_parent_cells[i], insert);
521 const int num_nodes_per_cell = parent_info.
cell_nodes.extent(1);
522 const int num_dims = parent_info.
cell_nodes.extent(2);
525 sub_info.
global_cells = PHX::View<GO*>(
"global_cells", num_total_cells);
526 sub_info.
local_cells = PHX::View<LO*>(
"local_cells", num_total_cells);
527 sub_info.
cell_nodes = PHX::View<double***>(
"cell_nodes", num_total_cells, num_nodes_per_cell, num_dims);
528 auto global_cells_h = Kokkos::create_mirror_view(sub_info.
global_cells);
529 auto local_cells_h = Kokkos::create_mirror_view(sub_info.
local_cells);
530 auto cell_nodes_h = Kokkos::create_mirror_view(sub_info.
cell_nodes);
531 auto p_global_cells_h = Kokkos::create_mirror_view(parent_info.
global_cells);
532 auto p_local_cells_h = Kokkos::create_mirror_view(parent_info.
local_cells);
533 auto p_cell_nodes_h = Kokkos::create_mirror_view(parent_info.
cell_nodes);
534 Kokkos::deep_copy(p_global_cells_h,parent_info.
global_cells);
535 Kokkos::deep_copy(p_local_cells_h,parent_info.
local_cells);
536 Kokkos::deep_copy(p_cell_nodes_h,parent_info.
cell_nodes);
538 for (
int cell=0; cell<num_total_cells; ++cell) {
539 const LO parent_cell = all_parent_cells[cell].first;
540 global_cells_h(cell) = p_global_cells_h(parent_cell);
541 local_cells_h(cell) = p_local_cells_h(parent_cell);
542 for(
int node=0;node<num_nodes_per_cell;++node){
543 for(
int dim=0;dim<num_dims;++dim){
544 cell_nodes_h(cell,node,dim) = p_cell_nodes_h(parent_cell,node,dim);
548 Kokkos::deep_copy(sub_info.
global_cells, global_cells_h);
549 Kokkos::deep_copy(sub_info.
local_cells, local_cells_h);
550 Kokkos::deep_copy(sub_info.
cell_nodes, cell_nodes_h);
558 face_t(LO c0, LO c1, LO sc0, LO sc1)
573 std::vector<face_t> faces;
575 PANZER_FUNC_TIME_MONITOR_DIFF(
"Create faces",CreateFaces);
577 std::unordered_map<LO,std::unordered_map<LO, std::pair<LO,LO> > > faces_set;
579 std::sort(all_parent_cells.begin(), all_parent_cells.end());
581 auto cell_to_faces_h = Kokkos::create_mirror_view(parent_info.
cell_to_faces);
582 auto face_to_cells_h = Kokkos::create_mirror_view(parent_info.
face_to_cells);
583 auto face_to_lidx_h = Kokkos::create_mirror_view(parent_info.
face_to_lidx);
584 Kokkos::deep_copy(cell_to_faces_h, parent_info.
cell_to_faces);
585 Kokkos::deep_copy(face_to_cells_h, parent_info.
face_to_cells);
586 Kokkos::deep_copy(face_to_lidx_h, parent_info.
face_to_lidx);
587 for(
int owned_cell=0;owned_cell<num_owned_cells;++owned_cell){
588 const LO owned_parent_cell = owned_parent_cells[owned_cell];
589 for(
int local_face=0;local_face<num_faces_per_cell;++local_face){
590 const LO parent_face = cell_to_faces_h(owned_parent_cell,local_face);
597 const LO neighbor_side = (face_to_cells_h(parent_face,0) == owned_parent_cell) ? 1 : 0;
599 const LO neighbor_parent_cell = face_to_cells_h(parent_face, neighbor_side);
600 const LO neighbor_subcell_index = face_to_lidx_h(parent_face, neighbor_side);
603 std::pair<LO, LO> search_point(neighbor_parent_cell, 0);
604 auto itr = std::lower_bound(all_parent_cells.begin(), all_parent_cells.end(), search_point);
606 TEUCHOS_TEST_FOR_EXCEPT_MSG(itr == all_parent_cells.end(),
"panzer_stk::setupSubLocalMeshInfo : Neighbor cell was not found in owned, ghosted, or virtual cells");
608 const LO neighbor_cell = itr->second;
610 LO cell_0, cell_1, subcell_index_0, subcell_index_1;
611 if(owned_cell < neighbor_cell){
613 subcell_index_0 = local_face;
614 cell_1 = neighbor_cell;
615 subcell_index_1 = neighbor_subcell_index;
618 subcell_index_1 = local_face;
619 cell_0 = neighbor_cell;
620 subcell_index_0 = neighbor_subcell_index;
624 faces_set[cell_0][subcell_index_0] = std::pair<LO,LO>(cell_1, subcell_index_1);
628 for(
const auto & cell_pair : faces_set){
629 const LO cell_0 = cell_pair.first;
630 for(
const auto & subcell_pair : cell_pair.second){
631 const LO subcell_index_0 = subcell_pair.first;
632 const LO cell_1 = subcell_pair.second.first;
633 const LO subcell_index_1 = subcell_pair.second.second;
634 faces.push_back(face_t(cell_0,cell_1,subcell_index_0,subcell_index_1));
639 const int num_faces = faces.size();
641 sub_info.
face_to_cells = PHX::View<LO*[2]>(
"face_to_cells", num_faces);
642 sub_info.
face_to_lidx = PHX::View<LO*[2]>(
"face_to_lidx", num_faces);
643 sub_info.
cell_to_faces = PHX::View<LO**>(
"cell_to_faces", num_total_cells, num_faces_per_cell);
644 auto cell_to_faces_h = Kokkos::create_mirror_view(sub_info.
cell_to_faces);
645 auto face_to_cells_h = Kokkos::create_mirror_view(sub_info.
face_to_cells);
646 auto face_to_lidx_h = Kokkos::create_mirror_view(sub_info.
face_to_lidx);
650 Kokkos::deep_copy(cell_to_faces_h, -1);
652 for(
int face_index=0;face_index<num_faces;++face_index){
653 const face_t & face = faces[face_index];
655 face_to_cells_h(face_index,0) = face.cell_0;
656 face_to_cells_h(face_index,1) = face.cell_1;
658 cell_to_faces_h(face.cell_0,face.subcell_index_0) = face_index;
659 cell_to_faces_h(face.cell_1,face.subcell_index_1) = face_index;
661 face_to_lidx_h(face_index,0) = face.subcell_index_0;
662 face_to_lidx_h(face_index,1) = face.subcell_index_1;
667 Kokkos::deep_copy(sub_info.
face_to_lidx, face_to_lidx_h);
674 const int splitting_size,
675 std::vector<panzer::LocalMeshPartition> & partitions)
678 using LO = panzer::LocalOrdinal;
687 std::vector<LO> partition_cells;
688 partition_cells.resize(base_partition_size);
694 LO partition_size = base_partition_size;
702 if(partition_size != base_partition_size)
703 partition_cells.resize(partition_size);
706 for(LO i=0; i<partition_size; ++i)
707 partition_cells[i] = cell_count+i;
716 cell_count += partition_size;
726 std::vector<panzer::LocalMeshPartition> & partitions)
735 const std::string & element_block_name = description.
getElementBlock();
743 const auto & sideset_map = mesh_info.
sidesets.at(element_block_name);
745 const std::string & sideset_name = description.
getSideset();
748 if(sideset_map.find(sideset_name) == sideset_map.end())
756 for(
auto & partition : partitions){
757 partition.sideset_name = sideset_name;
758 partition.element_block_name = element_block_name;
760 partition.has_connectivity =
true;
783 for(
auto & partition : partitions){
784 partition.element_block_name = element_block_name;
786 partition.has_connectivity =
true;
796 PHX::View<panzer::GlobalOrdinal*> & owned_cells,
797 PHX::View<panzer::GlobalOrdinal*> & ghost_cells,
798 PHX::View<panzer::GlobalOrdinal*> & virtual_cells)
804 PHX::View<panzer::GlobalOrdinal**> owned_cell_to_nodes;
805 buildCellToNodes(conn, owned_cell_to_nodes);
808 buildCellGlobalIDs(conn, owned_cells);
811 ghost_cells = buildGhostedCellOneRing(comm,owned_cells,owned_cell_to_nodes);
818 faceToElement->initialize(conn, comm);
819 auto elems_by_face = faceToElement->getFaceToElementsMap();
820 auto face_to_lidx = faceToElement->getFaceToCellLocalIdxMap();
822 const panzer::LocalOrdinal num_owned_cells = owned_cells.extent(0);
833 std::vector<int> all_boundary_faces;
834 const int num_faces = elems_by_face.extent(0);
835 auto elems_by_face_h = Kokkos::create_mirror_view(elems_by_face);
836 Kokkos::deep_copy(elems_by_face_h, elems_by_face);
837 for(
int face=0;face<num_faces;++face)
838 if(elems_by_face_h(face,0) < 0 or elems_by_face_h(face,1) < 0)
839 all_boundary_faces.push_back(face);
840 const panzer::LocalOrdinal num_virtual_cells = all_boundary_faces.size();
844 virtual_cells = PHX::View<panzer::GlobalOrdinal*>(
"virtual_cells",num_virtual_cells);
845 auto virtual_cells_h = Kokkos::create_mirror_view(virtual_cells);
847 PANZER_FUNC_TIME_MONITOR_DIFF(
"Initial global index creation",InitialGlobalIndexCreation);
849 const int num_ranks = comm->getSize();
850 const int rank = comm->getRank();
852 std::vector<panzer::GlobalOrdinal> owned_cell_distribution(num_ranks,0);
854 std::vector<panzer::GlobalOrdinal> my_owned_cell_distribution(num_ranks,0);
855 my_owned_cell_distribution[rank] = num_owned_cells;
857 Teuchos::reduceAll(*comm,
Teuchos::REDUCE_SUM, num_ranks, my_owned_cell_distribution.data(),owned_cell_distribution.data());
860 std::vector<panzer::GlobalOrdinal> virtual_cell_distribution(num_ranks,0);
862 std::vector<panzer::GlobalOrdinal> my_virtual_cell_distribution(num_ranks,0);
863 my_virtual_cell_distribution[rank] = num_virtual_cells;
865 Teuchos::reduceAll(*comm,
Teuchos::REDUCE_SUM, num_ranks, my_virtual_cell_distribution.data(),virtual_cell_distribution.data());
868 panzer::GlobalOrdinal num_global_real_cells=0;
869 for(
int i=0;i<num_ranks;++i){
870 num_global_real_cells+=owned_cell_distribution[i];
873 panzer::GlobalOrdinal global_virtual_start_idx = num_global_real_cells;
874 for(
int i=0;i<rank;++i){
875 global_virtual_start_idx += virtual_cell_distribution[i];
878 for(
int i=0;i<num_virtual_cells;++i){
879 virtual_cells_h(i) = global_virtual_start_idx + panzer::GlobalOrdinal(i);
882 Kokkos::deep_copy(virtual_cells, virtual_cells_h);
Backwards compatibility mode that ignores the worksetSize in the WorksetDescriptor.
std::map< std::string, std::map< std::string, LocalMeshSidesetInfo > > sidesets
const std::string & getSideset(const int block=0) const
Get sideset name.
Teuchos::RCP< const shards::CellTopology > cell_topology
PHX::View< panzer::LocalOrdinal * > local_cells
void fillLocalCellIDs(const Teuchos::RCP< const Teuchos::Comm< int >> &comm, panzer::ConnManager &conn, PHX::View< panzer::GlobalOrdinal * > &owned_cells, PHX::View< panzer::GlobalOrdinal * > &ghost_cells, PHX::View< panzer::GlobalOrdinal * > &virtual_cells)
Get the owned, ghost and virtual global cell ids for this process.
const std::string & getElementBlock(const int block=0) const
Get element block name.
void generateLocalMeshPartitions(const panzer::LocalMeshInfo &mesh_info, const panzer::WorksetDescriptor &description, std::vector< panzer::LocalMeshPartition > &partitions)
virtual LocalOrdinal getConnectivitySize(LocalOrdinal localElmtId) const =0
PHX::View< panzer::LocalOrdinal *[2]> face_to_cells
bool useSideset() const
This descriptor is for a side set.
panzer::LocalOrdinal num_owned_cells
panzer::LocalOrdinal num_virtual_cells
Teuchos::RCP< const shards::CellTopology > cell_topology
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
#define TEUCHOS_TEST_FOR_EXCEPT_MSG(throw_exception_test, msg)
virtual const std::vector< LocalOrdinal > & getElementBlock(const std::string &blockID) const =0
PHX::View< panzer::LocalOrdinal *[2]> face_to_lidx
virtual void getElementBlockIds(std::vector< std::string > &elementBlockIds) const =0
Pure virtual base class for supplying mesh connectivity information to the DOF Manager.
virtual void getElementBlockTopologies(std::vector< shards::CellTopology > &elementBlockTopologies) const =0
panzer::LocalOrdinal num_ghstd_cells
std::map< std::string, LocalMeshBlockInfo > element_blocks
void splitMeshInfo(const panzer::LocalMeshInfoBase &mesh_info, const int splitting_size, std::vector< panzer::LocalMeshPartition > &partitions)
PHX::View< double *** > cell_nodes
#define TEUCHOS_ASSERT(assertion_test)
int getWorksetSize() const
Get the requested workset size (default -2 (workset size is set elsewhere), -1 (largest possible work...
void setupSubLocalMeshInfo(const panzer::LocalMeshInfoBase &parent_info, const std::vector< panzer::LocalOrdinal > &owned_parent_cells, panzer::LocalMeshInfoBase &sub_info)
bool requiresPartitioning() const
Do we need to partition the local mesh prior to generating worksets.
PHX::View< panzer::GlobalOrdinal * > global_cells
virtual void buildConnectivity(const FieldPattern &fp)=0
Workset size is set to the total number of local elements in the MPI process.
PHX::View< panzer::LocalOrdinal ** > cell_to_faces
virtual const GlobalOrdinal * getConnectivity(LocalOrdinal localElmtId) const =0