11#ifndef PANZER_SUBCELL_CONNECTIVITY_HPP
12#define PANZER_SUBCELL_CONNECTIVITY_HPP
14#include "PanzerCore_config.hpp"
15#include "Phalanx_KokkosDeviceTypes.hpp"
16#include "Teuchos_Assert.hpp"
20struct LocalMeshPartition;
37 KOKKOS_INLINE_FUNCTION
45 KOKKOS_INLINE_FUNCTION
57 KOKKOS_INLINE_FUNCTION
73 KOKKOS_INLINE_FUNCTION
92 KOKKOS_INLINE_FUNCTION
93 int subcellForCell(
const int cell,
const int local_subcell_index)
const;
111 KOKKOS_INLINE_FUNCTION
112 int cellForSubcell(
const int subcell,
const int local_cell_index)
const;
126 KOKKOS_INLINE_FUNCTION
184PHALANX_HIP_HACK_KOKKOS_FUNCTION
190 KOKKOS_ASSERT(cell >= 0 and cell <
numCells());
200 KOKKOS_ASSERT(cell >= 0 and cell <
numCells());
205PHALANX_HIP_HACK_KOKKOS_FUNCTION
211 KOKKOS_ASSERT(subcell >= 0 and subcell <
numSubcells());
221 KOKKOS_ASSERT(subcell >= 0 and subcell <
numSubcells());
226PHALANX_HIP_HACK_KOKKOS_FUNCTION
229subcellForCell(
const int cell,
const int local_subcell_index)
const
232 KOKKOS_ASSERT(cell >= 0 and cell <
numCells());
244 KOKKOS_ASSERT(cell >= 0 and cell <
numCells());
251PHALANX_HIP_HACK_KOKKOS_FUNCTION
254cellForSubcell(
const int subcell,
const int local_cell_index)
const
257 KOKKOS_ASSERT(subcell >= 0 and subcell <
numSubcells());
269 KOKKOS_ASSERT(subcell >= 0 and subcell <
numSubcells());
276PHALANX_HIP_HACK_KOKKOS_FUNCTION
282 KOKKOS_ASSERT(subcell >= 0 and subcell <
numSubcells());
294 KOKKOS_ASSERT(subcell >= 0 and subcell <
numSubcells());
Generates a SubcellConnectivity associated with faces and cells given a partition of the local mesh.
void setup(const panzer::LocalMeshPartition &partition)
Setup the face connectivity from a partition of the local mesh.
FaceConnectivity()=default
Default constructor.
~FaceConnectivity()=default
Default destructor.
PHX::View< int * >::host_mirror_type _subcell_to_cells_adj_host
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.
int numSubcellsOnCellHost(const int cell) const
PHX::View< int * > _subcell_to_cells_adj
Adjacency array for indexing into subcell_to_cells array.
KOKKOS_INLINE_FUNCTION int numSubcellsOnCell(const int cell) const
gives number of subcells (e.g. faces) found on a given cell
~SubcellConnectivity()=default
Default destructor.
PHX::View< int * > _subcell_to_cells
Mapping from subcells to cells.
KOKKOS_INLINE_FUNCTION int numCellsOnSubcell(const int subcell) const
Returns the number of cells attached to a given subcell.
PHX::View< int * >::host_mirror_type _cell_to_subcells_host
SubcellConnectivity()=default
Default constructor.
PHX::View< int * >::host_mirror_type _subcell_to_cells_host
PHX::View< int * > _cell_to_subcells
Mapping from cells to subcells.
PHX::View< int * > _cell_to_subcells_adj
Adjacency array for indexing into cell_to_subcells array.
int numCellsOnSubcellHost(const int subcell) const
KOKKOS_INLINE_FUNCTION int numCells() const
Gives number of cells in connectivity.
PHX::View< int * >::host_mirror_type _subcell_to_local_subcells_host
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.
int localSubcellForSubcellHost(const int subcell, const int local_cell_index) const
PHX::View< int * >::host_mirror_type _cell_to_subcells_adj_host
int cellForSubcellHost(const int subcell, const int local_cell_index) const
KOKKOS_INLINE_FUNCTION int numSubcells() const
Gives number of subcells (e.g. faces) in connectivity.
int subcellForCellHost(const int cell, const int local_subcell_index) const
PHX::View< int * > _subcell_to_local_subcells
Mapping from subcell indexes to local subcell indexes.
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.