xtgeo 4.13.1__cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of xtgeo might be problematic. Click here for more details.
- cxtgeo.py +558 -0
- cxtgeoPYTHON_wrap.c +19537 -0
- xtgeo/__init__.py +246 -0
- xtgeo/_cxtgeo.cpython-312-aarch64-linux-gnu.so +0 -0
- xtgeo/_internal.cpython-312-aarch64-linux-gnu.so +0 -0
- xtgeo/common/__init__.py +19 -0
- xtgeo/common/_angles.py +29 -0
- xtgeo/common/_xyz_enum.py +50 -0
- xtgeo/common/calc.py +396 -0
- xtgeo/common/constants.py +30 -0
- xtgeo/common/exceptions.py +42 -0
- xtgeo/common/log.py +93 -0
- xtgeo/common/sys.py +166 -0
- xtgeo/common/types.py +18 -0
- xtgeo/common/version.py +34 -0
- xtgeo/common/xtgeo_dialog.py +604 -0
- xtgeo/cube/__init__.py +9 -0
- xtgeo/cube/_cube_export.py +214 -0
- xtgeo/cube/_cube_import.py +532 -0
- xtgeo/cube/_cube_roxapi.py +180 -0
- xtgeo/cube/_cube_utils.py +287 -0
- xtgeo/cube/_cube_window_attributes.py +273 -0
- xtgeo/cube/cube1.py +1023 -0
- xtgeo/grid3d/__init__.py +15 -0
- xtgeo/grid3d/_ecl_grid.py +774 -0
- xtgeo/grid3d/_ecl_inte_head.py +152 -0
- xtgeo/grid3d/_ecl_logi_head.py +71 -0
- xtgeo/grid3d/_ecl_output_file.py +81 -0
- xtgeo/grid3d/_egrid.py +1004 -0
- xtgeo/grid3d/_find_gridprop_in_eclrun.py +625 -0
- xtgeo/grid3d/_grdecl_format.py +309 -0
- xtgeo/grid3d/_grdecl_grid.py +400 -0
- xtgeo/grid3d/_grid3d.py +29 -0
- xtgeo/grid3d/_grid3d_fence.py +284 -0
- xtgeo/grid3d/_grid3d_utils.py +228 -0
- xtgeo/grid3d/_grid_boundary.py +76 -0
- xtgeo/grid3d/_grid_etc1.py +1595 -0
- xtgeo/grid3d/_grid_export.py +222 -0
- xtgeo/grid3d/_grid_hybrid.py +50 -0
- xtgeo/grid3d/_grid_import.py +79 -0
- xtgeo/grid3d/_grid_import_ecl.py +101 -0
- xtgeo/grid3d/_grid_import_roff.py +135 -0
- xtgeo/grid3d/_grid_import_xtgcpgeom.py +375 -0
- xtgeo/grid3d/_grid_refine.py +258 -0
- xtgeo/grid3d/_grid_roxapi.py +292 -0
- xtgeo/grid3d/_grid_translate_coords.py +154 -0
- xtgeo/grid3d/_grid_wellzone.py +165 -0
- xtgeo/grid3d/_gridprop_export.py +202 -0
- xtgeo/grid3d/_gridprop_import_eclrun.py +164 -0
- xtgeo/grid3d/_gridprop_import_grdecl.py +130 -0
- xtgeo/grid3d/_gridprop_import_roff.py +52 -0
- xtgeo/grid3d/_gridprop_import_xtgcpprop.py +168 -0
- xtgeo/grid3d/_gridprop_lowlevel.py +171 -0
- xtgeo/grid3d/_gridprop_op1.py +272 -0
- xtgeo/grid3d/_gridprop_roxapi.py +301 -0
- xtgeo/grid3d/_gridprop_value_init.py +140 -0
- xtgeo/grid3d/_gridprops_import_eclrun.py +344 -0
- xtgeo/grid3d/_gridprops_import_roff.py +83 -0
- xtgeo/grid3d/_roff_grid.py +470 -0
- xtgeo/grid3d/_roff_parameter.py +303 -0
- xtgeo/grid3d/grid.py +2957 -0
- xtgeo/grid3d/grid_properties.py +699 -0
- xtgeo/grid3d/grid_property.py +1313 -0
- xtgeo/grid3d/types.py +15 -0
- xtgeo/include/eigen3/Eigen/Cholesky +45 -0
- xtgeo/include/eigen3/Eigen/CholmodSupport +48 -0
- xtgeo/include/eigen3/Eigen/Core +384 -0
- xtgeo/include/eigen3/Eigen/Dense +7 -0
- xtgeo/include/eigen3/Eigen/Eigen +2 -0
- xtgeo/include/eigen3/Eigen/Eigenvalues +60 -0
- xtgeo/include/eigen3/Eigen/Geometry +59 -0
- xtgeo/include/eigen3/Eigen/Householder +29 -0
- xtgeo/include/eigen3/Eigen/IterativeLinearSolvers +48 -0
- xtgeo/include/eigen3/Eigen/Jacobi +32 -0
- xtgeo/include/eigen3/Eigen/KLUSupport +41 -0
- xtgeo/include/eigen3/Eigen/LU +47 -0
- xtgeo/include/eigen3/Eigen/MetisSupport +35 -0
- xtgeo/include/eigen3/Eigen/OrderingMethods +70 -0
- xtgeo/include/eigen3/Eigen/PaStiXSupport +49 -0
- xtgeo/include/eigen3/Eigen/PardisoSupport +35 -0
- xtgeo/include/eigen3/Eigen/QR +50 -0
- xtgeo/include/eigen3/Eigen/QtAlignedMalloc +39 -0
- xtgeo/include/eigen3/Eigen/SPQRSupport +34 -0
- xtgeo/include/eigen3/Eigen/SVD +50 -0
- xtgeo/include/eigen3/Eigen/Sparse +34 -0
- xtgeo/include/eigen3/Eigen/SparseCholesky +37 -0
- xtgeo/include/eigen3/Eigen/SparseCore +69 -0
- xtgeo/include/eigen3/Eigen/SparseLU +50 -0
- xtgeo/include/eigen3/Eigen/SparseQR +36 -0
- xtgeo/include/eigen3/Eigen/StdDeque +27 -0
- xtgeo/include/eigen3/Eigen/StdList +26 -0
- xtgeo/include/eigen3/Eigen/StdVector +27 -0
- xtgeo/include/eigen3/Eigen/SuperLUSupport +64 -0
- xtgeo/include/eigen3/Eigen/UmfPackSupport +40 -0
- xtgeo/include/eigen3/Eigen/src/Cholesky/LDLT.h +688 -0
- xtgeo/include/eigen3/Eigen/src/Cholesky/LLT.h +558 -0
- xtgeo/include/eigen3/Eigen/src/Cholesky/LLT_LAPACKE.h +99 -0
- xtgeo/include/eigen3/Eigen/src/CholmodSupport/CholmodSupport.h +682 -0
- xtgeo/include/eigen3/Eigen/src/Core/ArithmeticSequence.h +413 -0
- xtgeo/include/eigen3/Eigen/src/Core/Array.h +417 -0
- xtgeo/include/eigen3/Eigen/src/Core/ArrayBase.h +226 -0
- xtgeo/include/eigen3/Eigen/src/Core/ArrayWrapper.h +209 -0
- xtgeo/include/eigen3/Eigen/src/Core/Assign.h +90 -0
- xtgeo/include/eigen3/Eigen/src/Core/AssignEvaluator.h +1010 -0
- xtgeo/include/eigen3/Eigen/src/Core/Assign_MKL.h +178 -0
- xtgeo/include/eigen3/Eigen/src/Core/BandMatrix.h +353 -0
- xtgeo/include/eigen3/Eigen/src/Core/Block.h +448 -0
- xtgeo/include/eigen3/Eigen/src/Core/BooleanRedux.h +162 -0
- xtgeo/include/eigen3/Eigen/src/Core/CommaInitializer.h +164 -0
- xtgeo/include/eigen3/Eigen/src/Core/ConditionEstimator.h +175 -0
- xtgeo/include/eigen3/Eigen/src/Core/CoreEvaluators.h +1741 -0
- xtgeo/include/eigen3/Eigen/src/Core/CoreIterators.h +132 -0
- xtgeo/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h +183 -0
- xtgeo/include/eigen3/Eigen/src/Core/CwiseNullaryOp.h +1001 -0
- xtgeo/include/eigen3/Eigen/src/Core/CwiseTernaryOp.h +197 -0
- xtgeo/include/eigen3/Eigen/src/Core/CwiseUnaryOp.h +103 -0
- xtgeo/include/eigen3/Eigen/src/Core/CwiseUnaryView.h +132 -0
- xtgeo/include/eigen3/Eigen/src/Core/DenseBase.h +701 -0
- xtgeo/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h +685 -0
- xtgeo/include/eigen3/Eigen/src/Core/DenseStorage.h +652 -0
- xtgeo/include/eigen3/Eigen/src/Core/Diagonal.h +258 -0
- xtgeo/include/eigen3/Eigen/src/Core/DiagonalMatrix.h +391 -0
- xtgeo/include/eigen3/Eigen/src/Core/DiagonalProduct.h +28 -0
- xtgeo/include/eigen3/Eigen/src/Core/Dot.h +318 -0
- xtgeo/include/eigen3/Eigen/src/Core/EigenBase.h +160 -0
- xtgeo/include/eigen3/Eigen/src/Core/ForceAlignedAccess.h +150 -0
- xtgeo/include/eigen3/Eigen/src/Core/Fuzzy.h +155 -0
- xtgeo/include/eigen3/Eigen/src/Core/GeneralProduct.h +465 -0
- xtgeo/include/eigen3/Eigen/src/Core/GenericPacketMath.h +1040 -0
- xtgeo/include/eigen3/Eigen/src/Core/GlobalFunctions.h +194 -0
- xtgeo/include/eigen3/Eigen/src/Core/IO.h +258 -0
- xtgeo/include/eigen3/Eigen/src/Core/IndexedView.h +237 -0
- xtgeo/include/eigen3/Eigen/src/Core/Inverse.h +117 -0
- xtgeo/include/eigen3/Eigen/src/Core/Map.h +171 -0
- xtgeo/include/eigen3/Eigen/src/Core/MapBase.h +310 -0
- xtgeo/include/eigen3/Eigen/src/Core/MathFunctions.h +2057 -0
- xtgeo/include/eigen3/Eigen/src/Core/MathFunctionsImpl.h +200 -0
- xtgeo/include/eigen3/Eigen/src/Core/Matrix.h +565 -0
- xtgeo/include/eigen3/Eigen/src/Core/MatrixBase.h +547 -0
- xtgeo/include/eigen3/Eigen/src/Core/NestByValue.h +85 -0
- xtgeo/include/eigen3/Eigen/src/Core/NoAlias.h +109 -0
- xtgeo/include/eigen3/Eigen/src/Core/NumTraits.h +335 -0
- xtgeo/include/eigen3/Eigen/src/Core/PartialReduxEvaluator.h +232 -0
- xtgeo/include/eigen3/Eigen/src/Core/PermutationMatrix.h +605 -0
- xtgeo/include/eigen3/Eigen/src/Core/PlainObjectBase.h +1128 -0
- xtgeo/include/eigen3/Eigen/src/Core/Product.h +191 -0
- xtgeo/include/eigen3/Eigen/src/Core/ProductEvaluators.h +1179 -0
- xtgeo/include/eigen3/Eigen/src/Core/Random.h +218 -0
- xtgeo/include/eigen3/Eigen/src/Core/Redux.h +515 -0
- xtgeo/include/eigen3/Eigen/src/Core/Ref.h +381 -0
- xtgeo/include/eigen3/Eigen/src/Core/Replicate.h +142 -0
- xtgeo/include/eigen3/Eigen/src/Core/Reshaped.h +454 -0
- xtgeo/include/eigen3/Eigen/src/Core/ReturnByValue.h +119 -0
- xtgeo/include/eigen3/Eigen/src/Core/Reverse.h +217 -0
- xtgeo/include/eigen3/Eigen/src/Core/Select.h +164 -0
- xtgeo/include/eigen3/Eigen/src/Core/SelfAdjointView.h +365 -0
- xtgeo/include/eigen3/Eigen/src/Core/SelfCwiseBinaryOp.h +47 -0
- xtgeo/include/eigen3/Eigen/src/Core/Solve.h +188 -0
- xtgeo/include/eigen3/Eigen/src/Core/SolveTriangular.h +235 -0
- xtgeo/include/eigen3/Eigen/src/Core/SolverBase.h +168 -0
- xtgeo/include/eigen3/Eigen/src/Core/StableNorm.h +251 -0
- xtgeo/include/eigen3/Eigen/src/Core/StlIterators.h +463 -0
- xtgeo/include/eigen3/Eigen/src/Core/Stride.h +116 -0
- xtgeo/include/eigen3/Eigen/src/Core/Swap.h +68 -0
- xtgeo/include/eigen3/Eigen/src/Core/Transpose.h +464 -0
- xtgeo/include/eigen3/Eigen/src/Core/Transpositions.h +386 -0
- xtgeo/include/eigen3/Eigen/src/Core/TriangularMatrix.h +1001 -0
- xtgeo/include/eigen3/Eigen/src/Core/VectorBlock.h +96 -0
- xtgeo/include/eigen3/Eigen/src/Core/VectorwiseOp.h +784 -0
- xtgeo/include/eigen3/Eigen/src/Core/Visitor.h +381 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AVX/Complex.h +372 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AVX/MathFunctions.h +228 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AVX/PacketMath.h +1574 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AVX/TypeCasting.h +115 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AVX512/Complex.h +422 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AVX512/MathFunctions.h +362 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AVX512/PacketMath.h +2303 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AltiVec/Complex.h +417 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AltiVec/MathFunctions.h +90 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2937 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +221 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +629 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h +2711 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/CUDA/Complex.h +258 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/Default/BFloat16.h +700 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/Default/ConjHelper.h +117 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1649 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +110 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/Default/Half.h +942 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/Default/Settings.h +49 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/GPU/MathFunctions.h +103 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/GPU/PacketMath.h +1685 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/GPU/TypeCasting.h +80 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/MSA/Complex.h +648 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/MSA/PacketMath.h +1233 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/NEON/Complex.h +584 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/NEON/MathFunctions.h +75 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/NEON/PacketMath.h +4587 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/NEON/TypeCasting.h +1419 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/SSE/Complex.h +351 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/SSE/MathFunctions.h +199 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/SSE/PacketMath.h +1505 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/SSE/TypeCasting.h +142 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/SVE/PacketMath.h +752 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/ZVector/Complex.h +426 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/ZVector/MathFunctions.h +233 -0
- xtgeo/include/eigen3/Eigen/src/Core/arch/ZVector/PacketMath.h +1060 -0
- xtgeo/include/eigen3/Eigen/src/Core/functors/AssignmentFunctors.h +177 -0
- xtgeo/include/eigen3/Eigen/src/Core/functors/BinaryFunctors.h +541 -0
- xtgeo/include/eigen3/Eigen/src/Core/functors/NullaryFunctors.h +189 -0
- xtgeo/include/eigen3/Eigen/src/Core/functors/StlFunctors.h +166 -0
- xtgeo/include/eigen3/Eigen/src/Core/functors/TernaryFunctors.h +25 -0
- xtgeo/include/eigen3/Eigen/src/Core/functors/UnaryFunctors.h +1131 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h +2645 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h +517 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +317 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +145 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +124 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/GeneralMatrixVector.h +518 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +136 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/Parallelizer.h +180 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +544 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +295 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector.h +262 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +118 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/SelfadjointProduct.h +133 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/SelfadjointRank2Update.h +94 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix.h +472 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +317 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/TriangularMatrixVector.h +350 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +255 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/TriangularSolverMatrix.h +337 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +167 -0
- xtgeo/include/eigen3/Eigen/src/Core/products/TriangularSolverVector.h +148 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/BlasUtil.h +583 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/ConfigureVectorization.h +512 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/Constants.h +563 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/DisableStupidWarnings.h +106 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h +322 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/IntegralConstant.h +272 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/MKL_support.h +137 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/Macros.h +1464 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/Memory.h +1163 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/Meta.h +812 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/NonMPL2.h +3 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/ReenableStupidWarnings.h +31 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/ReshapedHelper.h +51 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/StaticAssert.h +221 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/SymbolicIndex.h +293 -0
- xtgeo/include/eigen3/Eigen/src/Core/util/XprHelper.h +856 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/ComplexEigenSolver.h +346 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/ComplexSchur.h +462 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +91 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/EigenSolver.h +622 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +418 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +226 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/HessenbergDecomposition.h +374 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +158 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/RealQZ.h +657 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/RealSchur.h +558 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +77 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +904 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +87 -0
- xtgeo/include/eigen3/Eigen/src/Eigenvalues/Tridiagonalization.h +561 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/AlignedBox.h +486 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/AngleAxis.h +247 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/EulerAngles.h +114 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/Homogeneous.h +501 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/Hyperplane.h +282 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/OrthoMethods.h +235 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/ParametrizedLine.h +232 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/Quaternion.h +870 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/Rotation2D.h +199 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/RotationBase.h +206 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/Scaling.h +188 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/Transform.h +1563 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/Translation.h +202 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/Umeyama.h +166 -0
- xtgeo/include/eigen3/Eigen/src/Geometry/arch/Geometry_SIMD.h +168 -0
- xtgeo/include/eigen3/Eigen/src/Householder/BlockHouseholder.h +110 -0
- xtgeo/include/eigen3/Eigen/src/Householder/Householder.h +176 -0
- xtgeo/include/eigen3/Eigen/src/Householder/HouseholderSequence.h +545 -0
- xtgeo/include/eigen3/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +226 -0
- xtgeo/include/eigen3/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +212 -0
- xtgeo/include/eigen3/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +229 -0
- xtgeo/include/eigen3/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +394 -0
- xtgeo/include/eigen3/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +453 -0
- xtgeo/include/eigen3/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +444 -0
- xtgeo/include/eigen3/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +198 -0
- xtgeo/include/eigen3/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +117 -0
- xtgeo/include/eigen3/Eigen/src/Jacobi/Jacobi.h +483 -0
- xtgeo/include/eigen3/Eigen/src/KLUSupport/KLUSupport.h +358 -0
- xtgeo/include/eigen3/Eigen/src/LU/Determinant.h +117 -0
- xtgeo/include/eigen3/Eigen/src/LU/FullPivLU.h +877 -0
- xtgeo/include/eigen3/Eigen/src/LU/InverseImpl.h +432 -0
- xtgeo/include/eigen3/Eigen/src/LU/PartialPivLU.h +624 -0
- xtgeo/include/eigen3/Eigen/src/LU/PartialPivLU_LAPACKE.h +83 -0
- xtgeo/include/eigen3/Eigen/src/LU/arch/InverseSize4.h +351 -0
- xtgeo/include/eigen3/Eigen/src/MetisSupport/MetisSupport.h +137 -0
- xtgeo/include/eigen3/Eigen/src/OrderingMethods/Amd.h +435 -0
- xtgeo/include/eigen3/Eigen/src/OrderingMethods/Eigen_Colamd.h +1863 -0
- xtgeo/include/eigen3/Eigen/src/OrderingMethods/Ordering.h +153 -0
- xtgeo/include/eigen3/Eigen/src/PaStiXSupport/PaStiXSupport.h +678 -0
- xtgeo/include/eigen3/Eigen/src/PardisoSupport/PardisoSupport.h +545 -0
- xtgeo/include/eigen3/Eigen/src/QR/ColPivHouseholderQR.h +674 -0
- xtgeo/include/eigen3/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +97 -0
- xtgeo/include/eigen3/Eigen/src/QR/CompleteOrthogonalDecomposition.h +635 -0
- xtgeo/include/eigen3/Eigen/src/QR/FullPivHouseholderQR.h +713 -0
- xtgeo/include/eigen3/Eigen/src/QR/HouseholderQR.h +434 -0
- xtgeo/include/eigen3/Eigen/src/QR/HouseholderQR_LAPACKE.h +68 -0
- xtgeo/include/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +335 -0
- xtgeo/include/eigen3/Eigen/src/SVD/BDCSVD.h +1366 -0
- xtgeo/include/eigen3/Eigen/src/SVD/JacobiSVD.h +812 -0
- xtgeo/include/eigen3/Eigen/src/SVD/JacobiSVD_LAPACKE.h +91 -0
- xtgeo/include/eigen3/Eigen/src/SVD/SVDBase.h +376 -0
- xtgeo/include/eigen3/Eigen/src/SVD/UpperBidiagonalization.h +414 -0
- xtgeo/include/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky.h +697 -0
- xtgeo/include/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +174 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/AmbiVector.h +378 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/CompressedStorage.h +274 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +352 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/MappedSparseMatrix.h +67 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseAssign.h +270 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseBlock.h +571 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseColEtree.h +206 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseCompressedBase.h +370 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +722 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +150 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseDenseProduct.h +342 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseDiagonalProduct.h +138 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseDot.h +98 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseFuzzy.h +29 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseMap.h +305 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseMatrix.h +1518 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseMatrixBase.h +398 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparsePermutation.h +178 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseProduct.h +181 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseRedux.h +49 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseRef.h +397 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseSelfAdjointView.h +659 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseSolverBase.h +124 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +198 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseTranspose.h +92 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseTriangularView.h +189 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseUtil.h +186 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseVector.h +478 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/SparseView.h +254 -0
- xtgeo/include/eigen3/Eigen/src/SparseCore/TriangularSolver.h +315 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU.h +923 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLUImpl.h +66 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_Memory.h +226 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_Structs.h +110 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +375 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_Utils.h +80 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_column_bmod.h +181 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_column_dfs.h +179 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +107 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +280 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +126 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +130 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_panel_bmod.h +223 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_panel_dfs.h +258 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_pivotL.h +137 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_pruneL.h +136 -0
- xtgeo/include/eigen3/Eigen/src/SparseLU/SparseLU_relax_snode.h +83 -0
- xtgeo/include/eigen3/Eigen/src/SparseQR/SparseQR.h +758 -0
- xtgeo/include/eigen3/Eigen/src/StlSupport/StdDeque.h +116 -0
- xtgeo/include/eigen3/Eigen/src/StlSupport/StdList.h +106 -0
- xtgeo/include/eigen3/Eigen/src/StlSupport/StdVector.h +131 -0
- xtgeo/include/eigen3/Eigen/src/StlSupport/details.h +84 -0
- xtgeo/include/eigen3/Eigen/src/SuperLUSupport/SuperLUSupport.h +1025 -0
- xtgeo/include/eigen3/Eigen/src/UmfPackSupport/UmfPackSupport.h +642 -0
- xtgeo/include/eigen3/Eigen/src/misc/Image.h +82 -0
- xtgeo/include/eigen3/Eigen/src/misc/Kernel.h +79 -0
- xtgeo/include/eigen3/Eigen/src/misc/RealSvd2x2.h +55 -0
- xtgeo/include/eigen3/Eigen/src/misc/blas.h +440 -0
- xtgeo/include/eigen3/Eigen/src/misc/lapack.h +152 -0
- xtgeo/include/eigen3/Eigen/src/misc/lapacke.h +16292 -0
- xtgeo/include/eigen3/Eigen/src/misc/lapacke_mangling.h +17 -0
- xtgeo/include/eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h +358 -0
- xtgeo/include/eigen3/Eigen/src/plugins/ArrayCwiseUnaryOps.h +696 -0
- xtgeo/include/eigen3/Eigen/src/plugins/BlockMethods.h +1442 -0
- xtgeo/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h +115 -0
- xtgeo/include/eigen3/Eigen/src/plugins/CommonCwiseUnaryOps.h +177 -0
- xtgeo/include/eigen3/Eigen/src/plugins/IndexedViewMethods.h +262 -0
- xtgeo/include/eigen3/Eigen/src/plugins/MatrixCwiseBinaryOps.h +152 -0
- xtgeo/include/eigen3/Eigen/src/plugins/MatrixCwiseUnaryOps.h +95 -0
- xtgeo/include/eigen3/Eigen/src/plugins/ReshapedMethods.h +149 -0
- xtgeo/include/eigen3/signature_of_eigen3_matrix_library +1 -0
- xtgeo/include/eigen3/unsupported/Eigen/AdolcForward +159 -0
- xtgeo/include/eigen3/unsupported/Eigen/AlignedVector3 +234 -0
- xtgeo/include/eigen3/unsupported/Eigen/ArpackSupport +30 -0
- xtgeo/include/eigen3/unsupported/Eigen/AutoDiff +46 -0
- xtgeo/include/eigen3/unsupported/Eigen/BVH +95 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/Tensor +137 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/TensorSymmetry +42 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/ThreadPool +74 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/Tensor.h +554 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorArgMax.h +329 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorAssign.h +247 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h +1176 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBlock.h +1559 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h +1093 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h +518 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConcatenation.h +377 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h +1023 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionBlocking.h +73 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionCuda.h +6 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionGpu.h +1413 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionMapper.h +575 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionSycl.h +1650 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h +1679 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConversion.h +456 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConvolution.h +1132 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorConvolutionSycl.h +544 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorCostModel.h +214 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorCustomOp.h +347 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h +137 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h +6 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceDefault.h +104 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h +389 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h +1048 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h +409 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDimensionList.h +236 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h +490 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h +236 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h +983 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h +703 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExpr.h +388 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorFFT.h +669 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorFixedSize.h +379 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorForcedEval.h +237 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorForwardDeclarations.h +191 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorFunctors.h +488 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGenerator.h +302 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGlobalFunctions.h +33 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h +99 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaUndefines.h +44 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h +79 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorImagePatch.h +603 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorIndexList.h +738 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorInflation.h +247 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorInitializer.h +82 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h +263 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorLayoutSwap.h +216 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h +98 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h +327 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h +311 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMorphing.h +1102 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorPadding.h +708 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorPatch.h +291 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h +322 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h +998 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h +6 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +966 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReductionSycl.h +582 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorRef.h +454 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorReverse.h +465 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorScan.h +528 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorScanSycl.h +513 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorShuffling.h +471 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h +161 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStriding.h +346 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorTrace.h +303 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorTraits.h +264 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorUInt128.h +249 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h +629 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/TensorSymmetry/DynamicSymmetry.h +293 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/TensorSymmetry/StaticSymmetry.h +236 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/TensorSymmetry/Symmetry.h +338 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/TensorSymmetry/util/TemplateGroupTheory.h +669 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/Barrier.h +67 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h +249 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h +486 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/RunQueue.h +236 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadCancel.h +23 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadEnvironment.h +40 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadLocal.h +301 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h +48 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/ThreadPool/ThreadYield.h +20 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/util/CXX11Meta.h +537 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/util/CXX11Workarounds.h +88 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/util/EmulateArray.h +261 -0
- xtgeo/include/eigen3/unsupported/Eigen/CXX11/src/util/MaxSizeVector.h +158 -0
- xtgeo/include/eigen3/unsupported/Eigen/EulerAngles +43 -0
- xtgeo/include/eigen3/unsupported/Eigen/FFT +419 -0
- xtgeo/include/eigen3/unsupported/Eigen/IterativeSolvers +51 -0
- xtgeo/include/eigen3/unsupported/Eigen/KroneckerProduct +36 -0
- xtgeo/include/eigen3/unsupported/Eigen/LevenbergMarquardt +49 -0
- xtgeo/include/eigen3/unsupported/Eigen/MPRealSupport +213 -0
- xtgeo/include/eigen3/unsupported/Eigen/MatrixFunctions +504 -0
- xtgeo/include/eigen3/unsupported/Eigen/MoreVectorization +24 -0
- xtgeo/include/eigen3/unsupported/Eigen/NonLinearOptimization +140 -0
- xtgeo/include/eigen3/unsupported/Eigen/NumericalDiff +56 -0
- xtgeo/include/eigen3/unsupported/Eigen/OpenGLSupport +322 -0
- xtgeo/include/eigen3/unsupported/Eigen/Polynomials +137 -0
- xtgeo/include/eigen3/unsupported/Eigen/Skyline +39 -0
- xtgeo/include/eigen3/unsupported/Eigen/SparseExtra +54 -0
- xtgeo/include/eigen3/unsupported/Eigen/SpecialFunctions +103 -0
- xtgeo/include/eigen3/unsupported/Eigen/Splines +35 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h +108 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h +730 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/AutoDiff/AutoDiffVector.h +220 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/BVH/BVAlgorithms.h +293 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/BVH/KdBVH.h +223 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/Eigenvalues/ArpackSelfAdjointEigenSolver.h +790 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/EulerAngles/EulerAngles.h +355 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/EulerAngles/EulerSystem.h +305 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/FFT/ei_fftw_impl.h +261 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/FFT/ei_kissfft_impl.h +449 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/IterativeSolvers/ConstrainedConjGrad.h +187 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/IterativeSolvers/DGMRES.h +511 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/IterativeSolvers/GMRES.h +335 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/IterativeSolvers/IDRS.h +436 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/IterativeSolvers/IncompleteLU.h +90 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/IterativeSolvers/IterationController.h +154 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/IterativeSolvers/MINRES.h +267 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/IterativeSolvers/Scaling.h +193 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/KroneckerProduct/KroneckerTensorProduct.h +305 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LMcovar.h +84 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LMonestep.h +202 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LMpar.h +160 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LMqrsolv.h +188 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/LevenbergMarquardt/LevenbergMarquardt.h +396 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h +441 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h +569 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixLogarithm.h +373 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h +705 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h +368 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/MatrixFunctions/StemFunction.h +117 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/MoreVectorization/MathFunctions.h +95 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/NonLinearOptimization/HybridNonLinearSolver.h +601 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/NonLinearOptimization/LevenbergMarquardt.h +657 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/NonLinearOptimization/chkder.h +66 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/NonLinearOptimization/covar.h +70 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/NonLinearOptimization/dogleg.h +107 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/NonLinearOptimization/fdjac1.h +79 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/NonLinearOptimization/lmpar.h +298 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/NonLinearOptimization/qrsolv.h +91 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/NonLinearOptimization/r1mpyq.h +30 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/NonLinearOptimization/r1updt.h +99 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/NonLinearOptimization/rwupdt.h +49 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h +130 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/Polynomials/Companion.h +280 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/Polynomials/PolynomialSolver.h +428 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/Polynomials/PolynomialUtils.h +143 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/Skyline/SkylineInplaceLU.h +352 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/Skyline/SkylineMatrix.h +862 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/Skyline/SkylineMatrixBase.h +212 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/Skyline/SkylineProduct.h +295 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/Skyline/SkylineStorage.h +259 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/Skyline/SkylineUtil.h +89 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SparseExtra/BlockOfDynamicSparseMatrix.h +122 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h +1079 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SparseExtra/DynamicSparseMatrix.h +404 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SparseExtra/MarketIO.h +282 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h +247 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SparseExtra/RandomSetter.h +349 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsArrayAPI.h +286 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsBFloat16.h +68 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsFunctors.h +357 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsHalf.h +66 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsImpl.h +1959 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/BesselFunctionsPacketMath.h +118 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/HipVectorCompatibility.h +67 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsArrayAPI.h +167 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsBFloat16.h +58 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsFunctors.h +330 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsHalf.h +58 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsImpl.h +2045 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsPacketMath.h +79 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/AVX/BesselFunctions.h +46 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/AVX/SpecialFunctions.h +16 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/AVX512/BesselFunctions.h +46 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/AVX512/SpecialFunctions.h +16 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/GPU/SpecialFunctions.h +369 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/NEON/BesselFunctions.h +54 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/SpecialFunctions/arch/NEON/SpecialFunctions.h +34 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/Splines/Spline.h +507 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/Splines/SplineFitting.h +431 -0
- xtgeo/include/eigen3/unsupported/Eigen/src/Splines/SplineFwd.h +93 -0
- xtgeo/io/__init__.py +1 -0
- xtgeo/io/_file.py +594 -0
- xtgeo/metadata/__init__.py +17 -0
- xtgeo/metadata/metadata.py +435 -0
- xtgeo/roxutils/__init__.py +7 -0
- xtgeo/roxutils/_roxar_loader.py +54 -0
- xtgeo/roxutils/_roxutils_etc.py +122 -0
- xtgeo/roxutils/roxutils.py +207 -0
- xtgeo/share/eigen3/cmake/Eigen3Config.cmake +37 -0
- xtgeo/share/eigen3/cmake/Eigen3ConfigVersion.cmake +65 -0
- xtgeo/share/eigen3/cmake/Eigen3Targets.cmake +106 -0
- xtgeo/share/eigen3/cmake/UseEigen3.cmake +6 -0
- xtgeo/share/pkgconfig/eigen3.pc +9 -0
- xtgeo/surface/__init__.py +18 -0
- xtgeo/surface/_regsurf_boundary.py +26 -0
- xtgeo/surface/_regsurf_cube.py +210 -0
- xtgeo/surface/_regsurf_cube_window.py +391 -0
- xtgeo/surface/_regsurf_cube_window_v2.py +297 -0
- xtgeo/surface/_regsurf_cube_window_v3.py +360 -0
- xtgeo/surface/_regsurf_export.py +388 -0
- xtgeo/surface/_regsurf_grid3d.py +275 -0
- xtgeo/surface/_regsurf_gridding.py +347 -0
- xtgeo/surface/_regsurf_ijxyz_parser.py +278 -0
- xtgeo/surface/_regsurf_import.py +347 -0
- xtgeo/surface/_regsurf_lowlevel.py +122 -0
- xtgeo/surface/_regsurf_oper.py +538 -0
- xtgeo/surface/_regsurf_roxapi.py +241 -0
- xtgeo/surface/_regsurf_utils.py +81 -0
- xtgeo/surface/_surfs_import.py +43 -0
- xtgeo/surface/_zmap_parser.py +138 -0
- xtgeo/surface/regular_surface.py +2962 -0
- xtgeo/surface/surfaces.py +276 -0
- xtgeo/well/__init__.py +24 -0
- xtgeo/well/_blockedwell_roxapi.py +241 -0
- xtgeo/well/_blockedwells_roxapi.py +68 -0
- xtgeo/well/_well_aux.py +30 -0
- xtgeo/well/_well_io.py +327 -0
- xtgeo/well/_well_oper.py +483 -0
- xtgeo/well/_well_roxapi.py +304 -0
- xtgeo/well/_wellmarkers.py +486 -0
- xtgeo/well/_wells_utils.py +158 -0
- xtgeo/well/blocked_well.py +220 -0
- xtgeo/well/blocked_wells.py +134 -0
- xtgeo/well/well1.py +1516 -0
- xtgeo/well/wells.py +211 -0
- xtgeo/xyz/__init__.py +6 -0
- xtgeo/xyz/_polygons_oper.py +272 -0
- xtgeo/xyz/_xyz.py +758 -0
- xtgeo/xyz/_xyz_data.py +646 -0
- xtgeo/xyz/_xyz_io.py +737 -0
- xtgeo/xyz/_xyz_lowlevel.py +42 -0
- xtgeo/xyz/_xyz_oper.py +613 -0
- xtgeo/xyz/_xyz_roxapi.py +766 -0
- xtgeo/xyz/points.py +698 -0
- xtgeo/xyz/polygons.py +827 -0
- xtgeo-4.13.1.dist-info/METADATA +146 -0
- xtgeo-4.13.1.dist-info/RECORD +654 -0
- xtgeo-4.13.1.dist-info/WHEEL +6 -0
- xtgeo-4.13.1.dist-info/licenses/LICENSE.md +165 -0
- xtgeo.libs/libgomp-a49a47f9.so.1.0.0 +0 -0
xtgeo/grid3d/_egrid.py
ADDED
|
@@ -0,0 +1,1004 @@
|
|
|
1
|
+
"""
|
|
2
|
+
The egrid fileformat is a file outputted by reservoir simulators such as opm
|
|
3
|
+
flow containing the grid geometry. The layout of cell data and units is similar
|
|
4
|
+
to grdecl files, but there is additional metadata.
|
|
5
|
+
|
|
6
|
+
The data is layed out similarly to other ecl output files, see the resfo
|
|
7
|
+
module.
|
|
8
|
+
|
|
9
|
+
There is an alternate data layout (in addition to that of grdecl files), called
|
|
10
|
+
unstructured, which is not widely supported. XTGeo does not currently support
|
|
11
|
+
that format.
|
|
12
|
+
|
|
13
|
+
egrid files like other ecl files contain tuples of keywords and list of data values
|
|
14
|
+
of one type (An array with a name). The enums in this file generally describe
|
|
15
|
+
a range of values for a position in one of these lists, the dataclasses describe
|
|
16
|
+
the values of one keyword or a collection of those, named a file section.
|
|
17
|
+
|
|
18
|
+
The following egrid file contents (as keyword/array pairs)::
|
|
19
|
+
|
|
20
|
+
("FILEHEAD", [2001,3,0,3,0,0,0])
|
|
21
|
+
("GRIDUNIT", "METRES ")
|
|
22
|
+
|
|
23
|
+
is represented by::
|
|
24
|
+
|
|
25
|
+
EGridHead(
|
|
26
|
+
Filehead(2001,3,3,TypeOfGrid.CORNER_POINT,RockModel(0),GridFormat(0)),
|
|
27
|
+
GridUnit("METRES ")
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
Where ``EGridHead`` is a section of the file, ``Filehead`` and ``GridUnit`` are
|
|
31
|
+
keywords.
|
|
32
|
+
|
|
33
|
+
Generally, the data layout of these objects map 1-to-1 with some section of an
|
|
34
|
+
valid egrid file.
|
|
35
|
+
|
|
36
|
+
keywords implement the `to_egrid` and `from_egrid` functions
|
|
37
|
+
which should satisfy::
|
|
38
|
+
|
|
39
|
+
GridHead.from_egrid(x).to_egrid() == x
|
|
40
|
+
|
|
41
|
+
These convert to and from the object representation and the keyword/array
|
|
42
|
+
pairs, ie.
|
|
43
|
+
|
|
44
|
+
>>> grid_head_contents = [0]*100
|
|
45
|
+
>>> head = GridHead.from_egrid(grid_head_contents)
|
|
46
|
+
>>> head
|
|
47
|
+
GridHead(type_of_grid=<TypeOfGrid.COMPOSITE...
|
|
48
|
+
>>> head.to_egrid().tolist() == grid_head_contents
|
|
49
|
+
True
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
from __future__ import annotations
|
|
53
|
+
|
|
54
|
+
import warnings
|
|
55
|
+
from dataclasses import dataclass
|
|
56
|
+
from enum import Enum, unique
|
|
57
|
+
from itertools import chain
|
|
58
|
+
from typing import TYPE_CHECKING, Any
|
|
59
|
+
|
|
60
|
+
import numpy as np
|
|
61
|
+
import resfo
|
|
62
|
+
|
|
63
|
+
from xtgeo.common.types import Dimensions
|
|
64
|
+
from xtgeo.io._file import FileFormat
|
|
65
|
+
|
|
66
|
+
from ._ecl_grid import (
|
|
67
|
+
CoordinateType,
|
|
68
|
+
EclGrid,
|
|
69
|
+
GdOrient,
|
|
70
|
+
GridRelative,
|
|
71
|
+
GridUnit,
|
|
72
|
+
MapAxes,
|
|
73
|
+
Units,
|
|
74
|
+
)
|
|
75
|
+
from ._ecl_output_file import TypeOfGrid
|
|
76
|
+
|
|
77
|
+
if TYPE_CHECKING:
|
|
78
|
+
from collections.abc import Callable, Iterable, Sequence
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class EGridFileFormatError(ValueError):
|
|
82
|
+
"""
|
|
83
|
+
Exception raised when an file unexpectedly does not conform to the egrid
|
|
84
|
+
format.
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@unique
|
|
89
|
+
class RockModel(Enum):
|
|
90
|
+
"""
|
|
91
|
+
Type of rock model.
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
SINGLE_PERMEABILITY_POROSITY = 0
|
|
95
|
+
DUAL_POROSITY = 1
|
|
96
|
+
DUAL_PERMEABILITY = 2
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
@unique
|
|
100
|
+
class GridFormat(Enum):
|
|
101
|
+
"""
|
|
102
|
+
The format of the "original grid", ie., what
|
|
103
|
+
method was used to construct the values in the file.
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
UNKNOWN = 0
|
|
107
|
+
IRREGULAR_CORNER_POINT = 1
|
|
108
|
+
REGULAR_CARTESIAN = 2
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
@dataclass
|
|
112
|
+
class Filehead:
|
|
113
|
+
"""
|
|
114
|
+
The first keyword in an egrid file is the FILEHEAD
|
|
115
|
+
keyword, containing metadata about the file and its
|
|
116
|
+
content.
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
version_number: int
|
|
120
|
+
year: int
|
|
121
|
+
version_bound: int
|
|
122
|
+
type_of_grid: TypeOfGrid
|
|
123
|
+
rock_model: RockModel
|
|
124
|
+
grid_format: GridFormat
|
|
125
|
+
|
|
126
|
+
@classmethod
|
|
127
|
+
def from_egrid(cls, values: list[int]):
|
|
128
|
+
"""
|
|
129
|
+
Construct a Filehead given the list of values following
|
|
130
|
+
the FILEHEAD keyword.
|
|
131
|
+
Args:
|
|
132
|
+
values(List[int]): list of values following the FILEHEAD keyword,
|
|
133
|
+
expected to contain at least 7 values (normally 100).
|
|
134
|
+
Returns:
|
|
135
|
+
A Filhead constructed from the given values.
|
|
136
|
+
"""
|
|
137
|
+
if len(values) < 7:
|
|
138
|
+
raise ValueError(f"Filehead given too few values, {len(values)} < 7")
|
|
139
|
+
return cls(
|
|
140
|
+
version_number=values[0],
|
|
141
|
+
year=values[1],
|
|
142
|
+
version_bound=values[3],
|
|
143
|
+
type_of_grid=TypeOfGrid.alternate_code(values[4]),
|
|
144
|
+
rock_model=RockModel(values[5]),
|
|
145
|
+
grid_format=GridFormat(values[6]),
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
def to_egrid(self) -> np.ndarray:
|
|
149
|
+
"""
|
|
150
|
+
Returns:
|
|
151
|
+
List of values, as layed out after the FILEHEAD keyword for
|
|
152
|
+
the given filehead.
|
|
153
|
+
"""
|
|
154
|
+
# The data is expected to consist of
|
|
155
|
+
# 100 integers, but only a subset is used.
|
|
156
|
+
result = np.zeros((100,), dtype=np.int32)
|
|
157
|
+
result[0] = self.version_number
|
|
158
|
+
result[1] = self.year
|
|
159
|
+
result[3] = self.version_bound
|
|
160
|
+
result[4] = self.type_of_grid.alternate_value
|
|
161
|
+
result[5] = self.rock_model.value
|
|
162
|
+
result[6] = self.grid_format.value
|
|
163
|
+
return result
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
@dataclass
|
|
167
|
+
class GridHead:
|
|
168
|
+
"""
|
|
169
|
+
Both for lgr (see LGRSection) and the global grid (see GlobalGrid)
|
|
170
|
+
the GRIDHEAD keyword indicates the start of the grid layout for that
|
|
171
|
+
section.
|
|
172
|
+
"""
|
|
173
|
+
|
|
174
|
+
type_of_grid: TypeOfGrid
|
|
175
|
+
num_x: int
|
|
176
|
+
num_y: int
|
|
177
|
+
num_z: int
|
|
178
|
+
grid_reference_number: int
|
|
179
|
+
numres: int
|
|
180
|
+
nseg: int
|
|
181
|
+
coordinate_type: CoordinateType
|
|
182
|
+
lgr_start: tuple[int, int, int]
|
|
183
|
+
lgr_end: tuple[int, int, int]
|
|
184
|
+
|
|
185
|
+
@classmethod
|
|
186
|
+
def from_egrid(cls, values: Sequence[int]):
|
|
187
|
+
if len(values) < 33:
|
|
188
|
+
raise ValueError(
|
|
189
|
+
f"Too few arguments to GridHead.from_egrid {len(values)} < 33"
|
|
190
|
+
)
|
|
191
|
+
return cls(
|
|
192
|
+
type_of_grid=TypeOfGrid(values[0]),
|
|
193
|
+
num_x=values[1],
|
|
194
|
+
num_y=values[2],
|
|
195
|
+
num_z=values[3],
|
|
196
|
+
grid_reference_number=values[4],
|
|
197
|
+
numres=values[24],
|
|
198
|
+
nseg=values[25],
|
|
199
|
+
coordinate_type=CoordinateType.from_bgrdecl(values[26]),
|
|
200
|
+
lgr_start=(values[27], values[28], values[29]),
|
|
201
|
+
lgr_end=(values[30], values[31], values[32]),
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
def to_egrid(self) -> np.ndarray:
|
|
205
|
+
# The data is expected to consist of
|
|
206
|
+
# 100 integers, but only a subset is used.
|
|
207
|
+
result = np.zeros((100,), dtype=np.int32)
|
|
208
|
+
result[0] = self.type_of_grid.value
|
|
209
|
+
result[1] = self.num_x
|
|
210
|
+
result[2] = self.num_y
|
|
211
|
+
result[3] = self.num_z
|
|
212
|
+
result[4] = self.grid_reference_number
|
|
213
|
+
result[24] = self.numres
|
|
214
|
+
result[25] = self.nseg
|
|
215
|
+
result[26] = self.coordinate_type.to_bgrdecl()
|
|
216
|
+
result[[27, 28, 29]] = np.array(self.lgr_start)
|
|
217
|
+
result[[30, 31, 32]] = np.array(self.lgr_end)
|
|
218
|
+
return result
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
@dataclass
|
|
222
|
+
class EGridSubGrid:
|
|
223
|
+
"""
|
|
224
|
+
Both the LGR sections and the global grid contain a grid which is in the
|
|
225
|
+
general format of a eclipse grid. EGridSubGrid contain the common implementation.
|
|
226
|
+
"""
|
|
227
|
+
|
|
228
|
+
grid_head: GridHead | None
|
|
229
|
+
coord: np.ndarray
|
|
230
|
+
zcorn: np.ndarray
|
|
231
|
+
actnum: np.ndarray | None = None
|
|
232
|
+
|
|
233
|
+
def __eq__(self, other):
|
|
234
|
+
return (
|
|
235
|
+
self.grid_head == other.grid_head
|
|
236
|
+
and np.array_equal(self.actnum, other.actnum)
|
|
237
|
+
and np.array_equal(self.coord, other.coord)
|
|
238
|
+
and np.array_equal(self.zcorn, other.zcorn)
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
def _check_xtgeo_compatible(self):
|
|
242
|
+
if self.grid_head.coordinate_type == CoordinateType.CYLINDRICAL:
|
|
243
|
+
raise NotImplementedError(
|
|
244
|
+
"Xtgeo does not currently support cylindrical coordinate systems"
|
|
245
|
+
)
|
|
246
|
+
if self.grid_head.numres < 1:
|
|
247
|
+
warnings.warn(
|
|
248
|
+
"EGrid file given with numres < 1, which is invalid, so assuming"
|
|
249
|
+
" instead that the file contains exactly one reservoir. XTGeo"
|
|
250
|
+
" prior to version 2.14 would output grids with numres == 0. If"
|
|
251
|
+
" the file was created with an older version of XTGeo, consider"
|
|
252
|
+
" importing the file with version 2.15 and re-exporting."
|
|
253
|
+
)
|
|
254
|
+
self.grid_head.numres = 1
|
|
255
|
+
if self.grid_head.numres > 1:
|
|
256
|
+
raise NotImplementedError(
|
|
257
|
+
"Xtgeo does not currently support multiple reservoirs"
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
@property
|
|
261
|
+
def dimensions(self) -> Dimensions:
|
|
262
|
+
"""Dimensions NamedTuple: The grid dimensions (read only)."""
|
|
263
|
+
return Dimensions(
|
|
264
|
+
int(self.grid_head.num_x),
|
|
265
|
+
int(self.grid_head.num_y),
|
|
266
|
+
int(self.grid_head.num_z),
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
def to_egrid(self) -> list[tuple[str, Any]]:
|
|
270
|
+
result = [
|
|
271
|
+
("GRIDHEAD", self.grid_head.to_egrid()),
|
|
272
|
+
("COORD ", self.coord.astype(np.float32)),
|
|
273
|
+
("ZCORN ", self.zcorn.astype(np.float32)),
|
|
274
|
+
]
|
|
275
|
+
if self.actnum is not None:
|
|
276
|
+
result.append(("ACTNUM ", self.actnum.astype(np.int32)))
|
|
277
|
+
return result
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
@dataclass
|
|
281
|
+
class LGRSection(EGridSubGrid):
|
|
282
|
+
"""
|
|
283
|
+
An Egrid file can contain multiple LGR (Local Grid Refinement) sections
|
|
284
|
+
which define a subgrid with finer layout.
|
|
285
|
+
"""
|
|
286
|
+
|
|
287
|
+
name: str | None = None
|
|
288
|
+
parent: str | None = None
|
|
289
|
+
grid_parent: str | None = None
|
|
290
|
+
hostnum: np.ndarray | None = None
|
|
291
|
+
boxorig: tuple[int, int, int] | None = None
|
|
292
|
+
coord_sys: MapAxes | None = None
|
|
293
|
+
|
|
294
|
+
def __eq__(self, other):
|
|
295
|
+
if not isinstance(other, LGRSection):
|
|
296
|
+
return False
|
|
297
|
+
return (
|
|
298
|
+
super().__eq__(other)
|
|
299
|
+
and self.name == other.name
|
|
300
|
+
and self.parent == other.parent
|
|
301
|
+
and self.grid_parent == other.grid_parent
|
|
302
|
+
and np.array_equal(self.hostnum, other.hostnum)
|
|
303
|
+
and self.boxorig == other.boxorig
|
|
304
|
+
and self.coord_sys == other.coord_sys
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
def __post_init__(self):
|
|
308
|
+
if self.name is None:
|
|
309
|
+
raise TypeError("Missing parameter to LGRSection: name")
|
|
310
|
+
|
|
311
|
+
def to_egrid(self) -> list[tuple[str, Any]]:
|
|
312
|
+
result_dict = dict(super().to_egrid())
|
|
313
|
+
result_dict["LGR "] = [self.name]
|
|
314
|
+
if self.parent is not None:
|
|
315
|
+
result_dict["LGRPARNT"] = [self.parent]
|
|
316
|
+
if self.grid_parent is not None:
|
|
317
|
+
result_dict["LGRSGRID"] = [self.grid_parent]
|
|
318
|
+
if self.hostnum is not None:
|
|
319
|
+
result_dict["HOSTNUM "] = self.hostnum
|
|
320
|
+
if self.boxorig is not None:
|
|
321
|
+
result_dict["BOXORIG "] = np.array(self.boxorig, dtype=np.int32)
|
|
322
|
+
if self.coord_sys is not None:
|
|
323
|
+
result_dict["COORDSYS"] = self.coord_sys.to_bgrdecl()
|
|
324
|
+
result_dict["ENDGRID "] = np.array([], dtype=np.int32)
|
|
325
|
+
result_dict["ENDLGR "] = np.array([], dtype=np.int32)
|
|
326
|
+
result = []
|
|
327
|
+
order = [
|
|
328
|
+
"LGR ",
|
|
329
|
+
"LGRPARNT",
|
|
330
|
+
"LGRSGRID",
|
|
331
|
+
"GRIDHEAD",
|
|
332
|
+
"BOXORIG ",
|
|
333
|
+
"COORD ",
|
|
334
|
+
"COORDSYS",
|
|
335
|
+
"ZCORN ",
|
|
336
|
+
"ACTNUM ",
|
|
337
|
+
"HOSTNUM ",
|
|
338
|
+
"ENDGRID ",
|
|
339
|
+
"ENDLGR ",
|
|
340
|
+
]
|
|
341
|
+
for kw in order:
|
|
342
|
+
if kw in result_dict:
|
|
343
|
+
result.append((kw, result_dict[kw]))
|
|
344
|
+
return result
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
@dataclass
|
|
348
|
+
class GlobalGrid(EGridSubGrid):
|
|
349
|
+
"""
|
|
350
|
+
The global grid contains the layout of the grid before
|
|
351
|
+
refinements, and the sectioning into grid coarsening
|
|
352
|
+
through the optional corsnum keyword.
|
|
353
|
+
"""
|
|
354
|
+
|
|
355
|
+
coord_sys: MapAxes | None = None
|
|
356
|
+
boxorig: tuple[int, int, int] | None = None
|
|
357
|
+
corsnum: np.ndarray | None = None
|
|
358
|
+
|
|
359
|
+
def _check_xtgeo_compatible(self):
|
|
360
|
+
super()._check_xtgeo_compatible()
|
|
361
|
+
if self.corsnum is not None:
|
|
362
|
+
warnings.warn(
|
|
363
|
+
"egrid file given with coarsening, this is not directly supported "
|
|
364
|
+
" by xtgeo. Instead grid is imported without coarsening."
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
if self.coord_sys is not None:
|
|
368
|
+
warnings.warn(
|
|
369
|
+
"egrid file given with coordinate definition for global "
|
|
370
|
+
"grid, this is not directly supported by xtgeo. Instead "
|
|
371
|
+
"grid is imported without converting by local coordsys."
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
def __eq__(self, other):
|
|
375
|
+
if not isinstance(other, GlobalGrid):
|
|
376
|
+
return False
|
|
377
|
+
return (
|
|
378
|
+
super().__eq__(other)
|
|
379
|
+
and self.coord_sys == other.coord_sys
|
|
380
|
+
and self.boxorig == other.boxorig
|
|
381
|
+
and np.array_equal(self.corsnum, other.corsnum)
|
|
382
|
+
)
|
|
383
|
+
|
|
384
|
+
def to_egrid(self) -> list[tuple[str, Any]]:
|
|
385
|
+
result_dict = dict(super().to_egrid())
|
|
386
|
+
if self.coord_sys is not None:
|
|
387
|
+
result_dict["COORDSYS"] = self.coord_sys.to_bgrdecl()
|
|
388
|
+
if self.boxorig is not None:
|
|
389
|
+
result_dict["BOXORIG "] = np.array(self.boxorig, dtype=np.int32)
|
|
390
|
+
if self.corsnum is not None:
|
|
391
|
+
result_dict["CORSNUM "] = self.corsnum
|
|
392
|
+
result_dict["ENDGRID "] = np.array([], dtype=np.int32)
|
|
393
|
+
result = []
|
|
394
|
+
order = [
|
|
395
|
+
"GRIDHEAD",
|
|
396
|
+
"BOXORIG ",
|
|
397
|
+
"COORD ",
|
|
398
|
+
"COORDSYS",
|
|
399
|
+
"ZCORN ",
|
|
400
|
+
"ACTNUM ",
|
|
401
|
+
"CORSNUM ",
|
|
402
|
+
"ENDGRID ",
|
|
403
|
+
]
|
|
404
|
+
for kw in order:
|
|
405
|
+
if kw in result_dict:
|
|
406
|
+
result.append((kw, result_dict[kw]))
|
|
407
|
+
return result
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
@dataclass
|
|
411
|
+
class NNCHead:
|
|
412
|
+
"""
|
|
413
|
+
The NNCHead keyword denotes the start of a
|
|
414
|
+
NNCSection and contains the number of nncs and
|
|
415
|
+
the grid number of the grid where the NNCs applies.
|
|
416
|
+
"""
|
|
417
|
+
|
|
418
|
+
num_nnc: int
|
|
419
|
+
grid_identifier: int
|
|
420
|
+
|
|
421
|
+
@classmethod
|
|
422
|
+
def from_egrid(cls, values: list[int]):
|
|
423
|
+
return cls(*values[0:2])
|
|
424
|
+
|
|
425
|
+
def to_egrid(self) -> np.ndarray:
|
|
426
|
+
result = np.zeros((10,), dtype=np.int32)
|
|
427
|
+
result[0] = self.num_nnc
|
|
428
|
+
result[1] = self.grid_identifier
|
|
429
|
+
return result
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
@dataclass
|
|
433
|
+
class NNCSection:
|
|
434
|
+
"""The NNCSection's describe non-neighboor connections in the grid.
|
|
435
|
+
|
|
436
|
+
See, for instance, OPM user manual 2021-4 Rev. 1 Table D1.1 and 6.3.5.
|
|
437
|
+
|
|
438
|
+
Args:
|
|
439
|
+
nnchead: The nnc header
|
|
440
|
+
upstream_nnc: list of cells (by index) for the upstream nnc.
|
|
441
|
+
downstream_nnc: list of cells (by index) for the downstream nnc
|
|
442
|
+
to be connected to the corresponding cell in upstream_nnc.
|
|
443
|
+
nncl: list of LGR cells (by index) to be connected to the global grid.
|
|
444
|
+
nncg: list of global cells (by index) connected to the corresponding
|
|
445
|
+
LGR cells in nncl.
|
|
446
|
+
|
|
447
|
+
"""
|
|
448
|
+
|
|
449
|
+
nnchead: NNCHead
|
|
450
|
+
upstream_nnc: np.ndarray
|
|
451
|
+
downstream_nnc: np.ndarray
|
|
452
|
+
nncl: np.ndarray | None = None
|
|
453
|
+
nncg: np.ndarray | None = None
|
|
454
|
+
|
|
455
|
+
def __eq__(self, other):
|
|
456
|
+
if not isinstance(other, NNCSection):
|
|
457
|
+
return False
|
|
458
|
+
return (
|
|
459
|
+
self.nnchead == other.nnchead
|
|
460
|
+
and np.array_equal(self.upstream_nnc, other.upstream_nnc)
|
|
461
|
+
and np.array_equal(self.downstream_nnc, other.downstream_nnc)
|
|
462
|
+
and np.array_equal(self.nncl, other.nncl)
|
|
463
|
+
and np.array_equal(self.nncg, other.nncg)
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
def to_egrid(self) -> list[tuple[str, Any]]:
|
|
467
|
+
result = [
|
|
468
|
+
("NNCHEAD ", self.nnchead.to_egrid()),
|
|
469
|
+
("NNC1 ", self.upstream_nnc),
|
|
470
|
+
("NNC2 ", self.downstream_nnc),
|
|
471
|
+
]
|
|
472
|
+
if self.nncl is not None:
|
|
473
|
+
result.append(("NNCL ", self.nncl))
|
|
474
|
+
if self.nncg is not None:
|
|
475
|
+
result.append(("NNCG ", self.nncg))
|
|
476
|
+
return result
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
@dataclass
|
|
480
|
+
class AmalgamationSection:
|
|
481
|
+
"""The AmalgamationSection's describe the amalgamation of two LGR's.
|
|
482
|
+
|
|
483
|
+
See, for instance, OPM user manual 2021-4 Rev. 1 Table D1.1 and 6.3.5.
|
|
484
|
+
|
|
485
|
+
Args:
|
|
486
|
+
lgr_idxs: The indexes of the LGR's to be amalgamated
|
|
487
|
+
nna1: indecies in the first lgr connected in the amalgamation.
|
|
488
|
+
nna2: indecies in the second lgr connected in the amalgamation, to
|
|
489
|
+
the corresponding cell in nna1.
|
|
490
|
+
|
|
491
|
+
"""
|
|
492
|
+
|
|
493
|
+
lgr_idxs: tuple[int, int]
|
|
494
|
+
nna1: np.ndarray | None
|
|
495
|
+
nna2: np.ndarray | None
|
|
496
|
+
|
|
497
|
+
def __eq__(self, other):
|
|
498
|
+
if not isinstance(other, AmalgamationSection):
|
|
499
|
+
return False
|
|
500
|
+
return (
|
|
501
|
+
self.lgr_idxs == other.lgr_idxs
|
|
502
|
+
and np.array_equal(self.nna1, other.nna1)
|
|
503
|
+
and np.array_equal(self.nna2, other.nna2)
|
|
504
|
+
)
|
|
505
|
+
|
|
506
|
+
def to_egrid(self) -> list[tuple[str, Any]]:
|
|
507
|
+
return [
|
|
508
|
+
("NNCHEADA", np.array(self.lgr_idxs, np.int32)),
|
|
509
|
+
("NNA1 ", self.nna1),
|
|
510
|
+
("NNA2 ", self.nna2),
|
|
511
|
+
]
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
@dataclass
|
|
515
|
+
class EGridHead:
|
|
516
|
+
"""The EGridHead section occurs once at the start of an EGrid file."""
|
|
517
|
+
|
|
518
|
+
file_head: Filehead
|
|
519
|
+
mapunits: Units | None = None
|
|
520
|
+
mapaxes: MapAxes | None = None
|
|
521
|
+
gridunit: GridUnit | None = None
|
|
522
|
+
gdorient: GdOrient | None = None
|
|
523
|
+
|
|
524
|
+
def to_egrid(self) -> list[tuple[str, Any]]:
|
|
525
|
+
result = [
|
|
526
|
+
("FILEHEAD", self.file_head.to_egrid()),
|
|
527
|
+
]
|
|
528
|
+
if self.mapunits is not None:
|
|
529
|
+
result.append(("MAPUNITS", [self.mapunits.to_bgrdecl()]))
|
|
530
|
+
if self.mapaxes is not None:
|
|
531
|
+
result.append(("MAPAXES ", self.mapaxes.to_bgrdecl()))
|
|
532
|
+
if self.gridunit is not None:
|
|
533
|
+
result.append(("GRIDUNIT", self.gridunit.to_bgrdecl()))
|
|
534
|
+
if self.gdorient is not None:
|
|
535
|
+
result.append(("GDORIENT", self.gdorient.to_bgrdecl()))
|
|
536
|
+
return result
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
@dataclass
|
|
540
|
+
class EGrid(EclGrid):
|
|
541
|
+
"""Contains the data of an EGRID file.
|
|
542
|
+
|
|
543
|
+
Args:
|
|
544
|
+
egrid_head: The file header starting with the FILEHEAD keyword and
|
|
545
|
+
contains optional information about units, map relative location, and
|
|
546
|
+
orientation.
|
|
547
|
+
global_grid: The global grid
|
|
548
|
+
lgr_sections: List of local grid refinements.
|
|
549
|
+
nnc_sections: Describe non-neighboring sections as a list of either
|
|
550
|
+
NNCSections or AmalgamationSection's.
|
|
551
|
+
"""
|
|
552
|
+
|
|
553
|
+
egrid_head: EGridHead
|
|
554
|
+
global_grid: GlobalGrid
|
|
555
|
+
lgr_sections: list[LGRSection]
|
|
556
|
+
# The nnc_sections are kept as one list which can consist of both
|
|
557
|
+
# NNCSection and AmalgamationSection as these occur interspersed in the
|
|
558
|
+
# file. The order seems to be sorted by LGR index. Keeping them in
|
|
559
|
+
# one list keeps the data layout of EGrid 1-to-1 with the contents
|
|
560
|
+
# of the file.
|
|
561
|
+
nnc_sections: list[NNCSection | AmalgamationSection]
|
|
562
|
+
|
|
563
|
+
@classmethod
|
|
564
|
+
def default_settings_grid(
|
|
565
|
+
cls,
|
|
566
|
+
coord: np.ndarray,
|
|
567
|
+
zcorn: np.ndarray,
|
|
568
|
+
actnum: np.ndarray | None,
|
|
569
|
+
size: tuple[int, int, int],
|
|
570
|
+
):
|
|
571
|
+
grid_head = GridHead(
|
|
572
|
+
TypeOfGrid.CORNER_POINT,
|
|
573
|
+
*size,
|
|
574
|
+
1,
|
|
575
|
+
1,
|
|
576
|
+
1,
|
|
577
|
+
CoordinateType.CARTESIAN,
|
|
578
|
+
(0, 0, 0),
|
|
579
|
+
(0, 0, 0),
|
|
580
|
+
)
|
|
581
|
+
global_grid = GlobalGrid(
|
|
582
|
+
grid_head,
|
|
583
|
+
coord,
|
|
584
|
+
zcorn,
|
|
585
|
+
actnum,
|
|
586
|
+
)
|
|
587
|
+
return EGrid(
|
|
588
|
+
EGridHead(
|
|
589
|
+
Filehead(
|
|
590
|
+
3,
|
|
591
|
+
2007,
|
|
592
|
+
3,
|
|
593
|
+
TypeOfGrid.CORNER_POINT,
|
|
594
|
+
RockModel.SINGLE_PERMEABILITY_POROSITY,
|
|
595
|
+
GridFormat.IRREGULAR_CORNER_POINT,
|
|
596
|
+
),
|
|
597
|
+
gridunit=GridUnit(),
|
|
598
|
+
),
|
|
599
|
+
global_grid,
|
|
600
|
+
[],
|
|
601
|
+
[],
|
|
602
|
+
)
|
|
603
|
+
|
|
604
|
+
@property
|
|
605
|
+
def coord(self) -> np.ndarray:
|
|
606
|
+
return self.global_grid.coord
|
|
607
|
+
|
|
608
|
+
@coord.setter
|
|
609
|
+
def coord(self, value: np.ndarray):
|
|
610
|
+
self.global_grid.coord = value
|
|
611
|
+
|
|
612
|
+
@property
|
|
613
|
+
def zcorn(self) -> np.ndarray:
|
|
614
|
+
return self.global_grid.zcorn
|
|
615
|
+
|
|
616
|
+
@zcorn.setter
|
|
617
|
+
def zcorn(self, value: np.ndarray):
|
|
618
|
+
self.global_grid.zcorn = value
|
|
619
|
+
|
|
620
|
+
@property
|
|
621
|
+
def actnum(self) -> np.ndarray | None:
|
|
622
|
+
return self.global_grid.actnum
|
|
623
|
+
|
|
624
|
+
@classmethod
|
|
625
|
+
def from_file(cls, filelike, fileformat: FileFormat = None):
|
|
626
|
+
"""
|
|
627
|
+
Read an egrid file
|
|
628
|
+
Args:
|
|
629
|
+
filelike (str,Path,stream): The egrid file to be read.
|
|
630
|
+
file_format (None or str): The format of the file (either "egrid"
|
|
631
|
+
or "fegrid") None means guess.
|
|
632
|
+
Returns:
|
|
633
|
+
EGrid with the contents of the file.
|
|
634
|
+
"""
|
|
635
|
+
file_format = None
|
|
636
|
+
if fileformat == FileFormat.EGRID:
|
|
637
|
+
file_format = resfo.Format.UNFORMATTED
|
|
638
|
+
elif fileformat == FileFormat.FEGRID:
|
|
639
|
+
file_format = resfo.Format.FORMATTED
|
|
640
|
+
elif fileformat is not None:
|
|
641
|
+
raise ValueError(f"Unrecognized egrid file format {fileformat}")
|
|
642
|
+
return EGridReader(filelike, file_format=file_format).read()
|
|
643
|
+
|
|
644
|
+
def to_file(self, filelike, fileformat: str = "egrid"):
|
|
645
|
+
"""
|
|
646
|
+
write the EGrid to file.
|
|
647
|
+
Args:
|
|
648
|
+
filelike (str,Path,stream): The egrid file to write to.
|
|
649
|
+
file_format (resfo.Format): The format of the file.
|
|
650
|
+
"""
|
|
651
|
+
file_format = None
|
|
652
|
+
if fileformat == "egrid":
|
|
653
|
+
file_format = resfo.Format.UNFORMATTED
|
|
654
|
+
elif fileformat == "fegrid":
|
|
655
|
+
file_format = resfo.Format.FORMATTED
|
|
656
|
+
elif fileformat is not None:
|
|
657
|
+
raise ValueError(f"Unrecognized egrid file format {fileformat}")
|
|
658
|
+
contents = []
|
|
659
|
+
contents += self.egrid_head.to_egrid()
|
|
660
|
+
contents += self.global_grid.to_egrid()
|
|
661
|
+
for lgr in self.lgr_sections:
|
|
662
|
+
contents += lgr.to_egrid()
|
|
663
|
+
for nnc in self.nnc_sections:
|
|
664
|
+
contents += nnc.to_egrid()
|
|
665
|
+
resfo.write(filelike, contents, file_format)
|
|
666
|
+
|
|
667
|
+
def _check_xtgeo_compatible(self):
|
|
668
|
+
self.global_grid._check_xtgeo_compatible()
|
|
669
|
+
if self.lgr_sections:
|
|
670
|
+
warnings.warn(
|
|
671
|
+
"UserWarning: egrid file contains local grid refinements (LGR). "
|
|
672
|
+
"LGR's are not directly supported, only the global grid is "
|
|
673
|
+
"imported."
|
|
674
|
+
)
|
|
675
|
+
|
|
676
|
+
@property
|
|
677
|
+
def is_map_relative(self) -> bool:
|
|
678
|
+
if self.egrid_head.gridunit is None:
|
|
679
|
+
return False
|
|
680
|
+
return self.egrid_head.gridunit.grid_relative == GridRelative.MAP
|
|
681
|
+
|
|
682
|
+
@property
|
|
683
|
+
def mapaxes(self) -> MapAxes | None:
|
|
684
|
+
return self.egrid_head.mapaxes
|
|
685
|
+
|
|
686
|
+
@mapaxes.setter
|
|
687
|
+
def mapaxes(self, value):
|
|
688
|
+
self.egrid_head.mapaxes = value
|
|
689
|
+
|
|
690
|
+
@property
|
|
691
|
+
def dimensions(self) -> Dimensions:
|
|
692
|
+
return self.global_grid.dimensions
|
|
693
|
+
|
|
694
|
+
@property
|
|
695
|
+
def map_axis_units(self) -> Units:
|
|
696
|
+
return self.egrid_head.mapunits
|
|
697
|
+
|
|
698
|
+
@map_axis_units.setter
|
|
699
|
+
def map_axis_units(self, value):
|
|
700
|
+
self.egrid_head.mapunits = value
|
|
701
|
+
|
|
702
|
+
@property
|
|
703
|
+
def grid_units(self) -> Units:
|
|
704
|
+
return self.egrid_head.gridunit.unit
|
|
705
|
+
|
|
706
|
+
@grid_units.setter
|
|
707
|
+
def grid_units(self, value):
|
|
708
|
+
self.egrid_head.gridunit.unit = value
|
|
709
|
+
|
|
710
|
+
@classmethod
|
|
711
|
+
def from_xtgeo_grid(cls, xtgeo_grid):
|
|
712
|
+
default_grid = super().from_xtgeo_grid(xtgeo_grid)
|
|
713
|
+
|
|
714
|
+
default_grid.global_grid.coord = default_grid.global_grid.coord.astype(
|
|
715
|
+
np.float32
|
|
716
|
+
)
|
|
717
|
+
default_grid.global_grid.zcorn = default_grid.global_grid.zcorn.astype(
|
|
718
|
+
np.float32
|
|
719
|
+
)
|
|
720
|
+
if xtgeo_grid._dualporo:
|
|
721
|
+
default_grid.rock_model = RockModel.DUAL_POROSITY
|
|
722
|
+
if xtgeo_grid._dualperm:
|
|
723
|
+
default_grid.rock_model = RockModel.DUAL_PERMEABILITY
|
|
724
|
+
|
|
725
|
+
if default_grid.egrid_head.gridunit is None:
|
|
726
|
+
warnings.warn(
|
|
727
|
+
"Unitless xtgeo grid converted to egrid. Assuming meters as unit."
|
|
728
|
+
)
|
|
729
|
+
default_grid.egrid_head.gridunit = GridUnit()
|
|
730
|
+
return default_grid
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
keyword_translation = {
|
|
734
|
+
"FILEHEAD": "file_head",
|
|
735
|
+
"MAPUNITS": "mapunits",
|
|
736
|
+
"MAPAXES ": "mapaxes",
|
|
737
|
+
"GRIDUNIT": "gridunit",
|
|
738
|
+
"GDORIENT": "gdorient",
|
|
739
|
+
"LGR ": "name",
|
|
740
|
+
"GRIDHEAD": "grid_head",
|
|
741
|
+
"HOSTNUM ": "hostnum",
|
|
742
|
+
"BOXORIG ": "boxorig",
|
|
743
|
+
"COORDSYS": "coord_sys",
|
|
744
|
+
"LGRPARNT": "parent",
|
|
745
|
+
"LGRSGRID": "grid_parent",
|
|
746
|
+
"COORD ": "coord",
|
|
747
|
+
"ZCORN ": "zcorn",
|
|
748
|
+
"ACTNUM ": "actnum",
|
|
749
|
+
"NNCHEAD ": "nnchead",
|
|
750
|
+
"NNC1 ": "upstream_nnc",
|
|
751
|
+
"NNC2 ": "downstream_nnc",
|
|
752
|
+
"NNCL ": "nncl",
|
|
753
|
+
"NNCG ": "nncg",
|
|
754
|
+
"NNCHEADA": "lgr_idxs",
|
|
755
|
+
"NNA1 ": "nna1",
|
|
756
|
+
"NNA2 ": "nna2",
|
|
757
|
+
"CORSNUM ": "corsnum",
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
class EGridReader:
|
|
762
|
+
"""
|
|
763
|
+
The EGridReader reads an egrid file through the `read` method.
|
|
764
|
+
|
|
765
|
+
Args:
|
|
766
|
+
filelike (str, Path, stream): The egrid file to read from.
|
|
767
|
+
file_format (None or resfo.Format): The format of the file,
|
|
768
|
+
None means guess.
|
|
769
|
+
|
|
770
|
+
"""
|
|
771
|
+
|
|
772
|
+
def __init__(self, filelike, file_format: resfo.Format = None):
|
|
773
|
+
self.filelike = filelike
|
|
774
|
+
self.keyword_generator = resfo.lazy_read(filelike, file_format)
|
|
775
|
+
|
|
776
|
+
def read_section(
|
|
777
|
+
self,
|
|
778
|
+
keyword_factories: dict[str, Callable],
|
|
779
|
+
required_keywords: set[str],
|
|
780
|
+
stop_keywords: Iterable[str],
|
|
781
|
+
skip_keywords: Iterable[str] = [],
|
|
782
|
+
keyword_visitors: Iterable[Callable] = [],
|
|
783
|
+
):
|
|
784
|
+
"""
|
|
785
|
+
Read a general egrid file section.
|
|
786
|
+
Args:
|
|
787
|
+
keyword_factories (dict[str, func]): The function used
|
|
788
|
+
to construct a section member.
|
|
789
|
+
required_keywords (List[str]): List of keywords that are required
|
|
790
|
+
for the given section.
|
|
791
|
+
stop_keywords (List[str]): List of keywords which when read ends
|
|
792
|
+
the section. The keyword generator will be at the first keyword
|
|
793
|
+
in stop_keywords after read_section is called.
|
|
794
|
+
skip_keywords (List[str]): List of keywords that does not
|
|
795
|
+
have a factory, which should just be skipped.
|
|
796
|
+
keyword_visitors (List[func]): List of functions that
|
|
797
|
+
"visit" each keyword. Each of these functions are called
|
|
798
|
+
for each keyword, value pair and can be used to
|
|
799
|
+
preprocess the data.
|
|
800
|
+
|
|
801
|
+
Returns:
|
|
802
|
+
dictionary of parameters for the constructor of the given section.
|
|
803
|
+
"""
|
|
804
|
+
results = {}
|
|
805
|
+
i = 0
|
|
806
|
+
while True:
|
|
807
|
+
try:
|
|
808
|
+
entry = next(self.keyword_generator)
|
|
809
|
+
except StopIteration:
|
|
810
|
+
break
|
|
811
|
+
kw = entry.read_keyword()
|
|
812
|
+
if kw in skip_keywords:
|
|
813
|
+
continue
|
|
814
|
+
if kw in stop_keywords and i > 0:
|
|
815
|
+
# Optional keywords were possibly omitted and
|
|
816
|
+
# we have reached the global grid section
|
|
817
|
+
# push back the grid head of the global grid
|
|
818
|
+
# and proceed
|
|
819
|
+
self.keyword_generator = chain([entry], self.keyword_generator)
|
|
820
|
+
break
|
|
821
|
+
if kw in results:
|
|
822
|
+
raise EGridFileFormatError(f"Duplicate keyword {kw} in {self.filelike}")
|
|
823
|
+
try:
|
|
824
|
+
factory = keyword_factories[kw]
|
|
825
|
+
except KeyError as err:
|
|
826
|
+
raise EGridFileFormatError(f"Unknown egrid keyword {kw}") from err
|
|
827
|
+
try:
|
|
828
|
+
value = factory(entry.read_array())
|
|
829
|
+
results[kw] = value
|
|
830
|
+
except (ValueError, IndexError, TypeError) as err:
|
|
831
|
+
raise EGridFileFormatError(f"Incorrect values in keyword {kw}") from err
|
|
832
|
+
for visit in keyword_visitors:
|
|
833
|
+
visit(kw, value)
|
|
834
|
+
i += 1
|
|
835
|
+
|
|
836
|
+
missing_keywords = required_keywords.difference(results.keys())
|
|
837
|
+
params = {keyword_translation[kw]: v for kw, v in results.items()}
|
|
838
|
+
if missing_keywords:
|
|
839
|
+
raise EGridFileFormatError(f"Missing required keywords {missing_keywords}")
|
|
840
|
+
return params
|
|
841
|
+
|
|
842
|
+
def read_header(self) -> EGridHead:
|
|
843
|
+
"""
|
|
844
|
+
Reads the EGrid header from the start of the stream. Ensures
|
|
845
|
+
that the keyword_generator is at the first GRIDHEAD keyword
|
|
846
|
+
after the header.
|
|
847
|
+
"""
|
|
848
|
+
params = self.read_section(
|
|
849
|
+
keyword_factories={
|
|
850
|
+
"FILEHEAD": Filehead.from_egrid,
|
|
851
|
+
"MAPUNITS": lambda x: Units.from_bgrdecl(x[0]),
|
|
852
|
+
"MAPAXES ": MapAxes.from_bgrdecl,
|
|
853
|
+
"GRIDUNIT": GridUnit.from_bgrdecl,
|
|
854
|
+
"GDORIENT": GdOrient.from_bgrdecl,
|
|
855
|
+
},
|
|
856
|
+
required_keywords={"FILEHEAD"},
|
|
857
|
+
stop_keywords=["GRIDHEAD"],
|
|
858
|
+
)
|
|
859
|
+
return EGridHead(**params)
|
|
860
|
+
|
|
861
|
+
def read_global_grid(self) -> GlobalGrid:
|
|
862
|
+
"""
|
|
863
|
+
Reads the global grid section from the start of the keyword_generator,
|
|
864
|
+
ensures the keyword_generator is at the keyword after the first ENDGRID
|
|
865
|
+
keyword encountered.
|
|
866
|
+
"""
|
|
867
|
+
|
|
868
|
+
def check_gridhead(kw: str, value):
|
|
869
|
+
if kw == "GRIDHEAD" and value.type_of_grid != TypeOfGrid.CORNER_POINT:
|
|
870
|
+
raise NotImplementedError(
|
|
871
|
+
"XTGeo does not support unstructured or mixed grids."
|
|
872
|
+
)
|
|
873
|
+
|
|
874
|
+
params = self.read_section(
|
|
875
|
+
keyword_factories={
|
|
876
|
+
"GRIDHEAD": GridHead.from_egrid,
|
|
877
|
+
"BOXORIG ": tuple,
|
|
878
|
+
"COORDSYS": MapAxes.from_bgrdecl,
|
|
879
|
+
"COORD ": lambda x: np.array(x, dtype=np.float32),
|
|
880
|
+
"ZCORN ": lambda x: np.array(x, dtype=np.float32),
|
|
881
|
+
"ACTNUM ": lambda x: np.array(x, dtype=np.int32),
|
|
882
|
+
"CORSNUM ": lambda x: np.array(x, dtype=np.int32),
|
|
883
|
+
},
|
|
884
|
+
required_keywords={"GRIDHEAD", "COORD ", "ZCORN "},
|
|
885
|
+
stop_keywords=["ENDGRID "],
|
|
886
|
+
keyword_visitors=[check_gridhead],
|
|
887
|
+
)
|
|
888
|
+
try:
|
|
889
|
+
entry = next(self.keyword_generator)
|
|
890
|
+
except StopIteration as err:
|
|
891
|
+
raise EGridFileFormatError(
|
|
892
|
+
"Did not read ENDGRID after global grid"
|
|
893
|
+
) from err
|
|
894
|
+
if entry.read_keyword() != "ENDGRID ":
|
|
895
|
+
raise EGridFileFormatError("Did not read ENDGRID after global grid")
|
|
896
|
+
return GlobalGrid(**params)
|
|
897
|
+
|
|
898
|
+
def read_subsections(self) -> tuple[list[LGRSection], list[NNCSection]]:
|
|
899
|
+
"""
|
|
900
|
+
Reads lgr and nnc subsections from the start of the keyword_generator.
|
|
901
|
+
"""
|
|
902
|
+
lgr_sections = []
|
|
903
|
+
nnc_sections = []
|
|
904
|
+
while True:
|
|
905
|
+
try:
|
|
906
|
+
entry = next(self.keyword_generator)
|
|
907
|
+
except StopIteration:
|
|
908
|
+
break
|
|
909
|
+
self.keyword_generator = chain([entry], self.keyword_generator)
|
|
910
|
+
keyword = entry.read_keyword().rstrip()
|
|
911
|
+
if keyword == "LGR":
|
|
912
|
+
lgr_sections.append(self.read_lgr_subsection())
|
|
913
|
+
elif keyword == "NNCHEAD":
|
|
914
|
+
nnc_sections.append(self.read_nnc_subsection())
|
|
915
|
+
elif keyword == "NNCHEADA":
|
|
916
|
+
nnc_sections.append(self.read_amalgamation_subsection())
|
|
917
|
+
else:
|
|
918
|
+
raise EGridFileFormatError(
|
|
919
|
+
f"egrid subsection started with unexpected keyword {keyword}"
|
|
920
|
+
)
|
|
921
|
+
return lgr_sections, nnc_sections
|
|
922
|
+
|
|
923
|
+
def read_lgr_subsection(self) -> LGRSection:
|
|
924
|
+
"""
|
|
925
|
+
Reads one lgr subsection from the start of the keyword generator.
|
|
926
|
+
After read_lgr_subsection is called, The keyword_generator is at the
|
|
927
|
+
keyword after the first ENDLGR keyword encountered, or end of stream.
|
|
928
|
+
"""
|
|
929
|
+
params = self.read_section(
|
|
930
|
+
keyword_factories={
|
|
931
|
+
"LGR ": lambda x: x[0].decode("ascii"),
|
|
932
|
+
"LGRPARNT": lambda x: x[0].decode("ascii"),
|
|
933
|
+
"LGRSGRID": lambda x: x[0].decode("ascii"),
|
|
934
|
+
"GRIDHEAD": GridHead.from_egrid,
|
|
935
|
+
"BOXORIG ": tuple,
|
|
936
|
+
"COORDSYS": MapAxes.from_bgrdecl,
|
|
937
|
+
"COORD ": lambda x: np.array(x, dtype=np.float32),
|
|
938
|
+
"ZCORN ": lambda x: np.array(x, dtype=np.float32),
|
|
939
|
+
"ACTNUM ": lambda x: np.array(x, dtype=np.int32),
|
|
940
|
+
"HOSTNUM ": lambda x: np.array(x, dtype=np.int32),
|
|
941
|
+
},
|
|
942
|
+
required_keywords={
|
|
943
|
+
"LGR ",
|
|
944
|
+
"GRIDHEAD",
|
|
945
|
+
"COORD ",
|
|
946
|
+
"ZCORN ",
|
|
947
|
+
"HOSTNUM ",
|
|
948
|
+
},
|
|
949
|
+
skip_keywords=["ENDGRID "],
|
|
950
|
+
stop_keywords=["ENDLGR "],
|
|
951
|
+
)
|
|
952
|
+
try:
|
|
953
|
+
entry = next(self.keyword_generator)
|
|
954
|
+
except StopIteration as err:
|
|
955
|
+
raise EGridFileFormatError("Did not read ENDLGR after lgr section") from err
|
|
956
|
+
if entry.read_keyword() != "ENDLGR ":
|
|
957
|
+
raise EGridFileFormatError("Did not read ENDLGR after lgr section")
|
|
958
|
+
return LGRSection(**params)
|
|
959
|
+
|
|
960
|
+
def read_nnc_subsection(self) -> NNCSection:
|
|
961
|
+
"""
|
|
962
|
+
Reads one nnc subsection from the start of the keyword generator.
|
|
963
|
+
After read_nncsubsection is called, The keyword_generator is
|
|
964
|
+
at the next NNCHEAD, NNCHEADA or LGR keyword, or end of stream.
|
|
965
|
+
"""
|
|
966
|
+
params = self.read_section(
|
|
967
|
+
keyword_factories={
|
|
968
|
+
"NNCHEAD ": NNCHead.from_egrid,
|
|
969
|
+
"NNC1 ": lambda x: np.array(x, dtype=np.int32),
|
|
970
|
+
"NNC2 ": lambda x: np.array(x, dtype=np.int32),
|
|
971
|
+
"NNCL ": lambda x: np.array(x, dtype=np.int32),
|
|
972
|
+
"NNCG ": lambda x: np.array(x, dtype=np.int32),
|
|
973
|
+
},
|
|
974
|
+
required_keywords={"NNCHEAD ", "NNC1 ", "NNC2 "},
|
|
975
|
+
stop_keywords=["NNCHEAD ", "LGR ", "NNCHEADA"],
|
|
976
|
+
)
|
|
977
|
+
return NNCSection(**params)
|
|
978
|
+
|
|
979
|
+
def read_amalgamation_subsection(self) -> AmalgamationSection:
|
|
980
|
+
"""
|
|
981
|
+
Reads one amalgamation subsection from the start of the keyword
|
|
982
|
+
generator. After read_nncsubsection is called, The keyword_generator is
|
|
983
|
+
at the next NNCHEAD, NNCHEADA or LGR keyword, or end of stream.
|
|
984
|
+
"""
|
|
985
|
+
params = self.read_section(
|
|
986
|
+
keyword_factories={
|
|
987
|
+
"NNCHEADA": lambda x: tuple(x[0:2]),
|
|
988
|
+
"NNA1 ": lambda x: np.array(x, dtype=np.int32),
|
|
989
|
+
"NNA2 ": lambda x: np.array(x, dtype=np.int32),
|
|
990
|
+
},
|
|
991
|
+
required_keywords={"NNCHEADA", "NNA1 ", "NNA2 "},
|
|
992
|
+
stop_keywords=["NNCHEAD ", "LGR ", "NNCHEADA"],
|
|
993
|
+
)
|
|
994
|
+
return AmalgamationSection(**params)
|
|
995
|
+
|
|
996
|
+
def read(self) -> EGrid:
|
|
997
|
+
header = self.read_header()
|
|
998
|
+
if header.file_head.type_of_grid != TypeOfGrid.CORNER_POINT:
|
|
999
|
+
raise NotImplementedError(
|
|
1000
|
+
"XTGeo does not support unstructured or mixed grids."
|
|
1001
|
+
)
|
|
1002
|
+
global_grid = self.read_global_grid()
|
|
1003
|
+
lgr_sections, nnc_sections = self.read_subsections()
|
|
1004
|
+
return EGrid(header, global_grid, lgr_sections, nnc_sections)
|