#10574 opm-common: Add support for map axes import

This commit is contained in:
Magne Sjaastad 2023-09-04 12:51:17 +02:00
parent 7a782cec66
commit 3e3812469a
2 changed files with 27 additions and 1 deletions

View File

@ -128,6 +128,32 @@ bool RifOpmGridTools::importGrid( const std::string& gridFilePath, RigMainGrid*
transferCoordinatesCartesian( opmGrid, opmGrid, mainGrid, mainGrid, caseData ); transferCoordinatesCartesian( opmGrid, opmGrid, mainGrid, mainGrid, caseData );
auto opmMapAxes = opmGrid.get_mapaxes();
if ( opmMapAxes.size() == 6 )
{
std::array<double, 6> mapAxes;
for ( size_t i = 0; i < opmMapAxes.size(); ++i )
{
mapAxes[i] = opmMapAxes[i];
}
// Set the map axes transformation matrix on the main grid
mainGrid->setMapAxes( mapAxes );
mainGrid->setUseMapAxes( true );
auto transform = mainGrid->mapAxisTransform();
// Invert the transformation matrix to convert from file coordinates to domain coordinates
transform.invert();
#pragma omp parallel for
for ( long i = 0; i < static_cast<long>( mainGrid->nodes().size() ); i++ )
{
auto& n = mainGrid->nodes()[i];
n.transformPoint( transform );
}
}
return true; return true;
} }

View File

@ -11,7 +11,7 @@ set(RESINSIGHT_VERSION_TEXT "-dev")
# Must be unique and increasing within one combination of major/minor/patch version # Must be unique and increasing within one combination of major/minor/patch version
# The uniqueness of this text is independent of RESINSIGHT_VERSION_TEXT # The uniqueness of this text is independent of RESINSIGHT_VERSION_TEXT
# Format of text must be ".xx" # Format of text must be ".xx"
set(RESINSIGHT_DEV_VERSION ".02") set(RESINSIGHT_DEV_VERSION ".03")
# https://github.com/CRAVA/crava/tree/master/libs/nrlib # https://github.com/CRAVA/crava/tree/master/libs/nrlib
set(NRLIB_GITHUB_SHA "ba35d4359882f1c6f5e9dc30eb95fe52af50fd6f") set(NRLIB_GITHUB_SHA "ba35d4359882f1c6f5e9dc30eb95fe52af50fd6f")