mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Rewrite to make code compile (#8061)
It should now be possible to build on centos 7, too
This commit is contained in:
parent
6a978b57f1
commit
de1d02e7bc
@ -627,20 +627,17 @@ size_t RifOdbReader::resultItemCount( const std::string& fieldName,
|
|||||||
odb_Instance* partInstance = instance( partIndex );
|
odb_Instance* partInstance = instance( partIndex );
|
||||||
CVF_ASSERT( partInstance != NULL );
|
CVF_ASSERT( partInstance != NULL );
|
||||||
|
|
||||||
const odb_Frame& frame = stepFrame( stepIndex, frameIndex );
|
const odb_Frame& frame = stepFrame( stepIndex, frameIndex );
|
||||||
odb_FieldOutput& instanceFieldOutput = frame.fieldOutputs()[fieldName.c_str()].getSubset( *partInstance );
|
const odb_FieldOutput& instanceFieldOutput = frame.fieldOutputs()[fieldName.c_str()].getSubset( *partInstance );
|
||||||
|
|
||||||
if ( resultPosition != NONE )
|
odb_Enum::odb_ResultPositionEnum odbResultPos = odb_Enum::NODAL;
|
||||||
{
|
if ( resultPosition == ELEMENT_NODAL )
|
||||||
odb_Enum::odb_ResultPositionEnum odbResultPos = odb_Enum::NODAL;
|
odbResultPos = odb_Enum::ELEMENT_NODAL;
|
||||||
if ( resultPosition == ELEMENT_NODAL )
|
else if ( resultPosition == INTEGRATION_POINT )
|
||||||
odbResultPos = odb_Enum::ELEMENT_NODAL;
|
odbResultPos = odb_Enum::INTEGRATION_POINT;
|
||||||
else if ( resultPosition == INTEGRATION_POINT )
|
|
||||||
odbResultPos = odb_Enum::INTEGRATION_POINT;
|
|
||||||
instanceFieldOutput = instanceFieldOutput.getSubset( odbResultPos );
|
|
||||||
}
|
|
||||||
|
|
||||||
const odb_SequenceFieldBulkData& seqFieldBulkData = instanceFieldOutput.bulkDataBlocks();
|
const odb_FieldOutput& subsetOutput = instanceFieldOutput.getSubset( odbResultPos );
|
||||||
|
const odb_SequenceFieldBulkData& seqFieldBulkData = subsetOutput.bulkDataBlocks();
|
||||||
|
|
||||||
size_t resultItemCount = 0;
|
size_t resultItemCount = 0;
|
||||||
int numBlocks = seqFieldBulkData.size();
|
int numBlocks = seqFieldBulkData.size();
|
||||||
@ -739,7 +736,7 @@ void RifOdbReader::readDisplacements( int partIndex, int stepIndex, int frameInd
|
|||||||
odb_Instance* partInstance = instance( partIndex );
|
odb_Instance* partInstance = instance( partIndex );
|
||||||
CVF_ASSERT( partInstance != NULL );
|
CVF_ASSERT( partInstance != NULL );
|
||||||
|
|
||||||
size_t dataSize = resultItemCount( "U", partIndex, stepIndex, frameIndex, NONE );
|
size_t dataSize = resultItemCount( "U", partIndex, stepIndex, frameIndex, NODAL );
|
||||||
if ( dataSize > 0 )
|
if ( dataSize > 0 )
|
||||||
{
|
{
|
||||||
displacements->resize( dataSize );
|
displacements->resize( dataSize );
|
||||||
|
@ -78,8 +78,7 @@ private:
|
|||||||
{
|
{
|
||||||
NODAL,
|
NODAL,
|
||||||
ELEMENT_NODAL,
|
ELEMENT_NODAL,
|
||||||
INTEGRATION_POINT,
|
INTEGRATION_POINT
|
||||||
NONE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RifOdbResultKey
|
class RifOdbResultKey
|
||||||
|
Loading…
Reference in New Issue
Block a user