44 #ifndef PANZER_SUBCELL_CONNECTIVITY_HPP
45 #define PANZER_SUBCELL_CONNECTIVITY_HPP
47 #include "PanzerCore_config.hpp"
48 #include "Phalanx_KokkosDeviceTypes.hpp"
49 #include "Teuchos_Assert.hpp"
53 struct LocalMeshPartition;
70 KOKKOS_INLINE_FUNCTION
78 KOKKOS_INLINE_FUNCTION
90 KOKKOS_INLINE_FUNCTION
106 KOKKOS_INLINE_FUNCTION
125 KOKKOS_INLINE_FUNCTION
126 int subcellForCell(
const int cell,
const int local_subcell_index)
const;
144 KOKKOS_INLINE_FUNCTION
145 int cellForSubcell(
const int subcell,
const int local_cell_index)
const;
159 KOKKOS_INLINE_FUNCTION
217 PHALANX_HIP_HACK_KOKKOS_FUNCTION
223 KOKKOS_ASSERT(cell >= 0 and cell <
numCells());
233 KOKKOS_ASSERT(cell >= 0 and cell <
numCells());
238 PHALANX_HIP_HACK_KOKKOS_FUNCTION
244 KOKKOS_ASSERT(subcell >= 0 and subcell <
numSubcells());
254 KOKKOS_ASSERT(subcell >= 0 and subcell <
numSubcells());
259 PHALANX_HIP_HACK_KOKKOS_FUNCTION
265 KOKKOS_ASSERT(cell >= 0 and cell <
numCells());
277 KOKKOS_ASSERT(cell >= 0 and cell <
numCells());
284 PHALANX_HIP_HACK_KOKKOS_FUNCTION
290 KOKKOS_ASSERT(subcell >= 0 and subcell <
numSubcells());
302 KOKKOS_ASSERT(subcell >= 0 and subcell <
numSubcells());
309 PHALANX_HIP_HACK_KOKKOS_FUNCTION
315 KOKKOS_ASSERT(subcell >= 0 and subcell <
numSubcells());
327 KOKKOS_ASSERT(subcell >= 0 and subcell <
numSubcells());
KOKKOS_INLINE_FUNCTION int cellForSubcell(const int subcell, const int local_cell_index) const
Get the cell for a given subcell and a local_cell_index.
int numSubcellsOnCellHost(const int cell) const
PHX::View< int * >::HostMirror _subcell_to_cells_adj_host
~SubcellConnectivity()=default
Default destructor.
KOKKOS_INLINE_FUNCTION int numCellsOnSubcell(const int subcell) const
Returns the number of cells attached to a given subcell.
FaceConnectivity()=default
Default constructor.
KOKKOS_INLINE_FUNCTION int localSubcellForSubcell(const int subcell, const int local_cell_index) const
Get the local subcell index given a subcell and a local cell index.
KOKKOS_INLINE_FUNCTION int numSubcellsOnCell(const int cell) const
gives number of subcells (e.g. faces) found on a given cell
PHX::View< int * >::HostMirror _subcell_to_local_subcells_host
Generates a SubcellConnectivity associated with faces and cells given a partition of the local mesh...
PHX::View< int * >::HostMirror _cell_to_subcells_adj_host
KOKKOS_INLINE_FUNCTION int numCells() const
Gives number of cells in connectivity.
PHX::View< int * > _subcell_to_local_subcells
Mapping from subcell indexes to local subcell indexes.
int cellForSubcellHost(const int subcell, const int local_cell_index) const
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.
KOKKOS_INLINE_FUNCTION int numSubcells() const
Gives number of subcells (e.g. faces) in connectivity.
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
int subcellForCellHost(const int cell, const int local_subcell_index) const
~FaceConnectivity()=default
Default destructor.
PHX::View< int * > _subcell_to_cells
Mapping from subcells to cells.
int numCellsOnSubcellHost(const int subcell) const
int localSubcellForSubcellHost(const int subcell, const int local_cell_index) const
SubcellConnectivity()=default
Default constructor.
KOKKOS_INLINE_FUNCTION int subcellForCell(const int cell, const int local_subcell_index) const
Get the subcell index for a given cell and local subcell index.