GEOSX
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
geosx::FluxStencil< INDEX, WEIGHT > Class Template Reference

#include <FluxStencil.hpp>

Classes

struct  Entry
 Structure containing the index and the weight of the single edge in the stencil graph. More...
 

Public Types

using index_type = INDEX
 Alias for INDEX.
 
using weight_type = WEIGHT
 Alias for WEIGHT.
 

Public Member Functions

 FluxStencil (localIndex const numConn, localIndex const avgStencilSize)
 Constructor. More...
 
localIndex numConnections () const
 Return the size of the stencil collection (i.e. number of connections). More...
 
void reserve (localIndex const numConn, localIndex const avgStencilSize)
 Resize the collection. More...
 
void add (localIndex const numPts, INDEX const *const indices, WEIGHT const *const weights, localIndex const connectorIndex)
 Add data for one connection. More...
 
bool zero (localIndex const connectorIndex)
 Zero out connections. More...
 
void compress ()
 Called after adding connections is done to compress the data.
 
ArrayOfArraysView< Entry const, true > getConnections () const
 Return the connections. More...
 

Static Public Attributes

static localIndex constexpr NUM_POINT_IN_FLUX = 2
 Number of points the flux is between (normally 2).
 
static localIndex constexpr MAX_STENCIL_SIZE = 18
 Maximum number of points in a stencil (required to use static arrays in kernels).
 

Detailed Description

template<typename INDEX, typename WEIGHT>
class geosx::FluxStencil< INDEX, WEIGHT >

Class representing a spatial discretization stencil.

Definition at line 35 of file FluxStencil.hpp.

Constructor & Destructor Documentation

◆ FluxStencil()

template<typename INDEX , typename WEIGHT >
geosx::FluxStencil< INDEX, WEIGHT >::FluxStencil ( localIndex const  numConn,
localIndex const  avgStencilSize 
)
explicit

Constructor.

Parameters
[in]numConnnumber of connections
[in]avgStencilSizeaverage stencil size

Definition at line 131 of file FluxStencil.hpp.

Member Function Documentation

◆ add()

template<typename INDEX , typename WEIGHT >
void geosx::FluxStencil< INDEX, WEIGHT >::add ( localIndex const  numPts,
INDEX const *const  indices,
WEIGHT const *const  weights,
localIndex const  connectorIndex 
)

Add data for one connection.

Parameters
[in]numPtsnumber of points to be added
[in]indicesthe INDEX array
[in]weightsthe WEIGHT array
[in]connectorIndexthe connector index

Definition at line 153 of file FluxStencil.hpp.

◆ getConnections()

template<typename INDEX , typename WEIGHT >
ArrayOfArraysView< Entry const, true > geosx::FluxStencil< INDEX, WEIGHT >::getConnections ( ) const
inline

Return the connections.

Returns
the connections

Definition at line 116 of file FluxStencil.hpp.

◆ numConnections()

template<typename INDEX , typename WEIGHT >
localIndex geosx::FluxStencil< INDEX, WEIGHT >::numConnections ( ) const

Return the size of the stencil collection (i.e. number of connections).

Returns
the size of the stencil collection (i.e. number of connections)

Definition at line 139 of file FluxStencil.hpp.

◆ reserve()

template<typename INDEX , typename WEIGHT >
void geosx::FluxStencil< INDEX, WEIGHT >::reserve ( localIndex const  numConn,
localIndex const  avgStencilSize 
)

Resize the collection.

Parameters
[in]numConnnumber of connections
[in]avgStencilSizeaverage stencil size

Definition at line 145 of file FluxStencil.hpp.

◆ zero()

template<typename INDEX , typename WEIGHT >
bool geosx::FluxStencil< INDEX, WEIGHT >::zero ( localIndex const  connectorIndex)

Zero out connections.

Parameters
[in]connectorIndexthe connector index
Returns
true if the stencil is zeroed out

Definition at line 171 of file FluxStencil.hpp.


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