GEOSX
Public Types | Public Member Functions | Static Public Attributes | List of all members
geosx::SurfaceElementStencilWrapper Class Reference

#include <SurfaceElementStencil.hpp>

Inheritance diagram for geosx::SurfaceElementStencilWrapper:
Inheritance graph
[legend]

Public Types

template<typename VIEWTYPE >
using CoefficientAccessor = ElementRegionManager::ElementViewConst< VIEWTYPE >
 Coefficient view accessory type.
 
- Public Types inherited from geosx::SurfaceElementStencil_Traits
using IndexContainerType = ArrayOfArrays< localIndex >
 The array type that will be used to store the indices of the stencil contributors.
 
using IndexContainerViewType = ArrayOfArraysView< localIndex >
 The array view type for the stencil indices.
 
using IndexContainerViewConstType = ArrayOfArraysView< localIndex const >
 The array view to const type for the stencil indices.
 
using WeightContainerType = ArrayOfArrays< real64 >
 The array type that is used to store the weights of the stencil contributors.
 
using WeightContainerViewType = ArrayOfArraysView< real64 >
 The array view type for the stencil weights.
 
using WeightContainerViewConstType = ArrayOfArraysView< real64 const >
 The array view to const type for the stencil weights.
 

Public Member Functions

 SurfaceElementStencilWrapper (IndexContainerType const &elementRegionIndices, IndexContainerType const &elementSubRegionIndices, IndexContainerType const &elementIndices, WeightContainerType const &weights, ArrayOfArrays< R1Tensor > const &cellCenterToEdgeCenters, real64 const meanPermCoefficient)
 Constructor. More...
 
virtual localIndex size () const override final
 Give the number of stencil entries. More...
 
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE localIndex stencilSize (localIndex index) const
 Give the number of stencil entries for the provided index. More...
 
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE localIndex numPointsInFlux (localIndex index) const
 Give the number of points between which the flux is. More...
 
GEOSX_HOST_DEVICE void computeWeights (localIndex iconn, CoefficientAccessor< arrayView3d< real64 const > > const &coefficient, CoefficientAccessor< arrayView3d< real64 const > > const &dCoeff_dVar, real64(&weight)[MAX_NUM_OF_CONNECTIONS][2], real64(&dWeight_dVar)[MAX_NUM_OF_CONNECTIONS][2]) const
 Compute weigths and derivatives w.r.t to one variable. More...
 
GEOSX_HOST_DEVICE void computeWeights (localIndex iconn, CoefficientAccessor< arrayView3d< real64 const > > const &coefficient, CoefficientAccessor< arrayView3d< real64 const > > const &dCoeff_dVar1, CoefficientAccessor< arrayView3d< real64 const > > const &dCoeff_dVar2, real64(&weight)[MAX_NUM_OF_CONNECTIONS][2], real64(&dWeight_dVar1)[MAX_NUM_OF_CONNECTIONS][2], real64(&dWeight_dVar2)[MAX_NUM_OF_CONNECTIONS][2]) const
 Compute weigths and derivatives w.r.t to one variable. More...
 
GEOSX_HOST_DEVICE void computeWeights (localIndex iconn, CoefficientAccessor< arrayView3d< real64 const > > const &coefficient, CoefficientAccessor< arrayView3d< real64 const > > const &coefficientMultiplier, R1Tensor const &gravityVector, real64(&weight)[MAX_NUM_OF_CONNECTIONS][2]) const
 Compute weigths and derivatives w.r.t to one variable. More...
 
GEOSX_HOST_DEVICE void computeWeights (localIndex iconn, CoefficientAccessor< arrayView3d< real64 const > > const &coefficient1, CoefficientAccessor< arrayView3d< real64 const > > const &coefficient1Multiplier, CoefficientAccessor< arrayView1d< real64 const > > const &coefficient2, R1Tensor const &gravityVector, real64(&weight1)[NUM_POINT_IN_FLUX], real64(&weight2)[NUM_POINT_IN_FLUX], real64(&geometricWeight)[NUM_POINT_IN_FLUX]) const
 Compute weigths and derivatives w.r.t to one variable. More...
 
ArrayOfArraysView< R1Tensor const > getCellCenterToEdgeCenters () const
 Accessor to the CellCenterToEdgeCenter vector. More...
 
- Public Member Functions inherited from geosx::StencilWrapperBase< SurfaceElementStencil_Traits >
 StencilWrapperBase (typename SurfaceElementStencil_Traits ::IndexContainerType const &elementRegionIndices, typename SurfaceElementStencil_Traits ::IndexContainerType const &elementSubRegionIndices, typename SurfaceElementStencil_Traits ::IndexContainerType const &elementIndices, typename SurfaceElementStencil_Traits ::WeightContainerType const &weights)
 Constructor. More...
 
SurfaceElementStencil_Traits ::IndexContainerViewConstType getElementRegionIndices () const
 Const access to the element regions indices. More...
 
SurfaceElementStencil_Traits ::IndexContainerViewConstType getElementSubRegionIndices () const
 Const access to the element subregions indices. More...
 
SurfaceElementStencil_Traits ::IndexContainerViewConstType getElementIndices () const
 Const access to the element indices. More...
 
SurfaceElementStencil_Traits ::WeightContainerViewConstType getWeights () const
 Const access to the stencil weights. More...
 

Static Public Attributes

static constexpr real64 MULTIPLIER_THRESHOLD = 1e-10
 Threshold for the application of the permeability multiplier.
 
- Static Public Attributes inherited from geosx::SurfaceElementStencil_Traits
static localIndex constexpr NUM_POINT_IN_FLUX = 6
 Number of points the flux is between (normally 2)
 
static localIndex constexpr MAX_STENCIL_SIZE = 6
 Maximum number of points in a stencil.
 
static localIndex constexpr MAX_NUM_OF_CONNECTIONS = MAX_STENCIL_SIZE * (MAX_STENCIL_SIZE - 1) / 2
 Maximum number of connections in a stencil.
 

Additional Inherited Members

- Protected Attributes inherited from geosx::StencilWrapperBase< SurfaceElementStencil_Traits >
SurfaceElementStencil_Traits ::IndexContainerViewConstType m_elementRegionIndices
 The container for the element region indices for each point in each stencil.
 
SurfaceElementStencil_Traits ::IndexContainerViewConstType m_elementSubRegionIndices
 The container for the element sub region indices for each point in each stencil.
 
SurfaceElementStencil_Traits ::IndexContainerViewConstType m_elementIndices
 The container for the element indices for each point in each stencil.
 
SurfaceElementStencil_Traits ::WeightContainerViewConstType m_weights
 The container for the weights for each point in each stencil.
 

Detailed Description

Class to provide access to the SurfaceElementStencil that may be called from a kernel function.

Definition at line 87 of file SurfaceElementStencil.hpp.

Constructor & Destructor Documentation

◆ SurfaceElementStencilWrapper()

geosx::SurfaceElementStencilWrapper::SurfaceElementStencilWrapper ( IndexContainerType const &  elementRegionIndices,
IndexContainerType const &  elementSubRegionIndices,
IndexContainerType const &  elementIndices,
WeightContainerType const &  weights,
ArrayOfArrays< R1Tensor > const &  cellCenterToEdgeCenters,
real64 const  meanPermCoefficient 
)
inline

Constructor.

Parameters
elementRegionIndicesThe container for the element region indices for each point in each stencil
elementSubRegionIndicesThe container for the element sub region indices for each point in each stencil
elementIndicesThe container for the element indices for each point in each stencil
weightsThe container for the weights for each point in each stencil
cellCenterToEdgeCentersCell center to Edge center vector
meanPermCoefficientMean permeability coefficient

Definition at line 108 of file SurfaceElementStencil.hpp.

Member Function Documentation

◆ computeWeights() [1/4]

GEOSX_HOST_DEVICE void geosx::SurfaceElementStencilWrapper::computeWeights ( localIndex  iconn,
CoefficientAccessor< arrayView3d< real64 const > > const &  coefficient,
CoefficientAccessor< arrayView3d< real64 const > > const &  dCoeff_dVar,
real64(&)  weight[MAX_NUM_OF_CONNECTIONS][2],
real64(&)  dWeight_dVar[MAX_NUM_OF_CONNECTIONS][2] 
) const
inline

Compute weigths and derivatives w.r.t to one variable.

Parameters
[in]iconnconnection index
[in]coefficientview accessor to the coefficient used to compute the weights
[in]dCoeff_dVarview accessor to the derivative of the coefficient w.r.t to the variable
[out]weightview weights
[out]dWeight_dVarderivative of the weigths w.r.t to the variable

Definition at line 332 of file SurfaceElementStencil.hpp.

◆ computeWeights() [2/4]

GEOSX_HOST_DEVICE void geosx::SurfaceElementStencilWrapper::computeWeights ( localIndex  iconn,
CoefficientAccessor< arrayView3d< real64 const > > const &  coefficient,
CoefficientAccessor< arrayView3d< real64 const > > const &  dCoeff_dVar1,
CoefficientAccessor< arrayView3d< real64 const > > const &  dCoeff_dVar2,
real64(&)  weight[MAX_NUM_OF_CONNECTIONS][2],
real64(&)  dWeight_dVar1[MAX_NUM_OF_CONNECTIONS][2],
real64(&)  dWeight_dVar2[MAX_NUM_OF_CONNECTIONS][2] 
) const
inline

Compute weigths and derivatives w.r.t to one variable.

Parameters
[in]iconnconnection index
[in]coefficientview accessor to the coefficient used to compute the weights
[in]dCoeff_dVar1view accessor to the derivative of the coefficient w.r.t to the variable 1
[in]dCoeff_dVar2view accessor to the derivative of the coefficient w.r.t to the variable 2
[out]weightview weights
[out]dWeight_dVar1derivative of the weigths w.r.t to the variable 1
[out]dWeight_dVar2derivative of the weigths w.r.t to the variable 2

Definition at line 397 of file SurfaceElementStencil.hpp.

◆ computeWeights() [3/4]

GEOSX_HOST_DEVICE void geosx::SurfaceElementStencilWrapper::computeWeights ( localIndex  iconn,
CoefficientAccessor< arrayView3d< real64 const > > const &  coefficient,
CoefficientAccessor< arrayView3d< real64 const > > const &  coefficientMultiplier,
R1Tensor const &  gravityVector,
real64(&)  weight[MAX_NUM_OF_CONNECTIONS][2] 
) const
inline

Compute weigths and derivatives w.r.t to one variable.

Parameters
[in]iconnconnection index
[in]coefficientview accessor to the coefficient used to compute the weights
[in]coefficientMultiplierview accessor to the coefficient multiplier used to compute the weights
[in]gravityVectorgravity vector
[out]weightview weights

Definition at line 475 of file SurfaceElementStencil.hpp.

◆ computeWeights() [4/4]

GEOSX_HOST_DEVICE void geosx::SurfaceElementStencilWrapper::computeWeights ( localIndex  iconn,
CoefficientAccessor< arrayView3d< real64 const > > const &  coefficient1,
CoefficientAccessor< arrayView3d< real64 const > > const &  coefficient1Multiplier,
CoefficientAccessor< arrayView1d< real64 const > > const &  coefficient2,
R1Tensor const &  gravityVector,
real64(&)  weight1[NUM_POINT_IN_FLUX],
real64(&)  weight2[NUM_POINT_IN_FLUX],
real64(&)  geometricWeight[NUM_POINT_IN_FLUX] 
) const
inline

Compute weigths and derivatives w.r.t to one variable.

Parameters
[in]iconnconnection index
[in]coefficient1view accessor to the first coefficient used to compute the first weights
[in]coefficient1Multiplierview accessor to the coefficient multiplier used to compute the first weights
[in]coefficient2view accessor to the first coefficient used to compute the second weights
[in]gravityVectorgravity vector
[out]weight1view on the first weights
[out]weight2view on the second weights
[out]geometricWeightview on the purely geometric weights

Definition at line 532 of file SurfaceElementStencil.hpp.

◆ getCellCenterToEdgeCenters()

ArrayOfArraysView< R1Tensor const > geosx::SurfaceElementStencilWrapper::getCellCenterToEdgeCenters ( ) const
inline

Accessor to the CellCenterToEdgeCenter vector.

Returns
the view const to the CellCenterToEdgeCenter vector

Definition at line 226 of file SurfaceElementStencil.hpp.

◆ numPointsInFlux()

GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE localIndex geosx::SurfaceElementStencilWrapper::numPointsInFlux ( localIndex  index) const
inline

Give the number of points between which the flux is.

Parameters
[in]indexof the stencil entry for which to query the size
Returns
the number of points.

Definition at line 145 of file SurfaceElementStencil.hpp.

◆ size()

virtual localIndex geosx::SurfaceElementStencilWrapper::size ( ) const
inlinefinaloverridevirtual

Give the number of stencil entries.

Returns
The number of stencil entries

Implements geosx::StencilWrapperBase< SurfaceElementStencil_Traits >.

Definition at line 124 of file SurfaceElementStencil.hpp.

◆ stencilSize()

GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE localIndex geosx::SurfaceElementStencilWrapper::stencilSize ( localIndex  index) const
inline

Give the number of stencil entries for the provided index.

Parameters
[in]indexthe index of which the stencil size is request
Returns
The number of stencil entries for the provided index

Definition at line 134 of file SurfaceElementStencil.hpp.


The documentation for this class was generated from the following file: