GEOS
DirichletFluxComputeKernel.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 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_COMPOSITIONAL_DIRICHLETFLUXCOMPUTEKERNEL_HPP
21 #define GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONAL_DIRICHLETFLUXCOMPUTEKERNEL_HPP
22 
23 #include "codingUtilities/Utilities.hpp"
24 #include "common/DataLayouts.hpp"
25 #include "common/DataTypes.hpp"
26 #include "common/GEOS_RAJA_Interface.hpp"
27 #include "constitutive/fluid/multifluid/MultiFluidBase.hpp"
28 #include "constitutive/fluid/multifluid/MultiFluidSelector.hpp"
35 
36 #include "FluxComputeKernel.hpp"
37 
38 namespace geos
39 {
40 
41 namespace isothermalCompositionalMultiphaseFVMKernels
42 {
43 
44 /******************************** DirichletFluxComputeKernel ********************************/
45 
53 template< integer NUM_COMP, integer NUM_DOF, typename FLUIDWRAPPER >
55  NUM_DOF,
56  BoundaryStencilWrapper >
57 {
58 public:
59 
66  template< typename VIEWTYPE >
68 
70  using DofNumberAccessor = AbstractBase::DofNumberAccessor;
75 
76  using AbstractBase::m_dt;
81  using AbstractBase::m_gravCoef;
84  using AbstractBase::m_dPhaseCompFrac;
88  using AbstractBase::m_kernelFlags;
89 
91  using Base::numComp;
92  using Base::numDof;
93  using Base::numEqn;
95  using Base::m_phaseMob;
96  using Base::m_dPhaseMob;
98  using Base::m_dPhaseMassDens;
100  using Base::m_dPerm_dPres;
101  using Base::m_seri;
102  using Base::m_sesri;
103  using Base::m_sei;
104 
123  globalIndex const rankOffset,
124  FaceManager const & faceManager,
125  BoundaryStencilWrapper const & stencilWrapper,
126  FLUIDWRAPPER const & fluidWrapper,
127  DofNumberAccessor const & dofNumberAccessor,
128  CompFlowAccessors const & compFlowAccessors,
129  MultiFluidAccessors const & multiFluidAccessors,
130  CapPressureAccessors const & capPressureAccessors,
131  PermeabilityAccessors const & permeabilityAccessors,
132  real64 const dt,
133  CRSMatrixView< real64, globalIndex const > const & localMatrix,
134  arrayView1d< real64 > const & localRhs,
135  BitFlags< KernelFlags > kernelFlags )
136  : Base( numPhases,
137  rankOffset,
138  stencilWrapper,
139  dofNumberAccessor,
140  compFlowAccessors,
141  multiFluidAccessors,
142  capPressureAccessors,
143  permeabilityAccessors,
144  dt,
145  localMatrix,
146  localRhs,
147  kernelFlags ),
148  m_facePres( faceManager.getField< fields::flow::facePressure >() ),
149  m_faceTemp( faceManager.getField< fields::flow::faceTemperature >() ),
150  m_faceCompFrac( faceManager.getField< fields::flow::faceGlobalCompFraction >() ),
151  m_faceGravCoef( faceManager.getField< fields::flow::gravityCoefficient >() ),
152  m_fluidWrapper( fluidWrapper )
153  {}
154 
160  {
161 public:
162 
170  localIndex GEOS_UNUSED_PARAM( numElems )) {}
171 
172  // Transmissibility
173  real64 transmissibility = 0.0;
174 
175  // Component fluxes and derivatives
176 
183 
184  // Local degrees of freedom and local residual/jacobian
185 
188 
193 
194  };
195 
196 
203  void setup( localIndex const iconn,
204  StackVariables & stack ) const
205  {
206  globalIndex const offset =
208 
209  for( integer jdof = 0; jdof < numDof; ++jdof )
210  {
211  stack.dofColIndices[jdof] = offset + jdof;
212  }
213  }
214 
215 
223  template< typename FUNC = NoOpFunc >
225  void computeFlux( localIndex const iconn,
226  StackVariables & stack,
227  FUNC && compFluxKernelOp = NoOpFunc{} ) const
228  {
229  using Deriv = constitutive::multifluid::DerivativeOffset;
230  using Order = BoundaryStencil::Order;
231 
232  localIndex const er = m_seri( iconn, Order::ELEM );
233  localIndex const esr = m_sesri( iconn, Order::ELEM );
234  localIndex const ei = m_sei( iconn, Order::ELEM );
235  localIndex const kf = m_sei( iconn, Order::FACE );
236 
237  // Step 1: compute the transmissibility at the boundary face
238 
239  real64 dTrans_dPerm[3]{};
242  stack.transmissibility,
243  dTrans_dPerm );
244  real64 const dTrans_dPres = LvArray::tensorOps::AiBi< 3 >( dTrans_dPerm, m_dPerm_dPres[er][esr][ei][0] );
245 
246  // Step 2: compute the fluid properties on the face
247  // This is needed to get the phase mass density and the phase comp fraction at the face
248  // Because we approximate the face mobility using the total element mobility
249 
256  StackArray< real64, 4, constitutive::MultiFluidBase::MAX_NUM_PHASES * NUM_COMP,
257  constitutive::multifluid::LAYOUT_PHASE_COMP > facePhaseCompFrac( 1, 1, m_numPhases, NUM_COMP );
258  real64 faceTotalDens = 0.0;
259 
260  constitutive::MultiFluidBase::KernelWrapper::computeValues( m_fluidWrapper,
261  m_facePres[kf],
262  m_faceTemp[kf],
263  m_faceCompFrac[kf],
264  facePhaseFrac[0][0],
265  facePhaseDens[0][0],
266  facePhaseMassDens[0][0],
267  facePhaseVisc[0][0],
268  facePhaseEnthalpy[0][0],
269  facePhaseInternalEnergy[0][0],
270  facePhaseCompFrac[0][0],
271  faceTotalDens );
272 
273  // Step 3: loop over phases, compute and upwind phase flux and sum contributions to each component's flux
274 
275  for( integer ip = 0; ip < m_numPhases; ++ip )
276  {
277 
278  // working variables
279  real64 dDensMean_dC[numComp]{};
280  real64 dF_dC[numComp]{};
281  real64 dProp_dC[numComp]{};
282 
283  real64 phaseFlux = 0.0; // for the lambda
284  real64 dPhaseFlux_dP = 0.0;
285  real64 dPhaseFlux_dC[numComp]{};
286 
287 
288  // Step 3.1: compute the average phase mass density at the face
289 
290  applyChainRule( numComp,
291  m_dCompFrac_dCompDens[er][esr][ei],
292  m_dPhaseMassDens[er][esr][ei][0][ip],
293  dProp_dC,
294  Deriv::dC );
295 
296  // average density and derivatives
297  real64 const densMean = 0.5 * ( m_phaseMassDens[er][esr][ei][0][ip] + facePhaseMassDens[0][0][ip] );
298  real64 const dDensMean_dP = 0.5 * m_dPhaseMassDens[er][esr][ei][0][ip][Deriv::dP];
299  for( integer jc = 0; jc < numComp; ++jc )
300  {
301  dDensMean_dC[jc] = 0.5 * dProp_dC[jc];
302  }
303 
304 
305  // Step 3.2: compute the (TPFA) potential difference at the face
306 
307  real64 const gravTimesDz = m_gravCoef[er][esr][ei] - m_faceGravCoef[kf];
308  real64 const potDif = m_pres[er][esr][ei] - m_facePres[kf] - densMean * gravTimesDz;
309  real64 const f = stack.transmissibility * potDif;
310  real64 const dF_dP = stack.transmissibility * ( 1.0 - dDensMean_dP * gravTimesDz ) + dTrans_dPres * potDif;
311  for( integer jc = 0; jc < numComp; ++jc )
312  {
313  dF_dC[jc] = -stack.transmissibility * dDensMean_dC[jc] * gravTimesDz;
314  }
315 
316  // Step 3.3: computation of the mobility
317  // We do that before the if/else statement to be able to pass it to the compFluxOpKernel
318 
319  // recomputing the exact mobility at the face would be quite complex, as it would require:
320  // 1) computing the saturation
321  // 2) computing the relperm
322  // 3) computing the mobility as \lambda_p = \rho_p kr_p( S_p ) / \mu_p
323  // the second step in particular would require yet another dispatch to get the relperm model
324  // so, for simplicity, we approximate the face mobility as
325  // \lambda^approx_p = \rho_p S_p / \mu_p
326  // = \rho_p ( (nu_p / rho_p) * rho_t ) / \mu_p (plugging the expression of saturation)
327  // = \nu_p * rho_t / \mu_p
328  // fortunately, we don't need the derivatives
329  real64 const facePhaseMob = ( facePhaseFrac[0][0][ip] > 0.0 )
330  ? facePhaseFrac[0][0][ip] * faceTotalDens / facePhaseVisc[0][0][ip]
331  : 0.0;
332 
333  // *** upwinding ***
334  // Step 3.4: upwinding based on the sign of the phase potential gradient
335  // It is easier to hard-code the if/else because it is difficult to address elem and face variables in a uniform way
336 
337  if( potDif >= 0 ) // the element is upstream
338  {
339 
340  // compute the phase flux and derivatives using the element mobility
341  phaseFlux = m_phaseMob[er][esr][ei][ip] * f;
342  dPhaseFlux_dP = m_phaseMob[er][esr][ei][ip] * dF_dP + m_dPhaseMob[er][esr][ei][ip][Deriv::dP] * f;
343  for( integer jc = 0; jc < numComp; ++jc )
344  {
345  dPhaseFlux_dC[jc] =
346  m_phaseMob[er][esr][ei][ip] * dF_dC[jc] + m_dPhaseMob[er][esr][ei][ip][Deriv::dC+jc] * f;
347  }
348 
349  // slice some constitutive arrays to avoid too much indexing in component loop
350  arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE_COMP-3 > phaseCompFracSub =
351  m_phaseCompFrac[er][esr][ei][0][ip];
352  arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC-3 > dPhaseCompFracSub =
353  m_dPhaseCompFrac[er][esr][ei][0][ip];
354 
355  // compute component fluxes and derivatives using element composition
356  for( integer ic = 0; ic < numComp; ++ic )
357  {
358  real64 const ycp = phaseCompFracSub[ic];
359  stack.compFlux[ic] += phaseFlux * ycp;
360  stack.dCompFlux_dP[ic] += dPhaseFlux_dP * ycp + phaseFlux * dPhaseCompFracSub[ic][Deriv::dP];
361 
362  applyChainRule( numComp,
363  m_dCompFrac_dCompDens[er][esr][ei],
364  dPhaseCompFracSub[ic],
365  dProp_dC,
366  Deriv::dC );
367  for( integer jc = 0; jc < numComp; ++jc )
368  {
369  stack.dCompFlux_dC[ic][jc] += dPhaseFlux_dC[jc] * ycp + phaseFlux * dProp_dC[jc];
370  }
371  }
372 
373  }
374  else // the face is upstream
375  {
376 
377  // compute the phase flux and derivatives using the approximated face mobility
378  // we only have to take derivatives of the potential gradient in this case
379  phaseFlux = facePhaseMob * f;
380  dPhaseFlux_dP = facePhaseMob * dF_dP;
381  for( integer jc = 0; jc < numComp; ++jc )
382  {
383  dPhaseFlux_dC[jc] = facePhaseMob * dF_dC[jc];
384  }
385 
386  // compute component fluxes and derivatives using the face composition
387  for( integer ic = 0; ic < numComp; ++ic )
388  {
389  real64 const ycp = facePhaseCompFrac[0][0][ip][ic];
390  stack.compFlux[ic] += phaseFlux * ycp;
391  stack.dCompFlux_dP[ic] += dPhaseFlux_dP * ycp;
392  for( integer jc = 0; jc < numComp; ++jc )
393  {
394  stack.dCompFlux_dC[ic][jc] += dPhaseFlux_dC[jc] * ycp;
395  }
396  }
397  }
398 
399  // call the lambda in the phase loop to allow the reuse of the phase fluxes and their derivatives
400  // possible use: assemble the derivatives wrt temperature, and the flux term of the energy equation for this phase
401  compFluxKernelOp( ip, er, esr, ei, kf, f,
402  facePhaseMob, facePhaseEnthalpy[0][0], facePhaseCompFrac[0][0],
403  phaseFlux, dPhaseFlux_dP, dPhaseFlux_dC );
404 
405  }
406 
407  // *** end of upwinding
408 
409  // Step 4: populate local flux vector and derivatives
410  for( integer ic = 0; ic < numComp; ++ic )
411  {
412  stack.localFlux[ic] = m_dt * stack.compFlux[ic];
413  stack.localFluxJacobian[ic][0] = m_dt * stack.dCompFlux_dP[ic];
414  for( integer jc = 0; jc < numComp; ++jc )
415  {
416  stack.localFluxJacobian[ic][jc+1] = m_dt * stack.dCompFlux_dC[ic][jc];
417  }
418  }
419  }
420 
426  template< typename FUNC = NoOpFunc >
428  void complete( localIndex const iconn,
429  StackVariables & stack,
430  FUNC && assemblyKernelOp = NoOpFunc{} ) const
431  {
432  using namespace compositionalMultiphaseUtilities;
433  using Order = BoundaryStencil::Order;
434 
435  if( AbstractBase::m_kernelFlags.isSet( KernelFlags::TotalMassEquation ) )
436  {
437  // Apply equation/variable change transformation(s)
438  real64 work[numDof]{};
439  shiftRowsAheadByOneAndReplaceFirstRowWithColumnSum( numComp, numDof, stack.localFluxJacobian, work );
440  shiftElementsAheadByOneAndReplaceFirstElementWithSum( numComp, stack.localFlux );
441  }
442 
443  // add contribution to residual and jacobian into:
444  // - the component mass balance equations (i = 0 to i = numComp-1)
445  // note that numDof includes derivatives wrt temperature if this class is derived in ThermalKernels
446  if( m_ghostRank[m_seri( iconn, Order::ELEM )][m_sesri( iconn, Order::ELEM )][m_sei( iconn, Order::ELEM )] < 0 )
447  {
448  globalIndex const globalRow = m_dofNumber[m_seri( iconn, Order::ELEM )][m_sesri( iconn, Order::ELEM )][m_sei( iconn, Order::ELEM )];
449  localIndex const localRow = LvArray::integerConversion< localIndex >( globalRow - m_rankOffset );
450  GEOS_ASSERT_GE( localRow, 0 );
451  GEOS_ASSERT_GT( AbstractBase::m_localMatrix.numRows(), localRow + numComp );
452 
453  for( integer ic = 0; ic < numComp; ++ic )
454  {
455  RAJA::atomicAdd( parallelDeviceAtomic{}, &AbstractBase::m_localRhs[localRow + ic], stack.localFlux[ic] );
456  AbstractBase::m_localMatrix.addToRowBinarySearchUnsorted< parallelDeviceAtomic >
457  ( localRow + ic,
458  stack.dofColIndices,
459  stack.localFluxJacobian[ic],
460  numDof );
461  }
462 
463  // call the lambda to assemble additional terms, such as thermal terms
464  assemblyKernelOp( localRow );
465  }
466  }
467 
468 protected:
469 
472  arrayView1d< real64 const > const m_faceTemp;
474 
477 
479  FLUIDWRAPPER const m_fluidWrapper;
480 
481 };
482 
483 
488 {
489 public:
490 
507  template< typename POLICY >
508  static void
509  createAndLaunch( integer const numComps,
510  integer const numPhases,
511  globalIndex const rankOffset,
512  BitFlags< KernelFlags > kernelFlags,
513  string const & dofKey,
514  string const & solverName,
515  FaceManager const & faceManager,
516  ElementRegionManager const & elemManager,
517  BoundaryStencilWrapper const & stencilWrapper,
518  constitutive::MultiFluidBase & fluidBase,
519  real64 const dt,
520  CRSMatrixView< real64, globalIndex const > const & localMatrix,
521  arrayView1d< real64 > const & localRhs )
522  {
523  constitutive::constitutiveComponentUpdatePassThru( fluidBase, numComps, [&]( auto & fluid, auto NC )
524  {
525  using FluidType = TYPEOFREF( fluid );
526  typename FluidType::KernelWrapper const fluidWrapper = fluid.createKernelWrapper();
527 
528  integer constexpr NUM_COMP = NC();
529  integer constexpr NUM_DOF = NC() + 1;
530 
532  elemManager.constructArrayViewAccessor< globalIndex, 1 >( dofKey );
533  dofNumberAccessor.setName( solverName + "/accessors/" + dofKey );
534 
536  typename kernelType::CompFlowAccessors compFlowAccessors( elemManager, solverName );
537  typename kernelType::MultiFluidAccessors multiFluidAccessors( elemManager, solverName );
538  typename kernelType::CapPressureAccessors capPressureAccessors( elemManager, solverName );
539  typename kernelType::PermeabilityAccessors permeabilityAccessors( elemManager, solverName );
540 
541  kernelType kernel( numPhases, rankOffset, faceManager, stencilWrapper, fluidWrapper,
542  dofNumberAccessor, compFlowAccessors, multiFluidAccessors, capPressureAccessors, permeabilityAccessors,
543  dt, localMatrix, localRhs, kernelFlags );
544  kernelType::template launch< POLICY >( stencilWrapper.size(), kernel );
545  } );
546  }
547 };
548 
549 } // namespace isothermalCompositionalMultiphaseFVMKernels
550 
551 } // namespace geos
552 
553 
554 #endif //GEOS_PHYSICSSOLVERS_FLUIDFLOW_COMPOSITIONAL_DIRICHLETFLUXCOMPUTEKERNEL_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
#define GEOS_ASSERT_GT(lhs, rhs)
Assert that one value compares greater than the other in debug builds.
Definition: Logger.hpp:440
#define GEOS_ASSERT_GE(lhs, rhs)
Assert that one value compares greater than or equal to the other in debug builds.
Definition: Logger.hpp:455
GEOS_HOST_DEVICE void computeWeights(localIndex const iconn, CoefficientAccessor< arrayView3d< real64 const > > const &coefficient, real64 &weight, real64(&dWeight_dCoef)[3]) const
Compute weights and derivatives w.r.t to the coefficient.
GEOS_HOST_DEVICE GEOS_FORCE_INLINE localIndex size() const
Give the number of stencil entries.
The ElementRegionManager class provides an interface to ObjectManagerBase in order to manage ElementR...
ElementViewAccessor< ArrayView< T const, NDIM, getUSD< PERM > > > constructArrayViewAccessor(string const &name, string const &neighborName=string()) const
This is a function to construct a ElementViewAccessor to access array data registered on the mesh.
array1d< array1d< VIEWTYPE > > ElementViewAccessor
The ElementViewAccessor at the ElementRegionManager level is an array of array of VIEWTYPE.
typename ElementViewAccessor< VIEWTYPE >::NestedViewTypeConst ElementViewConst
The ElementViewAccessor at the ElementRegionManager level is the type resulting from ElementViewAcces...
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data.
Definition: FaceManager.hpp:44
A struct to automatically construct and store element view accessors.
A struct to automatically construct and store element view accessors.
static void createAndLaunch(integer const numComps, integer const numPhases, globalIndex const rankOffset, BitFlags< KernelFlags > kernelFlags, string const &dofKey, string const &solverName, FaceManager const &faceManager, ElementRegionManager const &elemManager, BoundaryStencilWrapper const &stencilWrapper, constitutive::MultiFluidBase &fluidBase, real64 const dt, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs)
Create a new kernel and launch.
Define the interface for the assembly kernel in charge of Dirichlet face flux terms.
arrayView1d< real64 const > const m_faceGravCoef
View on the face gravity coefficient.
GEOS_HOST_DEVICE void complete(localIndex const iconn, StackVariables &stack, FUNC &&assemblyKernelOp=NoOpFunc{}) const
Performs the complete phase for the kernel.
ElementViewConst< arrayView1d< globalIndex const > > const m_dofNumber
Views on dof numbers.
ElementViewConst< arrayView1d< real64 const > > const m_pres
Views on pressure.
ElementViewConst< arrayView1d< integer const > > const m_ghostRank
Views on ghost rank numbers and gravity coefficients.
arrayView1d< real64 const > const m_facePres
Views on face pressure, temperature, and composition.
ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const m_phaseCompFrac
Views on phase component fractions.
GEOS_HOST_DEVICE void setup(localIndex const iconn, StackVariables &stack) const
Performs the setup phase for the kernel.
DirichletFluxComputeKernel(integer const numPhases, globalIndex const rankOffset, FaceManager const &faceManager, BoundaryStencilWrapper const &stencilWrapper, FLUIDWRAPPER const &fluidWrapper, DofNumberAccessor const &dofNumberAccessor, CompFlowAccessors const &compFlowAccessors, MultiFluidAccessors const &multiFluidAccessors, CapPressureAccessors const &capPressureAccessors, PermeabilityAccessors const &permeabilityAccessors, real64 const dt, CRSMatrixView< real64, globalIndex const > const &localMatrix, arrayView1d< real64 > const &localRhs, BitFlags< KernelFlags > kernelFlags)
Constructor for the kernel interface.
ElementViewConst< arrayView3d< real64 const, compflow::USD_COMP_DC > > const m_dCompFrac_dCompDens
Views on derivatives of comp fractions.
ElementRegionManager::ElementViewConst< VIEWTYPE > ElementViewConst
The type for element-based data. Consists entirely of ArrayView's.
GEOS_HOST_DEVICE void computeFlux(localIndex const iconn, StackVariables &stack, FUNC &&compFluxKernelOp=NoOpFunc{}) const
Compute the local Dirichlet face flux contributions to the residual and Jacobian.
Base class for FluxComputeKernel that holds all data not dependent on template parameters (like stenc...
ElementViewConst< arrayView1d< globalIndex const > > const m_dofNumber
Views on dof numbers.
ElementViewConst< arrayView1d< real64 const > > const m_pres
Views on pressure.
ElementViewConst< arrayView1d< integer const > > const m_ghostRank
Views on ghost rank numbers and gravity coefficients.
ElementViewConst< arrayView4d< real64 const, constitutive::multifluid::USD_PHASE_COMP > > const m_phaseCompFrac
Views on phase component fractions.
CRSMatrixView< real64, globalIndex const > const m_localMatrix
View on the local CRS matrix.
ElementViewConst< arrayView3d< real64 const, compflow::USD_COMP_DC > > const m_dCompFrac_dCompDens
Views on derivatives of comp fractions.
Define the interface for the assembly kernel in charge of flux terms.
static constexpr integer numEqn
Compute time value for the number of equations (all of them, except the volume balance equation)
ElementViewConst< arrayView3d< real64 const, constitutive::multifluid::USD_PHASE > > const m_phaseMassDens
Views on phase mass densities.
ElementViewConst< arrayView2d< real64 const, compflow::USD_PHASE > > const m_phaseMob
Views on phase mobilities.
static constexpr integer numDof
Compute time value for the number of degrees of freedom.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:188
LvArray::CRSMatrixView< T, COL_INDEX, localIndex const, LvArray::ChaiBuffer > CRSMatrixView
Alias for CRS Matrix View.
Definition: DataTypes.hpp:318
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
Definition: DataTypes.hpp:87
LvArray::StackArray< T, NDIM, PERMUTATION, localIndex, MAXSIZE > StackArray
Multidimensional stack-based array type. See LvArray:StackArray for details.
Definition: DataTypes.hpp:164
ArraySlice< T, 2, USD > arraySlice2d
Alias for 2D array slice.
Definition: DataTypes.hpp:208
double real64
64-bit floating point type.
Definition: DataTypes.hpp:98
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
Definition: DataTypes.hpp:84
ArraySlice< T, 1, USD > arraySlice1d
Alias for 1D array slice.
Definition: DataTypes.hpp:192
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:81
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Definition: DataTypes.hpp:204
Defines the order of element/face in the stencil.
static constexpr localIndex ELEM
Order of element index in stencil.
Kernel variables (dof numbers, jacobian and residual) located on the stack.
real64 dCompFlux_dC[numComp][numComp]
Derivatives of component fluxes wrt component densities.
globalIndex dofColIndices[numDof]
Indices of the matrix rows/columns corresponding to the dofs in this face.
GEOS_HOST_DEVICE StackVariables(localIndex const GEOS_UNUSED_PARAM(size), localIndex GEOS_UNUSED_PARAM(numElems))
Constructor for the stack variables.