GEOS
ProppantTransportKernels.hpp
Go to the documentation of this file.
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 Total, S.A
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_PROPPANTTRANSPORT_PROPPANTTRANSPORTKERNELS_HPP_
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_PROPPANTTRANSPORT_PROPPANTTRANSPORTKERNELS_HPP_
22 
23 #include "common/DataTypes.hpp"
24 #include "common/GEOS_RAJA_Interface.hpp"
25 #include "constitutive/fluid/singlefluid/SingleFluidFields.hpp"
26 #include "constitutive/fluid/singlefluid/ParticleFluidBase.hpp"
27 #include "constitutive/fluid/singlefluid/ParticleFluidFields.hpp"
28 #include "constitutive/fluid/singlefluid/SlurryFluidBase.hpp"
29 #include "constitutive/fluid/singlefluid/SlurryFluidFields.hpp"
30 #include "constitutive/permeability/PermeabilityBase.hpp"
31 #include "constitutive/permeability/PermeabilityFields.hpp"
37 
38 namespace geos
39 {
40 
41 namespace proppantTransportKernels
42 {
43 /******************************** FluidUpdateKernel ********************************/
44 
46 {
47  template< typename FLUID_WRAPPER >
48  static void launch( FLUID_WRAPPER const & fluidWrapper,
49  arrayView1d< real64 const > const & pres,
50  arrayView2d< real64 const > const & componentConcentration )
51  {
52  forAll< parallelDevicePolicy<> >( fluidWrapper.numElems(), [=] GEOS_HOST_DEVICE ( localIndex const a )
53  {
54  localIndex const NC = fluidWrapper.numFluidComponents();
56 
57  for( localIndex c = 0; c < NC; ++c )
58  {
59  compConc[c] = componentConcentration[a][c];
60  }
61 
62  for( localIndex q = 0; q < fluidWrapper.numGauss(); ++q )
63  {
64  fluidWrapper.updateFluidProperty( a, q,
65  pres[a],
66  compConc,
67  0.0 );
68  }
69  } );
70  }
71 };
72 
73 /******************************** ComponentDensityUpdateKernel ********************************/
74 
76 {
77  template< typename FLUID_WRAPPER >
78  static void launch( FLUID_WRAPPER const & fluidWrapper,
79  arrayView1d< real64 const > const & pres,
80  arrayView2d< real64 const > const & componentConcentration )
81  {
82  forAll< parallelDevicePolicy<> >( fluidWrapper.numElems(), [=] GEOS_HOST_DEVICE ( localIndex const a )
83  {
84  localIndex const NC = fluidWrapper.numFluidComponents();
86 
87  for( localIndex c = 0; c < NC; ++c )
88  {
89  compConc[c] = componentConcentration[a][c];
90  }
91 
92  for( localIndex q = 0; q < fluidWrapper.numGauss(); ++q )
93  {
94  fluidWrapper.updateComponentDensity( a, q,
95  pres[a],
96  compConc );
97  }
98  } );
99  }
100 };
101 
102 /******************************** ProppantUpdateKernel ********************************/
103 
105 {
106  template< typename PROPPANT_WRAPPER >
107  static void launch( PROPPANT_WRAPPER const & proppantWrapper,
108  arrayView1d< real64 const > const & proppantConc,
109  arrayView2d< real64 const > const & fluidDens,
110  arrayView2d< real64 const > const & dFluidDens_dPres,
111  arrayView3d< real64 const > const & dFluidDens_dCompConc,
112  arrayView2d< real64 const > const & fluidVisc,
113  arrayView2d< real64 const > const & dFluidVisc_dPres,
114  arrayView3d< real64 const > const & dFluidVisc_dCompConc )
115  {
116 
117  forAll< parallelDevicePolicy<> >( proppantWrapper.numElems(), [=] GEOS_HOST_DEVICE ( localIndex const a )
118  {
119  proppantWrapper.update( a,
120  proppantConc[a],
121  fluidDens[a][0],
122  dFluidDens_dPres[a][0],
123  dFluidDens_dCompConc[a][0],
124  fluidVisc[a][0],
125  dFluidVisc_dPres[a][0],
126  dFluidVisc_dCompConc[a][0] );
127  } );
128  }
129 };
130 
131 /******************************** AccumulationKernel ********************************/
132 
134 {
136  inline
137  static
138  void
139  compute( localIndex const NC,
140  real64 const proppantConc_n,
141  real64 const proppantConcNew,
142  arraySlice1d< real64 const > const & componentDens_n,
143  arraySlice1d< real64 const > const & componentDensNew,
144  arraySlice1d< real64 const > const & GEOS_UNUSED_PARAM( dCompDens_dPres ),
145  arraySlice2d< real64 const > const & dCompDens_dCompConc,
146  real64 const volume,
147  real64 const packPoreVolume,
148  real64 const proppantLiftVolume,
149  arraySlice1d< real64 > const & localAccum,
150  arraySlice2d< real64 > const & localAccumJacobian );
151 
152  static void
153  launch( localIndex const size,
154  localIndex const NC,
155  localIndex const NDOF,
156  globalIndex const rankOffset,
157  arrayView1d< globalIndex const > const & dofNumber,
158  arrayView1d< integer const > const & elemGhostRank,
159  arrayView1d< real64 const > const & proppantConc_n,
160  arrayView1d< real64 const > const & proppantConc,
161  arrayView2d< real64 const > const & componentDens_n,
162  arrayView3d< real64 const > const & componentDens,
163  arrayView3d< real64 const > const & dCompDens_dPres,
164  arrayView4d< real64 const > const & dCompDens_dCompConc,
165  arrayView1d< real64 const > const & volume,
166  arrayView1d< real64 const > const & proppantPackVolFrac,
167  arrayView1d< real64 const > const & proppantLiftFlux,
168  real64 const dt,
169  real64 const maxProppantConcentration,
170  CRSMatrixView< real64, globalIndex const > const & localMatrix,
171  arrayView1d< real64 > const & localRhs );
172 };
173 
174 /******************************** FluxKernel ********************************/
175 
177 {
178  using FlowAccessors =
181  fields::flow::pressure,
182  fields::flow::gravityCoefficient,
183  fields::proppant::proppantConcentration,
184  fields::proppant::isProppantMobile >;
185 
187  StencilAccessors< fields::flow::pressure,
188  fields::flow::gravityCoefficient,
190 
191  using ParticleFluidAccessors =
192  StencilMaterialAccessors< constitutive::ParticleFluidBase,
193  fields::particlefluid::settlingFactor,
194  fields::particlefluid::dSettlingFactor_dPressure,
195  fields::particlefluid::dSettlingFactor_dProppantConcentration,
196  fields::particlefluid::dSettlingFactor_dComponentConcentration,
197  fields::particlefluid::collisionFactor,
198  fields::particlefluid::dCollisionFactor_dProppantConcentration >;
199 
200  using SlurryFluidAccessors =
201  StencilMaterialAccessors< constitutive::SlurryFluidBase,
202  fields::singlefluid::density,
203  fields::singlefluid::dDensity_dPressure,
204  fields::slurryfluid::dDensity_dProppantConcentration,
205  fields::slurryfluid::dDensity_dComponentConcentration,
206  fields::singlefluid::viscosity,
207  fields::singlefluid::dViscosity_dPressure,
208  fields::slurryfluid::dViscosity_dProppantConcentration,
209  fields::slurryfluid::dViscosity_dComponentConcentration,
210  fields::slurryfluid::componentDensity,
211  fields::slurryfluid::dComponentDensity_dPressure,
212  fields::slurryfluid::dComponentDensity_dComponentConcentration,
213  fields::slurryfluid::fluidDensity,
214  fields::slurryfluid::dFluidDensity_dPressure,
215  fields::slurryfluid::dFluidDensity_dComponentConcentration >;
216 
218  StencilMaterialAccessors< constitutive::SlurryFluidBase,
219  fields::singlefluid::density,
220  fields::singlefluid::viscosity >;
221 
222  using PermeabilityAccessors =
223  StencilMaterialAccessors< constitutive::PermeabilityBase,
224  fields::permeability::permeability,
225  fields::permeability::permeabilityMultiplier >;
226 
234  template< typename VIEWTYPE >
236 
237  template< typename VIEWTYPE >
238  using ElementView = typename ElementRegionManager::ElementView< VIEWTYPE >;
239 
240  static void
241  launch( SurfaceElementStencilWrapper const & stencilWrapper,
242  localIndex const numDofPerCell,
243  real64 const dt,
244  globalIndex const rankOffset,
245  integer const updateProppantPacking,
246  R1Tensor const & unitGravityVector,
248  ElementViewConst< arrayView1d< integer const > > const & ghostRank,
250  ElementViewConst< arrayView1d< real64 const > > const & proppantConc,
251  ElementViewConst< arrayView3d< real64 const > > const & componentDens,
252  ElementViewConst< arrayView3d< real64 const > > const & dComponentDens_dPres,
253  ElementViewConst< arrayView4d< real64 const > > const & dComponentDens_dComponentConc,
254  ElementViewConst< arrayView1d< real64 const > > const & gravDepth,
256  ElementViewConst< arrayView2d< real64 const > > const & dDens_dPres,
257  ElementViewConst< arrayView2d< real64 const > > const & dDens_dProppantConc,
258  ElementViewConst< arrayView3d< real64 const > > const & dDens_dComponentConc,
260  ElementViewConst< arrayView2d< real64 const > > const & dVisc_dPres,
261  ElementViewConst< arrayView2d< real64 const > > const & dVisc_dProppantConc,
262  ElementViewConst< arrayView3d< real64 const > > const & dVisc_dComponentConc,
263  ElementViewConst< arrayView2d< real64 const > > const & fluidDensity,
264  ElementViewConst< arrayView2d< real64 const > > const & dFluidDens_dPres,
265  ElementViewConst< arrayView3d< real64 const > > const & dFluidDens_dComponentConc,
266  ElementViewConst< arrayView1d< real64 const > > const & settlingFactor,
267  ElementViewConst< arrayView1d< real64 const > > const & dSettlingFactor_dPres,
268  ElementViewConst< arrayView1d< real64 const > > const & dSettlingFactor_dProppantConc,
269  ElementViewConst< arrayView2d< real64 const > > const & dSettlingFactor_dComponentConc,
270  ElementViewConst< arrayView1d< real64 const > > const & collisionFactor,
271  ElementViewConst< arrayView1d< real64 const > > const & dCollisionFactor_dProppantConc,
272  ElementViewConst< arrayView1d< integer const > > const & isProppantMobile,
273  ElementViewConst< arrayView3d< real64 const > > const & permeability,
274  ElementViewConst< arrayView3d< real64 const > > const & permeabilityMultiplier,
275  ElementViewConst< arrayView1d< real64 const > > const & aperture,
276  CRSMatrixView< real64, globalIndex const > const & localMatrix,
277  arrayView1d< real64 > const & localRhs );
278 
279  static void
280  launchCellBasedFluxCalculation( SurfaceElementStencilWrapper const & stencilWrapper,
281  R1Tensor const & unitGravityVector,
283  ElementViewConst< arrayView1d< real64 const > > const & gravDepth,
286  ElementViewConst< arrayView3d< real64 const > > const & permeability,
287  ElementViewConst< arrayView3d< real64 const > > const & permeabilityMultiplier,
288  ElementViewConst< arrayView1d< real64 const > > const & aperture,
289  ElementView< arrayView2d< real64 > > const & cellBasedFlux );
290 
297  template< localIndex MAX_NUM_FLUX_ELEMS >
299  static void
300  computeJunction( localIndex const numElems,
301  localIndex const numDofPerCell,
302  arraySlice1d< localIndex const > const & stencilElementIndices,
303  arrayView1d< real64 const > const & pres,
304  arrayView1d< real64 const > const & proppantConc,
305  arrayView3d< real64 const > const & componentDens,
306  arrayView3d< real64 const > const & dComponentDens_dPres,
307  arrayView4d< real64 const > const & dComponentDens_dComponentConc,
308  arrayView1d< real64 const > const & gravDepth,
309  arrayView2d< real64 const > const & dens,
310  arrayView2d< real64 const > const & dDens_dPres,
311  arrayView2d< real64 const > const & dDens_dProppantConc,
312  arrayView3d< real64 const > const & dDens_dComponentConc,
313  arrayView2d< real64 const > const & visc,
314  arrayView2d< real64 const > const & dVisc_dPres,
315  arrayView2d< real64 const > const & dVisc_dProppantConc,
316  arrayView3d< real64 const > const & dVisc_dComponentConc,
317  arrayView2d< real64 const > const & fluidDensity,
318  arrayView2d< real64 const > const & dFluidDens_dPres,
319  arrayView3d< real64 const > const & dFluidDens_dComponentConc,
320  arrayView1d< real64 const > const & settlingFactor,
321  arrayView1d< real64 const > const & dSettlingFactor_dPres,
322  arrayView1d< real64 const > const & dSettlingFactor_dProppantConc,
323  arrayView2d< real64 const > const & dSettlingFactor_dComponentConc,
324  arrayView1d< real64 const > const & collisionFactor,
325  arrayView1d< real64 const > const & dCollisionFactor_dProppantConc,
326  arrayView1d< integer const > const & isProppantMobile,
327  real64 const (&transmissibility)[MAX_NUM_FLUX_ELEMS],
328  real64 const (&apertureWeight)[MAX_NUM_FLUX_ELEMS],
329  real64 const (&geometricWeight)[MAX_NUM_FLUX_ELEMS],
330  real64 const dt,
331  arraySlice1d< real64 > const & localFlux,
332  arraySlice2d< real64 > const & localFluxJacobian );
333 
334 
335  template< localIndex MAX_NUM_FLUX_ELEMS >
337  static void
338  computeCellBasedFlux( localIndex const numElems,
339  arraySlice1d< localIndex const > const & stencilElementIndices,
340  arrayView1d< real64 const > const & pres_n,
341  arrayView1d< real64 const > const & gravDepth,
342  arrayView2d< real64 const > const & dens,
343  arrayView2d< real64 const > const & visc,
344  arraySlice1d< R1Tensor const > const & cellCenterToEdgeCenters,
345  real64 const (&transmissibility)[MAX_NUM_FLUX_ELEMS],
346  real64 const (&apertureWeight)[MAX_NUM_FLUX_ELEMS],
347  real64 const (&geometricWeight)[MAX_NUM_FLUX_ELEMS],
348  arrayView2d< real64 > const & cellBasedFlux );
349 };
350 
352 {
353 
354  using FlowAccessors =
358  fields::proppant::cellBasedFlux,
359  fields::proppant::isProppantMobile,
360  fields::proppant::isProppantBoundary >;
361 
362  using ParticleFluidAccessors =
364 
365  using SlurryFluidAccessors =
366  StencilMaterialAccessors< constitutive::SlurryFluidBase,
367  fields::singlefluid::density,
368  fields::slurryfluid::fluidDensity,
369  fields::slurryfluid::fluidViscosity >;
370 
371 
372  template< typename VIEWTYPE >
374 
375  template< typename VIEWTYPE >
377 
378  static void
379  launchProppantPackVolumeCalculation( SurfaceElementStencil const & stencil,
380  real64 const dt,
381  real64 const proppantDensity,
382  real64 const proppantDiameter,
383  real64 const maxProppantConcentration,
384  R1Tensor const & unitGravityVector,
385  real64 const criticalShieldsNumber,
386  real64 const fricitonCoefficient,
387  ElementView< arrayView1d< real64 const > > const & settlingFactor,
388  ElementView< arrayView2d< real64 const > > const & density,
389  ElementView< arrayView2d< real64 const > > const & fluidDensity,
390  ElementView< arrayView2d< real64 const > > const & fluidViscosity,
391  ElementView< arrayView1d< integer const > > const & isProppantMobile,
392  ElementView< arrayView1d< integer const > > const & isProppantBoundaryElement,
393  ElementView< arrayView1d< real64 const > > const & aperture,
394  ElementView< arrayView1d< real64 const > > const & volume,
395  ElementView< arrayView1d< integer const > > const & elemGhostRank,
396  ElementView< arrayView2d< real64 const > > const & cellBasedFlux,
397  ElementView< arrayView1d< real64 > > const & conc,
398  ElementView< arrayView1d< real64 > > const & proppantPackVolFrac,
399  ElementView< arrayView1d< real64 > > const & proppantExcessPackVolume,
400  ElementView< arrayView1d< real64 > > const & proppantLiftFlux );
401 
402  static void
403  launchProppantPackVolumeUpdate( SurfaceElementStencil const & stencil,
404  R1Tensor const & unitGravityVector,
405  real64 const maxProppantConcentration,
406  ElementView< arrayView1d< integer const > > const & isProppantMobile,
407  ElementView< arrayView1d< real64 const > > const & proppantExcessPackVolume,
408  ElementView< arrayView1d< real64 > > const & conc,
409  ElementView< arrayView1d< real64 > > const & proppantPackVolFrac );
410 
412  inline
413  static
414  void
415  computeProppantPackVolume( localIndex const numElems,
416  real64 const dt,
417  real64 const proppantDensity,
418  real64 const proppantDiameter,
419  real64 const maxProppantConcentration,
420  R1Tensor const & unitGravityVector,
421  real64 const criticalShieldsNumber,
422  real64 const frictionCoefficient,
423  arraySlice1d< localIndex const > const & stencilElementIndices,
424  arraySlice1d< real64 const > const & stencilWeights,
425  arraySlice1d< R1Tensor const > const & stencilCellCenterToEdgeCenters,
426  arrayView1d< real64 const > const & settlingFactor,
427  arrayView2d< real64 const > const & density,
428  arrayView2d< real64 const > const & fluidDensity,
430  arrayView1d< real64 const > const & volume,
431  arrayView1d< real64 const > const & aperture,
432  arrayView1d< integer const > const & elemGhostRank,
433  arrayView1d< integer const > const & isProppantBoundaryElement,
434  arrayView1d< integer const > const & isProppantMobile,
435  arrayView2d< real64 const > const & cellBasedFlux,
436  arrayView1d< real64 > const & conc,
437  arrayView1d< real64 > const & proppantPackVolFrac,
438  arrayView1d< real64 > const & proppantExcessPackVolume,
439  arrayView1d< real64 > const & proppantLiftFlux );
440 
442  inline
443  static
444  void
445  updateProppantPackVolume( localIndex const numElems,
446  arraySlice1d< localIndex const > const & stencilElementIndices,
447  arraySlice1d< real64 const > const & stencilWeights,
448  arraySlice1d< R1Tensor const > const & stencilCellCenterToEdgeCenters,
449  R1Tensor const & unitGravityVector,
450  real64 const maxProppantConcentration,
451  arrayView1d< integer const > const & isProppantMobile,
452  arrayView1d< real64 const > const & proppantExcessPackVolume,
453  arrayView1d< real64 > const & conc,
454  arrayView1d< real64 > const & proppantPackVolFrac );
455 };
456 
457 /******************************** ResidualNormKernel ********************************/
458 
463 {
464 public:
465 
467  using Base::m_minNormalizer;
468  using Base::m_rankOffset;
469  using Base::m_localResidual;
470  using Base::m_dofNumber;
471 
472  ResidualNormKernel( globalIndex const rankOffset,
473  arrayView1d< real64 const > const & localResidual,
474  arrayView1d< globalIndex const > const & dofNumber,
476  integer const numComp,
477  ElementSubRegionBase const & subRegion,
478  real64 const minNormalizer )
479  : Base( rankOffset,
480  localResidual,
481  dofNumber,
482  ghostRank,
483  minNormalizer ),
484  m_numComp( numComp ),
485  m_volume( subRegion.getElementVolume() )
486  {}
487 
489  virtual void computeLinf( localIndex const ei,
490  LinfStackVariables & stack ) const override
491  {
492  real64 const normalizer = LvArray::math::max( m_minNormalizer, m_volume[ei] );
493  for( integer idof = 0; idof < m_numComp; ++idof )
494  {
495  real64 const valMass = LvArray::math::abs( m_localResidual[stack.localRow + idof] ) / normalizer;
496  if( valMass > stack.localValue[0] )
497  {
498  stack.localValue[0] = valMass;
499  }
500  }
501  }
502 
504  virtual void computeL2( localIndex const ei,
505  L2StackVariables & stack ) const override
506  {
507  real64 const normalizer = LvArray::math::max( m_minNormalizer, m_volume[ei] );
508  for( integer idof = 0; idof < m_numComp; ++idof )
509  {
510  stack.localValue[0] += m_localResidual[stack.localRow + idof] * m_localResidual[stack.localRow + idof];
511  stack.localNormalizer[0] += normalizer;
512  }
513  }
514 
515 
516 protected:
517 
520 
523 };
524 
529 {
530 public:
531 
544  template< typename POLICY >
545  static void
547  integer const numComp,
548  globalIndex const rankOffset,
549  string const & dofKey,
550  arrayView1d< real64 const > const & localResidual,
551  ElementSubRegionBase const & subRegion,
552  real64 const minNormalizer,
553  real64 (& residualNorm)[1],
554  real64 (& residualNormalizer)[1] )
555  {
556  arrayView1d< globalIndex const > const dofNumber = subRegion.getReference< array1d< globalIndex > >( dofKey );
557  arrayView1d< integer const > const ghostRank = subRegion.ghostRank();
558 
559  ResidualNormKernel kernel( rankOffset, localResidual, dofNumber, ghostRank,
560  numComp, subRegion, minNormalizer );
561  if( normType == physicsSolverBaseKernels::NormType::Linf )
562  {
563  ResidualNormKernel::launchLinf< POLICY >( subRegion.size(), kernel, residualNorm );
564  }
565  else // L2 norm
566  {
567  ResidualNormKernel::launchL2< POLICY >( subRegion.size(), kernel, residualNorm, residualNormalizer );
568  }
569  }
570 
571 };
572 
573 
574 
575 } // namespace proppantTransportKernels
576 
577 } // namespace geos
578 
579 #endif //GEOS_PHYSICSSOLVERS_FLUIDFLOW_PROPPANTTRANSPORT_PROPPANTTRANSPORTKERNELS_HPP_
#define GEOS_HOST_DEVICE
Marks a host-device function.
Definition: GeosxMacros.hpp:49
#define GEOS_UNUSED_PARAM(X)
Mark an unused argument and silence compiler warnings.
Definition: GeosxMacros.hpp:72
NormType
Type of norm used to check convergence TODO: find a way to put this inside the class.
typename ElementViewAccessor< VIEWTYPE >::NestedViewType ElementView
The ElementViewAccessor at the ElementRegionManager level is the type resulting from ElementViewAcces...
typename ElementViewAccessor< VIEWTYPE >::NestedViewTypeConst ElementViewConst
The ElementViewAccessor at the ElementRegionManager level is the type resulting from ElementViewAcces...
arrayView1d< real64 const > getElementVolume() const
Get the volume of each element in this subregion.
array1d< integer > const & ghostRank()
Get the ghost information of each object.
A struct to automatically construct and store element view accessors.
A struct to automatically construct and store element view accessors.
Provides management of the interior stencil points for a face elements when using Two-Point flux appr...
Provides access to the SurfaceElementStencil that may be called from a kernel function.
GEOS_DECLTYPE_AUTO_RETURN getReference(LOOKUP_TYPE const &lookup) const
Look up a wrapper and get reference to wrapped object.
Definition: Group.hpp:1273
localIndex size() const
Get the "size" of the group, which determines the number of elements in resizable wrappers.
Definition: Group.hpp:1315
Define the base interface for the residual calculations.
real64 const m_minNormalizer
Value used to make sure that normalizers are never zero.
arrayView1d< globalIndex const > const m_dofNumber
View on the dof numbers.
GEOS_HOST_DEVICE integer ghostRank(localIndex const i) const
Getter for the ghost rank.
arrayView1d< real64 const > const m_localResidual
View on the local residual.
static void createAndLaunch(physicsSolverBaseKernels::NormType const normType, integer const numComp, globalIndex const rankOffset, string const &dofKey, arrayView1d< real64 const > const &localResidual, ElementSubRegionBase const &subRegion, real64 const minNormalizer, real64(&residualNorm)[1], real64(&residualNormalizer)[1])
Create a new kernel and launch.
virtual GEOS_HOST_DEVICE void computeL2(localIndex const ei, L2StackVariables &stack) const override
Compute the local values and normalizer for the L2 norm.
integer const m_numComp
Number of fluid components.
virtual GEOS_HOST_DEVICE void computeLinf(localIndex const ei, LinfStackVariables &stack) const override
Compute the local values for the Linf norm.
arrayView1d< real64 const > const m_volume
View on the element volume.
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
StackArray< T, 1, MAXSIZE > stackArray1d
Alias for 1D stack array.
Definition: DataTypes.hpp:188
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
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:82
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
Array< T, 1 > array1d
Alias for 1D array.
Definition: DataTypes.hpp:176
ArrayView< T, 3, USD > arrayView3d
Alias for 3D array view.
Definition: DataTypes.hpp:212
Trait struct for elementAperture data.
Definition: MeshFields.hpp:116
Trait struct for elementVolume data.
Definition: MeshFields.hpp:108
Trait struct for ghostRank data.
Definition: MeshFields.hpp:100
typename ElementRegionManager::ElementViewConst< VIEWTYPE > ElementViewConst
The type for element-based non-constitutive data parameters. Consists entirely of ArrayView's.
static GEOS_HOST_DEVICE void computeJunction(localIndex const numElems, localIndex const numDofPerCell, arraySlice1d< localIndex const > const &stencilElementIndices, arrayView1d< real64 const > const &pres, arrayView1d< real64 const > const &proppantConc, arrayView3d< real64 const > const &componentDens, arrayView3d< real64 const > const &dComponentDens_dPres, arrayView4d< real64 const > const &dComponentDens_dComponentConc, arrayView1d< real64 const > const &gravDepth, arrayView2d< real64 const > const &dens, arrayView2d< real64 const > const &dDens_dPres, arrayView2d< real64 const > const &dDens_dProppantConc, arrayView3d< real64 const > const &dDens_dComponentConc, arrayView2d< real64 const > const &visc, arrayView2d< real64 const > const &dVisc_dPres, arrayView2d< real64 const > const &dVisc_dProppantConc, arrayView3d< real64 const > const &dVisc_dComponentConc, arrayView2d< real64 const > const &fluidDensity, arrayView2d< real64 const > const &dFluidDens_dPres, arrayView3d< real64 const > const &dFluidDens_dComponentConc, arrayView1d< real64 const > const &settlingFactor, arrayView1d< real64 const > const &dSettlingFactor_dPres, arrayView1d< real64 const > const &dSettlingFactor_dProppantConc, arrayView2d< real64 const > const &dSettlingFactor_dComponentConc, arrayView1d< real64 const > const &collisionFactor, arrayView1d< real64 const > const &dCollisionFactor_dProppantConc, arrayView1d< integer const > const &isProppantMobile, real64 const (&transmissibility)[MAX_NUM_FLUX_ELEMS], real64 const (&apertureWeight)[MAX_NUM_FLUX_ELEMS], real64 const (&geometricWeight)[MAX_NUM_FLUX_ELEMS], real64 const dt, arraySlice1d< real64 > const &localFlux, arraySlice2d< real64 > const &localFluxJacobian)
Compute flux and its derivatives for a given multi-element connector.