mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
EclEquil: use std::vector to store mappings.
This commit is contained in:
parent
e240cf8eae
commit
e3286b3ec0
@ -200,6 +200,12 @@ public:
|
||||
int cartesianSize() const
|
||||
{ return asImp_().cartesianIndexMapper().cartesianSize(); }
|
||||
|
||||
/*!
|
||||
* \brief Returns the overall number of cells of the logically EquilCartesian grid
|
||||
*/
|
||||
int equilCartesianSize() const
|
||||
{ return asImp_().equilCartesianIndexMapper().cartesianSize(); }
|
||||
|
||||
/*!
|
||||
* \brief Returns the Cartesian cell id for identifaction with ECL data
|
||||
*/
|
||||
|
@ -107,7 +107,7 @@ public:
|
||||
// create a separate instance of the material law manager just because opm-core
|
||||
// only supports double as the type for scalars (but ebos may use float or quad)
|
||||
std::vector<int> compressedToCartesianEquilElemIdx(numEquilElems);
|
||||
std::map<int,int> equilCartesianToCompressed;
|
||||
std::vector<int> equilCartesianToCompressed( gridManager.equilCartesianSize(), -1 );
|
||||
|
||||
for (unsigned equilElemIdx = 0; equilElemIdx < numEquilElems; ++equilElemIdx)
|
||||
{
|
||||
@ -149,7 +149,7 @@ public:
|
||||
for( unsigned int elemIdx = 0; elemIdx < numElems; ++elemIdx )
|
||||
{
|
||||
const int cartesianIndex = gridManager.cartesianIndex( elemIdx );
|
||||
assert( equilCartesianToCompressed.find( cartesianIndex ) != equilCartesianToCompressed.end() );
|
||||
assert( equilCartesianToCompressed[ cartesianIndex ] >= 0 );
|
||||
localToEquilIndex[ elemIdx ] = equilCartesianToCompressed[ cartesianIndex ];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user