GEOS
ProppantBaseKernels.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 
19 #ifndef GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASE_PROPPANTBASEKERNELS_HPP_
20 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASE_PROPPANTBASEKERNELS_HPP_
21 
22 #include "common/DataTypes.hpp"
23 #include "common/GEOS_RAJA_Interface.hpp"
24 
25 namespace geos
26 {
27 
28 namespace singlePhaseProppantBaseKernels
29 {
30 
31 /******************************** FluidUpdateKernel ********************************/
32 
34 {
35  template< typename FLUID_WRAPPER >
36  static void launch( FLUID_WRAPPER const & fluidWrapper,
37  arrayView1d< real64 const > const & pres,
38  arrayView1d< real64 const > const & proppantConcentration,
39  arrayView2d< real64 const > const & componentConcentration,
40  arrayView2d< real64 const > const & cellBasedFlux,
41  arrayView1d< integer const > const & isProppantBoundaryElement )
42  {
43  forAll< parallelDevicePolicy<> >( fluidWrapper.numElems(), [=] GEOS_HOST_DEVICE ( localIndex const a )
44  {
45 
46  for( localIndex q = 0; q < fluidWrapper.numGauss(); ++q )
47  {
48 
49  fluidWrapper.update( a, q,
50  pres[a],
51  proppantConcentration[a],
52  componentConcentration[a],
53  LvArray::tensorOps::l2Norm< 3 >( cellBasedFlux[a] ),
54  isProppantBoundaryElement[a] );
55  }
56  } );
57  }
58 };
59 
60 } // namespace singlePhaseProppantBaseKernels
61 
62 } //namespace geos
63 
64 #endif //GEOS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASE_PROPPANTBASEKERNELS_HPP_
#define GEOS_HOST_DEVICE
Marks a host-device function.
Definition: GeosxMacros.hpp:49
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:180
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
Definition: DataTypes.hpp:85
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Definition: DataTypes.hpp:196