20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_HYBRIDFVMHELPERKERNELS_HPP
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_HYBRIDFVMHELPERKERNELS_HPP
28 namespace hybridFVMKernels
39 isNeighborFound(
localIndex const (&localIds)[3],
48 neighborIds[0] = localIds[0];
49 neighborIds[1] = localIds[1];
50 neighborIds[2] = localIds[2];
56 for(
localIndex k=0; k<elemRegionList.size( 1 ); ++k )
59 localIndex const erNeighbor = elemRegionList[elemToFaces[ifaceLoc]][k];
60 localIndex const esrNeighbor = elemSubRegionList[elemToFaces[ifaceLoc]][k];
61 localIndex const eiNeighbor = elemList[elemToFaces[ifaceLoc]][k];
65 if( erNeighbor != localIds[0] || esrNeighbor != localIds[1] || eiNeighbor != localIds[2] )
67 bool const onBoundary = (erNeighbor == -1 || esrNeighbor == -1 || eiNeighbor == -1);
68 bool const neighborInTarget = regionFilter.contains( erNeighbor );
71 if( !onBoundary && neighborInTarget )
73 neighborIds[0] = erNeighbor;
74 neighborIds[1] = esrNeighbor;
75 neighborIds[2] = eiNeighbor;
80 return !( localIds[0] == neighborIds[0] &&
81 localIds[1] == neighborIds[1] &&
82 localIds[2] == neighborIds[2] );
#define GEOS_HOST_DEVICE
Marks a host-device function.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
ArraySlice< T, 1, USD > arraySlice1d
Alias for 1D array slice.
LvArray::SortedArrayView< T, localIndex, LvArray::ChaiBuffer > SortedArrayView
A sorted array view of local indices.
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.