xtgeo 4.7.1__cp39-cp39-win_amd64.whl → 4.9.0__cp39-cp39-win_amd64.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 +0 -6
- cxtgeoPYTHON_wrap.c +0 -558
- xtgeo/_cxtgeo.cp39-win_amd64.pyd +0 -0
- xtgeo/_internal.cp39-win_amd64.pyd +0 -0
- xtgeo/common/log.py +14 -9
- xtgeo/common/version.py +2 -2
- xtgeo/grid3d/_grid_etc1.py +43 -53
- xtgeo/grid3d/_grid_refine.py +9 -29
- xtgeo/grid3d/grid.py +210 -19
- xtgeo/surface/_regsurf_grid3d.py +12 -8
- xtgeo/well/_well_io.py +2 -3
- xtgeo/xyz/_xyz.py +17 -0
- xtgeo/xyz/points.py +4 -0
- xtgeo/xyz/polygons.py +4 -0
- {xtgeo-4.7.1.dist-info → xtgeo-4.9.0.dist-info}/METADATA +2 -1
- {xtgeo-4.7.1.dist-info → xtgeo-4.9.0.dist-info}/RECORD +18 -18
- {xtgeo-4.7.1.dist-info → xtgeo-4.9.0.dist-info}/WHEEL +1 -1
- {xtgeo-4.7.1.dist-info → xtgeo-4.9.0.dist-info}/licenses/LICENSE.md +0 -0
cxtgeo.py
CHANGED
|
@@ -478,9 +478,6 @@ def grd3d_reduce_onelayer(nx, ny, nz, swig_np_dbl_in_v1, swig_np_dbl_inplace_v1,
|
|
|
478
478
|
def grd3d_get_lay_slice(nx, ny, nz, swig_np_dbl_in_v1, swig_np_dbl_in_v2, swig_np_int_in_v1, kslice, koption, actonly, swig_np_dbl_aout_v1, swig_np_lng_aout_v1):
|
|
479
479
|
return _cxtgeo.grd3d_get_lay_slice(nx, ny, nz, swig_np_dbl_in_v1, swig_np_dbl_in_v2, swig_np_int_in_v1, kslice, koption, actonly, swig_np_dbl_aout_v1, swig_np_lng_aout_v1)
|
|
480
480
|
|
|
481
|
-
def grd3d_refine_vert(nx, ny, nz, swig_np_dbl_in_v2, swig_np_int_in_v1, nzref, swig_np_dbl_inplace_v2, swig_np_int_inplace_v1, rfac):
|
|
482
|
-
return _cxtgeo.grd3d_refine_vert(nx, ny, nz, swig_np_dbl_in_v2, swig_np_int_in_v1, nzref, swig_np_dbl_inplace_v2, swig_np_int_inplace_v1, rfac)
|
|
483
|
-
|
|
484
481
|
def grd3d_convert_hybrid(nx, ny, nz, swig_np_dbl_in_v1, swig_np_dbl_in_v2, swig_np_int_in_v1, nzhyb, swig_np_dbl_inplace_v1, swig_np_int_inplace_v1, toplevel, botlevel, ndiv, swig_np_int_in_v2, region):
|
|
485
482
|
return _cxtgeo.grd3d_convert_hybrid(nx, ny, nz, swig_np_dbl_in_v1, swig_np_dbl_in_v2, swig_np_int_in_v1, nzhyb, swig_np_dbl_inplace_v1, swig_np_int_inplace_v1, toplevel, botlevel, ndiv, swig_np_int_in_v2, region)
|
|
486
483
|
|
|
@@ -499,9 +496,6 @@ def grd3d_point_val_crange(x, y, z, nx, ny, nz, p_coor_v, zcornsv, actnumsv, p_v
|
|
|
499
496
|
def grd3d_point_in_cell(ibstart, kzonly, x, y, z, nx, ny, nz, p_coor_v, zcornsv, actnumsv, maxrad, sflag, nradsearch, option):
|
|
500
497
|
return _cxtgeo.grd3d_point_in_cell(ibstart, kzonly, x, y, z, nx, ny, nz, p_coor_v, zcornsv, actnumsv, maxrad, sflag, nradsearch, option)
|
|
501
498
|
|
|
502
|
-
def grd3d_points_ijk_cells(swig_np_dbl_in_v1, swig_np_dbl_in_v2, swig_np_dbl_in_v3, mcol, mrow, xori, yori, xinc, yinc, rotation, yflip, maptopi, maptopj, mapbasi, mapbasj, nx, ny, nz, swig_np_dbl_in_v4, swig_np_dbl_in_v5, swig_np_int_in_v1, swig_np_dbl_in_v6, actnumoption, swig_np_int_aout_v1, swig_np_int_aout_v2, swig_np_int_aout_v3):
|
|
503
|
-
return _cxtgeo.grd3d_points_ijk_cells(swig_np_dbl_in_v1, swig_np_dbl_in_v2, swig_np_dbl_in_v3, mcol, mrow, xori, yori, xinc, yinc, rotation, yflip, maptopi, maptopj, mapbasi, mapbasj, nx, ny, nz, swig_np_dbl_in_v4, swig_np_dbl_in_v5, swig_np_int_in_v1, swig_np_dbl_in_v6, actnumoption, swig_np_int_aout_v1, swig_np_int_aout_v2, swig_np_int_aout_v3)
|
|
504
|
-
|
|
505
499
|
def grd3d_get_randomline(swig_np_dbl_in_v1, swig_np_dbl_in_v2, zmin, zmax, nzsam, mcol, mrow, xori, yori, xinc, yinc, rotation, yflip, maptopi, maptopj, mapbasi, mapbasj, nx, ny, nz, swig_np_dbl_in_v3, swig_np_dbl_in_v4, swig_np_int_in_v1, p_val_v, swig_np_dbl_in_v5, swig_np_int_in_v2, swig_np_dbl_aout_v1):
|
|
506
500
|
return _cxtgeo.grd3d_get_randomline(swig_np_dbl_in_v1, swig_np_dbl_in_v2, zmin, zmax, nzsam, mcol, mrow, xori, yori, xinc, yinc, rotation, yflip, maptopi, maptopj, mapbasi, mapbasj, nx, ny, nz, swig_np_dbl_in_v3, swig_np_dbl_in_v4, swig_np_int_in_v1, p_val_v, swig_np_dbl_in_v5, swig_np_int_in_v2, swig_np_dbl_aout_v1)
|
|
507
501
|
|
cxtgeoPYTHON_wrap.c
CHANGED
|
@@ -15017,149 +15017,6 @@ fail:
|
|
|
15017
15017
|
}
|
|
15018
15018
|
|
|
15019
15019
|
|
|
15020
|
-
SWIGINTERN PyObject *_wrap_grd3d_refine_vert(PyObject *self, PyObject *args) {
|
|
15021
|
-
PyObject *resultobj = 0;
|
|
15022
|
-
int arg1 ;
|
|
15023
|
-
int arg2 ;
|
|
15024
|
-
int arg3 ;
|
|
15025
|
-
double *arg4 = (double *) 0 ;
|
|
15026
|
-
long arg5 ;
|
|
15027
|
-
int *arg6 = (int *) 0 ;
|
|
15028
|
-
long arg7 ;
|
|
15029
|
-
int arg8 ;
|
|
15030
|
-
double *arg9 = (double *) 0 ;
|
|
15031
|
-
long arg10 ;
|
|
15032
|
-
int *arg11 = (int *) 0 ;
|
|
15033
|
-
long arg12 ;
|
|
15034
|
-
int *arg13 = (int *) 0 ;
|
|
15035
|
-
int val1 ;
|
|
15036
|
-
int ecode1 = 0 ;
|
|
15037
|
-
int val2 ;
|
|
15038
|
-
int ecode2 = 0 ;
|
|
15039
|
-
int val3 ;
|
|
15040
|
-
int ecode3 = 0 ;
|
|
15041
|
-
PyArrayObject *array4 = NULL ;
|
|
15042
|
-
int is_new_object4 = 0 ;
|
|
15043
|
-
PyArrayObject *array6 = NULL ;
|
|
15044
|
-
int is_new_object6 = 0 ;
|
|
15045
|
-
int val8 ;
|
|
15046
|
-
int ecode8 = 0 ;
|
|
15047
|
-
PyArrayObject *array9 = NULL ;
|
|
15048
|
-
int i9 = 1 ;
|
|
15049
|
-
PyArrayObject *array11 = NULL ;
|
|
15050
|
-
int i11 = 1 ;
|
|
15051
|
-
void *argp13 = 0 ;
|
|
15052
|
-
int res13 = 0 ;
|
|
15053
|
-
PyObject *swig_obj[9] ;
|
|
15054
|
-
int result;
|
|
15055
|
-
|
|
15056
|
-
(void)self;
|
|
15057
|
-
if (!SWIG_Python_UnpackTuple(args, "grd3d_refine_vert", 9, 9, swig_obj)) SWIG_fail;
|
|
15058
|
-
ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
|
|
15059
|
-
if (!SWIG_IsOK(ecode1)) {
|
|
15060
|
-
SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "grd3d_refine_vert" "', argument " "1"" of type '" "int""'");
|
|
15061
|
-
}
|
|
15062
|
-
arg1 = (int)(val1);
|
|
15063
|
-
ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
|
|
15064
|
-
if (!SWIG_IsOK(ecode2)) {
|
|
15065
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grd3d_refine_vert" "', argument " "2"" of type '" "int""'");
|
|
15066
|
-
}
|
|
15067
|
-
arg2 = (int)(val2);
|
|
15068
|
-
ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
|
|
15069
|
-
if (!SWIG_IsOK(ecode3)) {
|
|
15070
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grd3d_refine_vert" "', argument " "3"" of type '" "int""'");
|
|
15071
|
-
}
|
|
15072
|
-
arg3 = (int)(val3);
|
|
15073
|
-
{
|
|
15074
|
-
npy_intp size[1] = {
|
|
15075
|
-
-1
|
|
15076
|
-
};
|
|
15077
|
-
array4 = obj_to_array_contiguous_allow_conversion(swig_obj[3],
|
|
15078
|
-
NPY_DOUBLE,
|
|
15079
|
-
&is_new_object4);
|
|
15080
|
-
if (!array4 || !require_dimensions(array4, 1) ||
|
|
15081
|
-
!require_size(array4, size, 1)) SWIG_fail;
|
|
15082
|
-
arg4 = (double*) array_data(array4);
|
|
15083
|
-
arg5 = (long) array_size(array4,0);
|
|
15084
|
-
}
|
|
15085
|
-
{
|
|
15086
|
-
npy_intp size[1] = {
|
|
15087
|
-
-1
|
|
15088
|
-
};
|
|
15089
|
-
array6 = obj_to_array_contiguous_allow_conversion(swig_obj[4],
|
|
15090
|
-
NPY_INT,
|
|
15091
|
-
&is_new_object6);
|
|
15092
|
-
if (!array6 || !require_dimensions(array6, 1) ||
|
|
15093
|
-
!require_size(array6, size, 1)) SWIG_fail;
|
|
15094
|
-
arg6 = (int*) array_data(array6);
|
|
15095
|
-
arg7 = (long) array_size(array6,0);
|
|
15096
|
-
}
|
|
15097
|
-
ecode8 = SWIG_AsVal_int(swig_obj[5], &val8);
|
|
15098
|
-
if (!SWIG_IsOK(ecode8)) {
|
|
15099
|
-
SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "grd3d_refine_vert" "', argument " "8"" of type '" "int""'");
|
|
15100
|
-
}
|
|
15101
|
-
arg8 = (int)(val8);
|
|
15102
|
-
{
|
|
15103
|
-
array9 = obj_to_array_no_conversion(swig_obj[6], NPY_DOUBLE);
|
|
15104
|
-
if (!array9 || !require_dimensions(array9,1) || !require_contiguous(array9)
|
|
15105
|
-
|| !require_native(array9)) SWIG_fail;
|
|
15106
|
-
arg9 = (double*) array_data(array9);
|
|
15107
|
-
arg10 = 1;
|
|
15108
|
-
for (i9=0; i9 < array_numdims(array9); ++i9) arg10 *= array_size(array9,i9);
|
|
15109
|
-
}
|
|
15110
|
-
{
|
|
15111
|
-
array11 = obj_to_array_no_conversion(swig_obj[7], NPY_INT);
|
|
15112
|
-
if (!array11 || !require_dimensions(array11,1) || !require_contiguous(array11)
|
|
15113
|
-
|| !require_native(array11)) SWIG_fail;
|
|
15114
|
-
arg11 = (int*) array_data(array11);
|
|
15115
|
-
arg12 = 1;
|
|
15116
|
-
for (i11=0; i11 < array_numdims(array11); ++i11) arg12 *= array_size(array11,i11);
|
|
15117
|
-
}
|
|
15118
|
-
res13 = SWIG_ConvertPtr(swig_obj[8], &argp13,SWIGTYPE_p_int, 0 | 0 );
|
|
15119
|
-
if (!SWIG_IsOK(res13)) {
|
|
15120
|
-
SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "grd3d_refine_vert" "', argument " "13"" of type '" "int *""'");
|
|
15121
|
-
}
|
|
15122
|
-
arg13 = (int *)(argp13);
|
|
15123
|
-
{
|
|
15124
|
-
char *err;
|
|
15125
|
-
clear_exception();
|
|
15126
|
-
result = (int)grd3d_refine_vert(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
|
|
15127
|
-
if ((err = check_exception())) {
|
|
15128
|
-
PyErr_SetString(PY_XTGeoCLibError, err);
|
|
15129
|
-
return NULL;
|
|
15130
|
-
}
|
|
15131
|
-
}
|
|
15132
|
-
resultobj = SWIG_From_int((int)(result));
|
|
15133
|
-
{
|
|
15134
|
-
if (is_new_object4 && array4)
|
|
15135
|
-
{
|
|
15136
|
-
Py_DECREF(array4);
|
|
15137
|
-
}
|
|
15138
|
-
}
|
|
15139
|
-
{
|
|
15140
|
-
if (is_new_object6 && array6)
|
|
15141
|
-
{
|
|
15142
|
-
Py_DECREF(array6);
|
|
15143
|
-
}
|
|
15144
|
-
}
|
|
15145
|
-
return resultobj;
|
|
15146
|
-
fail:
|
|
15147
|
-
{
|
|
15148
|
-
if (is_new_object4 && array4)
|
|
15149
|
-
{
|
|
15150
|
-
Py_DECREF(array4);
|
|
15151
|
-
}
|
|
15152
|
-
}
|
|
15153
|
-
{
|
|
15154
|
-
if (is_new_object6 && array6)
|
|
15155
|
-
{
|
|
15156
|
-
Py_DECREF(array6);
|
|
15157
|
-
}
|
|
15158
|
-
}
|
|
15159
|
-
return NULL;
|
|
15160
|
-
}
|
|
15161
|
-
|
|
15162
|
-
|
|
15163
15020
|
SWIGINTERN PyObject *_wrap_grd3d_convert_hybrid(PyObject *self, PyObject *args) {
|
|
15164
15021
|
PyObject *resultobj = 0;
|
|
15165
15022
|
int arg1 ;
|
|
@@ -15968,419 +15825,6 @@ fail:
|
|
|
15968
15825
|
}
|
|
15969
15826
|
|
|
15970
15827
|
|
|
15971
|
-
SWIGINTERN PyObject *_wrap_grd3d_points_ijk_cells(PyObject *self, PyObject *args) {
|
|
15972
|
-
PyObject *resultobj = 0;
|
|
15973
|
-
double *arg1 = (double *) 0 ;
|
|
15974
|
-
long arg2 ;
|
|
15975
|
-
double *arg3 = (double *) 0 ;
|
|
15976
|
-
long arg4 ;
|
|
15977
|
-
double *arg5 = (double *) 0 ;
|
|
15978
|
-
long arg6 ;
|
|
15979
|
-
int arg7 ;
|
|
15980
|
-
int arg8 ;
|
|
15981
|
-
double arg9 ;
|
|
15982
|
-
double arg10 ;
|
|
15983
|
-
double arg11 ;
|
|
15984
|
-
double arg12 ;
|
|
15985
|
-
double arg13 ;
|
|
15986
|
-
int arg14 ;
|
|
15987
|
-
double *arg15 = (double *) 0 ;
|
|
15988
|
-
double *arg16 = (double *) 0 ;
|
|
15989
|
-
double *arg17 = (double *) 0 ;
|
|
15990
|
-
double *arg18 = (double *) 0 ;
|
|
15991
|
-
int arg19 ;
|
|
15992
|
-
int arg20 ;
|
|
15993
|
-
int arg21 ;
|
|
15994
|
-
double *arg22 = (double *) 0 ;
|
|
15995
|
-
long arg23 ;
|
|
15996
|
-
double *arg24 = (double *) 0 ;
|
|
15997
|
-
long arg25 ;
|
|
15998
|
-
int *arg26 = (int *) 0 ;
|
|
15999
|
-
long arg27 ;
|
|
16000
|
-
double *arg28 = (double *) 0 ;
|
|
16001
|
-
long arg29 ;
|
|
16002
|
-
int arg30 ;
|
|
16003
|
-
int *arg31 = (int *) 0 ;
|
|
16004
|
-
long arg32 ;
|
|
16005
|
-
int *arg33 = (int *) 0 ;
|
|
16006
|
-
long arg34 ;
|
|
16007
|
-
int *arg35 = (int *) 0 ;
|
|
16008
|
-
long arg36 ;
|
|
16009
|
-
PyArrayObject *array1 = NULL ;
|
|
16010
|
-
int is_new_object1 = 0 ;
|
|
16011
|
-
PyArrayObject *array3 = NULL ;
|
|
16012
|
-
int is_new_object3 = 0 ;
|
|
16013
|
-
PyArrayObject *array5 = NULL ;
|
|
16014
|
-
int is_new_object5 = 0 ;
|
|
16015
|
-
int val7 ;
|
|
16016
|
-
int ecode7 = 0 ;
|
|
16017
|
-
int val8 ;
|
|
16018
|
-
int ecode8 = 0 ;
|
|
16019
|
-
double val9 ;
|
|
16020
|
-
int ecode9 = 0 ;
|
|
16021
|
-
double val10 ;
|
|
16022
|
-
int ecode10 = 0 ;
|
|
16023
|
-
double val11 ;
|
|
16024
|
-
int ecode11 = 0 ;
|
|
16025
|
-
double val12 ;
|
|
16026
|
-
int ecode12 = 0 ;
|
|
16027
|
-
double val13 ;
|
|
16028
|
-
int ecode13 = 0 ;
|
|
16029
|
-
int val14 ;
|
|
16030
|
-
int ecode14 = 0 ;
|
|
16031
|
-
void *argp15 = 0 ;
|
|
16032
|
-
int res15 = 0 ;
|
|
16033
|
-
void *argp16 = 0 ;
|
|
16034
|
-
int res16 = 0 ;
|
|
16035
|
-
void *argp17 = 0 ;
|
|
16036
|
-
int res17 = 0 ;
|
|
16037
|
-
void *argp18 = 0 ;
|
|
16038
|
-
int res18 = 0 ;
|
|
16039
|
-
int val19 ;
|
|
16040
|
-
int ecode19 = 0 ;
|
|
16041
|
-
int val20 ;
|
|
16042
|
-
int ecode20 = 0 ;
|
|
16043
|
-
int val21 ;
|
|
16044
|
-
int ecode21 = 0 ;
|
|
16045
|
-
PyArrayObject *array22 = NULL ;
|
|
16046
|
-
int is_new_object22 = 0 ;
|
|
16047
|
-
PyArrayObject *array24 = NULL ;
|
|
16048
|
-
int is_new_object24 = 0 ;
|
|
16049
|
-
PyArrayObject *array26 = NULL ;
|
|
16050
|
-
int is_new_object26 = 0 ;
|
|
16051
|
-
PyArrayObject *array28 = NULL ;
|
|
16052
|
-
int is_new_object28 = 0 ;
|
|
16053
|
-
int val30 ;
|
|
16054
|
-
int ecode30 = 0 ;
|
|
16055
|
-
PyObject *array31 = NULL ;
|
|
16056
|
-
PyObject *array33 = NULL ;
|
|
16057
|
-
PyObject *array35 = NULL ;
|
|
16058
|
-
PyObject *swig_obj[26] ;
|
|
16059
|
-
int result;
|
|
16060
|
-
|
|
16061
|
-
(void)self;
|
|
16062
|
-
if (!SWIG_Python_UnpackTuple(args, "grd3d_points_ijk_cells", 26, 26, swig_obj)) SWIG_fail;
|
|
16063
|
-
{
|
|
16064
|
-
npy_intp size[1] = {
|
|
16065
|
-
-1
|
|
16066
|
-
};
|
|
16067
|
-
array1 = obj_to_array_contiguous_allow_conversion(swig_obj[0],
|
|
16068
|
-
NPY_DOUBLE,
|
|
16069
|
-
&is_new_object1);
|
|
16070
|
-
if (!array1 || !require_dimensions(array1, 1) ||
|
|
16071
|
-
!require_size(array1, size, 1)) SWIG_fail;
|
|
16072
|
-
arg1 = (double*) array_data(array1);
|
|
16073
|
-
arg2 = (long) array_size(array1,0);
|
|
16074
|
-
}
|
|
16075
|
-
{
|
|
16076
|
-
npy_intp size[1] = {
|
|
16077
|
-
-1
|
|
16078
|
-
};
|
|
16079
|
-
array3 = obj_to_array_contiguous_allow_conversion(swig_obj[1],
|
|
16080
|
-
NPY_DOUBLE,
|
|
16081
|
-
&is_new_object3);
|
|
16082
|
-
if (!array3 || !require_dimensions(array3, 1) ||
|
|
16083
|
-
!require_size(array3, size, 1)) SWIG_fail;
|
|
16084
|
-
arg3 = (double*) array_data(array3);
|
|
16085
|
-
arg4 = (long) array_size(array3,0);
|
|
16086
|
-
}
|
|
16087
|
-
{
|
|
16088
|
-
npy_intp size[1] = {
|
|
16089
|
-
-1
|
|
16090
|
-
};
|
|
16091
|
-
array5 = obj_to_array_contiguous_allow_conversion(swig_obj[2],
|
|
16092
|
-
NPY_DOUBLE,
|
|
16093
|
-
&is_new_object5);
|
|
16094
|
-
if (!array5 || !require_dimensions(array5, 1) ||
|
|
16095
|
-
!require_size(array5, size, 1)) SWIG_fail;
|
|
16096
|
-
arg5 = (double*) array_data(array5);
|
|
16097
|
-
arg6 = (long) array_size(array5,0);
|
|
16098
|
-
}
|
|
16099
|
-
ecode7 = SWIG_AsVal_int(swig_obj[3], &val7);
|
|
16100
|
-
if (!SWIG_IsOK(ecode7)) {
|
|
16101
|
-
SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "grd3d_points_ijk_cells" "', argument " "7"" of type '" "int""'");
|
|
16102
|
-
}
|
|
16103
|
-
arg7 = (int)(val7);
|
|
16104
|
-
ecode8 = SWIG_AsVal_int(swig_obj[4], &val8);
|
|
16105
|
-
if (!SWIG_IsOK(ecode8)) {
|
|
16106
|
-
SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "grd3d_points_ijk_cells" "', argument " "8"" of type '" "int""'");
|
|
16107
|
-
}
|
|
16108
|
-
arg8 = (int)(val8);
|
|
16109
|
-
ecode9 = SWIG_AsVal_double(swig_obj[5], &val9);
|
|
16110
|
-
if (!SWIG_IsOK(ecode9)) {
|
|
16111
|
-
SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "grd3d_points_ijk_cells" "', argument " "9"" of type '" "double""'");
|
|
16112
|
-
}
|
|
16113
|
-
arg9 = (double)(val9);
|
|
16114
|
-
ecode10 = SWIG_AsVal_double(swig_obj[6], &val10);
|
|
16115
|
-
if (!SWIG_IsOK(ecode10)) {
|
|
16116
|
-
SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "grd3d_points_ijk_cells" "', argument " "10"" of type '" "double""'");
|
|
16117
|
-
}
|
|
16118
|
-
arg10 = (double)(val10);
|
|
16119
|
-
ecode11 = SWIG_AsVal_double(swig_obj[7], &val11);
|
|
16120
|
-
if (!SWIG_IsOK(ecode11)) {
|
|
16121
|
-
SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "grd3d_points_ijk_cells" "', argument " "11"" of type '" "double""'");
|
|
16122
|
-
}
|
|
16123
|
-
arg11 = (double)(val11);
|
|
16124
|
-
ecode12 = SWIG_AsVal_double(swig_obj[8], &val12);
|
|
16125
|
-
if (!SWIG_IsOK(ecode12)) {
|
|
16126
|
-
SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "grd3d_points_ijk_cells" "', argument " "12"" of type '" "double""'");
|
|
16127
|
-
}
|
|
16128
|
-
arg12 = (double)(val12);
|
|
16129
|
-
ecode13 = SWIG_AsVal_double(swig_obj[9], &val13);
|
|
16130
|
-
if (!SWIG_IsOK(ecode13)) {
|
|
16131
|
-
SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "grd3d_points_ijk_cells" "', argument " "13"" of type '" "double""'");
|
|
16132
|
-
}
|
|
16133
|
-
arg13 = (double)(val13);
|
|
16134
|
-
ecode14 = SWIG_AsVal_int(swig_obj[10], &val14);
|
|
16135
|
-
if (!SWIG_IsOK(ecode14)) {
|
|
16136
|
-
SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "grd3d_points_ijk_cells" "', argument " "14"" of type '" "int""'");
|
|
16137
|
-
}
|
|
16138
|
-
arg14 = (int)(val14);
|
|
16139
|
-
res15 = SWIG_ConvertPtr(swig_obj[11], &argp15,SWIGTYPE_p_double, 0 | 0 );
|
|
16140
|
-
if (!SWIG_IsOK(res15)) {
|
|
16141
|
-
SWIG_exception_fail(SWIG_ArgError(res15), "in method '" "grd3d_points_ijk_cells" "', argument " "15"" of type '" "double *""'");
|
|
16142
|
-
}
|
|
16143
|
-
arg15 = (double *)(argp15);
|
|
16144
|
-
res16 = SWIG_ConvertPtr(swig_obj[12], &argp16,SWIGTYPE_p_double, 0 | 0 );
|
|
16145
|
-
if (!SWIG_IsOK(res16)) {
|
|
16146
|
-
SWIG_exception_fail(SWIG_ArgError(res16), "in method '" "grd3d_points_ijk_cells" "', argument " "16"" of type '" "double *""'");
|
|
16147
|
-
}
|
|
16148
|
-
arg16 = (double *)(argp16);
|
|
16149
|
-
res17 = SWIG_ConvertPtr(swig_obj[13], &argp17,SWIGTYPE_p_double, 0 | 0 );
|
|
16150
|
-
if (!SWIG_IsOK(res17)) {
|
|
16151
|
-
SWIG_exception_fail(SWIG_ArgError(res17), "in method '" "grd3d_points_ijk_cells" "', argument " "17"" of type '" "double *""'");
|
|
16152
|
-
}
|
|
16153
|
-
arg17 = (double *)(argp17);
|
|
16154
|
-
res18 = SWIG_ConvertPtr(swig_obj[14], &argp18,SWIGTYPE_p_double, 0 | 0 );
|
|
16155
|
-
if (!SWIG_IsOK(res18)) {
|
|
16156
|
-
SWIG_exception_fail(SWIG_ArgError(res18), "in method '" "grd3d_points_ijk_cells" "', argument " "18"" of type '" "double *""'");
|
|
16157
|
-
}
|
|
16158
|
-
arg18 = (double *)(argp18);
|
|
16159
|
-
ecode19 = SWIG_AsVal_int(swig_obj[15], &val19);
|
|
16160
|
-
if (!SWIG_IsOK(ecode19)) {
|
|
16161
|
-
SWIG_exception_fail(SWIG_ArgError(ecode19), "in method '" "grd3d_points_ijk_cells" "', argument " "19"" of type '" "int""'");
|
|
16162
|
-
}
|
|
16163
|
-
arg19 = (int)(val19);
|
|
16164
|
-
ecode20 = SWIG_AsVal_int(swig_obj[16], &val20);
|
|
16165
|
-
if (!SWIG_IsOK(ecode20)) {
|
|
16166
|
-
SWIG_exception_fail(SWIG_ArgError(ecode20), "in method '" "grd3d_points_ijk_cells" "', argument " "20"" of type '" "int""'");
|
|
16167
|
-
}
|
|
16168
|
-
arg20 = (int)(val20);
|
|
16169
|
-
ecode21 = SWIG_AsVal_int(swig_obj[17], &val21);
|
|
16170
|
-
if (!SWIG_IsOK(ecode21)) {
|
|
16171
|
-
SWIG_exception_fail(SWIG_ArgError(ecode21), "in method '" "grd3d_points_ijk_cells" "', argument " "21"" of type '" "int""'");
|
|
16172
|
-
}
|
|
16173
|
-
arg21 = (int)(val21);
|
|
16174
|
-
{
|
|
16175
|
-
npy_intp size[1] = {
|
|
16176
|
-
-1
|
|
16177
|
-
};
|
|
16178
|
-
array22 = obj_to_array_contiguous_allow_conversion(swig_obj[18],
|
|
16179
|
-
NPY_DOUBLE,
|
|
16180
|
-
&is_new_object22);
|
|
16181
|
-
if (!array22 || !require_dimensions(array22, 1) ||
|
|
16182
|
-
!require_size(array22, size, 1)) SWIG_fail;
|
|
16183
|
-
arg22 = (double*) array_data(array22);
|
|
16184
|
-
arg23 = (long) array_size(array22,0);
|
|
16185
|
-
}
|
|
16186
|
-
{
|
|
16187
|
-
npy_intp size[1] = {
|
|
16188
|
-
-1
|
|
16189
|
-
};
|
|
16190
|
-
array24 = obj_to_array_contiguous_allow_conversion(swig_obj[19],
|
|
16191
|
-
NPY_DOUBLE,
|
|
16192
|
-
&is_new_object24);
|
|
16193
|
-
if (!array24 || !require_dimensions(array24, 1) ||
|
|
16194
|
-
!require_size(array24, size, 1)) SWIG_fail;
|
|
16195
|
-
arg24 = (double*) array_data(array24);
|
|
16196
|
-
arg25 = (long) array_size(array24,0);
|
|
16197
|
-
}
|
|
16198
|
-
{
|
|
16199
|
-
npy_intp size[1] = {
|
|
16200
|
-
-1
|
|
16201
|
-
};
|
|
16202
|
-
array26 = obj_to_array_contiguous_allow_conversion(swig_obj[20],
|
|
16203
|
-
NPY_INT,
|
|
16204
|
-
&is_new_object26);
|
|
16205
|
-
if (!array26 || !require_dimensions(array26, 1) ||
|
|
16206
|
-
!require_size(array26, size, 1)) SWIG_fail;
|
|
16207
|
-
arg26 = (int*) array_data(array26);
|
|
16208
|
-
arg27 = (long) array_size(array26,0);
|
|
16209
|
-
}
|
|
16210
|
-
{
|
|
16211
|
-
npy_intp size[1] = {
|
|
16212
|
-
-1
|
|
16213
|
-
};
|
|
16214
|
-
array28 = obj_to_array_contiguous_allow_conversion(swig_obj[21],
|
|
16215
|
-
NPY_DOUBLE,
|
|
16216
|
-
&is_new_object28);
|
|
16217
|
-
if (!array28 || !require_dimensions(array28, 1) ||
|
|
16218
|
-
!require_size(array28, size, 1)) SWIG_fail;
|
|
16219
|
-
arg28 = (double*) array_data(array28);
|
|
16220
|
-
arg29 = (long) array_size(array28,0);
|
|
16221
|
-
}
|
|
16222
|
-
ecode30 = SWIG_AsVal_int(swig_obj[22], &val30);
|
|
16223
|
-
if (!SWIG_IsOK(ecode30)) {
|
|
16224
|
-
SWIG_exception_fail(SWIG_ArgError(ecode30), "in method '" "grd3d_points_ijk_cells" "', argument " "30"" of type '" "int""'");
|
|
16225
|
-
}
|
|
16226
|
-
arg30 = (int)(val30);
|
|
16227
|
-
{
|
|
16228
|
-
npy_intp dims[1];
|
|
16229
|
-
if (!PyInt_Check(swig_obj[23]))
|
|
16230
|
-
{
|
|
16231
|
-
const char* typestring = pytype_string(swig_obj[23]);
|
|
16232
|
-
PyErr_Format(PyExc_TypeError,
|
|
16233
|
-
"Int dimension expected. '%s' given.",
|
|
16234
|
-
typestring);
|
|
16235
|
-
SWIG_fail;
|
|
16236
|
-
}
|
|
16237
|
-
arg32 = (long) PyInt_AsLong(swig_obj[23]);
|
|
16238
|
-
dims[0] = (npy_intp) arg32;
|
|
16239
|
-
array31 = PyArray_SimpleNew(1, dims, NPY_INT);
|
|
16240
|
-
if (!array31) SWIG_fail;
|
|
16241
|
-
arg31 = (int*) array_data(array31);
|
|
16242
|
-
}
|
|
16243
|
-
{
|
|
16244
|
-
npy_intp dims[1];
|
|
16245
|
-
if (!PyInt_Check(swig_obj[24]))
|
|
16246
|
-
{
|
|
16247
|
-
const char* typestring = pytype_string(swig_obj[24]);
|
|
16248
|
-
PyErr_Format(PyExc_TypeError,
|
|
16249
|
-
"Int dimension expected. '%s' given.",
|
|
16250
|
-
typestring);
|
|
16251
|
-
SWIG_fail;
|
|
16252
|
-
}
|
|
16253
|
-
arg34 = (long) PyInt_AsLong(swig_obj[24]);
|
|
16254
|
-
dims[0] = (npy_intp) arg34;
|
|
16255
|
-
array33 = PyArray_SimpleNew(1, dims, NPY_INT);
|
|
16256
|
-
if (!array33) SWIG_fail;
|
|
16257
|
-
arg33 = (int*) array_data(array33);
|
|
16258
|
-
}
|
|
16259
|
-
{
|
|
16260
|
-
npy_intp dims[1];
|
|
16261
|
-
if (!PyInt_Check(swig_obj[25]))
|
|
16262
|
-
{
|
|
16263
|
-
const char* typestring = pytype_string(swig_obj[25]);
|
|
16264
|
-
PyErr_Format(PyExc_TypeError,
|
|
16265
|
-
"Int dimension expected. '%s' given.",
|
|
16266
|
-
typestring);
|
|
16267
|
-
SWIG_fail;
|
|
16268
|
-
}
|
|
16269
|
-
arg36 = (long) PyInt_AsLong(swig_obj[25]);
|
|
16270
|
-
dims[0] = (npy_intp) arg36;
|
|
16271
|
-
array35 = PyArray_SimpleNew(1, dims, NPY_INT);
|
|
16272
|
-
if (!array35) SWIG_fail;
|
|
16273
|
-
arg35 = (int*) array_data(array35);
|
|
16274
|
-
}
|
|
16275
|
-
{
|
|
16276
|
-
char *err;
|
|
16277
|
-
clear_exception();
|
|
16278
|
-
result = (int)grd3d_points_ijk_cells(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23,arg24,arg25,arg26,arg27,arg28,arg29,arg30,arg31,arg32,arg33,arg34,arg35,arg36);
|
|
16279
|
-
if ((err = check_exception())) {
|
|
16280
|
-
PyErr_SetString(PY_XTGeoCLibError, err);
|
|
16281
|
-
return NULL;
|
|
16282
|
-
}
|
|
16283
|
-
}
|
|
16284
|
-
resultobj = SWIG_From_int((int)(result));
|
|
16285
|
-
{
|
|
16286
|
-
resultobj = SWIG_Python_AppendOutput(resultobj,(PyObject*)array31);
|
|
16287
|
-
}
|
|
16288
|
-
{
|
|
16289
|
-
resultobj = SWIG_Python_AppendOutput(resultobj,(PyObject*)array33);
|
|
16290
|
-
}
|
|
16291
|
-
{
|
|
16292
|
-
resultobj = SWIG_Python_AppendOutput(resultobj,(PyObject*)array35);
|
|
16293
|
-
}
|
|
16294
|
-
{
|
|
16295
|
-
if (is_new_object1 && array1)
|
|
16296
|
-
{
|
|
16297
|
-
Py_DECREF(array1);
|
|
16298
|
-
}
|
|
16299
|
-
}
|
|
16300
|
-
{
|
|
16301
|
-
if (is_new_object3 && array3)
|
|
16302
|
-
{
|
|
16303
|
-
Py_DECREF(array3);
|
|
16304
|
-
}
|
|
16305
|
-
}
|
|
16306
|
-
{
|
|
16307
|
-
if (is_new_object5 && array5)
|
|
16308
|
-
{
|
|
16309
|
-
Py_DECREF(array5);
|
|
16310
|
-
}
|
|
16311
|
-
}
|
|
16312
|
-
{
|
|
16313
|
-
if (is_new_object22 && array22)
|
|
16314
|
-
{
|
|
16315
|
-
Py_DECREF(array22);
|
|
16316
|
-
}
|
|
16317
|
-
}
|
|
16318
|
-
{
|
|
16319
|
-
if (is_new_object24 && array24)
|
|
16320
|
-
{
|
|
16321
|
-
Py_DECREF(array24);
|
|
16322
|
-
}
|
|
16323
|
-
}
|
|
16324
|
-
{
|
|
16325
|
-
if (is_new_object26 && array26)
|
|
16326
|
-
{
|
|
16327
|
-
Py_DECREF(array26);
|
|
16328
|
-
}
|
|
16329
|
-
}
|
|
16330
|
-
{
|
|
16331
|
-
if (is_new_object28 && array28)
|
|
16332
|
-
{
|
|
16333
|
-
Py_DECREF(array28);
|
|
16334
|
-
}
|
|
16335
|
-
}
|
|
16336
|
-
return resultobj;
|
|
16337
|
-
fail:
|
|
16338
|
-
{
|
|
16339
|
-
if (is_new_object1 && array1)
|
|
16340
|
-
{
|
|
16341
|
-
Py_DECREF(array1);
|
|
16342
|
-
}
|
|
16343
|
-
}
|
|
16344
|
-
{
|
|
16345
|
-
if (is_new_object3 && array3)
|
|
16346
|
-
{
|
|
16347
|
-
Py_DECREF(array3);
|
|
16348
|
-
}
|
|
16349
|
-
}
|
|
16350
|
-
{
|
|
16351
|
-
if (is_new_object5 && array5)
|
|
16352
|
-
{
|
|
16353
|
-
Py_DECREF(array5);
|
|
16354
|
-
}
|
|
16355
|
-
}
|
|
16356
|
-
{
|
|
16357
|
-
if (is_new_object22 && array22)
|
|
16358
|
-
{
|
|
16359
|
-
Py_DECREF(array22);
|
|
16360
|
-
}
|
|
16361
|
-
}
|
|
16362
|
-
{
|
|
16363
|
-
if (is_new_object24 && array24)
|
|
16364
|
-
{
|
|
16365
|
-
Py_DECREF(array24);
|
|
16366
|
-
}
|
|
16367
|
-
}
|
|
16368
|
-
{
|
|
16369
|
-
if (is_new_object26 && array26)
|
|
16370
|
-
{
|
|
16371
|
-
Py_DECREF(array26);
|
|
16372
|
-
}
|
|
16373
|
-
}
|
|
16374
|
-
{
|
|
16375
|
-
if (is_new_object28 && array28)
|
|
16376
|
-
{
|
|
16377
|
-
Py_DECREF(array28);
|
|
16378
|
-
}
|
|
16379
|
-
}
|
|
16380
|
-
return NULL;
|
|
16381
|
-
}
|
|
16382
|
-
|
|
16383
|
-
|
|
16384
15828
|
SWIGINTERN PyObject *_wrap_grd3d_get_randomline(PyObject *self, PyObject *args) {
|
|
16385
15829
|
PyObject *resultobj = 0;
|
|
16386
15830
|
double *arg1 = (double *) 0 ;
|
|
@@ -20316,14 +19760,12 @@ static PyMethodDef SwigMethods[] = {
|
|
|
20316
19760
|
{ "grd3d_crop_geometry", _wrap_grd3d_crop_geometry, METH_VARARGS, NULL},
|
|
20317
19761
|
{ "grd3d_reduce_onelayer", _wrap_grd3d_reduce_onelayer, METH_VARARGS, NULL},
|
|
20318
19762
|
{ "grd3d_get_lay_slice", _wrap_grd3d_get_lay_slice, METH_VARARGS, NULL},
|
|
20319
|
-
{ "grd3d_refine_vert", _wrap_grd3d_refine_vert, METH_VARARGS, NULL},
|
|
20320
19763
|
{ "grd3d_convert_hybrid", _wrap_grd3d_convert_hybrid, METH_VARARGS, NULL},
|
|
20321
19764
|
{ "grd3d_make_z_consistent", _wrap_grd3d_make_z_consistent, METH_VARARGS, NULL},
|
|
20322
19765
|
{ "grd3d_translate", _wrap_grd3d_translate, METH_VARARGS, NULL},
|
|
20323
19766
|
{ "grd3d_reverse_jrows", _wrap_grd3d_reverse_jrows, METH_VARARGS, NULL},
|
|
20324
19767
|
{ "grd3d_point_val_crange", _wrap_grd3d_point_val_crange, METH_VARARGS, NULL},
|
|
20325
19768
|
{ "grd3d_point_in_cell", _wrap_grd3d_point_in_cell, METH_VARARGS, NULL},
|
|
20326
|
-
{ "grd3d_points_ijk_cells", _wrap_grd3d_points_ijk_cells, METH_VARARGS, NULL},
|
|
20327
19769
|
{ "grd3d_get_randomline", _wrap_grd3d_get_randomline, METH_VARARGS, NULL},
|
|
20328
19770
|
{ "grd3d_collapse_inact", _wrap_grd3d_collapse_inact, METH_VARARGS, NULL},
|
|
20329
19771
|
{ "grd3d_midpoint", _wrap_grd3d_midpoint, METH_VARARGS, NULL},
|
xtgeo/_cxtgeo.cp39-win_amd64.pyd
CHANGED
|
Binary file
|
|
Binary file
|
xtgeo/common/log.py
CHANGED
|
@@ -39,6 +39,7 @@ def functimer(
|
|
|
39
39
|
func: Optional[Callable] = None,
|
|
40
40
|
*,
|
|
41
41
|
output: Literal["debug", "info", "print"] = "debug",
|
|
42
|
+
comment: str = "",
|
|
42
43
|
) -> Callable:
|
|
43
44
|
"""A decorator function to measure the execution time of a function.
|
|
44
45
|
|
|
@@ -47,7 +48,7 @@ def functimer(
|
|
|
47
48
|
|
|
48
49
|
Usage is simple, just add the decorator to the function you want to measure:
|
|
49
50
|
|
|
50
|
-
@functimer(output="print")
|
|
51
|
+
@functimer(output="print", comment="My function took a while to run")
|
|
51
52
|
def my_function():
|
|
52
53
|
pass
|
|
53
54
|
|
|
@@ -61,7 +62,7 @@ def functimer(
|
|
|
61
62
|
if func is None:
|
|
62
63
|
|
|
63
64
|
def decorator(func: Callable) -> Callable:
|
|
64
|
-
return functimer(func, output=output)
|
|
65
|
+
return functimer(func, output=output, comment=comment)
|
|
65
66
|
|
|
66
67
|
return decorator
|
|
67
68
|
|
|
@@ -73,16 +74,20 @@ def functimer(
|
|
|
73
74
|
result = func(*args, **kwargs) # Execute the function
|
|
74
75
|
end_time = time.perf_counter() # End the timer
|
|
75
76
|
elapsed_time = f"{end_time - start_time: .5f}"
|
|
77
|
+
|
|
78
|
+
# Build message with optional comment
|
|
79
|
+
message = f"Function {func.__name__} executed in {elapsed_time} seconds"
|
|
80
|
+
if comment:
|
|
81
|
+
message += f" - {comment}"
|
|
82
|
+
|
|
83
|
+
# Output according to specified method
|
|
76
84
|
if output == "print":
|
|
77
|
-
print(
|
|
85
|
+
print(message)
|
|
78
86
|
elif output == "info":
|
|
79
|
-
logger.info(
|
|
80
|
-
"Function %s executed in %s seconds", func.__name__, elapsed_time
|
|
81
|
-
)
|
|
87
|
+
logger.info(message)
|
|
82
88
|
else:
|
|
83
|
-
logger.debug(
|
|
84
|
-
|
|
85
|
-
)
|
|
89
|
+
logger.debug(message)
|
|
90
|
+
|
|
86
91
|
return result
|
|
87
92
|
|
|
88
93
|
return wrapper
|
xtgeo/common/version.py
CHANGED