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 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_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 
37 namespace geos
38 {
39 
40 namespace isothermalCompositionalMultiphaseFVMKernels
41 {
42 
43 /******************************** DirichletFluxComputeKernel ********************************/
44 
52 template< integer NUM_COMP, integer NUM_DOF, typename FLUIDWRAPPER >
54  NUM_DOF,
55  BoundaryStencilWrapper >
56 {
57 public:
58 
65  template< typename VIEWTYPE >
67 
69  using DofNumberAccessor = AbstractBase::DofNumberAccessor;
74 
75  using AbstractBase::m_dt;
80  using AbstractBase::m_gravCoef;
83  using AbstractBase::m_dPhaseCompFrac;
87  using AbstractBase::m_kernelFlags;
88 
90  using Base::numComp;
91  using Base::numDof;
92  using Base::numEqn;
94  using Base::m_phaseMob;
95  using Base::m_dPhaseMob;
97  using Base::m_dPhaseMassDens;
99  using Base::m_dPerm_dPres;
100  using Base::m_seri;
101  using Base::m_sesri;
102  using Base::m_sei;
103 
122  globalIndex const rankOffset,
123  FaceManager const & faceManager,
124  BoundaryStencilWrapper const & stencilWrapper,
125  FLUIDWRAPPER const & fluidWrapper,
126  DofNumberAccessor const & dofNumberAccessor,
127  CompFlowAccessors const & compFlowAccessors,
128  MultiFluidAccessors const & multiFluidAccessors,
129  CapPressureAccessors const & capPressureAccessors,
130  PermeabilityAccessors const & permeabilityAccessors,
131  real64 const dt,
132  CRSMatrixView< real64, globalIndex const > const & localMatrix,
133  arrayView1d< real64 > const & localRhs,
134  BitFlags< KernelFlags > kernelFlags )
135  : Base( numPhases,
136  rankOffset,
137  stencilWrapper,
138  dofNumberAccessor,
139  compFlowAccessors,
140  multiFluidAccessors,
141  capPressureAccessors,
142  permeabilityAccessors,
143  dt,
144  localMatrix,
145  localRhs,
146  kernelFlags ),
147  m_facePres( faceManager.getField< fields::flow::facePressure >() ),
148  m_faceTemp( faceManager.getField< fields::flow::faceTemperature >() ),
149  m_faceCompFrac( faceManager.getField< fields::flow::faceGlobalCompFraction >() ),
150  m_faceGravCoef( faceManager.getField< fields::flow::gravityCoefficient >() ),
151  m_fluidWrapper( fluidWrapper )
152  {}
153 
159  {
160 public:
161 
169  localIndex GEOS_UNUSED_PARAM( numElems )) {}
170 
171  // Transmissibility
172  real64 transmissibility = 0.0;
173 
174  // Component fluxes and derivatives
175 
182 
183  // Local degrees of freedom and local residual/jacobian
184 
187 
192 
193  };
194 
195 
202  void setup( localIndex const iconn,
203  StackVariables & stack ) const
204  {
205  globalIndex const offset =
207 
208  for( integer jdof = 0; jdof < numDof; ++jdof )
209  {
210  stack.dofColIndices[jdof] = offset + jdof;
211  }
212  }
213 
214 
222  template< typename FUNC = NoOpFunc >
224  void computeFlux( localIndex const iconn,
225  StackVariables & stack,
226  FUNC && compFluxKernelOp = NoOpFunc{} ) const
227  {
228  using Deriv = constitutive::multifluid::DerivativeOffset;
229  using Order = BoundaryStencil::Order;
230 
231  localIndex const er = m_seri( iconn, Order::ELEM );
232  localIndex const esr = m_sesri( iconn, Order::ELEM );
233  localIndex const ei = m_sei( iconn, Order::ELEM );
234  localIndex const kf = m_sei( iconn, Order::FACE );
235 
236  // Step 1: compute the transmissibility at the boundary face
237 
238  real64 dTrans_dPerm[3]{};
241  stack.transmissibility,
242  dTrans_dPerm );
243  real64 const dTrans_dPres = LvArray::tensorOps::AiBi< 3 >( dTrans_dPerm, m_dPerm_dPres[er][esr][ei][0] );
244 
245  // Step 2: compute the fluid properties on the face
246  // This is needed to get the phase mass density and the phase comp fraction at the face
247  // Because we approximate the face mobility using the total element mobility
248 
255  StackArray< real64, 4, constitutive::MultiFluidBase::MAX_NUM_PHASES * NUM_COMP,
256  constitutive::multifluid::LAYOUT_PHASE_COMP > facePhaseCompFrac( 1, 1, m_numPhases, NUM_COMP );
257  real64 faceTotalDens = 0.0;
258 
259  constitutive::MultiFluidBase::KernelWrapper::computeValues( m_fluidWrapper,
260  m_facePres[kf],
261  m_faceTemp[kf],
262  m_faceCompFrac[kf],
263  facePhaseFrac[0][0],
264  facePhaseDens[0][0],
265  facePhaseMassDens[0][0],
266  facePhaseVisc[0][0],
267  facePhaseEnthalpy[0][0],
268  facePhaseInternalEnergy[0][0],
269  facePhaseCompFrac[0][0],
270  faceTotalDens );
271 
272  // Step 3: loop over phases, compute and upwind phase flux and sum contributions to each component's flux
273 
274  for( integer ip = 0; ip < m_numPhases; ++ip )
275  {
276 
277  // working variables
278  real64 dDensMean_dC[numComp]{};
279  real64 dF_dC[numComp]{};
280  real64 dProp_dC[numComp]{};
281 
282  real64 phaseFlux = 0.0; // for the lambda
283  real64 dPhaseFlux_dP = 0.0;
284  real64 dPhaseFlux_dC[numComp]{};
285 
286 
287  // Step 3.1: compute the average phase mass density at the face
288 
289  applyChainRule( numComp,
290  m_dCompFrac_dCompDens[er][esr][ei],
291  m_dPhaseMassDens[er][esr][ei][0][ip],
292  dProp_dC,
293  Deriv::dC );
294 
295  // average density and derivatives
296  real64 const densMean = 0.5 * ( m_phaseMassDens[er][esr][ei][0][ip] + facePhaseMassDens[0][0][ip] );
297  real64 const dDensMean_dP = 0.5 * m_dPhaseMassDens[er][esr][ei][0][ip][Deriv::dP];
298  for( integer jc = 0; jc < numComp; ++jc )
299  {
300  dDensMean_dC[jc] = 0.5 * dProp_dC[jc];
301  }
302 
303 
304  // Step 3.2: compute the (TPFA) potential difference at the face
305 
306  real64 const gravTimesDz = m_gravCoef[er][esr][ei] - m_faceGravCoef[kf];
307  real64 const potDif = m_pres[er][esr][ei] - m_facePres[kf] - densMean * gravTimesDz;
308  real64 const f = stack.transmissibility * potDif;
309  real64 const dF_dP = stack.transmissibility * ( 1.0 - dDensMean_dP * gravTimesDz ) + dTrans_dPres * potDif;
310  for( integer jc = 0; jc < numComp; ++jc )
311  {
312  dF_dC[jc] = -stack.transmissibility * dDensMean_dC[jc] * gravTimesDz;
313  }
314 
315  // Step 3.3: computation of the mobility
316  // We do that before the if/else statement to be able to pass it to the compFluxOpKernel
317 
318  // recomputing the exact mobility at the face would be quite complex, as it would require:
319  // 1) computing the saturation
320  // 2) computing the relperm
321  // 3) computing the mobility as \lambda_p = \rho_p kr_p( S_p ) / \mu_p
322  // the second step in particular would require yet another dispatch to get the relperm model
323  // so, for simplicity, we approximate the face mobility as
324  // \lambda^approx_p = \rho_p S_p / \mu_p
325  // = \rho_p ( (nu_p / rho_p) * rho_t ) / \mu_p (plugging the expression of saturation)
326  // = \nu_p * rho_t / \mu_p
327  // fortunately, we don't need the derivatives
328  real64 const facePhaseMob = ( facePhaseFrac[0][0][ip] > 0.0 )
329  ? facePhaseFrac[0][0][ip] * faceTotalDens / facePhaseVisc[0][0][ip]
330  : 0.0;
331 
332  // *** upwinding ***
333  // Step 3.4: upwinding based on the sign of the phase potential gradient
334  // It is easier to hard-code the if/else because it is difficult to address elem and face variables in a uniform way
335 
336  if( potDif >= 0 ) // the element is upstream
337  {
338 
339  // compute the phase flux and derivatives using the element mobility
340  phaseFlux = m_phaseMob[er][esr][ei][ip] * f;
341  dPhaseFlux_dP = m_phaseMob[er][esr][ei][ip] * dF_dP + m_dPhaseMob[er][esr][ei][ip][Deriv::dP] * f;
342  for( integer jc = 0; jc < numComp; ++jc )
343  {
344  dPhaseFlux_dC[jc] =
345  m_phaseMob[er][esr][ei][ip] * dF_dC[jc] + m_dPhaseMob[er][esr][ei][ip][Deriv::dC+jc] * f;
346  }
347 
348  // slice some constitutive arrays to avoid too much indexing in component loop
349  arraySlice1d< real64 const, constitutive::multifluid::USD_PHASE_COMP-3 > phaseCompFracSub =
350  m_phaseCompFrac[er][esr][ei][0][ip];
351  arraySlice2d< real64 const, constitutive::multifluid::USD_PHASE_COMP_DC-3 > dPhaseCompFracSub =
352  m_dPhaseCompFrac[er][esr][ei][0][ip];
353 
354  // compute component fluxes and derivatives using element composition
355  for( integer ic = 0; ic < numComp; ++ic )
356  {
357  real64 const ycp = phaseCompFracSub[ic];
358  stack.compFlux[ic] += phaseFlux * ycp;
359  stack.dCompFlux_dP[ic] += dPhaseFlux_dP * ycp + phaseFlux * dPhaseCompFracSub[ic][Deriv::dP];
360 
361  applyChainRule( numComp,
362  m_dCompFrac_dCompDens[er][esr][ei],
363  dPhaseCompFracSub[ic],
364  dProp_dC,
365  Deriv::dC );
366  for( integer jc = 0; jc < numComp; ++jc )
367  {
368  stack.dCompFlux_dC[ic][jc] += dPhaseFlux_dC[jc] * ycp + phaseFlux * dProp_dC[jc];
369  }
370  }
371 
372  }
373  else // the face is upstream
374  {
375 
376  // compute the phase flux and derivatives using the approximated face mobility
377  // we only have to take derivatives of the potential gradient in this case
378  phaseFlux = facePhaseMob * f;
379  dPhaseFlux_dP = facePhaseMob * dF_dP;
380  for( integer jc = 0; jc < numComp; ++jc )
381  {
382  dPhaseFlux_dC[jc] = facePhaseMob * dF_dC[jc];
383  }
384 
385  // compute component fluxes and derivatives using the face composition
386  for( integer ic = 0; ic < numComp; ++ic )
387  {
388  real64 const ycp = facePhaseCompFrac[0][0][ip][ic];
389  stack.compFlux[ic] += phaseFlux * ycp;
390  stack.dCompFlux_dP[ic] += dPhaseFlux_dP * ycp;
391  for( integer jc = 0; jc < numComp; ++jc )
392  {
393  stack.dCompFlux_dC[ic][jc] += dPhaseFlux_dC[jc] * ycp;
394  }
395  }
396  }
397 
398  // call the lambda in the phase loop to allow the reuse of the phase fluxes and their derivatives
399  // possible use: assemble the derivatives wrt temperature, and the flux term of the energy equation for this phase
400  compFluxKernelOp( ip, er, esr, ei, kf, f,
401  facePhaseMob, facePhaseEnthalpy[0][0], facePhaseCompFrac[0][0],
402  phaseFlux, dPhaseFlux_dP, dPhaseFlux_dC );
403 
404  }
405 
406  // *** end of upwinding
407 
408  // Step 4: populate local flux vector and derivatives
409  for( integer ic = 0; ic < numComp; ++ic )
410  {
411  stack.localFlux[ic] = m_dt * stack.compFlux[ic];
412  stack.localFluxJacobian[ic][0] = m_dt * stack.dCompFlux_dP[ic];
413  for( integer jc = 0; jc < numComp; ++jc )
414  {
415  stack.localFluxJacobian[ic][jc+1] = m_dt * stack.dCompFlux_dC[ic][jc];
416  }
417  }
418  }
419 
425  template< typename FUNC = NoOpFunc >
427  void complete( localIndex const iconn,
428  StackVariables & stack,
429  FUNC && assemblyKernelOp = NoOpFunc{} ) const
430  {
431  using namespace compositionalMultiphaseUtilities;
432  using Order = BoundaryStencil::Order;
433 
434  if( AbstractBase::m_kernelFlags.isSet( KernelFlags::TotalMassEquation ) )
435  {
436  // Apply equation/variable change transformation(s)
437  real64 work[numDof]{};
438  shiftRowsAheadByOneAndReplaceFirstRowWithColumnSum( numComp, numDof, stack.localFluxJacobian, work );
439  shiftElementsAheadByOneAndReplaceFirstElementWithSum( numComp, stack.localFlux );
440  }
441 
442  // add contribution to residual and jacobian into:
443  // - the component mass balance equations (i = 0 to i = numComp-1)
444  // note that numDof includes derivatives wrt temperature if this class is derived in ThermalKernels
445  if( m_ghostRank[m_seri( iconn, Order::ELEM )][m_sesri( iconn, Order::ELEM )][m_sei( iconn, Order::ELEM )] < 0 )
446  {
447  globalIndex const globalRow = m_dofNumber[m_seri( iconn, Order::ELEM )][m_sesri( iconn, Order::ELEM )][m_sei( iconn, Order::ELEM )];
448  localIndex const localRow = LvArray::integerConversion< localIndex >( globalRow - m_rankOffset );
449  GEOS_ASSERT_GE( localRow, 0 );
450  GEOS_ASSERT_GT( AbstractBase::m_localMatrix.numRows(), localRow + numComp );
451 
452  for( integer ic = 0; ic < numComp; ++ic )
453  {
454  RAJA::atomicAdd( parallelDeviceAtomic{}, &AbstractBase::m_localRhs[localRow + ic], stack.localFlux[ic] );
455  AbstractBase::m_localMatrix.addToRowBinarySearchUnsorted< parallelDeviceAtomic >
456  ( localRow + ic,
457  stack.dofColIndices,
458  stack.localFluxJacobian[ic],
459  numDof );
460  }
461 
462  // call the lambda to assemble additional terms, such as thermal terms
463  assemblyKernelOp( localRow );
464  }
465  }
466 
467 protected:
468 
471  arrayView1d< real64 const > const m_faceTemp;
473 
476 
478  FLUIDWRAPPER const m_fluidWrapper;
479 
480 };
481 
482 
487 {
488 public:
489 
506  template< typename POLICY >
507  static void
508  createAndLaunch( integer const numComps,
509  integer const numPhases,
510  globalIndex const rankOffset,
511  integer const useTotalMassEquation,
512  string const & dofKey,
513  string const & solverName,
514  FaceManager const & faceManager,
515  ElementRegionManager const & elemManager,
516  BoundaryStencilWrapper const & stencilWrapper,
517  constitutive::MultiFluidBase & fluidBase,
518  real64 const dt,
519  CRSMatrixView< real64, globalIndex const > const & localMatrix,
520  arrayView1d< real64 > const & localRhs )
521  {
522  constitutive::constitutiveComponentUpdatePassThru( fluidBase, numComps, [&]( auto & fluid, auto NC )
523  {
524  using FluidType = TYPEOFREF( fluid );
525  typename FluidType::KernelWrapper const fluidWrapper = fluid.createKernelWrapper();
526 
527  integer constexpr NUM_COMP = NC();
528  integer constexpr NUM_DOF = NC() + 1;
529 
531  elemManager.constructArrayViewAccessor< globalIndex, 1 >( dofKey );
532  dofNumberAccessor.setName( solverName + "/accessors/" + dofKey );
533 
534  // for now, we neglect capillary pressure in the kernel
535  BitFlags< KernelFlags > kernelFlags;
536  if( useTotalMassEquation )
537  kernelFlags.set( KernelFlags::TotalMassEquation );
538 
540  typename kernelType::CompFlowAccessors compFlowAccessors( elemManager, solverName );
541  typename kernelType::MultiFluidAccessors multiFluidAccessors( elemManager, solverName );
542  typename kernelType::CapPressureAccessors capPressureAccessors( elemManager, solverName );
543  typename kernelType::PermeabilityAccessors permeabilityAccessors( elemManager, solverName );
544 
545  kernelType kernel( numPhases, rankOffset, faceManager, stencilWrapper, fluidWrapper,
546  dofNumberAccessor, compFlowAccessors, multiFluidAccessors, capPressureAccessors, permeabilityAccessors,
547  dt, localMatrix, localRhs, kernelFlags );
548  kernelType::template launch< POLICY >( stencilWrapper.size(), kernel );
549  } );
550  }
551 };
552 
553 } // namespace isothermalCompositionalMultiphaseFVMKernels
554 
555 } // namespace geos
556 
557 
558 #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, integer const useTotalMassEquation, 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: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
LvArray::StackArray< T, NDIM, PERMUTATION, localIndex, MAXSIZE > StackArray
Multidimensional stack-based array type. See LvArray:StackArray for details.
Definition: DataTypes.hpp:156
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, 2, USD > arrayView2d
Alias for 2D array view.
Definition: DataTypes.hpp:196
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.