GEOS
ProppantFluxKernels.hpp
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 TotalEnergies
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
20 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASEPROPPANTFLUXKERNELS_HPP
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASEPROPPANTFLUXKERNELS_HPP
22 
23 #include "common/DataTypes.hpp"
26 
27 namespace geos
28 {
29 
30 namespace singlePhaseProppantFluxKernels
31 {
32 
33 /******************************** FaceElementFluxKernel ********************************/
34 
36 {
44  template< typename VIEWTYPE >
46 
47 
67  static void
68  launch( SurfaceElementStencilWrapper const & stencilWrapper,
69  real64 const dt,
70  globalIndex const rankOffset,
71  ElementViewConst< arrayView1d< globalIndex const > > const & pressureDofNumber,
76  ElementViewConst< arrayView2d< real64 const > > const & dDens_dPres,
78  ElementViewConst< arrayView1d< real64 const > > const & dMob_dPres,
79  ElementViewConst< arrayView3d< real64 const > > const & permeability,
80  ElementViewConst< arrayView3d< real64 const > > const & dPerm_dPres,
81  ElementViewConst< arrayView4d< real64 const > > const & dPerm_dDispJump,
82  ElementViewConst< arrayView3d< real64 const > > const & permeabilityMultiplier,
83  R1Tensor const & gravityVector,
85  arrayView1d< real64 > const & localRhs );
86 
87 
93  template< localIndex MAX_NUM_CONNECTIONS >
95  static void
96  compute( localIndex const numFluxElems,
100  real64 const (&transmissibility)[MAX_NUM_CONNECTIONS][2],
101  real64 const (&dTrans_dPres)[MAX_NUM_CONNECTIONS][2],
102  real64 const (&dTrans_dDispJump)[MAX_NUM_CONNECTIONS][2][3],
104  ElementViewConst< arrayView1d< real64 const > > const & gravCoef,
106  ElementViewConst< arrayView2d< real64 const > > const & dDens_dPres,
108  ElementViewConst< arrayView1d< real64 const > > const & dMob_dPres,
109  real64 const dt,
110  arraySlice1d< real64 > const & flux,
111  arraySlice2d< real64 > const & fluxJacobian,
112  arraySlice2d< real64 > const & dFlux_dAperture );
113 };
114 
115 
116 } // namespace singlePhaseProppantFluxKernels
117 
118 } // namespace geos
119 
120 #endif //GEOS_PHYSICSSOLVERS_MULTIPHYSICS_SINGLEPHASEPROPPANTFLUXKERNELS_HPP
#define GEOS_HOST_DEVICE
Marks a host-device function.
Definition: GeosxMacros.hpp:49
typename ElementViewAccessor< VIEWTYPE >::NestedViewTypeConst ElementViewConst
The ElementViewAccessor at the ElementRegionManager level is the type resulting from ElementViewAcces...
Provides access to the SurfaceElementStencil that may be called from a kernel function.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:180
LvArray::CRSMatrixView< T, COL_INDEX, localIndex const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
Definition: DataTypes.hpp:310
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
Definition: DataTypes.hpp:88
ArraySlice< T, 2, USD > arraySlice2d
Alias for 2D array slice.
Definition: DataTypes.hpp:200
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
Definition: DataTypes.hpp:85
ArraySlice< T, 1, USD > arraySlice1d
Alias for 1D array slice.
Definition: DataTypes.hpp:184
ArrayView< T, 4, USD > arrayView4d
Alias for 4D array view.
Definition: DataTypes.hpp:228
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Definition: DataTypes.hpp:196
ArrayView< T, 3, USD > arrayView3d
Alias for 3D array view.
Definition: DataTypes.hpp:212
static void launch(SurfaceElementStencilWrapper const &stencilWrapper, real64 const dt, globalIndex const rankOffset, ElementViewConst< arrayView1d< globalIndex const > > const &pressureDofNumber, ElementViewConst< arrayView1d< integer const > > const &ghostRank, ElementViewConst< arrayView1d< real64 const > > const &pres, ElementViewConst< arrayView1d< real64 const > > const &gravCoef, ElementViewConst< arrayView2d< real64 const > > const &dens, ElementViewConst< arrayView2d< real64 const > > const &dDens_dPres, ElementViewConst< arrayView1d< real64 const > > const &mob, ElementViewConst< arrayView1d< real64 const > > const &dMob_dPres, ElementViewConst< arrayView3d< real64 const > > const &permeability, ElementViewConst< arrayView3d< real64 const > > const &dPerm_dPres, ElementViewConst< arrayView4d< real64 const > > const &dPerm_dDispJump, ElementViewConst< arrayView3d< real64 const > > const &permeabilityMultiplier, R1Tensor const &gravityVector, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)
launches the kernel to assemble the flux contributions to the linear system.
ElementRegionManager::ElementViewConst< VIEWTYPE > ElementViewConst
The type for element-based non-constitutive data parameters. Consists entirely of ArrayView's.
static GEOS_HOST_DEVICE void compute(localIndex const numFluxElems, arraySlice1d< localIndex const > const &seri, arraySlice1d< localIndex const > const &sesri, arraySlice1d< localIndex const > const &sei, real64 const (&transmissibility)[MAX_NUM_CONNECTIONS][2], real64 const (&dTrans_dPres)[MAX_NUM_CONNECTIONS][2], real64 const (&dTrans_dDispJump)[MAX_NUM_CONNECTIONS][2][3], ElementViewConst< arrayView1d< real64 const > > const &pres, ElementViewConst< arrayView1d< real64 const > > const &gravCoef, ElementViewConst< arrayView2d< real64 const > > const &dens, ElementViewConst< arrayView2d< real64 const > > const &dDens_dPres, ElementViewConst< arrayView1d< real64 const > > const &mob, ElementViewConst< arrayView1d< real64 const > > const &dMob_dPres, real64 const dt, arraySlice1d< real64 > const &flux, arraySlice2d< real64 > const &fluxJacobian, arraySlice2d< real64 > const &dFlux_dAperture)
Compute flux and its derivatives for a given tpfa connector.