23 const int num_faces_per_cell = partition.
cell_to_faces.extent(1);
24 const int num_cells_per_face = 2;
27 _subcell_to_cells = PHX::View<int*>(
"subcell_to_cells", num_faces*num_cells_per_face);
30 _cell_to_subcells = PHX::View<int*>(
"cell_to_subcells", num_cells*num_faces_per_cell);
34 _subcell_to_cells_host = PHX::View<int*>::HostMirror(
"subcell_to_cells_host", num_faces*num_cells_per_face);
37 _cell_to_subcells_host = PHX::View<int*>::HostMirror(
"cell_to_subcells_host", num_cells*num_faces_per_cell);
48 Kokkos::parallel_for(
"subcell connectivity 0",num_faces,KOKKOS_LAMBDA (
const int face) {
49 subcell_to_cells_adj(face+1) = (face * num_cells_per_face) + num_cells_per_face;
50 subcell_to_cells(num_cells_per_face*face + 0) = face_to_cells(face,0);
51 subcell_to_cells(num_cells_per_face*face + 1) = face_to_cells(face,1);
52 subcell_to_local_subcells(num_cells_per_face*face + 0) = face_to_lidx(face,0);
53 subcell_to_local_subcells(num_cells_per_face*face + 1) = face_to_lidx(face,1);
55 PHX::Device::execution_space().fence();
65 Kokkos::parallel_for(
"subcell connectivity 1",num_cells,KOKKOS_LAMBDA (
const int cell) {
66 cell_to_subcells_adj(cell+1) = (cell * num_faces_per_cell) + num_faces_per_cell;
67 for(
int local_face=0;local_face<num_faces_per_cell;++local_face){
68 cell_to_subcells(num_faces_per_cell*cell+local_face) = cell_to_faces(cell,local_face);
71 PHX::Device::execution_space().fence();
PHX::View< int * >::HostMirror _subcell_to_cells_adj_host
PHX::View< int * >::HostMirror _subcell_to_local_subcells_host
PHX::View< panzer::LocalOrdinal *[2]> face_to_cells
PHX::View< int * >::HostMirror _cell_to_subcells_adj_host
PHX::View< int * > _subcell_to_local_subcells
Mapping from subcell indexes to local subcell indexes.
PHX::View< panzer::LocalOrdinal *[2]> face_to_lidx
PHX::View< int * >::HostMirror _subcell_to_cells_host
PHX::View< int * > _cell_to_subcells
Mapping from cells to subcells.
PHX::View< int * > _subcell_to_cells_adj
Adjacency array for indexing into subcell_to_cells array.
PHX::View< int * > _cell_to_subcells_adj
Adjacency array for indexing into cell_to_subcells array.
void setup(const panzer::LocalMeshPartition &partition)
Setup the face connectivity from a partition of the local mesh.
PHX::View< int * >::HostMirror _cell_to_subcells_host
PHX::View< int * > _subcell_to_cells
Mapping from subcells to cells.
PHX::View< panzer::LocalOrdinal ** > cell_to_faces