19 #ifndef GEOSX_LINEARALGEBRA_INTERFACES_HYPREMGRSTRATEGIES_HPP_ 20 #define GEOSX_LINEARALGEBRA_INTERFACES_HYPREMGRSTRATEGIES_HPP_ 24 #include <_hypre_utilities.h> 44 HYPRE_Int numFields = LvArray::integerConversion< HYPRE_Int >( numLocalDofsPerField.
size() );
48 HYPRE_Int numTotalLocalDof = 0;
49 for( HYPRE_Int i = 0; i < numFields; ++i )
51 numTotalLocalDof += LvArray::integerConversion< HYPRE_Int >( numLocalDofsPerField[i] );
54 ret.
resize( numTotalLocalDof );
56 HYPRE_Int firstLabel = 0;
60 for( HYPRE_Int iFld = 0; iFld < numFields; ++iFld )
62 numComp = LvArray::integerConversion< HYPRE_Int >( numComponentsPerField[iFld] );
64 for( HYPRE_Int k = 0; k < numComp; ++k )
66 vectorLabels[k] = k + firstLabel;
68 iend = istr + LvArray::integerConversion< HYPRE_Int >( numLocalDofsPerField[iFld] );
69 for(
localIndex i = istr; i < iend; i += numComp )
71 for(
integer k = 0; k < numComp; ++k )
73 ret[i+k] = vectorLabels[k];
77 firstLabel += numComp;
This class serves to provide a sliced multidimensional interface to the family of LvArray classes...
array1d< HYPRE_Int > computeLocalDofComponentLabels(arraySlice1d< localIndex const > const &numComponentsPerField, arraySlice1d< localIndex const > const &numLocalDofsPerField)
Compute an array of unique component labels.
constexpr INDEX_TYPE size() const noexcept
std::int32_t integer
Signed integer type.
void resize(int const numDims, DIMS_TYPE const *const dims)
Resize the dimensions of the Array to match the given dimensions.
std::ptrdiff_t localIndex
Local index type (for indexing objects within an MPI partition).
This class provides a fixed dimensional resizeable array interface in addition to an interface simila...