GEOSX
CellElementStencilMPFA.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2020 TotalEnergies
8  * Copyright (c) 2019- GEOSX Contributors
9  * All rights reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
19 #ifndef GEOS_FINITEVOLUME_CELLELEMENTSTENCILMPFA_HPP_
20 #define GEOS_FINITEVOLUME_CELLELEMENTSTENCILMPFA_HPP_
21 
22 #include "StencilBase.hpp"
23 
24 namespace geos
25 {
26 
34 
38 class CellElementStencilMPFA final : public StencilBase< CellElementStencilMPFATraits, CellElementStencilMPFA >
39 {
40 public:
41 
42  virtual void reserve( localIndex const size ) override;
43 
44  virtual void add( localIndex const numPts,
45  localIndex const * const elementRegionIndices,
46  localIndex const * const elementSubRegionIndices,
47  localIndex const * const elementIndices,
48  real64 const * const weights,
49  localIndex const connectorIndex ) override final;
50 
55  virtual localIndex size() const override
56  { return m_elementRegionIndices.size(); }
57 
64  { return m_elementRegionIndices.sizeOfArray( index ); }
65 
71  constexpr localIndex numPointsInFlux( localIndex index ) const
72  {
73  GEOS_UNUSED_VAR( index );
74  return maxNumPointsInFlux;
75  }
76 
77 };
78 
79 } /* namespace geos */
80 
81 #endif /* GEOS_FINITEVOLUME_CELLELEMENTSTENCILMPFA_HPP_ */
#define GEOS_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
Definition: GeosxMacros.hpp:83
Provides management of the interior stencil points when using a Multi-point flux approximation.
virtual void reserve(localIndex const size) override
Reserve the size of the stencil.
virtual localIndex size() const override
Return the stencil size.
constexpr localIndex numPointsInFlux(localIndex index) const
Give the number of points between which the flux is.
virtual void add(localIndex const numPts, localIndex const *const elementRegionIndices, localIndex const *const elementSubRegionIndices, localIndex const *const elementIndices, real64 const *const weights, localIndex const connectorIndex) override final
Add an entry to the stencil.
localIndex stencilSize(localIndex index) const
Give the number of points in a stencil entry.
Provides management of the interior stencil points when using Two-Point flux approximation.
TRAITS::IndexContainerType m_elementRegionIndices
The container for the element region indices for each point in each stencil.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:139
GEOSX_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
Definition: DataTypes.hpp:125
A collection of properties of a stencil type.
Definition: StencilBase.hpp:41
static constexpr localIndex maxNumPointsInFlux
Maximum number of points the flux.
Definition: StencilBase.hpp:58