diff --git a/python/resdata/geometry/cpolyline.py b/python/resdata/geometry/cpolyline.py index 780689807..b2cf5a6e5 100644 --- a/python/resdata/geometry/cpolyline.py +++ b/python/resdata/geometry/cpolyline.py @@ -10,34 +10,38 @@ class CPolyline(BaseCClass): - TYPE_NAME = "geo_polygon" + TYPE_NAME = "rd_geo_polygon" _alloc_new = ResdataPrototype( "void* geo_polygon_alloc( char* )", bind=False ) _fread_alloc_irap = ResdataPrototype( - "geo_polygon_obj geo_polygon_fload_alloc_irap( char* )", bind=False + "rd_geo_polygon_obj geo_polygon_fload_alloc_irap( char* )", bind=False ) _add_point = ResdataPrototype( - "void geo_polygon_add_point( geo_polygon , double , double )" + "void geo_polygon_add_point( rd_geo_polygon , double , double )" ) _add_point_front = ResdataPrototype( - "void geo_polygon_add_point_front( geo_polygon , double , double )" + "void geo_polygon_add_point_front( rd_geo_polygon , double , double )" ) - _free = ResdataPrototype("void geo_polygon_free( geo_polygon )") - _size = ResdataPrototype("int geo_polygon_get_size( geo_polygon )") + _free = ResdataPrototype("void geo_polygon_free( rd_geo_polygon )") + _size = ResdataPrototype("int geo_polygon_get_size( rd_geo_polygon )") _iget_xy = ResdataPrototype( - "void geo_polygon_iget_xy( geo_polygon , int , double* , double* )" + "void geo_polygon_iget_xy( rd_geo_polygon , int , double* , double* )" ) _segment_intersects = ResdataPrototype( - "bool geo_polygon_segment_intersects( geo_polygon , double , double, double , double)" + "bool geo_polygon_segment_intersects( rd_geo_polygon , double , double, double , double)" ) - _get_name = ResdataPrototype("char* geo_polygon_get_name( geo_polygon )") + _get_name = ResdataPrototype("char* geo_polygon_get_name( rd_geo_polygon )") _set_name = ResdataPrototype( - "void geo_polygon_set_name( geo_polygon , char* )" + "void geo_polygon_set_name( rd_geo_polygon , char* )" + ) + _segment_length = ResdataPrototype( + "double geo_polygon_get_length( rd_geo_polygon)" + ) + _equal = ResdataPrototype( + "bool geo_polygon_equal( rd_geo_polygon , rd_geo_polygon )" ) - _segment_length = ResdataPrototype("double geo_polygon_get_length( geo_polygon)") - _equal = ResdataPrototype("bool geo_polygon_equal( geo_polygon , geo_polygon )") def __init__(self, name=None, init_points=()): c_ptr = self._alloc_new(name) diff --git a/python/resdata/geometry/cpolyline_collection.py b/python/resdata/geometry/cpolyline_collection.py index 0c7ecf29c..a289460da 100644 --- a/python/resdata/geometry/cpolyline_collection.py +++ b/python/resdata/geometry/cpolyline_collection.py @@ -9,31 +9,29 @@ class CPolylineCollection(BaseCClass): - TYPE_NAME = "geo_polygon_collection" + TYPE_NAME = "rd_geo_polygon_collection" - _alloc_new = ResdataPrototype( - "void* geo_polygon_collection_alloc( )", bind=False - ) + _alloc_new = ResdataPrototype("void* geo_polygon_collection_alloc( )", bind=False) _free = ResdataPrototype( - "void geo_polygon_collection_free( geo_polygon_collection )" + "void geo_polygon_collection_free( rd_geo_polygon_collection )" ) _size = ResdataPrototype( - "int geo_polygon_collection_size( geo_polygon_collection)" + "int geo_polygon_collection_size( rd_geo_polygon_collection)" ) _create_polyline = ResdataPrototype( - "geo_polygon_ref geo_polygon_collection_create_polygon(geo_polygon_collection , char*)" + "rd_geo_polygon_ref geo_polygon_collection_create_polygon(rd_geo_polygon_collection , char*)" ) _has_polyline = ResdataPrototype( - "bool geo_polygon_collection_has_polygon(geo_polygon_collection , char*)" + "bool geo_polygon_collection_has_polygon(rd_geo_polygon_collection , char*)" ) _iget = ResdataPrototype( - "geo_polygon_ref geo_polygon_collection_iget_polygon(geo_polygon_collection , int)" + "rd_geo_polygon_ref geo_polygon_collection_iget_polygon(rd_geo_polygon_collection , int)" ) _get = ResdataPrototype( - "geo_polygon_ref geo_polygon_collection_get_polygon(geo_polygon_collection , char*)" + "rd_geo_polygon_ref geo_polygon_collection_get_polygon(rd_geo_polygon_collection , char*)" ) _add_polyline = ResdataPrototype( - "void geo_polygon_collection_add_polygon(geo_polygon_collection , geo_polygon , bool)" + "void geo_polygon_collection_add_polygon(rd_geo_polygon_collection , rd_geo_polygon , bool)" ) def __init__(self): diff --git a/python/resdata/geometry/geo_pointset.py b/python/resdata/geometry/geo_pointset.py index 64ac90b00..c60cb81fb 100644 --- a/python/resdata/geometry/geo_pointset.py +++ b/python/resdata/geometry/geo_pointset.py @@ -3,25 +3,13 @@ class GeoPointset(BaseCClass): - TYPE_NAME = "geo_pointset" + TYPE_NAME = "rd_geo_points" - _alloc = ResdataPrototype("void* geo_pointset_alloc(bool)", bind=False) - _free = ResdataPrototype("void geo_pointset_free(geo_pointset)") - # _add_xyz = ResdataPrototype("void geo_pointset_add_xyz(geo_pointset, double, double, double)") - _get_size = ResdataPrototype("int geo_pointset_get_size(geo_pointset)") - # _iget_xy = ResdataPrototype("void geo_pointset_iget_xy(geo_pointset, int, double*, double*)") - # _get_zcoord = ResdataPrototype("double* geo_pointset_get_zcoord(geo_pointset)") - _equal = ResdataPrototype("bool geo_pointset_equal(geo_pointset, geo_pointset)") - _iget_z = ResdataPrototype("double geo_pointset_iget_z(geo_pointset, int)") - # _iset_z = ResdataPrototype("void geo_pointset_iset_z(geo_pointset, int, double)") - # _memcpy = ResdataPrototype("void geo_pointset_memcpy(geo_pointset, geo_pointset, bool)") - # _shift_z = ResdataPrototype("void geo_pointset_shift_z(geo_pointset, double)") - # _assign_z = ResdataPrototype("void geo_pointset_assign_z(geo_pointset, double)") - # _scale_z = ResdataPrototype("void geo_pointset_scale_z(geo_pointset, double)") - # _imul = ResdataPrototype("void geo_pointset_imul(geo_pointset, geo_pointset)") - # _iadd = ResdataPrototype("void geo_pointset_iadd(geo_pointset, geo_pointset)") - # _isub = ResdataPrototype("void geo_pointset_isub(geo_pointset, geo_pointset)") - # _isqrt = ResdataPrototype("void geo_pointset_isqrt(geo_pointset)") + _alloc = ResdataPrototype("void* geo_pointset_alloc(bool)", bind=False) + _free = ResdataPrototype("void geo_pointset_free(rd_geo_points)") + _get_size = ResdataPrototype("int geo_pointset_get_size(rd_geo_points)") + _equal = ResdataPrototype("bool geo_pointset_equal(rd_geo_points, rd_geo_points)") + _iget_z = ResdataPrototype("double geo_pointset_iget_z(rd_geo_points, int)") def __init__(self, external_z=False): c_ptr = self._alloc(external_z) diff --git a/python/resdata/geometry/geo_region.py b/python/resdata/geometry/geo_region.py index 21bb3f954..33c7cb597 100644 --- a/python/resdata/geometry/geo_region.py +++ b/python/resdata/geometry/geo_region.py @@ -8,37 +8,37 @@ class GeoRegion(BaseCClass): - TYPE_NAME = "geo_region" + TYPE_NAME = "rd_geo_region" - _alloc = ResdataPrototype("void* geo_region_alloc(geo_pointset, bool)", bind=False) - _free = ResdataPrototype("void geo_region_free(geo_region)") - _reset = ResdataPrototype("void geo_region_reset(geo_region)") + _alloc = ResdataPrototype("void* geo_region_alloc(rd_geo_points, bool)", bind=False) + _free = ResdataPrototype("void geo_region_free(rd_geo_region)") + _reset = ResdataPrototype("void geo_region_reset(rd_geo_region)") _get_index_list = ResdataPrototype( - "int_vector_ref geo_region_get_index_list(geo_region)" + "rd_int_vector_ref geo_region_get_index_list(rd_geo_region)" ) _select_inside_polygon = ResdataPrototype( - "void geo_region_select_inside_polygon(geo_region, geo_polygon)" + "void geo_region_select_inside_polygon(rd_geo_region, rd_geo_polygon)" ) _select_outside_polygon = ResdataPrototype( - "void geo_region_select_outside_polygon(geo_region, geo_polygon)" + "void geo_region_select_outside_polygon(rd_geo_region, rd_geo_polygon)" ) _deselect_inside_polygon = ResdataPrototype( - "void geo_region_deselect_inside_polygon(geo_region, geo_polygon)" + "void geo_region_deselect_inside_polygon(rd_geo_region, rd_geo_polygon)" ) _deselect_outside_polygon = ResdataPrototype( - "void geo_region_deselect_outside_polygon(geo_region, geo_polygon)" + "void geo_region_deselect_outside_polygon(rd_geo_region, rd_geo_polygon)" ) _select_above_line = ResdataPrototype( - "void geo_region_select_above_line(geo_region, double*, double*)" + "void geo_region_select_above_line(rd_geo_region, double*, double*)" ) _select_below_line = ResdataPrototype( - "void geo_region_select_below_line(geo_region, double*, double*)" + "void geo_region_select_below_line(rd_geo_region, double*, double*)" ) _deselect_above_line = ResdataPrototype( - "void geo_region_deselect_above_line(geo_region, double*, double*)" + "void geo_region_deselect_above_line(rd_geo_region, double*, double*)" ) _deselect_below_line = ResdataPrototype( - "void geo_region_deselect_below_line(geo_region, double*, double*)" + "void geo_region_deselect_below_line(rd_geo_region, double*, double*)" ) def __init__(self, pointset, preselect=False): diff --git a/python/resdata/geometry/surface.py b/python/resdata/geometry/surface.py index c6f1004ed..40528d95d 100644 --- a/python/resdata/geometry/surface.py +++ b/python/resdata/geometry/surface.py @@ -12,40 +12,42 @@ class Surface(BaseCClass): - TYPE_NAME = "surface" + TYPE_NAME = "rd_surface" _alloc = ResdataPrototype( "void* geo_surface_fload_alloc_irap( char* , bool )", bind=False ) - _free = ResdataPrototype("void geo_surface_free( surface )") + _free = ResdataPrototype("void geo_surface_free( rd_surface )") _new = ResdataPrototype( "void* geo_surface_alloc_new( int, int, double, double, double, double, double )", bind=False, ) - _get_nx = ResdataPrototype("int geo_surface_get_nx( surface )") - _get_ny = ResdataPrototype("int geo_surface_get_ny( surface )") - _iget_zvalue = ResdataPrototype("double geo_surface_iget_zvalue( surface , int)") + _get_nx = ResdataPrototype("int geo_surface_get_nx( rd_surface )") + _get_ny = ResdataPrototype("int geo_surface_get_ny( rd_surface )") + _iget_zvalue = ResdataPrototype("double geo_surface_iget_zvalue( rd_surface , int)") _iset_zvalue = ResdataPrototype( - "void geo_surface_iset_zvalue( surface , int , double)" + "void geo_surface_iset_zvalue( rd_surface , int , double)" ) - _write = ResdataPrototype("void geo_surface_fprintf_irap( surface , char* )") - _equal = ResdataPrototype("bool geo_surface_equal( surface , surface )") + _write = ResdataPrototype("void geo_surface_fprintf_irap( rd_surface , char* )") + _equal = ResdataPrototype("bool geo_surface_equal( rd_surface , rd_surface )") _header_equal = ResdataPrototype( - "bool geo_surface_equal_header( surface , surface )" + "bool geo_surface_equal_header( rd_surface , rd_surface )" ) - _copy = ResdataPrototype("surface_obj geo_surface_alloc_copy( surface , bool )") - _assign = ResdataPrototype("void geo_surface_assign_value( surface , double )") - _scale = ResdataPrototype("void geo_surface_scale( surface , double )") - _shift = ResdataPrototype("void geo_surface_shift( surface , double )") - _iadd = ResdataPrototype("void geo_surface_iadd( surface , surface )") - _imul = ResdataPrototype("void geo_surface_imul( surface , surface )") - _isub = ResdataPrototype("void geo_surface_isub( surface , surface )") - _isqrt = ResdataPrototype("void geo_surface_isqrt( surface )") + _copy = ResdataPrototype( + "rd_surface_obj geo_surface_alloc_copy( rd_surface , bool )" + ) + _assign = ResdataPrototype("void geo_surface_assign_value( rd_surface , double )") + _scale = ResdataPrototype("void geo_surface_scale( rd_surface , double )") + _shift = ResdataPrototype("void geo_surface_shift( rd_surface , double )") + _iadd = ResdataPrototype("void geo_surface_iadd( rd_surface , rd_surface )") + _imul = ResdataPrototype("void geo_surface_imul( rd_surface , rd_surface )") + _isub = ResdataPrototype("void geo_surface_isub( rd_surface , rd_surface )") + _isqrt = ResdataPrototype("void geo_surface_isqrt( rd_surface )") _iget_xy = ResdataPrototype( - "void geo_surface_iget_xy(surface, int, double*, double*)" + "void geo_surface_iget_xy(rd_surface, int, double*, double*)" ) _get_pointset = ResdataPrototype( - "geo_pointset_ref geo_surface_get_pointset(surface)" + "rd_geo_points_ref geo_surface_get_pointset(rd_surface)" ) def __init__( diff --git a/python/resdata/grid/faults/fault_block.py b/python/resdata/grid/faults/fault_block.py index 3f4baaea4..a8025e115 100644 --- a/python/resdata/grid/faults/fault_block.py +++ b/python/resdata/grid/faults/fault_block.py @@ -22,34 +22,34 @@ def __str__(self): class FaultBlock(BaseCClass): - TYPE_NAME = "fault_block" + TYPE_NAME = "rd_fault_block" - _get_xc = ResdataPrototype("double fault_block_get_xc(fault_block)") - _get_yc = ResdataPrototype("double fault_block_get_yc(fault_block)") - _get_block_id = ResdataPrototype("int fault_block_get_id(fault_block)") - _get_size = ResdataPrototype("int fault_block_get_size(fault_block)") + _get_xc = ResdataPrototype("double fault_block_get_xc(rd_fault_block)") + _get_yc = ResdataPrototype("double fault_block_get_yc(rd_fault_block)") + _get_block_id = ResdataPrototype("int fault_block_get_id(rd_fault_block)") + _get_size = ResdataPrototype("int fault_block_get_size(rd_fault_block)") _export_cell = ResdataPrototype( - "void fault_block_export_cell(fault_block, int, int*, int*, int*, double*, double*, double*)" + "void fault_block_export_cell(rd_fault_block, int, int*, int*, int*, double*, double*, double*)" ) _assign_to_region = ResdataPrototype( - "void fault_block_assign_to_region(fault_block, int)" + "void fault_block_assign_to_region(rd_fault_block, int)" ) _get_region_list = ResdataPrototype( - "int_vector_ref fault_block_get_region_list(fault_block)" + "rd_int_vector_ref fault_block_get_region_list(rd_fault_block)" ) _add_cell = ResdataPrototype( - "void fault_block_add_cell(fault_block, int, int)" + "void fault_block_add_cell(rd_fault_block, int, int)" ) _get_global_index_list = ResdataPrototype( - "int_vector_ref fault_block_get_global_index_list(fault_block)" + "rd_int_vector_ref fault_block_get_global_index_list(rd_fault_block)" ) _trace_edge = ResdataPrototype( - "void fault_block_trace_edge(fault_block, double_vector, double_vector, int_vector)" + "void fault_block_trace_edge(rd_fault_block, rd_double_vector, rd_double_vector, rd_int_vector)" ) _get_neighbours = ResdataPrototype( - "void fault_block_list_neighbours(fault_block, bool, geo_polygon_collection, int_vector)" + "void fault_block_list_neighbours(rd_fault_block, bool, rd_geo_polygon_collection, rd_int_vector)" ) - _free = ResdataPrototype("void fault_block_free__(fault_block)") + _free = ResdataPrototype("void fault_block_free__(rd_fault_block)") def __init__(self, *args, **kwargs): raise NotImplementedError("Class can not be instantiated directly!") diff --git a/python/resdata/grid/faults/fault_block_collection.py b/python/resdata/grid/faults/fault_block_collection.py index 5b85769d2..85cb6aa1a 100644 --- a/python/resdata/grid/faults/fault_block_collection.py +++ b/python/resdata/grid/faults/fault_block_collection.py @@ -5,19 +5,19 @@ class FaultBlockCollection(BaseCClass): - TYPE_NAME = "fault_block_collection" + TYPE_NAME = "rd_fault_block_collection" _alloc = ResdataPrototype("void* fault_block_collection_alloc(rd_grid)", bind=False) _free = ResdataPrototype( - "void fault_block_collection_free(fault_block_collection)" + "void fault_block_collection_free(rd_fault_block_collection)" ) _num_layers = ResdataPrototype( - "int fault_block_collection_num_layers(fault_block_collection)" + "int fault_block_collection_num_layers(rd_fault_block_collection)" ) _scan_keyword = ResdataPrototype( - "bool fault_block_collection_scan_kw(fault_block_collection, rd_kw)" + "bool fault_block_collection_scan_kw(rd_fault_block_collection, rd_kw)" ) _get_layer = ResdataPrototype( - "fault_block_layer_ref fault_block_collection_get_layer(fault_block_collection, int)" + "rd_fault_block_layer_ref fault_block_collection_get_layer(rd_fault_block_collection, int)" ) def __init__(self, grid): diff --git a/python/resdata/grid/faults/fault_block_layer.py b/python/resdata/grid/faults/fault_block_layer.py index 3f81c57a7..0b0951df8 100644 --- a/python/resdata/grid/faults/fault_block_layer.py +++ b/python/resdata/grid/faults/fault_block_layer.py @@ -8,54 +8,48 @@ class FaultBlockLayer(BaseCClass): - TYPE_NAME = "fault_block_layer" + TYPE_NAME = "rd_fault_block_layer" _alloc = ResdataPrototype( - "void* fault_block_layer_alloc(rd_grid, int)", bind=False - ) - _free = ResdataPrototype( - "void fault_block_layer_free(fault_block_layer)" - ) - _size = ResdataPrototype( - "int fault_block_layer_get_size(fault_block_layer)" + "void* fault_block_layer_alloc(rd_grid, int)", bind=False ) + _free = ResdataPrototype("void fault_block_layer_free(rd_fault_block_layer)") + _size = ResdataPrototype("int fault_block_layer_get_size(rd_fault_block_layer)") _iget_block = ResdataPrototype( - "fault_block_ref fault_block_layer_iget_block(fault_block_layer, int)" + "rd_fault_block_ref fault_block_layer_iget_block(rd_fault_block_layer, int)" ) _add_block = ResdataPrototype( - "fault_block_ref fault_block_layer_add_block(fault_block_layer, int)" + "rd_fault_block_ref fault_block_layer_add_block(rd_fault_block_layer, int)" ) _get_block = ResdataPrototype( - "fault_block_ref fault_block_layer_get_block(fault_block_layer, int)" + "rd_fault_block_ref fault_block_layer_get_block(rd_fault_block_layer, int)" ) _del_block = ResdataPrototype( - "void fault_block_layer_del_block(fault_block_layer, int)" + "void fault_block_layer_del_block(rd_fault_block_layer, int)" ) _has_block = ResdataPrototype( - "bool fault_block_layer_has_block(fault_block_layer, int)" + "bool fault_block_layer_has_block(rd_fault_block_layer, int)" ) _scan_keyword = ResdataPrototype( - "bool fault_block_layer_scan_kw(fault_block_layer, rd_kw)" + "bool fault_block_layer_scan_kw(rd_fault_block_layer, rd_kw)" ) _load_keyword = ResdataPrototype( - "bool fault_block_layer_load_kw(fault_block_layer, rd_kw)" - ) - _getK = ResdataPrototype( - "int fault_block_layer_get_k(fault_block_layer)" + "bool fault_block_layer_load_kw(rd_fault_block_layer, rd_kw)" ) + _getK = ResdataPrototype("int fault_block_layer_get_k(rd_fault_block_layer)") _get_next_id = ResdataPrototype( - "int fault_block_layer_get_next_id(fault_block_layer)" + "int fault_block_layer_get_next_id(rd_fault_block_layer)" ) _scan_layer = ResdataPrototype( - "void fault_block_layer_scan_layer(fault_block_layer, layer)" + "void fault_block_layer_scan_layer(rd_fault_block_layer, rd_layer)" ) _insert_block_content = ResdataPrototype( - "void fault_block_layer_insert_block_content(fault_block_layer, fault_block)" + "void fault_block_layer_insert_block_content(rd_fault_block_layer, rd_fault_block)" ) _export_kw = ResdataPrototype( - "bool fault_block_layer_export(fault_block_layer, rd_kw)" + "bool fault_block_layer_export(rd_fault_block_layer, rd_kw)" ) _get_layer = ResdataPrototype( - "layer_ref fault_block_layer_get_layer(fault_block_layer)" + "layer_ref fault_block_layer_get_layer(rd_fault_block_layer)" ) def __init__(self, grid, k): diff --git a/python/resdata/grid/faults/layer.py b/python/resdata/grid/faults/layer.py index edfb3ac76..11686014f 100644 --- a/python/resdata/grid/faults/layer.py +++ b/python/resdata/grid/faults/layer.py @@ -8,42 +8,44 @@ class Layer(BaseCClass): - TYPE_NAME = "layer" + TYPE_NAME = "rd_layer" _alloc = ResdataPrototype("void* layer_alloc(int, int)", bind=False) - _copy = ResdataPrototype("void layer_memcpy(layer, layer)") - _free = ResdataPrototype("void layer_free(layer)") - _get_nx = ResdataPrototype("int layer_get_nx(layer)") - _get_ny = ResdataPrototype("int layer_get_ny(layer)") - _set_cell = ResdataPrototype("void layer_iset_cell_value(layer, int, int, int)") - _get_cell = ResdataPrototype("int layer_iget_cell_value(layer, int, int)") + _copy = ResdataPrototype("void layer_memcpy(rd_layer, rd_layer)") + _free = ResdataPrototype("void layer_free(rd_layer)") + _get_nx = ResdataPrototype("int layer_get_nx(rd_layer)") + _get_ny = ResdataPrototype("int layer_get_ny(rd_layer)") + _set_cell = ResdataPrototype("void layer_iset_cell_value(rd_layer, int, int, int)") + _get_cell = ResdataPrototype("int layer_iget_cell_value(rd_layer, int, int)") _get_bottom_barrier = ResdataPrototype( - "bool layer_iget_bottom_barrier(layer, int, int)" + "bool layer_iget_bottom_barrier(rd_layer, int, int)" ) _get_left_barrier = ResdataPrototype( - "bool layer_iget_left_barrier(layer, int, int)" + "bool layer_iget_left_barrier(rd_layer, int, int)" ) _cell_contact = ResdataPrototype( - "bool layer_cell_contact(layer, int, int, int, int)" + "bool layer_cell_contact(rd_layer, int, int, int, int)" ) - _add_barrier = ResdataPrototype("void layer_add_barrier(layer, int, int)") + _add_barrier = ResdataPrototype("void layer_add_barrier(rd_layer, int, int)") _add_ijbarrier = ResdataPrototype( - "void layer_add_ijbarrier(layer, int, int, int, int)" + "void layer_add_ijbarrier(rd_layer, int, int, int, int)" ) _add_interp_barrier = ResdataPrototype( - "void layer_add_interp_barrier(layer, int, int)" + "void layer_add_interp_barrier(rd_layer, int, int)" ) - _clear_cells = ResdataPrototype("void layer_clear_cells(layer)") - _assign = ResdataPrototype("void layer_assign(layer, int)") - _cell_sum = ResdataPrototype("int layer_get_cell_sum(layer)") + _clear_cells = ResdataPrototype("void layer_clear_cells(rd_layer)") + _assign = ResdataPrototype("void layer_assign(rd_layer, int)") + _cell_sum = ResdataPrototype("int layer_get_cell_sum(rd_layer)") _update_connected = ResdataPrototype( - "void layer_update_connected_cells(layer,int,int,int,int)" + "void layer_update_connected_cells(rd_layer,int,int,int,int)" ) _cells_equal = ResdataPrototype( - "void layer_cells_equal(layer, int,int_vector,int_vector)" + "void layer_cells_equal(rd_layer, int,rd_int_vector,rd_int_vector)" + ) + _count_equal = ResdataPrototype("int layer_count_equal(rd_layer, int)") + _active_cell = ResdataPrototype("bool layer_iget_active(rd_layer, int,int)") + _update_active = ResdataPrototype( + "bool layer_update_active(rd_layer, rd_grid, int)" ) - _count_equal = ResdataPrototype("int layer_count_equal(layer, int)") - _active_cell = ResdataPrototype("bool layer_iget_active(layer, int,int)") - _update_active = ResdataPrototype("bool layer_update_active(layer, rd_grid, int)") def __init__(self, nx, ny): c_ptr = self._alloc(nx, ny) diff --git a/python/resdata/grid/rd_grid.py b/python/resdata/grid/rd_grid.py index 849be6485..752d2a5fc 100644 --- a/python/resdata/grid/rd_grid.py +++ b/python/resdata/grid/rd_grid.py @@ -127,7 +127,7 @@ class Grid(BaseCClass): "void rd_grid_grdecl_fprintf_kw(rd_grid, rd_kw, char*, FILE, double)" ) _load_column = ResdataPrototype( - "void rd_grid_get_column_property(rd_grid, rd_kw, int, int, double_vector)" + "void rd_grid_get_column_property(rd_grid, rd_kw, int, int, rd_double_vector)" ) _get_top = ResdataPrototype("double rd_grid_get_top2(rd_grid, int, int)") _get_top1A = ResdataPrototype("double rd_grid_get_top1A(rd_grid, int)") diff --git a/python/resdata/grid/rd_region.py b/python/resdata/grid/rd_region.py index eaf4144be..8360fb0fe 100644 --- a/python/resdata/grid/rd_region.py +++ b/python/resdata/grid/rd_region.py @@ -173,16 +173,16 @@ class ResdataRegion(BaseCClass): _subtract = ResdataPrototype("void rd_region_subtract( rd_region , rd_region )") _xor = ResdataPrototype("void rd_region_xor( rd_region , rd_region )") _get_kw_index_list = ResdataPrototype( - "int_vector_ref rd_region_get_kw_index_list( rd_region , rd_kw , bool )" + "rd_int_vector_ref rd_region_get_kw_index_list( rd_region , rd_kw , bool )" ) _get_active_list = ResdataPrototype( - "int_vector_ref rd_region_get_active_list( rd_region )" + "rd_int_vector_ref rd_region_get_active_list( rd_region )" ) _get_global_list = ResdataPrototype( - "int_vector_ref rd_region_get_global_list( rd_region )" + "rd_int_vector_ref rd_region_get_global_list( rd_region )" ) _get_active_global = ResdataPrototype( - "int_vector_ref rd_region_get_global_active_list( rd_region )" + "rd_int_vector_ref rd_region_get_global_active_list( rd_region )" ) _select_cmp_less = ResdataPrototype( "void rd_region_cmp_select_less( rd_region , rd_kw , rd_kw)" @@ -273,16 +273,16 @@ class ResdataRegion(BaseCClass): "void rd_region_deselect_below_plane( rd_region, double* , double* )" ) _select_inside_polygon = ResdataPrototype( - "void rd_region_select_inside_polygon( rd_region , geo_polygon)" + "void rd_region_select_inside_polygon( rd_region , rd_geo_polygon)" ) _select_outside_polygon = ResdataPrototype( - "void rd_region_select_outside_polygon( rd_region , geo_polygon)" + "void rd_region_select_outside_polygon( rd_region , rd_geo_polygon)" ) _deselect_inside_polygon = ResdataPrototype( - "void rd_region_deselect_inside_polygon( rd_region , geo_polygon)" + "void rd_region_deselect_inside_polygon( rd_region , rd_geo_polygon)" ) _deselect_outside_polygon = ResdataPrototype( - "void rd_region_deselect_outside_polygon( rd_region , geo_polygon)" + "void rd_region_deselect_outside_polygon( rd_region , rd_geo_polygon)" ) _set_name = ResdataPrototype("void rd_region_set_name( rd_region , char*)") _get_name = ResdataPrototype("char* rd_region_get_name( rd_region )") @@ -305,10 +305,10 @@ class ResdataRegion(BaseCClass): "void rd_region_deselect_false( rd_region , rd_kw)" ) _select_from_layer = ResdataPrototype( - "void rd_region_select_from_layer( rd_region , layer , int , int)" + "void rd_region_select_from_layer( rd_region , rd_layer , int , int)" ) _deselect_from_layer = ResdataPrototype( - "void rd_region_deselect_from_layer( rd_region , layer , int , int)" + "void rd_region_deselect_from_layer( rd_region , rd_layer , int , int)" ) def __init__(self, grid, preselect): diff --git a/python/resdata/rd_util.py b/python/resdata/rd_util.py index 0b91cf80d..0060be3eb 100644 --- a/python/resdata/rd_util.py +++ b/python/resdata/rd_util.py @@ -102,7 +102,7 @@ class ResdataUtil(object): _get_file_type = ResdataPrototype( "rd_file_enum rd_get_file_type(char*, bool*, int*)", bind=False ) - _get_start_date = ResdataPrototype("time_t rd_get_start_date(char*)", bind=False) + _get_start_date = ResdataPrototype("rd_time_t rd_get_start_date(char*)", bind=False) _get_report_step = ResdataPrototype("int rd_filename_report_nr(char*)", bind=False) @staticmethod diff --git a/python/resdata/resfile/fortio.py b/python/resdata/resfile/fortio.py index 2262f3f70..bf77162b3 100644 --- a/python/resdata/resfile/fortio.py +++ b/python/resdata/resfile/fortio.py @@ -30,7 +30,7 @@ class FortIO(BaseCClass): - TYPE_NAME = "fortio" + TYPE_NAME = "rd_fortio" READ_MODE = 1 WRITE_MODE = 2 @@ -53,12 +53,12 @@ class FortIO(BaseCClass): "bool fortio_looks_like_fortran_file(char*, bool)", bind=False ) - _write_record = ResdataPrototype("void fortio_fwrite_record(fortio, char*, int)") - _get_position = ResdataPrototype("long fortio_ftell(fortio)") - _seek = ResdataPrototype("void fortio_fseek(fortio, long, int)") - _close = ResdataPrototype("bool fortio_fclose(fortio)") - _truncate = ResdataPrototype("bool fortio_ftruncate(fortio, long)") - _filename = ResdataPrototype("char* fortio_filename_ref(fortio)") + _write_record = ResdataPrototype("void fortio_fwrite_record(rd_fortio, char*, int)") + _get_position = ResdataPrototype("long fortio_ftell(rd_fortio)") + _seek = ResdataPrototype("void fortio_fseek(rd_fortio, long, int)") + _close = ResdataPrototype("bool fortio_fclose(rd_fortio)") + _truncate = ResdataPrototype("bool fortio_ftruncate(rd_fortio, long)") + _filename = ResdataPrototype("char* fortio_filename_ref(rd_fortio)") def __init__( self, file_name, mode=READ_MODE, fmt_file=False, endian_flip_header=True diff --git a/python/resdata/resfile/rd_file.py b/python/resdata/resfile/rd_file.py index 2920e1de1..7bd3bfbfc 100644 --- a/python/resdata/resfile/rd_file.py +++ b/python/resdata/resfile/rd_file.py @@ -43,27 +43,25 @@ class ResdataFile(BaseCClass): _save_kw = ResdataPrototype("void rd_file_save_kw( rd_file , rd_kw )") _close = ResdataPrototype("void rd_file_close( rd_file )") _iget_restart_time = ResdataPrototype( - "time_t rd_file_iget_restart_sim_date( rd_file , int )" + "rd_time_t rd_file_iget_restart_sim_date( rd_file , int )" ) _iget_restart_days = ResdataPrototype( "double rd_file_iget_restart_sim_days( rd_file , int )" ) _get_restart_index = ResdataPrototype( - "int rd_file_get_restart_index( rd_file , time_t)" + "int rd_file_get_restart_index( rd_file , rd_time_t)" ) _get_src_file = ResdataPrototype("char* rd_file_get_src_file( rd_file )") _replace_kw = ResdataPrototype( "void rd_file_replace_kw( rd_file , rd_kw , rd_kw , bool)" ) _fwrite = ResdataPrototype( - "void rd_file_fwrite_fortio( rd_file , fortio , int)" + "void rd_file_fwrite_fortio( rd_file , rd_fortio , int)" ) _has_report_step = ResdataPrototype( "bool rd_file_has_report_step( rd_file , int)" ) - _has_sim_time = ResdataPrototype( - "bool rd_file_has_sim_time( rd_file , time_t )" - ) + _has_sim_time = ResdataPrototype("bool rd_file_has_sim_time( rd_file , rd_time_t )") _get_global_view = ResdataPrototype( "rd_file_view_ref rd_file_get_global_view( rd_file )" ) diff --git a/python/resdata/resfile/rd_file_view.py b/python/resdata/resfile/rd_file_view.py index 048c795f1..44bb363cf 100644 --- a/python/resdata/resfile/rd_file_view.py +++ b/python/resdata/resfile/rd_file_view.py @@ -31,7 +31,7 @@ class ResdataFileView(BaseCClass): "rd_file_view_ref rd_file_view_add_blockview2( rd_file_view , char*, char*, int )" ) _restart_view = ResdataPrototype( - "rd_file_view_ref rd_file_view_add_restart_view( rd_file_view , int, int, time_t, double )" + "rd_file_view_ref rd_file_view_add_restart_view( rd_file_view , int, int, rd_time_t, double )" ) def __init__(self): diff --git a/python/resdata/resfile/rd_kw.py b/python/resdata/resfile/rd_kw.py index 42260babc..256c90e30 100644 --- a/python/resdata/resfile/rd_kw.py +++ b/python/resdata/resfile/rd_kw.py @@ -99,7 +99,9 @@ class ResdataKW(BaseCClass): _alloc_new = ResdataPrototype( "void* rd_kw_alloc_python(char*, int, rd_data_type)", bind=False ) - _fread_alloc = ResdataPrototype("rd_kw_obj rd_kw_fread_alloc(fortio)", bind=False) + _fread_alloc = ResdataPrototype( + "rd_kw_obj rd_kw_fread_alloc(rd_fortio)", bind=False + ) _load_grdecl = ResdataPrototype( "rd_kw_obj rd_kw_fscanf_alloc_grdecl_dynamic_python(FILE, char*, bool, rd_data_type)", bind=False, @@ -137,7 +139,7 @@ class ResdataKW(BaseCClass): _int_ptr = ResdataPrototype("int* rd_kw_get_int_ptr(rd_kw)") _double_ptr = ResdataPrototype("double* rd_kw_get_double_ptr(rd_kw)") _free = ResdataPrototype("void rd_kw_free(rd_kw)") - _fwrite = ResdataPrototype("void rd_kw_fwrite(rd_kw, fortio)") + _fwrite = ResdataPrototype("void rd_kw_fwrite(rd_kw, rd_fortio)") _get_header = ResdataPrototype("char* rd_kw_get_header (rd_kw)") _set_header = ResdataPrototype("void rd_kw_set_header_name (rd_kw, char*)") _get_data_type = ResdataPrototype( diff --git a/python/resdata/resfile/rd_restart_file.py b/python/resdata/resfile/rd_restart_file.py index 00c2cc9b5..302cdc80d 100644 --- a/python/resdata/resfile/rd_restart_file.py +++ b/python/resdata/resfile/rd_restart_file.py @@ -14,7 +14,7 @@ class ResdataRestartHead(BaseCClass): ) _free = ResdataPrototype("void rd_rsthead_free(rd_rsthead)") _get_report_step = ResdataPrototype("int rd_rsthead_get_report_step(rd_rsthead)") - _get_sim_time = ResdataPrototype("time_t rd_rsthead_get_sim_time(rd_rsthead)") + _get_sim_time = ResdataPrototype("rd_time_t rd_rsthead_get_sim_time(rd_rsthead)") _get_sim_days = ResdataPrototype("double rd_rsthead_get_sim_days(rd_rsthead)") _get_nxconz = ResdataPrototype("int rd_rsthead_get_nxconz(rd_rsthead)") _get_ncwmax = ResdataPrototype("int rd_rsthead_get_ncwmax(rd_rsthead)") diff --git a/python/resdata/rft/rd_rft.py b/python/resdata/rft/rd_rft.py index 9a64c72e4..efe6a7568 100644 --- a/python/resdata/rft/rd_rft.py +++ b/python/resdata/rft/rd_rft.py @@ -30,12 +30,12 @@ class ResdataRFT(BaseCClass): TYPE_NAME = "rd_rft" _alloc = ResdataPrototype( - "void* rd_rft_node_alloc_new( char* , char* , time_t , double)", bind=False + "void* rd_rft_node_alloc_new( char* , char* , rd_time_t , double)", bind=False ) _free = ResdataPrototype("void rd_rft_node_free( rd_rft )") _get_type = ResdataPrototype("int rd_rft_node_get_type( rd_rft )") _get_well = ResdataPrototype("char* rd_rft_node_get_well_name( rd_rft )") - _get_date = ResdataPrototype("time_t rd_rft_node_get_date( rd_rft )") + _get_date = ResdataPrototype("rd_time_t rd_rft_node_get_date( rd_rft )") _get_size = ResdataPrototype("int rd_rft_node_get_size( rd_rft )") _iget_cell = ResdataPrototype("void* rd_rft_node_iget_cell( rd_rft )") _iget_depth = ResdataPrototype("double rd_rft_node_iget_depth( rd_rft )") @@ -179,12 +179,12 @@ class ResdataRFTFile(BaseCClass): _load = ResdataPrototype("void* rd_rft_file_alloc_case( char* )", bind=False) _iget = ResdataPrototype("rd_rft_ref rd_rft_file_iget_node( rd_rft_file , int )") _get_rft = ResdataPrototype( - "rd_rft_ref rd_rft_file_get_well_time_rft( rd_rft_file , char* , time_t)" + "rd_rft_ref rd_rft_file_get_well_time_rft( rd_rft_file , char* , rd_time_t)" ) _has_rft = ResdataPrototype("bool rd_rft_file_case_has_rft( char* )", bind=False) _free = ResdataPrototype("void rd_rft_file_free( rd_rft_file )") _get_size = ResdataPrototype( - "int rd_rft_file_get_size__( rd_rft_file , char* , time_t)" + "int rd_rft_file_get_size__( rd_rft_file , char* , rd_time_t)" ) _get_num_wells = ResdataPrototype("int rd_rft_file_get_num_wells( rd_rft_file )") diff --git a/python/resdata/rft/rd_rft_cell.py b/python/resdata/rft/rd_rft_cell.py index 0e9f45bf2..bcbdcf78d 100644 --- a/python/resdata/rft/rd_rft_cell.py +++ b/python/resdata/rft/rd_rft_cell.py @@ -16,13 +16,15 @@ class RFTCell(BaseCClass): coordinate values. """ - TYPE_NAME = "rft_cell" - _free = ResdataPrototype("void rd_rft_cell_free(rft_cell)") - _get_pressure = ResdataPrototype("double rd_rft_cell_get_pressure(rft_cell)") - _get_depth = ResdataPrototype("double rd_rft_cell_get_depth(rft_cell)") - _get_i = ResdataPrototype("int rd_rft_cell_get_i(rft_cell)") - _get_j = ResdataPrototype("int rd_rft_cell_get_j(rft_cell)") - _get_k = ResdataPrototype("int rd_rft_cell_get_k(rft_cell)") + TYPE_NAME = "rd_rft_cell_base" + _free = ResdataPrototype("void rd_rft_cell_free(rd_rft_cell_base)") + _get_pressure = ResdataPrototype( + "double rd_rft_cell_get_pressure(rd_rft_cell_base)" + ) + _get_depth = ResdataPrototype("double rd_rft_cell_get_depth(rd_rft_cell_base)") + _get_i = ResdataPrototype("int rd_rft_cell_get_i(rd_rft_cell_base)") + _get_j = ResdataPrototype("int rd_rft_cell_get_j(rd_rft_cell_base)") + _get_k = ResdataPrototype("int rd_rft_cell_get_k(rd_rft_cell_base)") def free(self): self._free() diff --git a/python/resdata/summary/rd_smspec_node.py b/python/resdata/summary/rd_smspec_node.py index ef46699f0..e793b8c03 100644 --- a/python/resdata/summary/rd_smspec_node.py +++ b/python/resdata/summary/rd_smspec_node.py @@ -14,24 +14,24 @@ class ResdataSMSPECNode(BaseCClass): structure. """ - TYPE_NAME = "smspec_node" - _node_is_total = ResdataPrototype("bool smspec_node_is_total( smspec_node )") + TYPE_NAME = "rd_smspec_node" + _node_is_total = ResdataPrototype("bool smspec_node_is_total( rd_smspec_node )") _node_is_historical = ResdataPrototype( - "bool smspec_node_is_historical( smspec_node )" + "bool smspec_node_is_historical( rd_smspec_node )" ) - _node_is_rate = ResdataPrototype("bool smspec_node_is_rate( smspec_node )") - _node_unit = ResdataPrototype("char* smspec_node_get_unit( smspec_node )") - _node_wgname = ResdataPrototype("char* smspec_node_get_wgname( smspec_node )") - _node_keyword = ResdataPrototype("char* smspec_node_get_keyword( smspec_node )") - _node_num = ResdataPrototype("int smspec_node_get_num( smspec_node )") - _node_need_num = ResdataPrototype("bool smspec_node_need_nums( smspec_node )") - _gen_key1 = ResdataPrototype("char* smspec_node_get_gen_key1( smspec_node )") - _gen_key2 = ResdataPrototype("char* smspec_node_get_gen_key2( smspec_node )") + _node_is_rate = ResdataPrototype("bool smspec_node_is_rate( rd_smspec_node )") + _node_unit = ResdataPrototype("char* smspec_node_get_unit( rd_smspec_node )") + _node_wgname = ResdataPrototype("char* smspec_node_get_wgname( rd_smspec_node )") + _node_keyword = ResdataPrototype("char* smspec_node_get_keyword( rd_smspec_node )") + _node_num = ResdataPrototype("int smspec_node_get_num( rd_smspec_node )") + _node_need_num = ResdataPrototype("bool smspec_node_need_nums( rd_smspec_node )") + _gen_key1 = ResdataPrototype("char* smspec_node_get_gen_key1( rd_smspec_node )") + _gen_key2 = ResdataPrototype("char* smspec_node_get_gen_key2( rd_smspec_node )") _var_type = ResdataPrototype( - "rd_sum_var_type smspec_node_get_var_type( smspec_node )" + "rd_sum_var_type smspec_node_get_var_type( rd_smspec_node )" ) - _cmp = ResdataPrototype("int smspec_node_cmp( smspec_node , smspec_node)") - _get_default = ResdataPrototype("float smspec_node_get_default(smspec_node)") + _cmp = ResdataPrototype("int smspec_node_cmp( rd_smspec_node , rd_smspec_node)") + _get_default = ResdataPrototype("float smspec_node_get_default(rd_smspec_node)") def __init__(self): super(ResdataSMSPECNode, self).__init__(0) # null pointer diff --git a/python/resdata/summary/rd_sum.py b/python/resdata/summary/rd_sum.py index ca32ac5d9..6f6ecd44b 100644 --- a/python/resdata/summary/rd_sum.py +++ b/python/resdata/summary/rd_sum.py @@ -81,18 +81,18 @@ class Summary(BaseCClass): bind=False, ) _fread_alloc = ResdataPrototype( - "void* rd_sum_fread_alloc(char*, stringlist, char*, bool)", bind=False + "void* rd_sum_fread_alloc(char*, rd_stringlist, char*, bool)", bind=False ) _create_restart_writer = ResdataPrototype( - "rd_sum_obj rd_sum_alloc_restart_writer2(char*, char*, int, bool, bool, char*, time_t, bool, int, int, int)", + "rd_sum_obj rd_sum_alloc_restart_writer2(char*, char*, int, bool, bool, char*, rd_time_t, bool, int, int, int)", bind=False, ) _create_writer = ResdataPrototype( - "rd_sum_obj rd_sum_alloc_writer(char*, bool, bool, char*, time_t, bool, int, int, int)", + "rd_sum_obj rd_sum_alloc_writer(char*, bool, bool, char*, rd_time_t, bool, int, int, int)", bind=False, ) _resample = ResdataPrototype( - "rd_sum_obj rd_sum_alloc_resample( rd_sum, char*, time_t_vector, bool, bool)" + "rd_sum_obj rd_sum_alloc_resample( rd_sum, char*, rd_time_t_vector, bool, bool)" ) _iiget = ResdataPrototype("double rd_sum_iget(rd_sum, int, int)") _free = ResdataPrototype("void rd_sum_free(rd_sum)") @@ -101,7 +101,7 @@ class Summary(BaseCClass): _iget_report_step = ResdataPrototype( "int rd_sum_iget_report_step(rd_sum, int) " ) - _iget_sim_time = ResdataPrototype("time_t rd_sum_iget_sim_time(rd_sum, int) ") + _iget_sim_time = ResdataPrototype("rd_time_t rd_sum_iget_sim_time(rd_sum, int) ") _get_report_end = ResdataPrototype("int rd_sum_iget_report_end(rd_sum, int)") _get_general_var = ResdataPrototype( "double rd_sum_get_general_var(rd_sum, int, char*)" @@ -113,13 +113,13 @@ class Summary(BaseCClass): "double rd_sum_get_general_var_from_sim_days(rd_sum, double, char*)" ) _get_general_var_from_sim_time = ResdataPrototype( - "double rd_sum_get_general_var_from_sim_time(rd_sum, time_t, char*)" + "double rd_sum_get_general_var_from_sim_time(rd_sum, rd_time_t, char*)" ) _solve_days = ResdataPrototype( - "double_vector_obj rd_sum_alloc_days_solution(rd_sum, char*, double, bool)" + "rd_double_vector_obj rd_sum_alloc_days_solution(rd_sum, char*, double, bool)" ) _solve_dates = ResdataPrototype( - "time_t_vector_obj rd_sum_alloc_time_solution(rd_sum, char*, double, bool)" + "rd_time_t_vector_obj rd_sum_alloc_time_solution(rd_sum, char*, double, bool)" ) _get_first_gt = ResdataPrototype( "int rd_sum_get_first_gt(rd_sum, int, double)" @@ -127,8 +127,8 @@ class Summary(BaseCClass): _get_first_lt = ResdataPrototype( "int rd_sum_get_first_lt(rd_sum, int, double)" ) - _get_start_date = ResdataPrototype("time_t rd_sum_get_start_time(rd_sum)") - _get_end_date = ResdataPrototype("time_t rd_sum_get_end_time(rd_sum)") + _get_start_date = ResdataPrototype("rd_time_t rd_sum_get_start_time(rd_sum)") + _get_end_date = ResdataPrototype("rd_time_t rd_sum_get_end_time(rd_sum)") _get_last_report_step = ResdataPrototype( "int rd_sum_get_last_report_step(rd_sum)" ) @@ -136,14 +136,16 @@ class Summary(BaseCClass): "int rd_sum_get_first_report_step(rd_sum)" ) _select_matching_keys = ResdataPrototype( - "void rd_sum_select_matching_general_var_list(rd_sum, char*, stringlist)" + "void rd_sum_select_matching_general_var_list(rd_sum, char*, rd_stringlist)" ) _has_key = ResdataPrototype("bool rd_sum_has_general_var(rd_sum, char*)") - _check_sim_time = ResdataPrototype("bool rd_sum_check_sim_time(rd_sum, time_t)") + _check_sim_time = ResdataPrototype( + "bool rd_sum_check_sim_time(rd_sum, rd_time_t)" + ) _check_sim_days = ResdataPrototype("bool rd_sum_check_sim_days(rd_sum, double)") _sim_length = ResdataPrototype("double rd_sum_get_sim_length(rd_sum)") _get_first_day = ResdataPrototype("double rd_sum_get_first_day(rd_sum)") - _get_data_start = ResdataPrototype("time_t rd_sum_get_data_start(rd_sum)") + _get_data_start = ResdataPrototype("rd_time_t rd_sum_get_data_start(rd_sum)") _get_unit = ResdataPrototype("char* rd_sum_get_unit(rd_sum, char*)") _get_restart_case = ResdataPrototype("rd_sum_ref rd_sum_get_restart_case(rd_sum)") _get_restart_step = ResdataPrototype("int rd_sum_get_restart_step(rd_sum)") @@ -153,38 +155,40 @@ class Summary(BaseCClass): _get_path = ResdataPrototype("char* rd_sum_get_path(rd_sum)") _get_abs_path = ResdataPrototype("char* rd_sum_get_abs_path(rd_sum)") _get_report_step_from_time = ResdataPrototype( - "int rd_sum_get_report_step_from_time(rd_sum, time_t)" + "int rd_sum_get_report_step_from_time(rd_sum, rd_time_t)" ) _get_report_step_from_days = ResdataPrototype( "int rd_sum_get_report_step_from_days(rd_sum, double)" ) - _get_report_time = ResdataPrototype("time_t rd_sum_get_report_time(rd_sum, int)") + _get_report_time = ResdataPrototype( + "rd_time_t rd_sum_get_report_time(rd_sum, int)" + ) _fwrite_sum = ResdataPrototype("void rd_sum_fwrite(rd_sum)") _can_write = ResdataPrototype("bool rd_sum_can_write(rd_sum)") _set_case = ResdataPrototype("void rd_sum_set_case(rd_sum, char*)") _alloc_time_vector = ResdataPrototype( - "time_t_vector_obj rd_sum_alloc_time_vector(rd_sum, bool)" + "rd_time_t_vector_obj rd_sum_alloc_time_vector(rd_sum, bool)" ) _alloc_data_vector = ResdataPrototype( - "double_vector_obj rd_sum_alloc_data_vector(rd_sum, int, bool)" + "rd_double_vector_obj rd_sum_alloc_data_vector(rd_sum, int, bool)" ) _get_var_node = ResdataPrototype( - "smspec_node_ref rd_sum_get_general_var_node(rd_sum, char*)" + "rd_smspec_node_ref rd_sum_get_general_var_node(rd_sum, char*)" ) _create_well_list = ResdataPrototype( - "stringlist_obj rd_sum_alloc_well_list(rd_sum, char*)" + "rd_stringlist_obj rd_sum_alloc_well_list(rd_sum, char*)" ) _create_group_list = ResdataPrototype( - "stringlist_obj rd_sum_alloc_group_list(rd_sum, char*)" + "rd_stringlist_obj rd_sum_alloc_group_list(rd_sum, char*)" ) _add_variable = ResdataPrototype( - "smspec_node_ref rd_sum_add_var(rd_sum, char*, char*, int, char*, double)" + "rd_smspec_node_ref rd_sum_add_var(rd_sum, char*, char*, int, char*, double)" ) _add_tstep = ResdataPrototype( "rd_sum_tstep_ref rd_sum_add_tstep(rd_sum, int, double)" ) _export_csv = ResdataPrototype( - "void rd_sum_export_csv(rd_sum, char*, stringlist, char*, char*)" + "void rd_sum_export_csv(rd_sum, char*, rd_stringlist, char*, char*)" ) _identify_var_type = ResdataPrototype( "rd_sum_var_type rd_sum_identify_var_type(char*)", bind=False @@ -203,7 +207,7 @@ class Summary(BaseCClass): "void rd_sum_init_double_vector(rd_sum, char*, double*)" ) _init_numpy_vector_interp = ResdataPrototype( - "void rd_sum_init_double_vector_interp(rd_sum, char*, time_t_vector, double*)" + "void rd_sum_init_double_vector_interp(rd_sum, char*, rd_time_t_vector, double*)" ) _init_numpy_datetime64 = ResdataPrototype( "void rd_sum_init_datetime64_vector(rd_sum, int64*, int)" @@ -1616,18 +1620,18 @@ def resample( import resdata.summary.rd_sum_keyword_vector Summary._dump_csv_line = ResdataPrototype( - "void rd_sum_fwrite_interp_csv_line(rd_sum, time_t, rd_sum_vector, FILE)", + "void rd_sum_fwrite_interp_csv_line(rd_sum, rd_time_t, rd_sum_vector, FILE)", bind=False, ) Summary._get_interp_vector = ResdataPrototype( - "void rd_sum_get_interp_vector(rd_sum, time_t, rd_sum_vector, double_vector)", + "void rd_sum_get_interp_vector(rd_sum, rd_time_t, rd_sum_vector, rd_double_vector)", bind=False, ) Summary._init_pandas_frame = ResdataPrototype( "void rd_sum_init_double_frame(rd_sum, rd_sum_vector, double*)", bind=False ) Summary._init_pandas_frame_interp = ResdataPrototype( - "void rd_sum_init_double_frame_interp(rd_sum, rd_sum_vector, time_t_vector, double*)", + "void rd_sum_init_double_frame_interp(rd_sum, rd_sum_vector, rd_time_t_vector, double*)", bind=False, ) diff --git a/python/resdata/summary/rd_sum_tstep.py b/python/resdata/summary/rd_sum_tstep.py index c85a88c90..68699c078 100644 --- a/python/resdata/summary/rd_sum_tstep.py +++ b/python/resdata/summary/rd_sum_tstep.py @@ -12,7 +12,9 @@ class SummaryTStep(BaseCClass): ) _free = ResdataPrototype("void rd_sum_tstep_free(rd_sum_tstep)") _get_sim_days = ResdataPrototype("double rd_sum_tstep_get_sim_days(rd_sum_tstep)") - _get_sim_time = ResdataPrototype("time_t rd_sum_tstep_get_sim_time(rd_sum_tstep)") + _get_sim_time = ResdataPrototype( + "rd_time_t rd_sum_tstep_get_sim_time(rd_sum_tstep)" + ) _get_report = ResdataPrototype("int rd_sum_tstep_get_report(rd_sum_tstep)") _get_ministep = ResdataPrototype("int rd_sum_tstep_get_ministep(rd_sum_tstep)") _set_from_key = ResdataPrototype( diff --git a/python/resdata/util/enums/rng_alg_type_enum.py b/python/resdata/util/enums/rng_alg_type_enum.py index de7f76e8f..6d00af2fd 100644 --- a/python/resdata/util/enums/rng_alg_type_enum.py +++ b/python/resdata/util/enums/rng_alg_type_enum.py @@ -2,7 +2,7 @@ class RngAlgTypeEnum(BaseCEnum): - TYPE_NAME = "rng_alg_type_enum" + TYPE_NAME = "rd_rng_alg_type_enum" MZRAN = None diff --git a/python/resdata/util/enums/rng_init_mode_enum.py b/python/resdata/util/enums/rng_init_mode_enum.py index b0dc7a145..3c0ba01ec 100644 --- a/python/resdata/util/enums/rng_init_mode_enum.py +++ b/python/resdata/util/enums/rng_init_mode_enum.py @@ -2,7 +2,7 @@ class RngInitModeEnum(BaseCEnum): - TYPE_NAME = "rng_init_mode_enum" + TYPE_NAME = "rd_rng_init_mode" INIT_DEFAULT = None INIT_CLOCK = None INIT_DEV_RANDOM = None diff --git a/python/resdata/util/util/arg_pack.py b/python/resdata/util/util/arg_pack.py index f4af42d0b..7bb7a3050 100644 --- a/python/resdata/util/util/arg_pack.py +++ b/python/resdata/util/util/arg_pack.py @@ -3,15 +3,17 @@ class ArgPack(BaseCClass): - TYPE_NAME = "arg_pack" + TYPE_NAME = "rd_arg_pack" _alloc = ResdataPrototype("void* arg_pack_alloc()", bind=False) - _append_int = ResdataPrototype("void arg_pack_append_int(arg_pack, int)") - _append_double = ResdataPrototype("void arg_pack_append_double(arg_pack, double)") - _append_ptr = ResdataPrototype("void arg_pack_append_ptr(arg_pack, void*)") - - _size = ResdataPrototype("int arg_pack_size(arg_pack)") - _free = ResdataPrototype("void arg_pack_free(arg_pack)") + _append_int = ResdataPrototype("void arg_pack_append_int(rd_arg_pack, int)") + _append_double = ResdataPrototype( + "void arg_pack_append_double(rd_arg_pack, double)" + ) + _append_ptr = ResdataPrototype("void arg_pack_append_ptr(rd_arg_pack, void*)") + + _size = ResdataPrototype("int arg_pack_size(rd_arg_pack)") + _free = ResdataPrototype("void arg_pack_free(rd_arg_pack)") def __init__(self, *args): c_ptr = self._alloc() diff --git a/python/resdata/util/util/bool_vector.py b/python/resdata/util/util/bool_vector.py index 015d05482..b2aae19e3 100644 --- a/python/resdata/util/util/bool_vector.py +++ b/python/resdata/util/util/bool_vector.py @@ -3,96 +3,107 @@ class BoolVector(VectorTemplate): + TYPE_NAME = "rd_bool_vector" default_format = "%8d" _alloc = ResdataPrototype("void* bool_vector_alloc( int , bool )", bind=False) _create_active_mask = ResdataPrototype( - "bool_vector_obj string_util_alloc_active_mask( char* )", bind=False + "rd_bool_vector_obj string_util_alloc_active_mask( char* )", bind=False ) _active_list = ResdataPrototype( - "int_vector_obj bool_vector_alloc_active_list(bool_vector)" + "rd_int_vector_obj bool_vector_alloc_active_list(rd_bool_vector)" ) _alloc_copy = ResdataPrototype( - "bool_vector_obj bool_vector_alloc_copy( bool_vector )" + "rd_bool_vector_obj bool_vector_alloc_copy( rd_bool_vector )" ) _update_active_mask = ResdataPrototype( - "bool string_util_update_active_mask(char*, bool_vector)", bind=False + "bool string_util_update_active_mask(char*, rd_bool_vector)", bind=False ) _strided_copy = ResdataPrototype( - "bool_vector_obj bool_vector_alloc_strided_copy( bool_vector , int , int , int)" - ) - _free = ResdataPrototype("void bool_vector_free( bool_vector )") - _iget = ResdataPrototype("bool bool_vector_iget( bool_vector , int )") - _safe_iget = ResdataPrototype("bool bool_vector_safe_iget( bool_vector , int )") - _iset = ResdataPrototype("void bool_vector_iset( bool_vector , int , bool)") - _size = ResdataPrototype("int bool_vector_size( bool_vector )") - _append = ResdataPrototype("void bool_vector_append( bool_vector , bool )") + "rd_bool_vector_obj bool_vector_alloc_strided_copy( rd_bool_vector , int , int , int)" + ) + _free = ResdataPrototype("void bool_vector_free( rd_bool_vector )") + _iget = ResdataPrototype("bool bool_vector_iget( rd_bool_vector , int )") + _safe_iget = ResdataPrototype( + "bool bool_vector_safe_iget( rd_bool_vector , int )" + ) + _iset = ResdataPrototype("void bool_vector_iset( rd_bool_vector , int , bool)") + _size = ResdataPrototype("int bool_vector_size( rd_bool_vector )") + _append = ResdataPrototype("void bool_vector_append( rd_bool_vector , bool )") _idel_block = ResdataPrototype( - "void bool_vector_idel_block( bool_vector , bool , bool )" + "void bool_vector_idel_block( rd_bool_vector , bool , bool )" + ) + _idel = ResdataPrototype("void bool_vector_idel( rd_bool_vector , int )") + _pop = ResdataPrototype("bool bool_vector_pop( rd_bool_vector )") + _lshift = ResdataPrototype("void bool_vector_lshift( rd_bool_vector , int )") + _rshift = ResdataPrototype("void bool_vector_rshift( rd_bool_vector , int )") + _insert = ResdataPrototype( + "void bool_vector_insert( rd_bool_vector , int , bool)" ) - _idel = ResdataPrototype("void bool_vector_idel( bool_vector , int )") - _pop = ResdataPrototype("bool bool_vector_pop( bool_vector )") - _lshift = ResdataPrototype("void bool_vector_lshift( bool_vector , int )") - _rshift = ResdataPrototype("void bool_vector_rshift( bool_vector , int )") - _insert = ResdataPrototype("void bool_vector_insert( bool_vector , int , bool)") _fprintf = ResdataPrototype( - "void bool_vector_fprintf( bool_vector , FILE , char* , char*)" + "void bool_vector_fprintf( rd_bool_vector , FILE , char* , char*)" ) - _sort = ResdataPrototype("void bool_vector_sort( bool_vector )") - _rsort = ResdataPrototype("void bool_vector_rsort( bool_vector )") - _reset = ResdataPrototype("void bool_vector_reset( bool_vector )") + _sort = ResdataPrototype("void bool_vector_sort( rd_bool_vector )") + _rsort = ResdataPrototype("void bool_vector_rsort( rd_bool_vector )") + _reset = ResdataPrototype("void bool_vector_reset( rd_bool_vector )") _set_read_only = ResdataPrototype( - "void bool_vector_set_read_only( bool_vector , bool )" + "void bool_vector_set_read_only( rd_bool_vector , bool )" ) - _get_read_only = ResdataPrototype("bool bool_vector_get_read_only( bool_vector )") - _get_max = ResdataPrototype("bool bool_vector_get_max( bool_vector )") - _get_min = ResdataPrototype("bool bool_vector_get_min( bool_vector )") + _get_read_only = ResdataPrototype( + "bool bool_vector_get_read_only( rd_bool_vector )" + ) + _get_max = ResdataPrototype("bool bool_vector_get_max( rd_bool_vector )") + _get_min = ResdataPrototype("bool bool_vector_get_min( rd_bool_vector )") _get_max_index = ResdataPrototype( - "int bool_vector_get_max_index( bool_vector , bool)" + "int bool_vector_get_max_index( rd_bool_vector , bool)" ) _get_min_index = ResdataPrototype( - "int bool_vector_get_min_index( bool_vector , bool)" + "int bool_vector_get_min_index( rd_bool_vector , bool)" ) - _shift = ResdataPrototype("void bool_vector_shift( bool_vector , bool )") - _scale = ResdataPrototype("void bool_vector_scale( bool_vector , bool )") - _div = ResdataPrototype("void bool_vector_div( bool_vector , bool )") + _shift = ResdataPrototype("void bool_vector_shift( rd_bool_vector , bool )") + _scale = ResdataPrototype("void bool_vector_scale( rd_bool_vector , bool )") + _div = ResdataPrototype("void bool_vector_div( rd_bool_vector , bool )") _inplace_add = ResdataPrototype( - "void bool_vector_inplace_add( bool_vector , bool_vector )" + "void bool_vector_inplace_add( rd_bool_vector , rd_bool_vector )" ) _inplace_mul = ResdataPrototype( - "void bool_vector_inplace_mul( bool_vector , bool_vector )" + "void bool_vector_inplace_mul( rd_bool_vector , rd_bool_vector )" + ) + _assign = ResdataPrototype("void bool_vector_set_all( rd_bool_vector , bool)") + _memcpy = ResdataPrototype( + "void bool_vector_memcpy(rd_bool_vector , rd_bool_vector )" ) - _assign = ResdataPrototype("void bool_vector_set_all( bool_vector , bool)") - _memcpy = ResdataPrototype("void bool_vector_memcpy(bool_vector , bool_vector )") _set_default = ResdataPrototype( - "void bool_vector_set_default( bool_vector , bool)" + "void bool_vector_set_default( rd_bool_vector , bool)" + ) + _get_default = ResdataPrototype("bool bool_vector_get_default( rd_bool_vector )") + _element_size = ResdataPrototype( + "int bool_vector_element_size( rd_bool_vector )" ) - _get_default = ResdataPrototype("bool bool_vector_get_default( bool_vector )") - _element_size = ResdataPrototype("int bool_vector_element_size( bool_vector )") _permute = ResdataPrototype( - "void bool_vector_permute(bool_vector, permutation_vector)" + "void bool_vector_permute(rd_bool_vector, rd_permutation_vector)" ) _sort_perm = ResdataPrototype( - "permutation_vector_obj bool_vector_alloc_sort_perm(bool_vector)" + "rd_permutation_vector_obj bool_vector_alloc_sort_perm(rd_bool_vector)" ) _rsort_perm = ResdataPrototype( - "permutation_vector_obj bool_vector_alloc_rsort_perm(bool_vector)" + "rd_permutation_vector_obj bool_vector_alloc_rsort_perm(rd_bool_vector)" ) - _contains = ResdataPrototype("bool bool_vector_contains(bool_vector, bool)") - _select_unique = ResdataPrototype("void bool_vector_select_unique(bool_vector)") - _element_sum = ResdataPrototype("bool bool_vector_sum(bool_vector)") - _get_data_ptr = ResdataPrototype("bool* bool_vector_get_ptr(bool_vector)") - _count_equal = ResdataPrototype("int bool_vector_count_equal(bool_vector, bool)") + _contains = ResdataPrototype("bool bool_vector_contains(rd_bool_vector, bool)") + _select_unique = ResdataPrototype("void bool_vector_select_unique(rd_bool_vector)") + _element_sum = ResdataPrototype("bool bool_vector_sum(rd_bool_vector)") + _get_data_ptr = ResdataPrototype("bool* bool_vector_get_ptr(rd_bool_vector)") + _count_equal = ResdataPrototype("int bool_vector_count_equal(rd_bool_vector, bool)") _init_linear = None - _equal = ResdataPrototype("bool bool_vector_equal(bool_vector, bool_vector)") + _equal = ResdataPrototype("bool bool_vector_equal(rd_bool_vector, rd_bool_vector)") _first_eq = ResdataPrototype( - "int bool_vector_first_equal(bool_vector, bool_vector, int)" + "int bool_vector_first_equal(rd_bool_vector, rd_bool_vector, int)" ) _first_neq = ResdataPrototype( - "int bool_vector_first_not_equal(bool_vector, bool_vector, int)" + "int bool_vector_first_not_equal(rd_bool_vector, rd_bool_vector, int)" ) def __init__(self, default_value=False, initial_size=0): diff --git a/python/resdata/util/util/cthread_pool.py b/python/resdata/util/util/cthread_pool.py index e3aaac676..50e1b288b 100644 --- a/python/resdata/util/util/cthread_pool.py +++ b/python/resdata/util/util/cthread_pool.py @@ -7,12 +7,14 @@ class CThreadPool(BaseCClass): - TYPE_NAME = "thread_pool" + TYPE_NAME = "rd_thread_pool" _alloc = ResdataPrototype("void* thread_pool_alloc(int, bool)", bind=False) - _free = ResdataPrototype("void thread_pool_free(thread_pool)") - _add_job = ResdataPrototype("void thread_pool_add_job(thread_pool, void*, void*)") - _join = ResdataPrototype("void thread_pool_join(thread_pool)") + _free = ResdataPrototype("void thread_pool_free(rd_thread_pool)") + _add_job = ResdataPrototype( + "void thread_pool_add_job(rd_thread_pool, void*, void*)" + ) + _join = ResdataPrototype("void thread_pool_join(rd_thread_pool)") def __init__(self, pool_size, start=True): c_ptr = self._alloc(pool_size, start) diff --git a/python/resdata/util/util/ctime.py b/python/resdata/util/util/ctime.py index 53037b1b1..b22114919 100644 --- a/python/resdata/util/util/ctime.py +++ b/python/resdata/util/util/ctime.py @@ -7,7 +7,7 @@ class CTime(BaseCValue): - TYPE_NAME = "time_t" + TYPE_NAME = "rd_time_t" DATA_TYPE = ctypes.c_long _timezone = ResdataPrototype("char* util_get_timezone()", bind=False) _timegm = ResdataPrototype( diff --git a/python/resdata/util/util/double_vector.py b/python/resdata/util/util/double_vector.py index c027bfb95..53a32d582 100644 --- a/python/resdata/util/util/double_vector.py +++ b/python/resdata/util/util/double_vector.py @@ -3,102 +3,117 @@ class DoubleVector(VectorTemplate): + TYPE_NAME = "rd_double_vector" default_format = "%8.4f" _alloc = ResdataPrototype("void* double_vector_alloc( int , double )", bind=False) _alloc_copy = ResdataPrototype( - "double_vector_obj double_vector_alloc_copy( double_vector )" + "rd_double_vector_obj double_vector_alloc_copy( rd_double_vector )" ) _strided_copy = ResdataPrototype( - "double_vector_obj double_vector_alloc_strided_copy( double_vector , int , int , int)" + "rd_double_vector_obj double_vector_alloc_strided_copy( rd_double_vector , int , int , int)" ) - _free = ResdataPrototype("void double_vector_free( double_vector )") - _iget = ResdataPrototype("double double_vector_iget( double_vector , int )") + _free = ResdataPrototype("void double_vector_free( rd_double_vector )") + _iget = ResdataPrototype("double double_vector_iget( rd_double_vector , int )") _safe_iget = ResdataPrototype( - "double double_vector_safe_iget(double_vector , int )" + "double double_vector_safe_iget(rd_double_vector , int )" + ) + _iset = ResdataPrototype( + "double double_vector_iset( rd_double_vector , int , double)" + ) + _size = ResdataPrototype("int double_vector_size( rd_double_vector )") + _append = ResdataPrototype( + "void double_vector_append( rd_double_vector , double )" ) - _iset = ResdataPrototype("double double_vector_iset( double_vector , int , double)") - _size = ResdataPrototype("int double_vector_size( double_vector )") - _append = ResdataPrototype("void double_vector_append( double_vector , double )") _idel_block = ResdataPrototype( - "void double_vector_idel_block( double_vector , int , int )" + "void double_vector_idel_block( rd_double_vector , int , int )" ) - _pop = ResdataPrototype("double double_vector_pop( double_vector )") - _idel = ResdataPrototype("void double_vector_idel( double_vector , int )") - _lshift = ResdataPrototype("void double_vector_lshift( double_vector , int )") - _rshift = ResdataPrototype("void double_vector_rshift( double_vector , int )") + _pop = ResdataPrototype("double double_vector_pop( rd_double_vector )") + _idel = ResdataPrototype("void double_vector_idel( rd_double_vector , int )") + _lshift = ResdataPrototype("void double_vector_lshift( rd_double_vector , int )") + _rshift = ResdataPrototype("void double_vector_rshift( rd_double_vector , int )") _insert = ResdataPrototype( - "void double_vector_insert( double_vector , int , double)" + "void double_vector_insert( rd_double_vector , int , double)" ) _fprintf = ResdataPrototype( - "void double_vector_fprintf( double_vector , FILE , char* , char*)" + "void double_vector_fprintf( rd_double_vector , FILE , char* , char*)" ) - _sort = ResdataPrototype("void double_vector_sort( double_vector )") - _rsort = ResdataPrototype("void double_vector_rsort( double_vector )") - _reset = ResdataPrototype("void double_vector_reset( double_vector )") + _sort = ResdataPrototype("void double_vector_sort( rd_double_vector )") + _rsort = ResdataPrototype("void double_vector_rsort( rd_double_vector )") + _reset = ResdataPrototype("void double_vector_reset( rd_double_vector )") _get_read_only = ResdataPrototype( - "bool double_vector_get_read_only( double_vector )" + "bool double_vector_get_read_only( rd_double_vector )" ) _set_read_only = ResdataPrototype( - "void double_vector_set_read_only( double_vector , bool )" + "void double_vector_set_read_only( rd_double_vector , bool )" ) - _get_max = ResdataPrototype("double double_vector_get_max( double_vector )") - _get_min = ResdataPrototype("double double_vector_get_min( double_vector )") + _get_max = ResdataPrototype("double double_vector_get_max( rd_double_vector )") + _get_min = ResdataPrototype("double double_vector_get_min( rd_double_vector )") _get_max_index = ResdataPrototype( - "int double_vector_get_max_index( double_vector , bool)" + "int double_vector_get_max_index( rd_double_vector , bool)" ) _get_min_index = ResdataPrototype( - "int double_vector_get_min_index( double_vector , bool)" + "int double_vector_get_min_index( rd_double_vector , bool)" ) - _shift = ResdataPrototype("void double_vector_shift( double_vector , double )") - _scale = ResdataPrototype("void double_vector_scale( double_vector , double )") - _div = ResdataPrototype("void double_vector_div( double_vector , double )") + _shift = ResdataPrototype("void double_vector_shift( rd_double_vector , double )") + _scale = ResdataPrototype("void double_vector_scale( rd_double_vector , double )") + _div = ResdataPrototype("void double_vector_div( rd_double_vector , double )") _inplace_add = ResdataPrototype( - "void double_vector_inplace_add( double_vector , double_vector )" + "void double_vector_inplace_add( rd_double_vector , rd_double_vector )" ) _inplace_mul = ResdataPrototype( - "void double_vector_inplace_mul( double_vector , double_vector )" + "void double_vector_inplace_mul( rd_double_vector , rd_double_vector )" + ) + _assign = ResdataPrototype( + "void double_vector_set_all( rd_double_vector , double)" ) - _assign = ResdataPrototype("void double_vector_set_all( double_vector , double)") _memcpy = ResdataPrototype( - "void double_vector_memcpy(double_vector , double_vector )" + "void double_vector_memcpy(rd_double_vector , rd_double_vector )" ) _set_default = ResdataPrototype( - "void double_vector_set_default( double_vector , double)" + "void double_vector_set_default( rd_double_vector , double)" + ) + _get_default = ResdataPrototype( + "double double_vector_get_default( rd_double_vector )" ) - _get_default = ResdataPrototype("double double_vector_get_default( double_vector )") _element_size = ResdataPrototype( - "int double_vector_element_size( double_vector )" + "int double_vector_element_size( rd_double_vector )" ) _permute = ResdataPrototype( - "void double_vector_permute(double_vector, permutation_vector)" + "void double_vector_permute(rd_double_vector, rd_permutation_vector)" ) _sort_perm = ResdataPrototype( - "permutation_vector_obj double_vector_alloc_sort_perm(double_vector)" + "rd_permutation_vector_obj double_vector_alloc_sort_perm(rd_double_vector)" ) _rsort_perm = ResdataPrototype( - "permutation_vector_obj double_vector_alloc_rsort_perm(double_vector)" + "rd_permutation_vector_obj double_vector_alloc_rsort_perm(rd_double_vector)" ) - _contains = ResdataPrototype("bool double_vector_contains(double_vector, double)") - _select_unique = ResdataPrototype("void double_vector_select_unique(double_vector)") - _element_sum = ResdataPrototype("double double_vector_sum(double_vector)") - _get_data_ptr = ResdataPrototype("double* double_vector_get_ptr(double_vector)") + _contains = ResdataPrototype( + "bool double_vector_contains(rd_double_vector, double)" + ) + _select_unique = ResdataPrototype( + "void double_vector_select_unique(rd_double_vector)" + ) + _element_sum = ResdataPrototype("double double_vector_sum(rd_double_vector)") + _get_data_ptr = ResdataPrototype("double* double_vector_get_ptr(rd_double_vector)") _count_equal = ResdataPrototype( - "int double_vector_count_equal(double_vector, double)" + "int double_vector_count_equal(rd_double_vector, double)" ) _init_range = ResdataPrototype( - "void double_vector_init_range(double_vector, double , double , double)" + "void double_vector_init_range(rd_double_vector, double , double , double)" ) _init_linear = ResdataPrototype( - "bool double_vector_init_linear(double_vector, double, double, int)" + "bool double_vector_init_linear(rd_double_vector, double, double, int)" + ) + _equal = ResdataPrototype( + "bool double_vector_equal(rd_double_vector, rd_double_vector)" ) - _equal = ResdataPrototype("bool double_vector_equal(double_vector, double_vector)") _first_eq = ResdataPrototype( - "int double_vector_first_equal(double_vector, double_vector, int)" + "int double_vector_first_equal(rd_double_vector, rd_double_vector, int)" ) _first_neq = ResdataPrototype( - "int double_vector_first_not_equal(double_vector, double_vector, int)" + "int double_vector_first_not_equal(rd_double_vector, rd_double_vector, int)" ) def __init__(self, default_value=0, initial_size=0): diff --git a/python/resdata/util/util/hash.py b/python/resdata/util/util/hash.py index 3f2a5509f..4df2a96a4 100644 --- a/python/resdata/util/util/hash.py +++ b/python/resdata/util/util/hash.py @@ -9,7 +9,7 @@ class Hash(BaseCClass): _alloc = ResdataPrototype("void* hash_alloc()", bind=False) _free = ResdataPrototype("void hash_free(hash)") _size = ResdataPrototype("int hash_get_size(hash)") - _keys = ResdataPrototype("stringlist_obj hash_alloc_stringlist(hash)") + _keys = ResdataPrototype("rd_stringlist_obj hash_alloc_stringlist(hash)") _has_key = ResdataPrototype("bool hash_has_key(hash, char*)") _get = ResdataPrototype("void* hash_get(hash, char*)") _insert_ref = ResdataPrototype("void hash_insert_ref(hash, char*, void*)") diff --git a/python/resdata/util/util/int_vector.py b/python/resdata/util/util/int_vector.py index 666e2a5bc..8583488bf 100644 --- a/python/resdata/util/util/int_vector.py +++ b/python/resdata/util/util/int_vector.py @@ -3,92 +3,101 @@ class IntVector(VectorTemplate): + TYPE_NAME = "rd_int_vector" default_format = "%d" _alloc = ResdataPrototype("void* int_vector_alloc( int , int )", bind=False) _create_active_list = ResdataPrototype( - "int_vector_obj string_util_alloc_active_list( char*)", bind=False + "rd_int_vector_obj string_util_alloc_active_list( char*)", bind=False ) _create_value_list = ResdataPrototype( - "int_vector_obj string_util_alloc_value_list( char*)", bind=False + "rd_int_vector_obj string_util_alloc_value_list( char*)", bind=False + ) + _alloc_copy = ResdataPrototype( + "rd_int_vector_obj int_vector_alloc_copy( rd_int_vector )" ) - _alloc_copy = ResdataPrototype("int_vector_obj int_vector_alloc_copy( int_vector )") _strided_copy = ResdataPrototype( - "int_vector_obj int_vector_alloc_strided_copy( int_vector , int , int , int)" - ) - _free = ResdataPrototype("void int_vector_free( int_vector )") - _iget = ResdataPrototype("int int_vector_iget( int_vector , int )") - _safe_iget = ResdataPrototype("int int_vector_safe_iget( int_vector , int )") - _iset = ResdataPrototype("int int_vector_iset( int_vector , int , int)") - _size = ResdataPrototype("int int_vector_size( int_vector )") - _append = ResdataPrototype("void int_vector_append( int_vector , int )") + "rd_int_vector_obj int_vector_alloc_strided_copy( rd_int_vector , int , int , int)" + ) + _free = ResdataPrototype("void int_vector_free( rd_int_vector )") + _iget = ResdataPrototype("int int_vector_iget( rd_int_vector , int )") + _safe_iget = ResdataPrototype("int int_vector_safe_iget( rd_int_vector , int )") + _iset = ResdataPrototype("int int_vector_iset( rd_int_vector , int , int)") + _size = ResdataPrototype("int int_vector_size( rd_int_vector )") + _append = ResdataPrototype("void int_vector_append( rd_int_vector , int )") _idel_block = ResdataPrototype( - "void int_vector_idel_block( int_vector , int , int )" + "void int_vector_idel_block( rd_int_vector , int , int )" ) - _pop = ResdataPrototype("int int_vector_pop( int_vector )") - _idel = ResdataPrototype("void int_vector_idel( int_vector , int )") - _insert = ResdataPrototype("void int_vector_insert( int_vector , int , int)") - _lshift = ResdataPrototype("void int_vector_lshift( int_vector , int )") - _rshift = ResdataPrototype("void int_vector_rshift( int_vector , int )") + _pop = ResdataPrototype("int int_vector_pop( rd_int_vector )") + _idel = ResdataPrototype("void int_vector_idel( rd_int_vector , int )") + _insert = ResdataPrototype("void int_vector_insert( rd_int_vector , int , int)") + _lshift = ResdataPrototype("void int_vector_lshift( rd_int_vector , int )") + _rshift = ResdataPrototype("void int_vector_rshift( rd_int_vector , int )") _fprintf = ResdataPrototype( - "void int_vector_fprintf( int_vector , FILE , char* , char*)" + "void int_vector_fprintf( rd_int_vector , FILE , char* , char*)" ) - _sort = ResdataPrototype("void int_vector_sort( int_vector )") - _rsort = ResdataPrototype("void int_vector_rsort( int_vector )") - _reset = ResdataPrototype("void int_vector_reset( int_vector )") + _sort = ResdataPrototype("void int_vector_sort( rd_int_vector )") + _rsort = ResdataPrototype("void int_vector_rsort( rd_int_vector )") + _reset = ResdataPrototype("void int_vector_reset( rd_int_vector )") _set_read_only = ResdataPrototype( - "void int_vector_set_read_only( int_vector , bool )" + "void int_vector_set_read_only( rd_int_vector , bool )" + ) + _get_read_only = ResdataPrototype( + "bool int_vector_get_read_only( rd_int_vector )" ) - _get_read_only = ResdataPrototype("bool int_vector_get_read_only( int_vector )") - _get_max = ResdataPrototype("int int_vector_get_max( int_vector )") - _get_min = ResdataPrototype("int int_vector_get_min( int_vector )") + _get_max = ResdataPrototype("int int_vector_get_max( rd_int_vector )") + _get_min = ResdataPrototype("int int_vector_get_min( rd_int_vector )") _get_max_index = ResdataPrototype( - "int int_vector_get_max_index( int_vector , bool)" + "int int_vector_get_max_index( rd_int_vector , bool)" ) _get_min_index = ResdataPrototype( - "int int_vector_get_min_index( int_vector , bool)" + "int int_vector_get_min_index( rd_int_vector , bool)" ) - _shift = ResdataPrototype("void int_vector_shift( int_vector , int )") - _scale = ResdataPrototype("void int_vector_scale( int_vector , int )") - _div = ResdataPrototype("void int_vector_div( int_vector , int )") + _shift = ResdataPrototype("void int_vector_shift( rd_int_vector , int )") + _scale = ResdataPrototype("void int_vector_scale( rd_int_vector , int )") + _div = ResdataPrototype("void int_vector_div( rd_int_vector , int )") _inplace_add = ResdataPrototype( - "void int_vector_inplace_add( int_vector , int_vector )" + "void int_vector_inplace_add( rd_int_vector , rd_int_vector )" ) _inplace_mul = ResdataPrototype( - "void int_vector_inplace_mul( int_vector , int_vector )" + "void int_vector_inplace_mul( rd_int_vector , rd_int_vector )" + ) + _assign = ResdataPrototype("void int_vector_set_all( rd_int_vector , int)") + _memcpy = ResdataPrototype( + "void int_vector_memcpy(rd_int_vector , rd_int_vector )" + ) + _set_default = ResdataPrototype( + "void int_vector_set_default( rd_int_vector , int)" ) - _assign = ResdataPrototype("void int_vector_set_all( int_vector , int)") - _memcpy = ResdataPrototype("void int_vector_memcpy(int_vector , int_vector )") - _set_default = ResdataPrototype("void int_vector_set_default( int_vector , int)") - _get_default = ResdataPrototype("int int_vector_get_default( int_vector )") - _element_size = ResdataPrototype("int int_vector_element_size( int_vector )") + _get_default = ResdataPrototype("int int_vector_get_default( rd_int_vector )") + _element_size = ResdataPrototype("int int_vector_element_size( rd_int_vector )") _permute = ResdataPrototype( - "void int_vector_permute(int_vector, permutation_vector)" + "void int_vector_permute(rd_int_vector, rd_permutation_vector)" ) _sort_perm = ResdataPrototype( - "permutation_vector_obj int_vector_alloc_sort_perm(int_vector)" + "rd_permutation_vector_obj int_vector_alloc_sort_perm(rd_int_vector)" ) _rsort_perm = ResdataPrototype( - "permutation_vector_obj int_vector_alloc_rsort_perm(int_vector)" + "rd_permutation_vector_obj int_vector_alloc_rsort_perm(rd_int_vector)" ) - _contains = ResdataPrototype("bool int_vector_contains(int_vector, int)") - _select_unique = ResdataPrototype("void int_vector_select_unique(int_vector)") - _element_sum = ResdataPrototype("int int_vector_sum(int_vector)") - _get_data_ptr = ResdataPrototype("int* int_vector_get_ptr(int_vector)") - _count_equal = ResdataPrototype("int int_vector_count_equal(int_vector, int)") + _contains = ResdataPrototype("bool int_vector_contains(rd_int_vector, int)") + _select_unique = ResdataPrototype("void int_vector_select_unique(rd_int_vector)") + _element_sum = ResdataPrototype("int int_vector_sum(rd_int_vector)") + _get_data_ptr = ResdataPrototype("int* int_vector_get_ptr(rd_int_vector)") + _count_equal = ResdataPrototype("int int_vector_count_equal(rd_int_vector, int)") _init_range = ResdataPrototype( - "void int_vector_init_range(int_vector, int , int , int)" + "void int_vector_init_range(rd_int_vector, int , int , int)" ) _init_linear = ResdataPrototype( - "bool int_vector_init_linear(int_vector, int, int, int)" + "bool int_vector_init_linear(rd_int_vector, int, int, int)" ) - _equal = ResdataPrototype("bool int_vector_equal(int_vector, int_vector)") + _equal = ResdataPrototype("bool int_vector_equal(rd_int_vector, rd_int_vector)") _first_eq = ResdataPrototype( - "int int_vector_first_equal(int_vector, int_vector, int)" + "int int_vector_first_equal(rd_int_vector, rd_int_vector, int)" ) _first_neq = ResdataPrototype( - "int int_vector_first_not_equal(int_vector, int_vector, int)" + "int int_vector_first_not_equal(rd_int_vector, rd_int_vector, int)" ) def __init__(self, default_value=0, initial_size=0): diff --git a/python/resdata/util/util/permutation_vector.py b/python/resdata/util/util/permutation_vector.py index 16016a47d..0a5bea8b5 100644 --- a/python/resdata/util/util/permutation_vector.py +++ b/python/resdata/util/util/permutation_vector.py @@ -3,10 +3,10 @@ class PermutationVector(BaseCClass): - TYPE_NAME = "permutation_vector" - _free = ResdataPrototype("void perm_vector_free( permutation_vector )") - _size = ResdataPrototype("int perm_vector_get_size( permutation_vector )") - _iget = ResdataPrototype("int perm_vector_iget( permutation_vector , int)") + TYPE_NAME = "rd_permutation_vector" + _free = ResdataPrototype("void perm_vector_free( rd_permutation_vector )") + _size = ResdataPrototype("int perm_vector_get_size( rd_permutation_vector )") + _iget = ResdataPrototype("int perm_vector_iget( rd_permutation_vector , int)") def __init__(self): raise NotImplementedError("Can not instantiate PermutationVector directly") diff --git a/python/resdata/util/util/rng.py b/python/resdata/util/util/rng.py index 426568f5f..17274159a 100644 --- a/python/resdata/util/util/rng.py +++ b/python/resdata/util/util/rng.py @@ -6,20 +6,20 @@ class RandomNumberGenerator(BaseCClass): - TYPE_NAME = "rng" + TYPE_NAME = "rd_rng" _rng_alloc = ResdataPrototype( - "void* rng_alloc(rng_alg_type_enum, rng_init_mode_enum)", bind=False + "void* rng_alloc(rd_rng_alg_type_enum, rd_rng_init_mode)", bind=False ) - _free = ResdataPrototype("void rng_free(rng)") - _get_double = ResdataPrototype("double rng_get_double(rng)") - _get_int = ResdataPrototype("int rng_get_int(rng, int)") - _forward = ResdataPrototype("uint rng_forward(rng)") - _get_max_int = ResdataPrototype("uint rng_get_max_int(rng)") - _state_size = ResdataPrototype("int rng_state_size(rng)") - _set_state = ResdataPrototype("void rng_set_state(rng , char*)") - _load_state = ResdataPrototype("void rng_load_state(rng , char*)") - _save_state = ResdataPrototype("void rng_save_state(rng , char*)") + _free = ResdataPrototype("void rng_free(rd_rng)") + _get_double = ResdataPrototype("double rng_get_double(rd_rng)") + _get_int = ResdataPrototype("int rng_get_int(rd_rng, int)") + _forward = ResdataPrototype("uint rng_forward(rd_rng)") + _get_max_int = ResdataPrototype("uint rng_get_max_int(rd_rng)") + _state_size = ResdataPrototype("int rng_state_size(rd_rng)") + _set_state = ResdataPrototype("void rng_set_state(rd_rng , char*)") + _load_state = ResdataPrototype("void rng_load_state(rd_rng , char*)") + _save_state = ResdataPrototype("void rng_save_state(rd_rng , char*)") def __init__( self, alg_type=RngAlgTypeEnum.MZRAN, init_mode=RngInitModeEnum.INIT_CLOCK diff --git a/python/resdata/util/util/stringlist.py b/python/resdata/util/util/stringlist.py index 91cf383ee..eb4a0911f 100644 --- a/python/resdata/util/util/stringlist.py +++ b/python/resdata/util/util/stringlist.py @@ -20,23 +20,25 @@ class StringList(BaseCClass): - TYPE_NAME = "stringlist" + TYPE_NAME = "rd_stringlist" _alloc = ResdataPrototype("void* stringlist_alloc_new( )", bind=False) - _free = ResdataPrototype("void stringlist_free(stringlist )") - _append = ResdataPrototype("void stringlist_append_copy(stringlist , char* )") - _iget = ResdataPrototype("char* stringlist_iget(stringlist , int )") - _front = ResdataPrototype("char* stringlist_front( stringlist )") - _back = ResdataPrototype("char* stringlist_back( stringlist )") - _iget_copy = ResdataPrototype("char* stringlist_iget_copy(stringlist, int)") - _iset = ResdataPrototype("void stringlist_iset_copy( stringlist , int , char* )") - _get_size = ResdataPrototype("int stringlist_get_size( stringlist )") - _contains = ResdataPrototype("bool stringlist_contains(stringlist , char*)") - _equal = ResdataPrototype("bool stringlist_equal(stringlist , stringlist)") - _sort = ResdataPrototype("void stringlist_python_sort( stringlist , int)") - _pop = ResdataPrototype("char* stringlist_pop(stringlist)") - _last = ResdataPrototype("char* stringlist_get_last(stringlist)") - _find_first = ResdataPrototype("int stringlist_find_first(stringlist, char*)") + _free = ResdataPrototype("void stringlist_free(rd_stringlist )") + _append = ResdataPrototype("void stringlist_append_copy(rd_stringlist , char* )") + _iget = ResdataPrototype("char* stringlist_iget(rd_stringlist , int )") + _front = ResdataPrototype("char* stringlist_front( rd_stringlist )") + _back = ResdataPrototype("char* stringlist_back( rd_stringlist )") + _iget_copy = ResdataPrototype("char* stringlist_iget_copy(rd_stringlist, int)") + _iset = ResdataPrototype( + "void stringlist_iset_copy( rd_stringlist , int , char* )" + ) + _get_size = ResdataPrototype("int stringlist_get_size( rd_stringlist )") + _contains = ResdataPrototype("bool stringlist_contains(rd_stringlist , char*)") + _equal = ResdataPrototype("bool stringlist_equal(rd_stringlist , rd_stringlist)") + _sort = ResdataPrototype("void stringlist_python_sort( rd_stringlist , int)") + _pop = ResdataPrototype("char* stringlist_pop(rd_stringlist)") + _last = ResdataPrototype("char* stringlist_get_last(rd_stringlist)") + _find_first = ResdataPrototype("int stringlist_find_first(rd_stringlist, char*)") def __init__(self, initial=None): """ diff --git a/python/resdata/util/util/time_vector.py b/python/resdata/util/util/time_vector.py index 7109932dc..1aa4cbd3e 100644 --- a/python/resdata/util/util/time_vector.py +++ b/python/resdata/util/util/time_vector.py @@ -6,110 +6,128 @@ class TimeVector(VectorTemplate): - TYPE_NAME = "time_t_vector" + TYPE_NAME = "rd_time_t_vector" default_format = "%d" - _alloc = ResdataPrototype("void* time_t_vector_alloc(int, time_t )", bind=False) + _alloc = ResdataPrototype( + "void* time_t_vector_alloc(int, rd_time_t )", bind=False + ) _alloc_copy = ResdataPrototype( - "time_t_vector_obj time_t_vector_alloc_copy(time_t_vector )" + "rd_time_t_vector_obj time_t_vector_alloc_copy(rd_time_t_vector )" ) _strided_copy = ResdataPrototype( - "time_t_vector_obj time_t_vector_alloc_strided_copy(time_t_vector , int , int , int)" + "rd_time_t_vector_obj time_t_vector_alloc_strided_copy(rd_time_t_vector , int , int , int)" ) - _free = ResdataPrototype("void time_t_vector_free( time_t_vector )") - _iget = ResdataPrototype("time_t time_t_vector_iget( time_t_vector , int )") + _free = ResdataPrototype("void time_t_vector_free( rd_time_t_vector )") + _iget = ResdataPrototype("rd_time_t time_t_vector_iget( rd_time_t_vector , int )") _safe_iget = ResdataPrototype( - "time_t time_t_vector_safe_iget( time_t_vector , int )" + "rd_time_t time_t_vector_safe_iget( rd_time_t_vector , int )" ) _iset = ResdataPrototype( - "time_t time_t_vector_iset( time_t_vector , int , time_t)" + "rd_time_t time_t_vector_iset( rd_time_t_vector , int , rd_time_t)" ) - _size = ResdataPrototype("int time_t_vector_size( time_t_vector )") + _size = ResdataPrototype("int time_t_vector_size( rd_time_t_vector )") _append = ResdataPrototype( - "void time_t_vector_append( time_t_vector , time_t )" + "void time_t_vector_append( rd_time_t_vector , rd_time_t )" ) _idel_block = ResdataPrototype( - "void time_t_vector_idel_block( time_t_vector , int , int )" + "void time_t_vector_idel_block( rd_time_t_vector , int , int )" + ) + _idel = ResdataPrototype("void time_t_vector_idel( rd_time_t_vector , int )") + _pop = ResdataPrototype("rd_time_t time_t_vector_pop( rd_time_t_vector )") + _lshift = ResdataPrototype( + "void time_t_vector_lshift( rd_time_t_vector , int )" + ) + _rshift = ResdataPrototype( + "void time_t_vector_rshift( rd_time_t_vector , int )" ) - _idel = ResdataPrototype("void time_t_vector_idel( time_t_vector , int )") - _pop = ResdataPrototype("time_t time_t_vector_pop( time_t_vector )") - _lshift = ResdataPrototype("void time_t_vector_lshift( time_t_vector , int )") - _rshift = ResdataPrototype("void time_t_vector_rshift( time_t_vector , int )") _insert = ResdataPrototype( - "void time_t_vector_insert( time_t_vector , int , time_t)" + "void time_t_vector_insert( rd_time_t_vector , int , rd_time_t)" ) _fprintf = ResdataPrototype( - "void time_t_vector_fprintf( time_t_vector , FILE , char* , char*)" + "void time_t_vector_fprintf( rd_time_t_vector , FILE , char* , char*)" ) - _sort = ResdataPrototype("void time_t_vector_sort( time_t_vector )") - _rsort = ResdataPrototype("void time_t_vector_rsort( time_t_vector )") - _reset = ResdataPrototype("void time_t_vector_reset( time_t_vector )") + _sort = ResdataPrototype("void time_t_vector_sort( rd_time_t_vector )") + _rsort = ResdataPrototype("void time_t_vector_rsort( rd_time_t_vector )") + _reset = ResdataPrototype("void time_t_vector_reset( rd_time_t_vector )") _set_read_only = ResdataPrototype( - "void time_t_vector_set_read_only( time_t_vector , bool )" + "void time_t_vector_set_read_only( rd_time_t_vector , bool )" ) _get_read_only = ResdataPrototype( - "bool time_t_vector_get_read_only( time_t_vector )" + "bool time_t_vector_get_read_only( rd_time_t_vector )" ) - _get_max = ResdataPrototype("time_t time_t_vector_get_max( time_t_vector )") - _get_min = ResdataPrototype("time_t time_t_vector_get_min( time_t_vector )") + _get_max = ResdataPrototype("rd_time_t time_t_vector_get_max( rd_time_t_vector )") + _get_min = ResdataPrototype("rd_time_t time_t_vector_get_min( rd_time_t_vector )") _get_max_index = ResdataPrototype( - "int time_t_vector_get_max_index( time_t_vector , bool)" + "int time_t_vector_get_max_index( rd_time_t_vector , bool)" ) _get_min_index = ResdataPrototype( - "int time_t_vector_get_min_index( time_t_vector , bool)" + "int time_t_vector_get_min_index( rd_time_t_vector , bool)" + ) + _shift = ResdataPrototype( + "void time_t_vector_shift( rd_time_t_vector , rd_time_t )" + ) + _scale = ResdataPrototype( + "void time_t_vector_scale( rd_time_t_vector , rd_time_t )" + ) + _div = ResdataPrototype( + "void time_t_vector_div( rd_time_t_vector , rd_time_t )" ) - _shift = ResdataPrototype("void time_t_vector_shift( time_t_vector , time_t )") - _scale = ResdataPrototype("void time_t_vector_scale( time_t_vector , time_t )") - _div = ResdataPrototype("void time_t_vector_div( time_t_vector , time_t )") _inplace_add = ResdataPrototype( - "void time_t_vector_inplace_add( time_t_vector , time_t_vector )" + "void time_t_vector_inplace_add( rd_time_t_vector , rd_time_t_vector )" ) _inplace_mul = ResdataPrototype( - "void time_t_vector_inplace_mul( time_t_vector , time_t_vector )" + "void time_t_vector_inplace_mul( rd_time_t_vector , rd_time_t_vector )" ) _assign = ResdataPrototype( - "void time_t_vector_set_all( time_t_vector , time_t)" + "void time_t_vector_set_all( rd_time_t_vector , rd_time_t)" ) _memcpy = ResdataPrototype( - "void time_t_vector_memcpy(time_t_vector , time_t_vector )" + "void time_t_vector_memcpy(rd_time_t_vector , rd_time_t_vector )" ) _set_default = ResdataPrototype( - "void time_t_vector_set_default( time_t_vector , time_t)" + "void time_t_vector_set_default( rd_time_t_vector , rd_time_t)" ) _get_default = ResdataPrototype( - "time_t time_t_vector_get_default( time_t_vector )" + "rd_time_t time_t_vector_get_default( rd_time_t_vector )" ) _element_size = ResdataPrototype( - "int time_t_vector_element_size( time_t_vector )" + "int time_t_vector_element_size( rd_time_t_vector )" ) _permute = ResdataPrototype( - "void time_t_vector_permute(time_t_vector, permutation_vector)" + "void time_t_vector_permute(rd_time_t_vector, rd_permutation_vector)" ) _sort_perm = ResdataPrototype( - "permutation_vector_obj time_t_vector_alloc_sort_perm(time_t_vector)" + "rd_permutation_vector_obj time_t_vector_alloc_sort_perm(rd_time_t_vector)" ) _rsort_perm = ResdataPrototype( - "permutation_vector_obj time_t_vector_alloc_rsort_perm(time_t_vector)" + "rd_permutation_vector_obj time_t_vector_alloc_rsort_perm(rd_time_t_vector)" + ) + _contains = ResdataPrototype( + "bool time_t_vector_contains(rd_time_t_vector, rd_time_t)" ) - _contains = ResdataPrototype("bool time_t_vector_contains(time_t_vector, time_t)") - _select_unique = ResdataPrototype("void time_t_vector_select_unique(time_t_vector)") - _element_sum = ResdataPrototype("time_t time_t_vector_sum(time_t_vector)") + _select_unique = ResdataPrototype( + "void time_t_vector_select_unique(rd_time_t_vector)" + ) + _element_sum = ResdataPrototype("rd_time_t time_t_vector_sum(rd_time_t_vector)") _count_equal = ResdataPrototype( - "int time_t_vector_count_equal(time_t_vector, time_t)" + "int time_t_vector_count_equal(rd_time_t_vector, rd_time_t)" ) _init_range = ResdataPrototype( - "void time_t_vector_init_range(time_t_vector, time_t , time_t , time_t)" + "void time_t_vector_init_range(rd_time_t_vector, rd_time_t , rd_time_t , rd_time_t)" ) _init_linear = ResdataPrototype( - "bool time_t_vector_init_linear(time_t_vector, time_t, time_t, int)" + "bool time_t_vector_init_linear(rd_time_t_vector, rd_time_t, rd_time_t, int)" + ) + _equal = ResdataPrototype( + "bool time_t_vector_equal(rd_time_t_vector, rd_time_t_vector)" ) - _equal = ResdataPrototype("bool time_t_vector_equal(time_t_vector, time_t_vector)") _first_eq = ResdataPrototype( - "int time_t_vector_first_equal(time_t_vector, time_t_vector, int)" + "int time_t_vector_first_equal(rd_time_t_vector, rd_time_t_vector, int)" ) _first_neq = ResdataPrototype( - "int time_t_vector_first_not_equal(time_t_vector, time_t_vector, int)" + "int time_t_vector_first_not_equal(rd_time_t_vector, rd_time_t_vector, int)" ) def __init__(self, default_value=None, initial_size=0): diff --git a/python/resdata/well/well_connection.py b/python/resdata/well/well_connection.py index 648ed4af0..005f07ea5 100644 --- a/python/resdata/well/well_connection.py +++ b/python/resdata/well/well_connection.py @@ -4,39 +4,39 @@ class WellConnection(BaseCClass): - TYPE_NAME = "well_connection" - - _i = ResdataPrototype("int well_conn_get_i(well_connection)") - _j = ResdataPrototype("int well_conn_get_j(well_connection)") - _k = ResdataPrototype("int well_conn_get_k(well_connection)") - _segment_id = ResdataPrototype("int well_conn_get_segment_id(well_connection)") - _is_open = ResdataPrototype("bool well_conn_open(well_connection)") - _is_msw = ResdataPrototype("bool well_conn_MSW(well_connection)") + TYPE_NAME = "rd_well_connect" + + _i = ResdataPrototype("int well_conn_get_i(rd_well_connect)") + _j = ResdataPrototype("int well_conn_get_j(rd_well_connect)") + _k = ResdataPrototype("int well_conn_get_k(rd_well_connect)") + _segment_id = ResdataPrototype("int well_conn_get_segment_id(rd_well_connect)") + _is_open = ResdataPrototype("bool well_conn_open(rd_well_connect)") + _is_msw = ResdataPrototype("bool well_conn_MSW(rd_well_connect)") _fracture_connection = ResdataPrototype( - "bool well_conn_fracture_connection(well_connection)" + "bool well_conn_fracture_connection(rd_well_connect)" ) _matrix_connection = ResdataPrototype( - "bool well_conn_matrix_connection(well_connection)" + "bool well_conn_matrix_connection(rd_well_connect)" ) _connection_factor = ResdataPrototype( - "double well_conn_get_connection_factor(well_connection)" + "double well_conn_get_connection_factor(rd_well_connect)" ) - _equal = ResdataPrototype( - "bool well_conn_equal(well_connection, well_connection)" + _equal = ResdataPrototype("bool well_conn_equal(rd_well_connect, rd_well_connect)") + _get_dir = ResdataPrototype( + "rd_well_connection_dir well_conn_get_dir(rd_well_connect)" ) - _get_dir = ResdataPrototype("void* well_conn_get_dir(well_connection)") - _oil_rate = ResdataPrototype("double well_conn_get_oil_rate(well_connection)") - _gas_rate = ResdataPrototype("double well_conn_get_gas_rate(well_connection)") - _water_rate = ResdataPrototype("double well_conn_get_water_rate(well_connection)") - _volume_rate = ResdataPrototype("double well_conn_get_volume_rate(well_connection)") - - _oil_rate_si = ResdataPrototype("double well_conn_get_oil_rate_si(well_connection)") - _gas_rate_si = ResdataPrototype("double well_conn_get_gas_rate_si(well_connection)") + _oil_rate = ResdataPrototype("double well_conn_get_oil_rate(rd_well_connect)") + _gas_rate = ResdataPrototype("double well_conn_get_gas_rate(rd_well_connect)") + _water_rate = ResdataPrototype("double well_conn_get_water_rate(rd_well_connect)") + _volume_rate = ResdataPrototype("double well_conn_get_volume_rate(rd_well_connect)") + + _oil_rate_si = ResdataPrototype("double well_conn_get_oil_rate_si(rd_well_connect)") + _gas_rate_si = ResdataPrototype("double well_conn_get_gas_rate_si(rd_well_connect)") _water_rate_si = ResdataPrototype( - "double well_conn_get_water_rate_si(well_connection)" + "double well_conn_get_water_rate_si(rd_well_connect)" ) _volume_rate_si = ResdataPrototype( - "double well_conn_get_volume_rate_si(well_connection)" + "double well_conn_get_volume_rate_si(rd_well_connect)" ) def __init__(self): diff --git a/python/resdata/well/well_connection_direction_enum.py b/python/resdata/well/well_connection_direction_enum.py index e8ab46787..ac467a105 100644 --- a/python/resdata/well/well_connection_direction_enum.py +++ b/python/resdata/well/well_connection_direction_enum.py @@ -2,7 +2,7 @@ class WellConnectionDirection(BaseCEnum): - TYPE_NAME = "well_connection_dir_enum" + TYPE_NAME = "rd_well_connection_dir" well_conn_dirX = None well_conn_dirY = None well_conn_dirZ = None diff --git a/python/resdata/well/well_info.py b/python/resdata/well/well_info.py index 115dac416..6aa690676 100644 --- a/python/resdata/well/well_info.py +++ b/python/resdata/well/well_info.py @@ -7,20 +7,24 @@ class WellInfo(BaseCClass): - TYPE_NAME = "well_info" + TYPE_NAME = "rd_well_info" _alloc = ResdataPrototype("void* well_info_alloc(rd_grid)", bind=False) - _free = ResdataPrototype("void well_info_free(well_info)") + _free = ResdataPrototype("void well_info_free(rd_well_info)") _load_rstfile = ResdataPrototype( - "void well_info_load_rstfile(well_info, char*, bool)" + "void well_info_load_rstfile(rd_well_info, char*, bool)" ) _load_rst_resfile = ResdataPrototype( - "void well_info_load_rst_resfile(well_info, rd_file, bool)" + "void well_info_load_rst_resfile(rd_well_info, rd_file, bool)" + ) + _get_well_count = ResdataPrototype("int well_info_get_num_wells(rd_well_info)") + _iget_well_name = ResdataPrototype( + "char* well_info_iget_well_name(rd_well_info, int)" + ) + _has_well = ResdataPrototype("bool well_info_has_well(rd_well_info, char*)") + _get_ts = ResdataPrototype( + "rd_well_time_line_ref well_info_get_ts(rd_well_info, char*)" ) - _get_well_count = ResdataPrototype("int well_info_get_num_wells(well_info)") - _iget_well_name = ResdataPrototype("char* well_info_iget_well_name(well_info, int)") - _has_well = ResdataPrototype("bool well_info_has_well(well_info, char*)") - _get_ts = ResdataPrototype("well_time_line_ref well_info_get_ts(well_info, char*)") def __init__(self, grid, rst_file=None, load_segment_information=True): """ diff --git a/python/resdata/well/well_segment.py b/python/resdata/well/well_segment.py index 2e34e921a..7c4b7e684 100644 --- a/python/resdata/well/well_segment.py +++ b/python/resdata/well/well_segment.py @@ -3,23 +3,23 @@ class WellSegment(BaseCClass): - TYPE_NAME = "well_segment" + TYPE_NAME = "rd_well_segment" - _active = ResdataPrototype("bool well_segment_active(well_segment)") - _main_stem = ResdataPrototype("bool well_segment_main_stem(well_segment)") + _active = ResdataPrototype("bool well_segment_active(rd_well_segment)") + _main_stem = ResdataPrototype("bool well_segment_main_stem(rd_well_segment)") _nearest_wellhead = ResdataPrototype( - "bool well_segment_nearest_wellhead(well_segment)" + "bool well_segment_nearest_wellhead(rd_well_segment)" ) - _id = ResdataPrototype("int well_segment_get_id(well_segment)") - _link_count = ResdataPrototype("int well_segment_get_link_count(well_segment)") - _branch_id = ResdataPrototype("int well_segment_get_branch_id(well_segment)") - _outlet_id = ResdataPrototype("int well_segment_get_outlet_id(well_segment)") - _depth = ResdataPrototype("double well_segment_get_depth(well_segment)") - _length = ResdataPrototype("double well_segment_get_length(well_segment)") + _id = ResdataPrototype("int well_segment_get_id(rd_well_segment)") + _link_count = ResdataPrototype("int well_segment_get_link_count(rd_well_segment)") + _branch_id = ResdataPrototype("int well_segment_get_branch_id(rd_well_segment)") + _outlet_id = ResdataPrototype("int well_segment_get_outlet_id(rd_well_segment)") + _depth = ResdataPrototype("double well_segment_get_depth(rd_well_segment)") + _length = ResdataPrototype("double well_segment_get_length(rd_well_segment)") _total_length = ResdataPrototype( - "double well_segment_get_total_length(well_segment)" + "double well_segment_get_total_length(rd_well_segment)" ) - _diameter = ResdataPrototype("double well_segment_get_diameter(well_segment)") + _diameter = ResdataPrototype("double well_segment_get_diameter(rd_well_segment)") def __init__(self): raise NotImplementedError("Class can not be instantiated directly") diff --git a/python/resdata/well/well_state.py b/python/resdata/well/well_state.py index 29fdd4a79..438eaa067 100644 --- a/python/resdata/well/well_state.py +++ b/python/resdata/well/well_state.py @@ -6,13 +6,13 @@ class WellState(BaseCClass): - TYPE_NAME = "well_state" + TYPE_NAME = "rd_well_state" _global_connections_size = ResdataPrototype( "int well_conn_collection_get_size(void*)", bind=False ) _global_connections_iget = ResdataPrototype( - "well_connection_ref well_conn_collection_iget(void*, int)", bind=False + "rd_well_connect_ref well_conn_collection_iget(void*, int)", bind=False ) _segment_collection_size = ResdataPrototype( "int well_segment_collection_get_size(void*)", bind=False @@ -21,38 +21,42 @@ class WellState(BaseCClass): "well_segment_ref well_segment_collection_iget(void*, int)", bind=False ) _has_global_connections = ResdataPrototype( - "bool well_state_has_global_connections(well_state)" + "bool well_state_has_global_connections(rd_well_state)" ) _get_global_connections = ResdataPrototype( - "void* well_state_get_global_connections(well_state)" + "void* well_state_get_global_connections(rd_well_state)" ) _get_segment_collection = ResdataPrototype( - "void* well_state_get_segments(well_state)" + "void* well_state_get_segments(rd_well_state)" ) - _branches = ResdataPrototype("void* well_state_get_branches(well_state)") - _segments = ResdataPrototype("void* well_state_get_segments(well_state)") - _get_name = ResdataPrototype("char* well_state_get_name(well_state)") - _is_open = ResdataPrototype("bool well_state_is_open(well_state)") - _is_msw = ResdataPrototype("bool well_state_is_MSW(well_state)") - _well_number = ResdataPrototype("int well_state_get_well_nr(well_state)") - _report_number = ResdataPrototype("int well_state_get_report_nr(well_state)") + _branches = ResdataPrototype("void* well_state_get_branches(rd_well_state)") + _segments = ResdataPrototype("void* well_state_get_segments(rd_well_state)") + _get_name = ResdataPrototype("char* well_state_get_name(rd_well_state)") + _is_open = ResdataPrototype("bool well_state_is_open(rd_well_state)") + _is_msw = ResdataPrototype("bool well_state_is_MSW(rd_well_state)") + _well_number = ResdataPrototype("int well_state_get_well_nr(rd_well_state)") + _report_number = ResdataPrototype("int well_state_get_report_nr(rd_well_state)") _has_segment_data = ResdataPrototype( - "bool well_state_has_segment_data(well_state)" + "bool well_state_has_segment_data(rd_well_state)" + ) + _sim_time = ResdataPrototype("rd_time_t well_state_get_sim_time(rd_well_state)") + _well_type = ResdataPrototype( + "rd_well_type_enum well_state_get_type(rd_well_state)" + ) + _oil_rate = ResdataPrototype("double well_state_get_oil_rate(rd_well_state)") + _gas_rate = ResdataPrototype("double well_state_get_gas_rate(rd_well_state)") + _water_rate = ResdataPrototype("double well_state_get_water_rate(rd_well_state)") + _volume_rate = ResdataPrototype("double well_state_get_volume_rate(rd_well_state)") + _oil_rate_si = ResdataPrototype("double well_state_get_oil_rate_si(rd_well_state)") + _gas_rate_si = ResdataPrototype("double well_state_get_gas_rate_si(rd_well_state)") + _water_rate_si = ResdataPrototype( + "double well_state_get_water_rate_si(rd_well_state)" ) - _sim_time = ResdataPrototype("time_t well_state_get_sim_time(well_state)") - _well_type = ResdataPrototype("well_type_enum well_state_get_type(well_state)") - _oil_rate = ResdataPrototype("double well_state_get_oil_rate(well_state)") - _gas_rate = ResdataPrototype("double well_state_get_gas_rate(well_state)") - _water_rate = ResdataPrototype("double well_state_get_water_rate(well_state)") - _volume_rate = ResdataPrototype("double well_state_get_volume_rate(well_state)") - _oil_rate_si = ResdataPrototype("double well_state_get_oil_rate_si(well_state)") - _gas_rate_si = ResdataPrototype("double well_state_get_gas_rate_si(well_state)") - _water_rate_si = ResdataPrototype("double well_state_get_water_rate_si(well_state)") _volume_rate_si = ResdataPrototype( - "double well_state_get_volume_rate_si(well_state)" + "double well_state_get_volume_rate_si(rd_well_state)" ) _get_global_well_head = ResdataPrototype( - "well_connection_ref well_state_get_global_wellhead(well_state)" + "rd_well_connect_ref well_state_get_global_wellhead(rd_well_state)" ) def __init__(self): diff --git a/python/resdata/well/well_time_line.py b/python/resdata/well/well_time_line.py index cd5cb325b..f77f2b741 100644 --- a/python/resdata/well/well_time_line.py +++ b/python/resdata/well/well_time_line.py @@ -4,10 +4,12 @@ class WellTimeLine(BaseCClass): - TYPE_NAME = "well_time_line" - _size = ResdataPrototype("int well_ts_get_size(well_time_line)") - _name = ResdataPrototype("char* well_ts_get_name(well_time_line)") - _iget = ResdataPrototype("well_state_ref well_ts_iget_state(well_time_line, int)") + TYPE_NAME = "rd_well_time_line" + _size = ResdataPrototype("int well_ts_get_size(rd_well_time_line)") + _name = ResdataPrototype("char* well_ts_get_name(rd_well_time_line)") + _iget = ResdataPrototype( + "rd_well_state_ref well_ts_iget_state(rd_well_time_line, int)" + ) def __init__(self): raise NotImplementedError("Class can not be instantiated directly") diff --git a/python/resdata/well/well_type_enum.py b/python/resdata/well/well_type_enum.py index c757db0be..dc2231d28 100644 --- a/python/resdata/well/well_type_enum.py +++ b/python/resdata/well/well_type_enum.py @@ -2,7 +2,7 @@ class WellType(BaseCEnum): - TYPE_NAME = "well_type_enum" + TYPE_NAME = "rd_well_type_enum" ZERO = None PRODUCER = None WATER_INJECTOR = None diff --git a/python/tests/rd_tests/test_indexed_read.py b/python/tests/rd_tests/test_indexed_read.py index 76d6dcf71..fdb232b48 100644 --- a/python/tests/rd_tests/test_indexed_read.py +++ b/python/tests/rd_tests/test_indexed_read.py @@ -11,11 +11,11 @@ class ResdataIndexedReadTest(ResdataTest): _freadIndexedData = ResdataPrototype( - "void rd_kw_fread_indexed_data_python(fortio, int, rd_data_type, int, int_vector, char*)", + "void rd_kw_fread_indexed_data_python(rd_fortio, int, rd_data_type, int, rd_int_vector, char*)", bind=False, ) # fortio, offset, type, count, index_map, buffer _resFileIndexedRead = ResdataPrototype( - "void rd_file_indexed_read(rd_file, char*, int, int_vector, char*)", + "void rd_file_indexed_read(rd_file, char*, int, rd_int_vector, char*)", bind=False, ) # rd_file, kw, index, index_map, buffer diff --git a/python/tests/well_tests/test_rd_well.py b/python/tests/well_tests/test_rd_well.py index 319a8468e..8bb549e17 100644 --- a/python/tests/well_tests/test_rd_well.py +++ b/python/tests/well_tests/test_rd_well.py @@ -352,11 +352,6 @@ def checkWellInfo(well_info, well_count, report_step_count): well_info, well_count=8, report_step_count=[4, 4, 4, 4, 4, 3, 3, 3] ) - def test_well_type_enum(self): - source_file_path = "lib/include/resdata/well/well_conn.hpp" - # The header file has duplicated symbols, so the simple test fails. - # self.assertEnumIsFullyDefined(WellType, "well_type_enum", source_file_path) - def test_well_connection_direction_enum(self): source_file_path = "lib/include/resdata/well/well_conn.hpp" self.assertEnumIsFullyDefined(