From 956798afd6a6b5cfbdb502b63189dda6380140b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rnar=20Grip=20Fj=C3=A6r?= Date: Thu, 22 Jun 2017 11:51:46 +0200 Subject: [PATCH] #1641 Update libecl to latest revision from master --- .../Ert/.github/PULL_REQUEST_TEMPLATE.md | 11 + ThirdParty/Ert/.travis.yml | 36 +- ThirdParty/Ert/CMakeLists.txt | 285 +++++-- ThirdParty/Ert/applications/CMakeLists.txt | 87 ++ .../applications/block_fs/bcp.c | 0 .../applications/block_fs/bfs_extract.c | 0 .../applications/block_fs/block_fs_test.c | 0 .../applications/block_fs/bls.c | 0 .../applications/block_fs/brm.c | 0 .../applications/block_fs/brot.c | 0 .../ecl}/convert.c | 0 .../ecl}/ecl_pack.c | 0 .../ecl}/ecl_quantile.c | 0 .../ecl}/ecl_unpack.c | 7 +- .../ecl}/esummary.c | 0 .../ecl}/grdecl_grid.c | 0 .../ecl}/grdecl_test.c | 0 .../ecl}/grid_dump.c | 0 .../ecl}/grid_dump_ascii.c | 0 .../ecl}/grid_info.c | 0 .../ecl}/grid_layer.c | 0 .../ecl}/key_list.c | 0 .../ecl}/kw_extract.c | 2 +- .../ecl}/kw_list.c | 0 .../ecl}/load_test.c | 0 .../ecl}/make_grid.c | 0 .../ecl}/run_gravity.c | 0 .../ecl}/select_test.c | 0 .../ecl}/sum_write.c | 0 .../ecl}/summary2csv2.c | 0 .../ecl}/view_restart.c | 0 .../ecl}/view_rft.c | 0 .../ecl}/view_summary.c | 0 .../ecl}/vprofile.c | 0 .../applications/example_ens_plot_batch_file | 0 .../applications/irap_test.c | 0 .../man/man1/ecl_summary.1 | 0 .../applications/polygon_test.c | 0 .../well}/ri_well_test.c | 0 .../well}/segment_info.c | 0 .../well}/well_CF_dump.c | 0 .../Ert/cmake/Modules/FindCXX11Features.cmake | 29 +- ThirdParty/Ert/cmake/ert_api_check.cmake | 67 -- ThirdParty/Ert/cmake/ert_build_check.cmake | 72 -- ThirdParty/Ert/cmake/ert_lib_check.cmake | 27 - ThirdParty/Ert/docs/CMakeLists.txt | 104 +-- ThirdParty/Ert/lib/CMakeLists.txt | 766 ++++++++++++++++++ .../ert/util => lib}/build_config.h.in | 0 .../{libeclxx/src => lib/ecl}/EclFilename.cpp | 0 .../Ert/{libeclxx/src => lib/ecl}/FortIO.cpp | 0 .../Ert/{libeclxx/src => lib/ecl}/Smspec.cpp | 9 +- .../Ert/{libecl/src => lib/ecl}/ecl_box.c | 0 .../{libecl/src => lib/ecl}/ecl_coarse_cell.c | 0 .../Ert/{libecl/src => lib/ecl}/ecl_file.c | 202 ++++- .../Ert/{libecl/src => lib/ecl}/ecl_file_kw.c | 1 + .../{libecl/src => lib/ecl}/ecl_file_view.c | 0 .../Ert/{libecl/src => lib/ecl}/ecl_grav.c | 0 .../{libecl/src => lib/ecl}/ecl_grav_calc.c | 0 .../{libecl/src => lib/ecl}/ecl_grav_common.c | 0 .../Ert/{libecl/src => lib/ecl}/ecl_grid.c | 100 ++- .../{libecl/src => lib/ecl}/ecl_grid_cache.c | 0 .../{libecl/src => lib/ecl}/ecl_grid_dims.c | 0 .../{libecl/src => lib/ecl}/ecl_init_file.c | 0 .../{libecl/src => lib/ecl}/ecl_io_config.c | 0 .../Ert/{libecl/src => lib/ecl}/ecl_kw.c | 24 +- .../src => lib/ecl}/ecl_kw_functions.c | 0 .../{libecl/src => lib/ecl}/ecl_kw_grdecl.c | 101 +-- ThirdParty/Ert/lib/ecl/ecl_nnc_data.c | 280 +++++++ .../{libecl/src => lib/ecl}/ecl_nnc_export.c | 0 .../src => lib/ecl}/ecl_nnc_geometry.c | 8 + .../Ert/{libecl/src => lib/ecl}/ecl_region.c | 0 .../{libecl/src => lib/ecl}/ecl_rft_cell.c | 0 .../{libecl/src => lib/ecl}/ecl_rft_file.c | 0 .../{libecl/src => lib/ecl}/ecl_rft_node.c | 0 .../{libecl/src => lib/ecl}/ecl_rst_file.c | 0 .../Ert/{libecl/src => lib/ecl}/ecl_rsthead.c | 8 +- .../Ert/{libecl/src => lib/ecl}/ecl_smspec.c | 0 .../{libecl/src => lib/ecl}/ecl_subsidence.c | 0 .../Ert/{libecl/src => lib/ecl}/ecl_sum.c | 0 .../{libecl/src => lib/ecl}/ecl_sum_data.c | 246 +++--- .../{libecl/src => lib/ecl}/ecl_sum_file.c | 0 .../{libecl/src => lib/ecl}/ecl_sum_index.c | 0 .../{libecl/src => lib/ecl}/ecl_sum_tstep.c | 0 .../{libecl/src => lib/ecl}/ecl_sum_vector.c | 0 .../Ert/{libecl/src => lib/ecl}/ecl_type.c | 0 .../{libecl/src => lib/ecl}/ecl_type_python.c | 0 .../Ert/{libecl/src => lib/ecl}/ecl_util.c | 0 .../Ert/{libecl/src => lib/ecl}/fault_block.c | 5 +- .../src => lib/ecl}/fault_block_layer.c | 14 +- .../Ert/{libecl/src => lib/ecl}/fortio.c | 49 +- .../Ert/{libecl/src => lib/ecl}/grid_dims.c | 0 .../Ert/{libecl/src => lib/ecl}/layer.c | 0 .../Ert/{libecl/src => lib/ecl}/nnc_info.c | 0 .../Ert/{libecl/src => lib/ecl}/nnc_vector.c | 0 .../Ert/{libecl/src => lib/ecl}/overview.txt | 0 .../{libecl/src => lib/ecl}/readme.overview | 0 .../Ert/{libecl/src => lib/ecl}/smspec_node.c | 0 .../{libecl => lib/ecl}/tests/data/num_cpu1 | 0 .../{libecl => lib/ecl}/tests/data/num_cpu2 | 0 .../{libecl => lib/ecl}/tests/data/num_cpu3 | 0 .../{libecl => lib/ecl}/tests/data/num_cpu4 | 0 .../ecl}/tests/ecl_alloc_cpgrid.c | 0 .../ecl}/tests/ecl_alloc_grid_dxv_dyv_dzv.c | 0 .../ecl}/tests/ecl_coarse_test.c | 0 .../Ert/{libecl => lib/ecl}/tests/ecl_dualp.c | 0 .../ecl_fault_block_collection_statoil.c | 0 .../ecl}/tests/ecl_fault_block_layer.c | 0 .../tests/ecl_fault_block_layer_statoil.c | 0 ThirdParty/Ert/lib/ecl/tests/ecl_file.c | 92 +++ .../ecl/tests/ecl_file_statoil.c} | 4 +- .../Ert/{libecl => lib/ecl}/tests/ecl_fmt.c | 0 .../{libecl => lib/ecl}/tests/ecl_fortio.c | 21 + .../ecl}/tests/ecl_get_num_cpu_test.c | 0 .../ecl}/tests/ecl_grid_DEPTHZ.c | 0 .../ecl}/tests/ecl_grid_add_nnc.c | 0 .../{libecl => lib/ecl}/tests/ecl_grid_case.c | 0 .../ecl}/tests/ecl_grid_cell_contains.c | 0 .../tests/ecl_grid_cell_contains_wellpath.c | 33 +- .../ecl}/tests/ecl_grid_cell_volume.c | 0 .../{libecl => lib/ecl}/tests/ecl_grid_copy.c | 0 .../ecl}/tests/ecl_grid_copy_statoil.c | 0 .../ecl}/tests/ecl_grid_corner.c | 0 .../ecl}/tests/ecl_grid_create.c | 0 .../{libecl => lib/ecl}/tests/ecl_grid_dims.c | 0 .../ecl}/tests/ecl_grid_export.c | 0 .../ecl}/tests/ecl_grid_fwrite.c | 0 .../ecl}/tests/ecl_grid_init_fwrite.c | 0 .../ecl}/tests/ecl_grid_layer_contains.c | 0 .../ecl}/tests/ecl_grid_lgr_name.c | 0 .../ecl}/tests/ecl_grid_reset_actnum.c | 0 .../ecl}/tests/ecl_grid_simple.c | 0 .../ecl}/tests/ecl_grid_volume.c | 0 .../{libecl => lib/ecl}/tests/ecl_init_file.c | 0 .../ecl}/tests/ecl_kw_cmp_string.c | 0 .../{libecl => lib/ecl}/tests/ecl_kw_equal.c | 0 .../{libecl => lib/ecl}/tests/ecl_kw_fread.c | 51 ++ .../{libecl => lib/ecl}/tests/ecl_kw_grdecl.c | 0 .../{libecl => lib/ecl}/tests/ecl_kw_init.c | 0 .../Ert/{libecl => lib/ecl}/tests/ecl_layer.c | 0 .../ecl}/tests/ecl_layer_statoil.c | 0 .../Ert/{libecl => lib/ecl}/tests/ecl_lfs.c | 0 .../{libecl => lib/ecl}/tests/ecl_lgr_name.c | 0 .../{libecl => lib/ecl}/tests/ecl_lgr_test.c | 0 .../ecl}/tests/ecl_nnc_export.c | 7 + .../ecl}/tests/ecl_nnc_export_get_tran.c | 2 +- .../ecl}/tests/ecl_nnc_geometry.c | 42 +- .../ecl}/tests/ecl_nnc_index_list.c | 0 .../ecl}/tests/ecl_nnc_index_list_grid.c | 0 .../ecl}/tests/ecl_nnc_info_test.c | 0 ThirdParty/Ert/lib/ecl/tests/ecl_nnc_pair.c | 45 + .../{libecl => lib/ecl}/tests/ecl_nnc_test.c | 0 .../ecl}/tests/ecl_nnc_vector.c | 0 .../{libecl => lib/ecl}/tests/ecl_region.c | 0 .../ecl}/tests/ecl_region2region_test.c | 0 .../ecl}/tests/ecl_restart_test.c | 0 .../Ert/{libecl => lib/ecl}/tests/ecl_rft.c | 0 .../{libecl => lib/ecl}/tests/ecl_rft_cell.c | 0 .../{libecl => lib/ecl}/tests/ecl_rst_file.c | 0 .../{libecl => lib/ecl}/tests/ecl_rsthead.c | 0 .../{libecl => lib/ecl}/tests/ecl_smspec.c | 0 .../ecl}/tests/ecl_sum_case_exists.c | 0 .../tests/ecl_sum_report_step_compatible.c | 0 .../ecl}/tests/ecl_sum_report_step_equal.c | 0 .../{libecl => lib/ecl}/tests/ecl_sum_test.c | 0 .../ecl}/tests/ecl_sum_writer.c | 0 .../ecl}/tests/ecl_util_make_date_no_shift.c | 0 .../ecl}/tests/ecl_util_make_date_shift.c | 0 .../ecl}/tests/ecl_util_month_range.c | 0 .../ecl}/tests/ecl_valid_basename.c | 0 .../ecl}/tests/eclxx_filename.cpp | 0 .../ecl}/tests/eclxx_fortio.cpp | 0 .../{libeclxx => lib/ecl}/tests/eclxx_kw.cpp | 0 .../ecl}/tests/eclxx_smspec.cpp | 7 + .../ecl}/tests/eclxx_types.cpp | 0 .../Ert/{libecl => lib/ecl}/tests/rft_test.c | 0 .../Ert/lib/ecl/tests/test_ecl_nnc_data.c | 102 +++ .../tests/test_ecl_nnc_data_statoil_root.c | 128 +++ .../ecl}/tests/well_branch_collection.c | 0 .../ecl}/tests/well_conn.c | 0 .../ecl}/tests/well_conn_CF.c | 0 .../ecl}/tests/well_conn_collection.c | 0 .../ecl}/tests/well_conn_load.c | 0 .../ecl}/tests/well_dualp.c | 0 .../ecl}/tests/well_info.c | 0 .../ecl}/tests/well_lgr_load.c | 0 .../ecl}/tests/well_segment.c | 0 .../tests/well_segment_branch_conn_load.c | 0 .../ecl}/tests/well_segment_collection.c | 0 .../ecl}/tests/well_segment_conn.c | 0 .../ecl}/tests/well_segment_conn_load.c | 0 .../ecl}/tests/well_segment_load.c | 0 .../ecl}/tests/well_state.c | 0 .../ecl}/tests/well_state_load.c | 0 .../ecl}/tests/well_state_load_missing_RSEG.c | 0 .../{libecl_well => lib/ecl}/tests/well_ts.c | 0 .../src => lib/ecl}/well_branch_collection.c | 0 .../{libecl_well/src => lib/ecl}/well_conn.c | 0 .../src => lib/ecl}/well_conn_collection.c | 0 .../{libecl_well/src => lib/ecl}/well_info.c | 0 .../src => lib/ecl}/well_rseg_loader.c | 0 .../src => lib/ecl}/well_segment.c | 0 .../src => lib/ecl}/well_segment_collection.c | 0 .../{libecl_well/src => lib/ecl}/well_state.c | 0 .../{libecl_well/src => lib/ecl}/well_ts.c | 0 .../ert/util => lib}/ert_api_config.h.in | 0 .../src => lib/geometry}/geo_pointset.c | 0 .../src => lib/geometry}/geo_polygon.c | 0 .../geometry}/geo_polygon_collection.c | 0 .../src => lib/geometry}/geo_region.c | 0 .../src => lib/geometry}/geo_surface.c | 0 .../src => lib/geometry}/geo_util.c | 0 .../geometry}/tests/geo_polygon.c | 0 .../geometry}/tests/geo_polygon_collection.c | 0 .../geometry}/tests/geo_surface.c | 0 .../geometry}/tests/geo_util_xlines.c | 0 .../include/ert/ecl/EclFilename.hpp | 0 .../include/ert/ecl/EclKW.hpp | 0 .../include/ert/ecl/FortIO.hpp | 0 .../include/ert/ecl/Smspec.hpp | 0 .../{libecl => lib}/include/ert/ecl/ecl_box.h | 0 .../include/ert/ecl/ecl_coarse_cell.h | 0 .../include/ert/ecl/ecl_endian_flip.h | 0 .../include/ert/ecl/ecl_file.h | 1 + .../include/ert/ecl/ecl_file_kw.h | 0 .../Ert/lib/include/ert/ecl/ecl_file_view.h | 108 +++ .../include/ert/ecl/ecl_grav.h | 0 .../include/ert/ecl/ecl_grav_calc.h | 0 .../include/ert/ecl/ecl_grav_common.h | 0 .../include/ert/ecl/ecl_grid.h | 1 + .../include/ert/ecl/ecl_grid_cache.h | 0 .../include/ert/ecl/ecl_grid_dims.h | 0 .../include/ert/ecl/ecl_init_file.h | 0 .../include/ert/ecl/ecl_io_config.h | 0 .../{libecl => lib}/include/ert/ecl/ecl_kw.h | 2 +- .../include/ert/ecl/ecl_kw_grdecl.h | 0 .../include/ert/ecl/ecl_kw_magic.h | 11 + .../Ert/lib/include/ert/ecl/ecl_nnc_data.h | 46 ++ .../include/ert/ecl/ecl_nnc_export.h | 0 .../include/ert/ecl/ecl_nnc_geometry.h | 1 + .../include/ert/ecl/ecl_region.h | 0 .../include/ert/ecl/ecl_rft_cell.h | 0 .../include/ert/ecl/ecl_rft_file.h | 0 .../include/ert/ecl/ecl_rft_node.h | 0 .../include/ert/ecl/ecl_rst_file.h | 0 .../include/ert/ecl/ecl_rsthead.h | 0 .../include/ert/ecl/ecl_smspec.h | 0 .../include/ert/ecl/ecl_subsidence.h | 0 .../{libecl => lib}/include/ert/ecl/ecl_sum.h | 0 .../include/ert/ecl/ecl_sum_data.h | 0 .../include/ert/ecl/ecl_sum_index.h | 0 .../include/ert/ecl/ecl_sum_tstep.h | 0 .../include/ert/ecl/ecl_sum_vector.h | 0 .../include/ert/ecl/ecl_type.h | 39 +- .../include/ert/ecl/ecl_units.h | 0 .../include/ert/ecl/ecl_util.h | 0 .../include/ert/ecl/fault_block.h | 0 .../include/ert/ecl/fault_block_layer.h | 0 .../{libecl => lib}/include/ert/ecl/fortio.h | 2 + .../include/ert/ecl/grid_dims.h | 0 .../{libecl => lib}/include/ert/ecl/layer.h | 0 .../include/ert/ecl/nnc_info.h | 0 .../include/ert/ecl/nnc_vector.h | 0 .../include/ert/ecl/smspec_node.h | 0 .../ert/ecl_well/well_branch_collection.h | 0 .../include/ert/ecl_well/well_conn.h | 0 .../ert/ecl_well/well_conn_collection.h | 0 .../include/ert/ecl_well/well_const.h | 0 .../include/ert/ecl_well/well_info.h | 0 .../include/ert/ecl_well/well_rseg_loader.h | 0 .../include/ert/ecl_well/well_segment.h | 0 .../ert/ecl_well/well_segment_collection.h | 0 .../include/ert/ecl_well/well_state.h | 0 .../include/ert/ecl_well/well_ts.h | 0 .../include/ert/geometry/geo_pointset.h | 0 .../include/ert/geometry/geo_polygon.h | 0 .../ert/geometry/geo_polygon_collection.h | 0 .../include/ert/geometry/geo_region.h | 0 .../include/ert/geometry/geo_surface.h | 0 .../include/ert/geometry/geo_util.h | 0 .../include/ert/util/TestArea.hpp | 0 .../include/ert/util/arg_pack.h | 0 .../include/ert/util/atomic.h | 0 .../include/ert/util/block_fs.h | 0 .../include/ert/util/buffer.h | 0 .../include/ert/util/buffer_string.h | 0 .../include/ert/util/ert_unique_ptr.hpp | 0 .../include/ert/util/ert_version.h | 0 .../include/ert/util/hash.h | 0 .../include/ert/util/hash_node.h | 0 .../include/ert/util/hash_sll.h | 0 .../include/ert/util/lars.h | 0 .../include/ert/util/log.h | 11 + .../include/ert/util/lookup_table.h | 0 .../include/ert/util/matrix.h | 0 .../include/ert/util/matrix_blas.h | 0 .../include/ert/util/matrix_lapack.h | 0 .../include/ert/util/matrix_stat.h | 0 .../include/ert/util/menu.h | 0 .../include/ert/util/msg.h | 0 .../include/ert/util/msvc_stdbool.h | 0 .../include/ert/util/mzran.h | 0 .../include/ert/util/node_ctype.h | 0 .../include/ert/util/node_data.h | 0 .../include/ert/util/parser.h | 0 .../include/ert/util/path_fmt.h | 0 .../include/ert/util/path_stack.h | 0 .../include/ert/util/perm_vector.h | 0 .../include/ert/util/regression.h | 0 .../include/ert/util/rng.h | 0 .../include/ert/util/set.h | 0 .../include/ert/util/ssize_t.h | 0 .../include/ert/util/statistics.h | 0 .../include/ert/util/stepwise.h | 0 .../include/ert/util/string_util.h | 0 .../include/ert/util/stringlist.h | 0 .../include/ert/util/struct_vector.h | 0 .../include/ert/util/subst_func.h | 0 .../include/ert/util/subst_list.h | 0 .../include/ert/util/template.h | 0 .../include/ert/util/test_util.h | 0 .../include/ert/util/test_util.hpp | 0 .../include/ert/util/test_work_area.h | 0 .../include/ert/util/thread_pool.h | 0 .../include/ert/util/thread_pool1.h | 0 .../include/ert/util/time_interval.h | 0 .../include/ert/util/timer.h | 0 .../include/ert/util/type_macros.h | 0 .../include/ert/util/type_vector_functions.h | 0 .../include/ert/util/ui_return.h | 0 .../include/ert/util/util.h | 2 +- .../include/ert/util/util_endian.h | 0 .../include/ert/util/util_env.h | 0 .../include/ert/util/vector.h | 0 .../src => lib/util}/TestArea.cpp | 0 .../{libert_util/src => lib/util}/arg_pack.c | 0 .../{libert_util/src => lib/util}/block_fs.c | 0 .../{libert_util/src => lib/util}/buffer.c | 127 ++- .../src => lib/util}/config_test_input | 0 .../src => lib/util}/dependencies | 0 .../Ert/lib/util/ert/util/template_type.h | 34 + .../src => lib/util}/ert_version.c | 11 +- .../Ert/{libert_util/src => lib/util}/hash.c | 0 .../{libert_util/src => lib/util}/hash_node.c | 0 .../{libert_util/src => lib/util}/hash_sll.c | 0 .../Ert/{libert_util/src => lib/util}/lars.c | 0 .../Ert/{libert_util/src => lib/util}/log.c | 14 +- .../src => lib/util}/lookup_table.c | 0 .../{libert_util/src => lib/util}/matrix.c | 0 .../src => lib/util}/matrix_blas.c | 0 .../src => lib/util}/matrix_lapack.c | 7 +- .../src => lib/util}/matrix_stat.c | 0 .../Ert/{libert_util/src => lib/util}/menu.c | 0 .../Ert/{libert_util/src => lib/util}/msg.c | 0 .../Ert/{libert_util/src => lib/util}/mzran.c | 0 .../src => lib/util}/node_ctype.c | 0 .../{libert_util/src => lib/util}/node_data.c | 0 .../{libert_util/src => lib/util}/parser.c | 0 .../{libert_util/src => lib/util}/path_fmt.c | 0 .../src => lib/util}/path_stack.c | 0 .../src => lib/util}/perm_vector.c | 0 .../src => lib/util}/readme.overview | 0 .../src => lib/util}/regression.c | 0 .../Ert/{libert_util/src => lib/util}/rng.c | 0 .../Ert/{libert_util/src => lib/util}/set.c | 0 .../src => lib/util}/statistics.c | 0 .../{libert_util/src => lib/util}/stepwise.c | 0 .../src => lib/util}/string_util.c | 0 .../src => lib/util}/stringlist.c | 0 .../src => lib/util}/struct_vector.c | 0 .../src => lib/util}/subst_func.c | 0 .../src => lib/util}/subst_list.c | 0 .../{libert_util/src => lib/util}/template.c | 37 +- .../src => lib/util}/template_loop.c | 40 +- .../{libert_util/src => lib/util}/test_util.c | 0 .../src => lib/util}/test_work_area.c | 2 +- .../util}/tests/data/file1.txt | 0 .../util}/tests/data/file2.txt | 0 .../util}/tests/data2/dir2/file4 | 0 .../util}/tests/data2/file1 | 0 .../util}/tests/data2/file2 | 0 .../util}/tests/data2/file3 | 0 .../util}/tests/ert_util_PATH_test.c | 32 +- .../util}/tests/ert_util_abort_gnu_tests.c | 0 .../util}/tests/ert_util_addr2line.c | 0 .../tests/ert_util_alloc_file_components.c | 0 .../util}/tests/ert_util_approx_equal.c | 0 .../util}/tests/ert_util_arg_pack.c | 0 .../util}/tests/ert_util_before_after.c | 0 .../util}/tests/ert_util_binary_split.c | 0 .../util}/tests/ert_util_block_fs.c | 0 .../util}/tests/ert_util_buffer.c | 0 .../util}/tests/ert_util_clamp.c | 0 .../util}/tests/ert_util_copy_file.c | 0 .../util}/tests/ert_util_cwd_test.c | 0 .../Ert/lib/util/tests/ert_util_datetime.c | 52 ++ .../util}/tests/ert_util_file_readable.c | 0 .../util}/tests/ert_util_filename.c | 0 .../util}/tests/ert_util_hash_test.c | 0 .../util}/tests/ert_util_logh.c | 0 .../util}/tests/ert_util_matrix.c | 0 .../util}/tests/ert_util_matrix_lapack.c | 0 .../util}/tests/ert_util_matrix_stat.c | 0 .../util}/tests/ert_util_parent_path.c | 0 .../util}/tests/ert_util_path_stack_test.c | 0 .../util}/tests/ert_util_ping.c | 0 .../util}/tests/ert_util_realpath.c | 0 .../util}/tests/ert_util_relpath_test.c | 0 .../util}/tests/ert_util_rng.c | 0 .../util}/tests/ert_util_spawn.c | 0 .../util}/tests/ert_util_sprintf_escape.c | 0 .../util}/tests/ert_util_sscan_test.c | 0 .../util}/tests/ert_util_statistics.c | 0 .../util}/tests/ert_util_strcat_test.c | 0 .../util}/tests/ert_util_string_util.c | 0 .../util}/tests/ert_util_stringlist_test.c | 0 .../util}/tests/ert_util_strstr_int_format.c | 0 .../util}/tests/ert_util_struct_vector.c | 7 +- .../util}/tests/ert_util_subst_list.c | 0 .../util}/tests/ert_util_test_area_xx.cpp | 0 .../util}/tests/ert_util_time_interval.c | 0 .../tests/ert_util_type_vector_functions.c | 0 .../util}/tests/ert_util_type_vector_test.c | 0 .../util}/tests/ert_util_ui_return.c | 0 .../util}/tests/ert_util_unique_ptr.cpp | 0 .../util}/tests/ert_util_vector_test.c | 0 .../util}/tests/ert_util_work_area.c | 0 .../util}/tests/test_thread_pool.c | 0 .../src => lib/util}/thread_pool.c | 0 .../src => lib/util}/thread_pool1.c | 0 .../src => lib/util}/thread_pool_posix.c | 0 .../src => lib/util}/time_interval.c | 0 .../Ert/{libert_util/src => lib/util}/timer.c | 0 .../src => lib/util}/type_vector_functions.c | 0 .../{libert_util/src => lib/util}/ui_return.c | 0 .../Ert/{libert_util/src => lib/util}/util.c | 381 +++++++-- .../src => lib/util}/util_abort_gnu.c | 18 + .../src => lib/util}/util_abort_simple.c | 8 +- .../src => lib/util}/util_endian.c | 0 .../{libert_util/src => lib/util}/util_env.c | 2 + .../src => lib/util}/util_getuid.c | 9 + .../{libert_util/src => lib/util}/util_lfs.c | 2 + .../src => lib/util}/util_lockf.c | 9 + .../src => lib/util}/util_opendir.c | 10 + .../src => lib/util}/util_spawn.c | 18 +- .../src => lib/util}/util_symlink.c | 27 +- .../{libert_util/src => lib/util}/util_zlib.c | 7 + .../{libert_util/src => lib/util}/vector.c | 0 .../src => lib/util}/vector_template.c | 0 .../vector_template.h.in} | 0 ThirdParty/Ert/libecl/CMakeLists.txt | 5 - .../Ert/libecl/applications/CMakeLists.txt | 81 -- .../Ert/libecl/applications/link_static.sh | 2 - .../libecl/include/ert/ecl/ecl_file_view.h | 108 --- ThirdParty/Ert/libecl/src/CMakeLists.txt | 116 --- .../Ert/libecl/src/ecl_file_deprecated.c | 117 --- ThirdParty/Ert/libecl/src/ecl_rstfile.c | 116 --- ThirdParty/Ert/libecl/tests/CMakeLists.txt | 19 - .../Ert/libecl/tests/statoil_tests.cmake | 295 ------- ThirdParty/Ert/libecl/tests/tests.cmake | 119 --- ThirdParty/Ert/libecl_well/CMakeLists.txt | 8 - .../libecl_well/applications/CMakeLists.txt | 28 - ThirdParty/Ert/libecl_well/src/CMakeLists.txt | 51 -- .../Ert/libecl_well/tests/CMakeLists.txt | 12 - .../Ert/libecl_well/tests/statoil_tests.cmake | 100 --- ThirdParty/Ert/libecl_well/tests/tests.cmake | 35 - ThirdParty/Ert/libeclxx/CMakeLists.txt | 5 - ThirdParty/Ert/libeclxx/src/CMakeLists.txt | 28 - ThirdParty/Ert/libeclxx/tests/CMakeLists.txt | 19 - ThirdParty/Ert/libert_util/CMakeLists.txt | 10 - .../libert_util/applications/CMakeLists.txt | 3 - .../applications/block_fs/CMakeLists.txt | 18 - .../include/ert/util/CMakeLists.txt | 29 - ThirdParty/Ert/libert_util/src/CMakeLists.txt | 183 ----- .../Ert/libert_util/src/buffer_string.c | 57 -- ThirdParty/Ert/libert_util/src/buffer_zlib.c | 74 -- ThirdParty/Ert/libert_util/src/util_chdir.c | 38 - ThirdParty/Ert/libert_util/src/util_path.c | 307 ------- .../Ert/libert_util/tests/CMakeLists.txt | 196 ----- ThirdParty/Ert/libert_utilxx/CMakeLists.txt | 6 - .../Ert/libert_utilxx/src/CMakeLists.txt | 24 - .../Ert/libert_utilxx/tests/CMakeLists.txt | 7 - ThirdParty/Ert/libgeometry/CMakeLists.txt | 10 - ThirdParty/Ert/libgeometry/src/CMakeLists.txt | 20 - .../Ert/libgeometry/tests/CMakeLists.txt | 25 - .../cmake/Modules/add_python_package.cmake | 4 +- .../cmake/Modules/add_python_test.cmake | 2 +- .../cmake/Modules/find_python_package.cmake | 24 +- .../python/cmake/Modules/init_python.cmake | 29 +- ThirdParty/Ert/python/doc/install.txt | 14 +- ThirdParty/Ert/python/python/CMakeLists.txt | 5 +- .../Ert/python/python/bin/CMakeLists.txt | 24 - .../Ert/python/python/bin/ert_tcp_server | 53 -- .../Ert/python/python/bin/ert_upgrade_fs107 | 76 -- ThirdParty/Ert/python/python/bin/ertshell | 35 - ThirdParty/Ert/python/python/cwrap/clib.py | 14 - .../Ert/python/python/cwrap/prototype.py | 3 + .../Ert/python/python/ecl/ecl/ecl_grid.py | 65 +- .../python/ecl/ecl/ecl_grid_generator.py | 560 ++++++++++--- .../Ert/python/python/ecl/geo/__init__.py | 2 +- .../python/ecl/test/extended_testcase.py | 7 +- .../python/ecl/test/import_test_case.py | 3 + .../Ert/python/python/ecl/util/__init__.py | 2 +- .../Ert/python/python/ecl/well/__init__.py | 2 +- .../Ert/python/python/ecl/well/well_info.py | 22 + .../python/python/legacy/ert/CMakeLists.txt | 11 + .../Ert/python/python/legacy/ert/__init__.py | 0 .../python/python/legacy/ert/ecl/__init__.py | 26 + .../python/legacy/ert/ecl/faults/__init__.py | 7 + .../python/python/legacy/ert/geo/__init__.py | 8 + .../python/python/legacy/ert/test/__init__.py | 10 + .../python/python/legacy/ert/util/__init__.py | 25 + .../python/python/legacy/ert/well/__init__.py | 7 + ThirdParty/Ert/python/tests/CMakeLists.txt | 4 + .../Ert/python/tests/cwrap/test_basecvalue.py | 2 +- .../Ert/python/tests/cwrap/test_cfile.py | 2 +- .../Ert/python/tests/cwrap/test_metawrap.py | 3 +- .../Ert/python/tests/ecl/CMakeLists.txt | 4 + .../Ert/python/tests/ecl/test_ecl_file.py | 30 + .../Ert/python/tests/ecl/test_ecl_util.py | 4 +- .../Ert/python/tests/ecl/test_fk_user_data.py | 48 ++ ThirdParty/Ert/python/tests/ecl/test_grid.py | 61 +- .../python/tests/ecl/test_grid_generator.py | 272 +++++++ .../Ert/python/tests/ecl/test_grid_statoil.py | 19 + ThirdParty/Ert/python/tests/ecl/test_sum.py | 2 +- .../Ert/python/tests/install/test_install.py | 13 + .../Ert/python/tests/legacy/CMakeLists.txt | 16 + .../Ert/python/tests/legacy/__init__.py | 0 .../Ert/python/tests/legacy/test_ecl.py | 41 + .../Ert/python/tests/legacy/test_geo.py | 14 + .../Ert/python/tests/legacy/test_test.py | 16 + .../Ert/python/tests/legacy/test_util.py | 31 + .../Ert/python/tests/legacy/test_well.py | 13 + ThirdParty/Ert/python/tests/test_install.in | 6 + .../Ert/python/tests/util/test_arg_pack.py | 2 +- .../Ert/python/tests/util/test_cstring.py | 2 +- .../python/tests/util/test_cthread_pool.py | 2 +- .../python/tests/util/test_path_context.py | 6 +- ThirdParty/Ert/python/tests/util/test_rng.py | 4 +- .../Ert/python/tests/util/test_spawn.py | 2 +- .../Ert/python/tests/util/test_ui_return.py | 2 +- .../Ert/python/tests/well/CMakeLists.txt | 6 +- .../Ert/python/tests/well/test_ecl_well.py | 14 +- .../local/ECLIPSE/faarikaal/faarikaal1.EGRID | Bin 0 -> 258624 bytes .../local/ECLIPSE/faarikaal/faarikaal1.txt | 22 + .../local/ECLIPSE/faarikaal/faarikaal2.EGRID | Bin 0 -> 29440 bytes .../local/ECLIPSE/faarikaal/faarikaal2.txt | 6 + .../local/ECLIPSE/faarikaal/faarikaal3.EGRID | Bin 0 -> 8192 bytes .../local/ECLIPSE/faarikaal/faarikaal3.txt | 2 + .../local/ECLIPSE/faarikaal/faarikaal4.EGRID | Bin 0 -> 2928 bytes .../local/ECLIPSE/faarikaal/faarikaal4.txt | 2 + .../local/ECLIPSE/faarikaal/faarikaal5.EGRID | Bin 0 -> 78968 bytes .../local/ECLIPSE/faarikaal/faarikaal5.txt | 7 + .../local/ECLIPSE/faarikaal/faarikaal6.EGRID | Bin 0 -> 8192 bytes .../local/ECLIPSE/faarikaal/faarikaal6.txt | 2 + .../local/ECLIPSE/faarikaal/faarikaal7.EGRID | Bin 0 -> 78968 bytes .../local/ECLIPSE/faarikaal/faarikaal7.txt | 7 + 556 files changed, 4579 insertions(+), 3573 deletions(-) create mode 100644 ThirdParty/Ert/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 ThirdParty/Ert/applications/CMakeLists.txt rename ThirdParty/Ert/{libert_util => }/applications/block_fs/bcp.c (100%) rename ThirdParty/Ert/{libert_util => }/applications/block_fs/bfs_extract.c (100%) rename ThirdParty/Ert/{libert_util => }/applications/block_fs/block_fs_test.c (100%) rename ThirdParty/Ert/{libert_util => }/applications/block_fs/bls.c (100%) rename ThirdParty/Ert/{libert_util => }/applications/block_fs/brm.c (100%) rename ThirdParty/Ert/{libert_util => }/applications/block_fs/brot.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/convert.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/ecl_pack.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/ecl_quantile.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/ecl_unpack.c (92%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/esummary.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/grdecl_grid.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/grdecl_test.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/grid_dump.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/grid_dump_ascii.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/grid_info.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/grid_layer.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/key_list.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/kw_extract.c (97%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/kw_list.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/load_test.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/make_grid.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/run_gravity.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/select_test.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/sum_write.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/summary2csv2.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/view_restart.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/view_rft.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/view_summary.c (100%) rename ThirdParty/Ert/{libecl/applications => applications/ecl}/vprofile.c (100%) rename ThirdParty/Ert/{libecl => }/applications/example_ens_plot_batch_file (100%) rename ThirdParty/Ert/{libgeometry => }/applications/irap_test.c (100%) rename ThirdParty/Ert/{docs => applications}/man/man1/ecl_summary.1 (100%) rename ThirdParty/Ert/{libgeometry => }/applications/polygon_test.c (100%) rename ThirdParty/Ert/{libecl_well/applications => applications/well}/ri_well_test.c (100%) rename ThirdParty/Ert/{libecl_well/applications => applications/well}/segment_info.c (100%) rename ThirdParty/Ert/{libecl_well/applications => applications/well}/well_CF_dump.c (100%) create mode 100644 ThirdParty/Ert/lib/CMakeLists.txt rename ThirdParty/Ert/{libert_util/include/ert/util => lib}/build_config.h.in (100%) rename ThirdParty/Ert/{libeclxx/src => lib/ecl}/EclFilename.cpp (100%) rename ThirdParty/Ert/{libeclxx/src => lib/ecl}/FortIO.cpp (100%) rename ThirdParty/Ert/{libeclxx/src => lib/ecl}/Smspec.cpp (92%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_box.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_coarse_cell.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_file.c (79%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_file_kw.c (99%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_file_view.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_grav.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_grav_calc.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_grav_common.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_grid.c (99%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_grid_cache.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_grid_dims.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_init_file.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_io_config.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_kw.c (99%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_kw_functions.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_kw_grdecl.c (86%) create mode 100644 ThirdParty/Ert/lib/ecl/ecl_nnc_data.c rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_nnc_export.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_nnc_geometry.c (95%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_region.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_rft_cell.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_rft_file.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_rft_node.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_rst_file.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_rsthead.c (96%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_smspec.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_subsidence.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_sum.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_sum_data.c (90%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_sum_file.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_sum_index.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_sum_tstep.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_sum_vector.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_type.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_type_python.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/ecl_util.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/fault_block.c (98%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/fault_block_layer.c (97%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/fortio.c (95%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/grid_dims.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/layer.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/nnc_info.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/nnc_vector.c (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/overview.txt (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/readme.overview (100%) rename ThirdParty/Ert/{libecl/src => lib/ecl}/smspec_node.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/data/num_cpu1 (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/data/num_cpu2 (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/data/num_cpu3 (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/data/num_cpu4 (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_alloc_cpgrid.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_alloc_grid_dxv_dyv_dzv.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_coarse_test.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_dualp.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_fault_block_collection_statoil.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_fault_block_layer.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_fault_block_layer_statoil.c (100%) create mode 100644 ThirdParty/Ert/lib/ecl/tests/ecl_file.c rename ThirdParty/Ert/{libecl/tests/ecl_file.c => lib/ecl/tests/ecl_file_statoil.c} (97%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_fmt.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_fortio.c (93%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_get_num_cpu_test.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_DEPTHZ.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_add_nnc.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_case.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_cell_contains.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_cell_contains_wellpath.c (65%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_cell_volume.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_copy.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_copy_statoil.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_corner.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_create.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_dims.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_export.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_fwrite.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_init_fwrite.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_layer_contains.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_lgr_name.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_reset_actnum.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_simple.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_grid_volume.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_init_file.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_kw_cmp_string.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_kw_equal.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_kw_fread.c (57%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_kw_grdecl.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_kw_init.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_layer.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_layer_statoil.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_lfs.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_lgr_name.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_lgr_test.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_nnc_export.c (97%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_nnc_export_get_tran.c (99%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_nnc_geometry.c (56%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_nnc_index_list.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_nnc_index_list_grid.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_nnc_info_test.c (100%) create mode 100644 ThirdParty/Ert/lib/ecl/tests/ecl_nnc_pair.c rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_nnc_test.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_nnc_vector.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_region.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_region2region_test.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_restart_test.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_rft.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_rft_cell.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_rst_file.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_rsthead.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_smspec.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_sum_case_exists.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_sum_report_step_compatible.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_sum_report_step_equal.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_sum_test.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_sum_writer.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_util_make_date_no_shift.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_util_make_date_shift.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_util_month_range.c (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/ecl_valid_basename.c (100%) rename ThirdParty/Ert/{libeclxx => lib/ecl}/tests/eclxx_filename.cpp (100%) rename ThirdParty/Ert/{libeclxx => lib/ecl}/tests/eclxx_fortio.cpp (100%) rename ThirdParty/Ert/{libeclxx => lib/ecl}/tests/eclxx_kw.cpp (100%) rename ThirdParty/Ert/{libeclxx => lib/ecl}/tests/eclxx_smspec.cpp (96%) rename ThirdParty/Ert/{libeclxx => lib/ecl}/tests/eclxx_types.cpp (100%) rename ThirdParty/Ert/{libecl => lib/ecl}/tests/rft_test.c (100%) create mode 100644 ThirdParty/Ert/lib/ecl/tests/test_ecl_nnc_data.c create mode 100644 ThirdParty/Ert/lib/ecl/tests/test_ecl_nnc_data_statoil_root.c rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_branch_collection.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_conn.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_conn_CF.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_conn_collection.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_conn_load.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_dualp.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_info.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_lgr_load.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_segment.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_segment_branch_conn_load.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_segment_collection.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_segment_conn.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_segment_conn_load.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_segment_load.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_state.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_state_load.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_state_load_missing_RSEG.c (100%) rename ThirdParty/Ert/{libecl_well => lib/ecl}/tests/well_ts.c (100%) rename ThirdParty/Ert/{libecl_well/src => lib/ecl}/well_branch_collection.c (100%) rename ThirdParty/Ert/{libecl_well/src => lib/ecl}/well_conn.c (100%) rename ThirdParty/Ert/{libecl_well/src => lib/ecl}/well_conn_collection.c (100%) rename ThirdParty/Ert/{libecl_well/src => lib/ecl}/well_info.c (100%) rename ThirdParty/Ert/{libecl_well/src => lib/ecl}/well_rseg_loader.c (100%) rename ThirdParty/Ert/{libecl_well/src => lib/ecl}/well_segment.c (100%) rename ThirdParty/Ert/{libecl_well/src => lib/ecl}/well_segment_collection.c (100%) rename ThirdParty/Ert/{libecl_well/src => lib/ecl}/well_state.c (100%) rename ThirdParty/Ert/{libecl_well/src => lib/ecl}/well_ts.c (100%) rename ThirdParty/Ert/{libert_util/include/ert/util => lib}/ert_api_config.h.in (100%) rename ThirdParty/Ert/{libgeometry/src => lib/geometry}/geo_pointset.c (100%) rename ThirdParty/Ert/{libgeometry/src => lib/geometry}/geo_polygon.c (100%) rename ThirdParty/Ert/{libgeometry/src => lib/geometry}/geo_polygon_collection.c (100%) rename ThirdParty/Ert/{libgeometry/src => lib/geometry}/geo_region.c (100%) rename ThirdParty/Ert/{libgeometry/src => lib/geometry}/geo_surface.c (100%) rename ThirdParty/Ert/{libgeometry/src => lib/geometry}/geo_util.c (100%) rename ThirdParty/Ert/{libgeometry => lib/geometry}/tests/geo_polygon.c (100%) rename ThirdParty/Ert/{libgeometry => lib/geometry}/tests/geo_polygon_collection.c (100%) rename ThirdParty/Ert/{libgeometry => lib/geometry}/tests/geo_surface.c (100%) rename ThirdParty/Ert/{libgeometry => lib/geometry}/tests/geo_util_xlines.c (100%) rename ThirdParty/Ert/{libeclxx => lib}/include/ert/ecl/EclFilename.hpp (100%) rename ThirdParty/Ert/{libeclxx => lib}/include/ert/ecl/EclKW.hpp (100%) rename ThirdParty/Ert/{libeclxx => lib}/include/ert/ecl/FortIO.hpp (100%) rename ThirdParty/Ert/{libeclxx => lib}/include/ert/ecl/Smspec.hpp (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_box.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_coarse_cell.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_endian_flip.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_file.h (98%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_file_kw.h (100%) create mode 100644 ThirdParty/Ert/lib/include/ert/ecl/ecl_file_view.h rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_grav.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_grav_calc.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_grav_common.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_grid.h (99%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_grid_cache.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_grid_dims.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_init_file.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_io_config.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_kw.h (99%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_kw_grdecl.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_kw_magic.h (97%) create mode 100644 ThirdParty/Ert/lib/include/ert/ecl/ecl_nnc_data.h rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_nnc_export.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_nnc_geometry.h (92%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_region.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_rft_cell.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_rft_file.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_rft_node.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_rst_file.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_rsthead.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_smspec.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_subsidence.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_sum.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_sum_data.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_sum_index.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_sum_tstep.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_sum_vector.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_type.h (86%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_units.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/ecl_util.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/fault_block.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/fault_block_layer.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/fortio.h (97%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/grid_dims.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/layer.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/nnc_info.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/nnc_vector.h (100%) rename ThirdParty/Ert/{libecl => lib}/include/ert/ecl/smspec_node.h (100%) rename ThirdParty/Ert/{libecl_well => lib}/include/ert/ecl_well/well_branch_collection.h (100%) rename ThirdParty/Ert/{libecl_well => lib}/include/ert/ecl_well/well_conn.h (100%) rename ThirdParty/Ert/{libecl_well => lib}/include/ert/ecl_well/well_conn_collection.h (100%) rename ThirdParty/Ert/{libecl_well => lib}/include/ert/ecl_well/well_const.h (100%) rename ThirdParty/Ert/{libecl_well => lib}/include/ert/ecl_well/well_info.h (100%) rename ThirdParty/Ert/{libecl_well => lib}/include/ert/ecl_well/well_rseg_loader.h (100%) rename ThirdParty/Ert/{libecl_well => lib}/include/ert/ecl_well/well_segment.h (100%) rename ThirdParty/Ert/{libecl_well => lib}/include/ert/ecl_well/well_segment_collection.h (100%) rename ThirdParty/Ert/{libecl_well => lib}/include/ert/ecl_well/well_state.h (100%) rename ThirdParty/Ert/{libecl_well => lib}/include/ert/ecl_well/well_ts.h (100%) rename ThirdParty/Ert/{libgeometry => lib}/include/ert/geometry/geo_pointset.h (100%) rename ThirdParty/Ert/{libgeometry => lib}/include/ert/geometry/geo_polygon.h (100%) rename ThirdParty/Ert/{libgeometry => lib}/include/ert/geometry/geo_polygon_collection.h (100%) rename ThirdParty/Ert/{libgeometry => lib}/include/ert/geometry/geo_region.h (100%) rename ThirdParty/Ert/{libgeometry => lib}/include/ert/geometry/geo_surface.h (100%) rename ThirdParty/Ert/{libgeometry => lib}/include/ert/geometry/geo_util.h (100%) rename ThirdParty/Ert/{libert_utilxx => lib}/include/ert/util/TestArea.hpp (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/arg_pack.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/atomic.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/block_fs.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/buffer.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/buffer_string.h (100%) rename ThirdParty/Ert/{libert_utilxx => lib}/include/ert/util/ert_unique_ptr.hpp (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/ert_version.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/hash.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/hash_node.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/hash_sll.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/lars.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/log.h (75%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/lookup_table.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/matrix.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/matrix_blas.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/matrix_lapack.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/matrix_stat.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/menu.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/msg.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/msvc_stdbool.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/mzran.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/node_ctype.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/node_data.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/parser.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/path_fmt.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/path_stack.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/perm_vector.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/regression.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/rng.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/set.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/ssize_t.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/statistics.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/stepwise.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/string_util.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/stringlist.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/struct_vector.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/subst_func.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/subst_list.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/template.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/test_util.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/test_util.hpp (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/test_work_area.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/thread_pool.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/thread_pool1.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/time_interval.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/timer.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/type_macros.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/type_vector_functions.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/ui_return.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/util.h (99%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/util_endian.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/util_env.h (100%) rename ThirdParty/Ert/{libert_util => lib}/include/ert/util/vector.h (100%) rename ThirdParty/Ert/{libert_utilxx/src => lib/util}/TestArea.cpp (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/arg_pack.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/block_fs.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/buffer.c (84%) rename ThirdParty/Ert/{libert_util/src => lib/util}/config_test_input (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/dependencies (100%) create mode 100644 ThirdParty/Ert/lib/util/ert/util/template_type.h rename ThirdParty/Ert/{libert_util/src => lib/util}/ert_version.c (77%) rename ThirdParty/Ert/{libert_util/src => lib/util}/hash.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/hash_node.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/hash_sll.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/lars.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/log.c (91%) rename ThirdParty/Ert/{libert_util/src => lib/util}/lookup_table.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/matrix.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/matrix_blas.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/matrix_lapack.c (99%) rename ThirdParty/Ert/{libert_util/src => lib/util}/matrix_stat.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/menu.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/msg.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/mzran.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/node_ctype.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/node_data.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/parser.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/path_fmt.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/path_stack.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/perm_vector.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/readme.overview (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/regression.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/rng.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/set.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/statistics.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/stepwise.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/string_util.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/stringlist.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/struct_vector.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/subst_func.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/subst_list.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/template.c (84%) rename ThirdParty/Ert/{libert_util/src => lib/util}/template_loop.c (91%) rename ThirdParty/Ert/{libert_util/src => lib/util}/test_util.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/test_work_area.c (99%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/data/file1.txt (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/data/file2.txt (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/data2/dir2/file4 (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/data2/file1 (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/data2/file2 (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/data2/file3 (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_PATH_test.c (81%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_abort_gnu_tests.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_addr2line.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_alloc_file_components.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_approx_equal.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_arg_pack.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_before_after.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_binary_split.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_block_fs.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_buffer.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_clamp.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_copy_file.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_cwd_test.c (100%) create mode 100644 ThirdParty/Ert/lib/util/tests/ert_util_datetime.c rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_file_readable.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_filename.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_hash_test.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_logh.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_matrix.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_matrix_lapack.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_matrix_stat.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_parent_path.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_path_stack_test.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_ping.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_realpath.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_relpath_test.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_rng.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_spawn.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_sprintf_escape.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_sscan_test.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_statistics.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_strcat_test.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_string_util.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_stringlist_test.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_strstr_int_format.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_struct_vector.c (96%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_subst_list.c (100%) rename ThirdParty/Ert/{libert_utilxx => lib/util}/tests/ert_util_test_area_xx.cpp (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_time_interval.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_type_vector_functions.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_type_vector_test.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_ui_return.c (100%) rename ThirdParty/Ert/{libert_utilxx => lib/util}/tests/ert_util_unique_ptr.cpp (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_vector_test.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/ert_util_work_area.c (100%) rename ThirdParty/Ert/{libert_util => lib/util}/tests/test_thread_pool.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/thread_pool.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/thread_pool1.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/thread_pool_posix.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/time_interval.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/timer.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/type_vector_functions.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/ui_return.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/util.c (94%) rename ThirdParty/Ert/{libert_util/src => lib/util}/util_abort_gnu.c (94%) rename ThirdParty/Ert/{libert_util/src => lib/util}/util_abort_simple.c (89%) rename ThirdParty/Ert/{libert_util/src => lib/util}/util_endian.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/util_env.c (99%) rename ThirdParty/Ert/{libert_util/src => lib/util}/util_getuid.c (96%) rename ThirdParty/Ert/{libert_util/src => lib/util}/util_lfs.c (99%) rename ThirdParty/Ert/{libert_util/src => lib/util}/util_lockf.c (95%) rename ThirdParty/Ert/{libert_util/src => lib/util}/util_opendir.c (97%) rename ThirdParty/Ert/{libert_util/src => lib/util}/util_spawn.c (91%) rename ThirdParty/Ert/{libert_util/src => lib/util}/util_symlink.c (89%) rename ThirdParty/Ert/{libert_util/src => lib/util}/util_zlib.c (98%) rename ThirdParty/Ert/{libert_util/src => lib/util}/vector.c (100%) rename ThirdParty/Ert/{libert_util/src => lib/util}/vector_template.c (100%) rename ThirdParty/Ert/{libert_util/include/ert/util/vector_template.h => lib/vector_template.h.in} (100%) delete mode 100644 ThirdParty/Ert/libecl/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libecl/applications/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libecl/applications/link_static.sh delete mode 100644 ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_view.h delete mode 100644 ThirdParty/Ert/libecl/src/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libecl/src/ecl_file_deprecated.c delete mode 100644 ThirdParty/Ert/libecl/src/ecl_rstfile.c delete mode 100644 ThirdParty/Ert/libecl/tests/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libecl/tests/statoil_tests.cmake delete mode 100644 ThirdParty/Ert/libecl/tests/tests.cmake delete mode 100644 ThirdParty/Ert/libecl_well/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libecl_well/applications/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libecl_well/src/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libecl_well/tests/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libecl_well/tests/statoil_tests.cmake delete mode 100644 ThirdParty/Ert/libecl_well/tests/tests.cmake delete mode 100644 ThirdParty/Ert/libeclxx/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libeclxx/src/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libeclxx/tests/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libert_util/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libert_util/applications/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libert_util/applications/block_fs/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libert_util/include/ert/util/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libert_util/src/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libert_util/src/buffer_string.c delete mode 100644 ThirdParty/Ert/libert_util/src/buffer_zlib.c delete mode 100644 ThirdParty/Ert/libert_util/src/util_chdir.c delete mode 100644 ThirdParty/Ert/libert_util/src/util_path.c delete mode 100644 ThirdParty/Ert/libert_util/tests/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libert_utilxx/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libert_utilxx/src/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libert_utilxx/tests/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libgeometry/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libgeometry/src/CMakeLists.txt delete mode 100644 ThirdParty/Ert/libgeometry/tests/CMakeLists.txt delete mode 100644 ThirdParty/Ert/python/python/bin/CMakeLists.txt delete mode 100644 ThirdParty/Ert/python/python/bin/ert_tcp_server delete mode 100644 ThirdParty/Ert/python/python/bin/ert_upgrade_fs107 delete mode 100644 ThirdParty/Ert/python/python/bin/ertshell create mode 100644 ThirdParty/Ert/python/python/legacy/ert/CMakeLists.txt create mode 100644 ThirdParty/Ert/python/python/legacy/ert/__init__.py create mode 100644 ThirdParty/Ert/python/python/legacy/ert/ecl/__init__.py create mode 100644 ThirdParty/Ert/python/python/legacy/ert/ecl/faults/__init__.py create mode 100644 ThirdParty/Ert/python/python/legacy/ert/geo/__init__.py create mode 100644 ThirdParty/Ert/python/python/legacy/ert/test/__init__.py create mode 100644 ThirdParty/Ert/python/python/legacy/ert/util/__init__.py create mode 100644 ThirdParty/Ert/python/python/legacy/ert/well/__init__.py create mode 100644 ThirdParty/Ert/python/tests/ecl/test_fk_user_data.py create mode 100644 ThirdParty/Ert/python/tests/ecl/test_grid_generator.py create mode 100644 ThirdParty/Ert/python/tests/install/test_install.py create mode 100644 ThirdParty/Ert/python/tests/legacy/CMakeLists.txt create mode 100644 ThirdParty/Ert/python/tests/legacy/__init__.py create mode 100644 ThirdParty/Ert/python/tests/legacy/test_ecl.py create mode 100644 ThirdParty/Ert/python/tests/legacy/test_geo.py create mode 100644 ThirdParty/Ert/python/tests/legacy/test_test.py create mode 100644 ThirdParty/Ert/python/tests/legacy/test_util.py create mode 100644 ThirdParty/Ert/python/tests/legacy/test_well.py create mode 100644 ThirdParty/Ert/python/tests/test_install.in create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal1.EGRID create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal1.txt create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal2.EGRID create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal2.txt create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal3.EGRID create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal3.txt create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal4.EGRID create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal4.txt create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal5.EGRID create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal5.txt create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal6.EGRID create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal6.txt create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal7.EGRID create mode 100644 ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal7.txt diff --git a/ThirdParty/Ert/.github/PULL_REQUEST_TEMPLATE.md b/ThirdParty/Ert/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..85c76997e0 --- /dev/null +++ b/ThirdParty/Ert/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ +**Task** +_Short description of the task_ + + +**Approach** +_Short description of the approach_ + + +**Pre un-WIP checklist** +- [ ] Statoil tests pass locally +- [ ] Have completed graphical integration test steps diff --git a/ThirdParty/Ert/.travis.yml b/ThirdParty/Ert/.travis.yml index 81671386ce..dfcf1b0442 100644 --- a/ThirdParty/Ert/.travis.yml +++ b/ThirdParty/Ert/.travis.yml @@ -1,7 +1,16 @@ -dist: trusty -sudo: false language: c +matrix: + fast_finish: true + include: + - os: osx + osx_image: xcode7.3 + compiler: clang + - os: linux + sudo: false + compiler: gcc + dist: trusty + addons: apt: sources: @@ -11,6 +20,9 @@ addons: - valgrind - gcc-4.8 - g++-4.8 + - clang + - cmake + - cmake-data env: global: @@ -18,7 +30,18 @@ env: install: - if [[ "$CC" == "gcc" ]]; then export CXX="g++-4.8"; fi -- wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh +- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + export CONDA_OS=MacOSX; + else + export CONDA_OS=Linux; + fi +- export TRAVIS_PYTHON_VERSION="2.7" +# We do this conditionally because it saves us some downloading if the version is the same. +- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then + wget https://repo.continuum.io/miniconda/Miniconda2-latest-${CONDA_OS}-x86_64.sh -O miniconda.sh; + else + wget https://repo.continuum.io/miniconda/Miniconda3-latest-${CONDA_OS}-x86_64.sh -O miniconda.sh; + fi - bash miniconda.sh -b -p $HOME/miniconda - export CONDA_HOME="$HOME/miniconda" - export PATH="$CONDA_HOME/bin:$PATH" @@ -29,10 +52,7 @@ install: - conda install pylint numpy pandas before_script: -- mkdir build -- cd build -- cmake -DBUILD_TESTS=ON -DBUILD_PYTHON=ON -DERT_BUILD_CXX=ON -DBUILD_APPLICATIONS=ON .. + - wget https://raw.githubusercontent.com/Statoil/ert/master/travis/build_total.py script: -- make -- ctest --output-on-failure -E ert_util_ping + - python build_total.py ecl diff --git a/ThirdParty/Ert/CMakeLists.txt b/ThirdParty/Ert/CMakeLists.txt index cb4d90eb8f..500b0adecf 100644 --- a/ThirdParty/Ert/CMakeLists.txt +++ b/ThirdParty/Ert/CMakeLists.txt @@ -1,6 +1,8 @@ -cmake_minimum_required( VERSION 2.8 ) +cmake_minimum_required( VERSION 2.8.12 ) project( ERT C CXX ) +include(GNUInstallDirs) + if(POLICY CMP0042) cmake_policy(SET CMP0042 OLD) endif() @@ -19,15 +21,13 @@ set( ERT_VERSION_MICRO git ) # with "new in Ert Version X.X.X"! option( BUILD_TESTS "Should the tests be built" OFF) option( BUILD_APPLICATIONS "Should we build small utility applications" OFF) option( BUILD_ECL_SUMMARY "Build the commandline application ecl_summary" OFF) -option( BUILD_PYTHON "Run py_compile on the python wrappers" ON ) +option( BUILD_PYTHON "Run py_compile on the python wrappers" OFF) option( BUILD_SHARED_LIBS "Build shared libraries" ON ) -option( INSTALL_ERT "Should anything be installed when issuing make install?" ON ) option( ERT_USE_OPENMP "Use OpenMP" OFF ) -option( ERT_DOC "Build ERT documantation" OFF) +option( RST_DOC "Build RST documentation" OFF) option( ERT_BUILD_CXX "Build some CXX wrappers" ON) - - - +option( USE_RPATH "Don't strip RPATH from libraries and binaries" OFF) +option( INSTALL_ERT_LEGACY "Add ert legacy wrappers" OFF) set(STATOIL_TESTDATA_ROOT "" CACHE PATH "Root to Statoil internal testdata") @@ -39,12 +39,22 @@ if (EXISTS ${STATOIL_TESTDATA_ROOT}) EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink "${STATOIL_TESTDATA_ROOT}" "${LINK}") message(STATUS "Linking testdata: ${LINK} -> ${STATOIL_TESTDATA_ROOT}") + + set(_statoil_test_data ${CMAKE_SOURCE_DIR}/test-data/Statoil) + set(_eclpath ${_statoil_test_data}/ECLIPSE) + set(_geopath ${_statoil_test_data}/Geometry) endif() +# output libs to some lib/ path for testing +set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) +set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin) + +if (USE_RPATH) + SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +endif () -include( CheckFunctionExists ) -include( CheckTypeSize ) ENABLE_TESTING() if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") @@ -66,7 +76,7 @@ endif() if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.") - set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING + set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE) # Set the possible values of build type for cmake-gui set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" @@ -84,90 +94,221 @@ if (MSVC) endif() -if (ERT_USE_OPENMP) - find_package(OpenMP) - if (OPENMP_FOUND) - message(STATUS "Enabling OpenMP support") - # The actual use of OpenMP is only in the libecl library - the compile flags is only applied there. - else() - set( ERT_USE_OPENMP OFF ) - message(STATUS "OpenMP package not found - OpenMP disabled") - endif() -endif() - list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules) find_package(CXX11Features) +#----------------------------------------------------------------- +# create targets for (required and optional) dependencies to link to + +find_package(OpenMP) +if (NOT OPENMP_FOUND) + message(STATUS "OpenMP package not found") + set(ERT_USE_OPENMP OFF) +endif () + +if (NOT ERT_USE_OPENMP) + message(STATUS "OpenMP disabled") +endif () + +# when cmake can be upgraded to >= 3.0, dependencies should be implemented +# either via target-providing FindLib.cmake: +# ``` +# find_package(Threads) +# target_link_libraries(lib Threads::Threads) +# ``` +# +# or via INTERFACE libraries: +# add_library(m INTERFACE) +# find_library(M_LIBRARY NAMES m) +# if (M_LIBRARY) +# target_link_libraries(m ${M_LIBRARY}) +# endif () +# target_link_libraries(m ${M_LIBRARY}) +# +# These targets can then be exported along with targets provided by this +# project. Linking against cmake interface targets will handle include +# directories better than raw names given to target_link_libraries + +set(CMAKE_THREAD_PREFER_PTHREAD ON) +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads) +if (CMAKE_USE_PTHREADS_INIT) + set(HAVE_PTHREAD TRUE) + set(ERT_HAVE_THREAD_POOL ON) + + set(pthread "${CMAKE_THREAD_LIBS_INIT}") + + if (THREADS_HAVE_PTHREAD_ARG) + set(pthreadarg "-pthread") + endif () +endif () + +set(dl "${CMAKE_DL_LIBS}") + +find_library(M_LIBRARY NAMES m) +if(M_LIBRARY) + set(m m) +endif () + +find_package(BLAS) +if (BLAS_FOUND) + set(blas "${BLAS_LIBRARIES}") +endif () + +set(ERT_HAVE_LAPACK OFF) +find_package(LAPACK) +if (LAPACK_FOUND) + set(ERT_HAVE_LAPACK ON) + list(APPEND lapack ${LAPACK_LIBRARIES} ${LAPACK_LINKER_FLAGS}) +endif() + +find_package(ZLIB) +if (ZLIB_FOUND) + set(ERT_HAVE_ZLIB ON) + set(zlib "${ZLIB_LIBRARIES}") +endif () + +find_library(SHLWAPI_LIBRARY NAMES Shlwapi) +if (SHLWAPI_LIBRARY) + set(shlwapi ${SHLWAPI_LIBRARY}) +endif () #----------------------------------------------------------------- -# Checking based on compiling. Some of the code generates warnings, so we just cut down to bare-bone compiler flags. +# feature tests +include(CheckFunctionExists) +include(CheckIncludeFile) +include(CheckSymbolExists) +include(CheckTypeSize) -set( CMAKE_C_FLAGS_main ${CMAKE_C_FLAGS} ) -set( CMAKE_CXX_FLAGS_main ${CMAKE_CXX_FLAGS} ) +check_function_exists( chdir HAVE_POSIX_CHDIR ) +check_function_exists( _chdir HAVE_WINDOWS_CHDIR ) +check_function_exists( chmod HAVE_CHMOD ) +check_function_exists( fnmatch HAVE_FNMATCH ) +check_function_exists( fork HAVE_FORK ) +check_function_exists( fseeko HAVE_FSEEKO ) +check_function_exists( fsync HAVE_FSYNC ) +check_function_exists( ftruncate HAVE_FTRUNCATE ) +check_function_exists( getcwd HAVE_POSIX_GETCWD) +check_function_exists( _getcwd HAVE_WINDOWS_GETCWD) +check_function_exists( getpwuid HAVE_GETPWUID ) +check_function_exists( GetTempPath HAVE_WINDOWS_GET_TEMP_PATH ) +check_function_exists( getuid ERT_HAVE_GETUID ) +check_function_exists( glob ERT_HAVE_GLOB ) +check_function_exists( gmtime_r HAVE_GMTIME_R ) +check_function_exists( localtime_r HAVE_LOCALTIME_R ) +check_function_exists( lockf ERT_HAVE_LOCKF ) +check_function_exists( mkdir HAVE_POSIX_MKDIR) +check_function_exists( _mkdir HAVE_WINDOWS_MKDIR) +check_function_exists( opendir ERT_HAVE_OPENDIR ) +check_function_exists( posix_spawn ERT_HAVE_SPAWN ) +check_function_exists( pthread_timedjoin_np HAVE_TIMEDJOIN) +check_function_exists( pthread_yield HAVE_YIELD) +check_function_exists( pthread_yield_np HAVE_YIELD_NP) +check_function_exists( readlinkat ERT_HAVE_READLINKAT ) +check_function_exists( realpath HAVE_REALPATH ) +check_function_exists( regexec ERT_HAVE_REGEXP ) +check_function_exists( round HAVE_ROUND ) +check_function_exists( setenv HAVE_POSIX_SETENV ) +check_function_exists( symlink ERT_HAVE_SYMLINK ) +check_function_exists( timegm HAVE_TIMEGM ) +check_function_exists( usleep HAVE__USLEEP ) -if (NOT ERT_WINDOWS) - set( CMAKE_C_FLAGS_main "${CMAKE_C_FLAGS} -std=gnu99" ) +check_symbol_exists(_tzname time.h HAVE_WINDOWS_TZNAME) +check_symbol_exists( tzname time.h HAVE_TZNAME) + +check_include_file(execinfo.h HAVE_EXECINFO) +check_include_file(getopt.h ERT_HAVE_GETOPT) +check_include_file(unistd.h ERT_HAVE_UNISTD) + +check_type_size(time_t SIZE_OF_TIME_T) +if (${SIZE_OF_TIME_T} EQUAL 8) + try_run(RUN_RESULT COMPILE_RESULT ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_mktime_before1970.c) + if (${COMPILE_RESULT}) + if (${RUN_RESULT} EQUAL 0) + set( ERT_TIME_T_64BIT_ACCEPT_PRE1970 ON ) + endif() + endif() endif() -set( ERT_EXTERNAL_UTIL_LIBS "" ) -include(cmake/ert_build_check.cmake) -include(cmake/ert_api_check.cmake) -include(cmake/ert_lib_check.cmake) +try_compile( HAVE_VA_COPY ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_va_copy.c ) +try_compile( HAVE_SIGBUS ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_have_sigbus.c ) +try_compile( HAVE_PID_T ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_pid_t.c ) +try_compile( HAVE_MODE_T ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_mode_t.c ) +try_compile( ERT_HAVE_ISFINITE ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_isfinite.c) -set( CMAKE_C_FLAGS ${CMAKE_C_FLAGS_main} ) -set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_main} ) +set( BUILD_CXX ON ) +try_compile( HAVE_CXX_SHARED_PTR ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_shared_ptr.cpp ) +if (NOT HAVE_CXX_SHARED_PTR) + set( BUILD_CXX OFF ) +endif() -include(cmake/Modules/UseMultiArch.cmake) -include(cmake/ert_link.cmake) +if (HAVE_FORK AND HAVE_PTHREAD AND HAVE_EXECINFO AND HAVE_GETPWUID) + set( HAVE_UTIL_ABORT_INTERCEPT ON) + set( HAVE_BACKTRACE ON) +endif() + +if (ERT_WINDOWS) + if (CMAKE_SIZEOF_VOID_P EQUAL 8) + set( ERT_WINDOWS_LFS ON ) + endif() +endif() + +find_program(PING_PATH NAMES ping) +if (PING_PATH) + set(ERT_HAVE_PING ON) +endif() + +find_package(Git) +if(GIT_FOUND) + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GIT_COMMIT + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GIT_COMMIT_SHORT + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +else() + set( GIT_COMMIT "unknown (git not found!)") + set( GIT_COMMIT_SHORT "unknown (git not found!)") + message( WARNING "Git not found. Build will not contain git revision info." ) +endif() + +if (ERT_WINDOWS) + execute_process(COMMAND cmd.exe /c "echo %date% %time%" OUTPUT_VARIABLE BUILD_TIME) +else() # Linux or Darwin + execute_process(COMMAND date "+%Y-%m-%d %H:%M:%S" OUTPUT_VARIABLE BUILD_TIME) +endif() +string(STRIP ${BUILD_TIME} BUILD_TIME) #----------------------------------------------------------------- set(INSTALL_GROUP "" CACHE STRING "Group to install as - blank to install as current group") -set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) -set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin) - - if (MSVC) add_definitions( -D__func__="\\"????\\"") endif() +if (ERT_WINDOWS) + message(WARNING "Python is not supported on Windows") + set( BUILD_PYTHON OFF ) +endif () + if (ERT_LINUX) - set( NEED_LIBM TRUE ) - set( LINK_STATIC FALSE ) add_definitions( -DHAVE_PROC ) -else() - set( NEED_LIBM FALSE ) - set( LINK_STATIC TRUE ) endif() -include_directories( ${PROJECT_SOURCE_DIR}/libert_util/include ) -include_directories( ${PROJECT_BINARY_DIR}/libert_util/include ) -if (MSVC) - include_directories( ${PROJECT_BINARY_DIR}/libert_util/include/ert/util ) -endif() -add_subdirectory( libert_util ) +add_subdirectory( lib ) +add_subdirectory( applications ) -include_directories( ${PROJECT_SOURCE_DIR}/libgeometry/include ) -add_subdirectory( libgeometry ) - -include_directories( ${PROJECT_SOURCE_DIR}/libecl/include ) -add_subdirectory( libecl ) - -if (ERT_BUILD_CXX) - include_directories( ${PROJECT_SOURCE_DIR}/libert_utilxx/include ) - include_directories( ${PROJECT_SOURCE_DIR}/libeclxx/include ) - - add_subdirectory( libert_utilxx ) - add_subdirectory( libeclxx ) -endif() - -include_directories( ${PROJECT_SOURCE_DIR}/libecl_well/include ) -add_subdirectory( libecl_well ) - if (BUILD_PYTHON) if (ERT_WINDOWS) message(WARNING "Python is not supported on Windows") @@ -178,7 +319,7 @@ if (BUILD_PYTHON) # will be set to OFF. add_subdirectory( python ) - if(ERT_DOC) + if(RST_DOC) add_subdirectory( docs ) endif() endif() @@ -190,10 +331,6 @@ if (BUILD_PYTHON) endif() endif() - - -configure_file( cmake/libecl-config.cmake.in libecl-config.cmake @ONLY) -configure_file( cmake/libecl-config-version.cmake.in libecl-config-version.cmake @ONLY) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libecl-config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/libecl-config-version.cmake - DESTINATION lib/libecl ) +install(EXPORT ecl-config DESTINATION share/cmake/ecl) +export(TARGETS ecl FILE eclConfig.cmake) +export(PACKAGE ecl) diff --git a/ThirdParty/Ert/applications/CMakeLists.txt b/ThirdParty/Ert/applications/CMakeLists.txt new file mode 100644 index 0000000000..bc6d65b81b --- /dev/null +++ b/ThirdParty/Ert/applications/CMakeLists.txt @@ -0,0 +1,87 @@ +project(libecl-applications) + +if (NOT BUILD_APPLICATIONS) + return () +endif () + +add_executable(sum_write ecl/sum_write.c) +add_executable(make_grid ecl/make_grid.c) +add_executable(grdecl_grid ecl/grdecl_grid.c) +add_executable(summary ecl/view_summary.c) +target_link_libraries(sum_write ecl) +target_link_libraries(make_grid ecl) +target_link_libraries(grdecl_grid ecl) +target_link_libraries(summary ecl) + +list(APPEND apps make_grid grdecl_grid summary) + +foreach (app ecl_pack + ecl_unpack + kw_extract + grid_info + grid_dump + grid_dump_ascii + select_test + load_test + ) + add_executable(${app} ecl/${app}.c) + target_link_libraries(${app} ecl) + list(APPEND apps ${app}) + if (ERT_LINUX) + # The stupid .x extension creates problems on windows + set_target_properties(${app} PROPERTIES SUFFIX ".x") + endif () +endforeach () + + +if (ERT_LINUX) + foreach (app convert esummary grdecl_test kw_list) + add_executable(${app} ecl/${app}.c) + target_link_libraries(${app} ecl) + # The stupid .x extension creates problems on windows + set_target_properties(${app} PROPERTIES SUFFIX ".x") + list(APPEND apps ${app}) + endforeach () + + set_target_properties(summary PROPERTIES SUFFIX ".x") +endif () + + +# This minor eclipse application depends on the config parser library +# and should be moved to the libres repository - it can not be +# built here. +if (BUILD_ERT) + add_executable( ecl_quantile ecl/ecl_quantile.c ) + target_link_libraries( ecl_quantile config ) + list(APPEND apps ecl_quantile) +endif() + +if (BUILD_ECL_SUMMARY) + add_executable(ecl_summary ecl/view_summary.c) + target_link_libraries(ecl_summary ecl) + list(APPEND apps ecl_summary) + + install(FILES ${PROJECT_SOURCE_DIR}/man/man1/ecl_summary.1 + DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) +endif() + +if (PTHREAD_LIBRARY) + add_executable(bls block_fs/bls.c) + target_link_libraries(bls ecl) + list(APPEND apps bls) +endif () + +add_executable(segment_info well/segment_info.c) +add_executable(CF_dump well/well_CF_dump.c) +add_executable(ri_well_test well/ri_well_test.c) + +target_link_libraries(segment_info ecl) +target_link_libraries(CF_dump ecl) +target_link_libraries(ri_well_test ecl) + +list(APPEND apps segment_info CF_dump ri_well_test) + +install(TARGETS ${apps} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/bcp.c b/ThirdParty/Ert/applications/block_fs/bcp.c similarity index 100% rename from ThirdParty/Ert/libert_util/applications/block_fs/bcp.c rename to ThirdParty/Ert/applications/block_fs/bcp.c diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/bfs_extract.c b/ThirdParty/Ert/applications/block_fs/bfs_extract.c similarity index 100% rename from ThirdParty/Ert/libert_util/applications/block_fs/bfs_extract.c rename to ThirdParty/Ert/applications/block_fs/bfs_extract.c diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/block_fs_test.c b/ThirdParty/Ert/applications/block_fs/block_fs_test.c similarity index 100% rename from ThirdParty/Ert/libert_util/applications/block_fs/block_fs_test.c rename to ThirdParty/Ert/applications/block_fs/block_fs_test.c diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/bls.c b/ThirdParty/Ert/applications/block_fs/bls.c similarity index 100% rename from ThirdParty/Ert/libert_util/applications/block_fs/bls.c rename to ThirdParty/Ert/applications/block_fs/bls.c diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/brm.c b/ThirdParty/Ert/applications/block_fs/brm.c similarity index 100% rename from ThirdParty/Ert/libert_util/applications/block_fs/brm.c rename to ThirdParty/Ert/applications/block_fs/brm.c diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/brot.c b/ThirdParty/Ert/applications/block_fs/brot.c similarity index 100% rename from ThirdParty/Ert/libert_util/applications/block_fs/brot.c rename to ThirdParty/Ert/applications/block_fs/brot.c diff --git a/ThirdParty/Ert/libecl/applications/convert.c b/ThirdParty/Ert/applications/ecl/convert.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/convert.c rename to ThirdParty/Ert/applications/ecl/convert.c diff --git a/ThirdParty/Ert/libecl/applications/ecl_pack.c b/ThirdParty/Ert/applications/ecl/ecl_pack.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/ecl_pack.c rename to ThirdParty/Ert/applications/ecl/ecl_pack.c diff --git a/ThirdParty/Ert/libecl/applications/ecl_quantile.c b/ThirdParty/Ert/applications/ecl/ecl_quantile.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/ecl_quantile.c rename to ThirdParty/Ert/applications/ecl/ecl_quantile.c diff --git a/ThirdParty/Ert/libecl/applications/ecl_unpack.c b/ThirdParty/Ert/applications/ecl/ecl_unpack.c similarity index 92% rename from ThirdParty/Ert/libecl/applications/ecl_unpack.c rename to ThirdParty/Ert/applications/ecl/ecl_unpack.c index 409d989c1f..71c6f3492d 100644 --- a/ThirdParty/Ert/libecl/applications/ecl_unpack.c +++ b/ThirdParty/Ert/applications/ecl/ecl_unpack.c @@ -72,13 +72,13 @@ void unpack_file(const char * filename) { break; if (target_type == ECL_SUMMARY_FILE) { - active_view = ecl_file_alloc_global_blockview(src_file, SEQHDR_KW, block_index); + active_view = ecl_file_get_global_blockview(src_file, SEQHDR_KW, block_index); report_step += 1; offset = 0; } else { ecl_kw_type * seqnum_kw; - active_view = ecl_file_alloc_global_blockview(src_file, SEQNUM_KW, block_index); - seqnum_kw = ecl_file_iget_named_kw( src_file , SEQNUM_KW , 0); + active_view = ecl_file_get_global_blockview(src_file, SEQNUM_KW, block_index); + seqnum_kw = ecl_file_view_iget_named_kw( active_view , SEQNUM_KW , 0); report_step = ecl_kw_iget_int( seqnum_kw , 0); offset = 1; } @@ -100,7 +100,6 @@ void unpack_file(const char * filename) { free(target_file); } block_index++; - ecl_file_view_free( active_view ); } ecl_file_close( src_file ); util_safe_free(path); diff --git a/ThirdParty/Ert/libecl/applications/esummary.c b/ThirdParty/Ert/applications/ecl/esummary.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/esummary.c rename to ThirdParty/Ert/applications/ecl/esummary.c diff --git a/ThirdParty/Ert/libecl/applications/grdecl_grid.c b/ThirdParty/Ert/applications/ecl/grdecl_grid.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/grdecl_grid.c rename to ThirdParty/Ert/applications/ecl/grdecl_grid.c diff --git a/ThirdParty/Ert/libecl/applications/grdecl_test.c b/ThirdParty/Ert/applications/ecl/grdecl_test.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/grdecl_test.c rename to ThirdParty/Ert/applications/ecl/grdecl_test.c diff --git a/ThirdParty/Ert/libecl/applications/grid_dump.c b/ThirdParty/Ert/applications/ecl/grid_dump.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/grid_dump.c rename to ThirdParty/Ert/applications/ecl/grid_dump.c diff --git a/ThirdParty/Ert/libecl/applications/grid_dump_ascii.c b/ThirdParty/Ert/applications/ecl/grid_dump_ascii.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/grid_dump_ascii.c rename to ThirdParty/Ert/applications/ecl/grid_dump_ascii.c diff --git a/ThirdParty/Ert/libecl/applications/grid_info.c b/ThirdParty/Ert/applications/ecl/grid_info.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/grid_info.c rename to ThirdParty/Ert/applications/ecl/grid_info.c diff --git a/ThirdParty/Ert/libecl/applications/grid_layer.c b/ThirdParty/Ert/applications/ecl/grid_layer.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/grid_layer.c rename to ThirdParty/Ert/applications/ecl/grid_layer.c diff --git a/ThirdParty/Ert/libecl/applications/key_list.c b/ThirdParty/Ert/applications/ecl/key_list.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/key_list.c rename to ThirdParty/Ert/applications/ecl/key_list.c diff --git a/ThirdParty/Ert/libecl/applications/kw_extract.c b/ThirdParty/Ert/applications/ecl/kw_extract.c similarity index 97% rename from ThirdParty/Ert/libecl/applications/kw_extract.c rename to ThirdParty/Ert/applications/ecl/kw_extract.c index 04256d7979..a578b5abfa 100644 --- a/ThirdParty/Ert/libecl/applications/kw_extract.c +++ b/ThirdParty/Ert/applications/ecl/kw_extract.c @@ -65,7 +65,7 @@ int main(int argc, char ** argv) { { ecl_kw_type * ecl_kw = ecl_kw_alloc_empty(); while (true) { - if (ecl_kw_fread_header( ecl_kw , fortio_src )) { + if (ecl_kw_fread_header( ecl_kw , fortio_src ) == ECL_KW_READ_OK) { const char * header = ecl_kw_get_header( ecl_kw ); if (set_has_key( kw_set , header )) { ecl_kw_fread_realloc_data(ecl_kw , fortio_src ); diff --git a/ThirdParty/Ert/libecl/applications/kw_list.c b/ThirdParty/Ert/applications/ecl/kw_list.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/kw_list.c rename to ThirdParty/Ert/applications/ecl/kw_list.c diff --git a/ThirdParty/Ert/libecl/applications/load_test.c b/ThirdParty/Ert/applications/ecl/load_test.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/load_test.c rename to ThirdParty/Ert/applications/ecl/load_test.c diff --git a/ThirdParty/Ert/libecl/applications/make_grid.c b/ThirdParty/Ert/applications/ecl/make_grid.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/make_grid.c rename to ThirdParty/Ert/applications/ecl/make_grid.c diff --git a/ThirdParty/Ert/libecl/applications/run_gravity.c b/ThirdParty/Ert/applications/ecl/run_gravity.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/run_gravity.c rename to ThirdParty/Ert/applications/ecl/run_gravity.c diff --git a/ThirdParty/Ert/libecl/applications/select_test.c b/ThirdParty/Ert/applications/ecl/select_test.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/select_test.c rename to ThirdParty/Ert/applications/ecl/select_test.c diff --git a/ThirdParty/Ert/libecl/applications/sum_write.c b/ThirdParty/Ert/applications/ecl/sum_write.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/sum_write.c rename to ThirdParty/Ert/applications/ecl/sum_write.c diff --git a/ThirdParty/Ert/libecl/applications/summary2csv2.c b/ThirdParty/Ert/applications/ecl/summary2csv2.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/summary2csv2.c rename to ThirdParty/Ert/applications/ecl/summary2csv2.c diff --git a/ThirdParty/Ert/libecl/applications/view_restart.c b/ThirdParty/Ert/applications/ecl/view_restart.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/view_restart.c rename to ThirdParty/Ert/applications/ecl/view_restart.c diff --git a/ThirdParty/Ert/libecl/applications/view_rft.c b/ThirdParty/Ert/applications/ecl/view_rft.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/view_rft.c rename to ThirdParty/Ert/applications/ecl/view_rft.c diff --git a/ThirdParty/Ert/libecl/applications/view_summary.c b/ThirdParty/Ert/applications/ecl/view_summary.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/view_summary.c rename to ThirdParty/Ert/applications/ecl/view_summary.c diff --git a/ThirdParty/Ert/libecl/applications/vprofile.c b/ThirdParty/Ert/applications/ecl/vprofile.c similarity index 100% rename from ThirdParty/Ert/libecl/applications/vprofile.c rename to ThirdParty/Ert/applications/ecl/vprofile.c diff --git a/ThirdParty/Ert/libecl/applications/example_ens_plot_batch_file b/ThirdParty/Ert/applications/example_ens_plot_batch_file similarity index 100% rename from ThirdParty/Ert/libecl/applications/example_ens_plot_batch_file rename to ThirdParty/Ert/applications/example_ens_plot_batch_file diff --git a/ThirdParty/Ert/libgeometry/applications/irap_test.c b/ThirdParty/Ert/applications/irap_test.c similarity index 100% rename from ThirdParty/Ert/libgeometry/applications/irap_test.c rename to ThirdParty/Ert/applications/irap_test.c diff --git a/ThirdParty/Ert/docs/man/man1/ecl_summary.1 b/ThirdParty/Ert/applications/man/man1/ecl_summary.1 similarity index 100% rename from ThirdParty/Ert/docs/man/man1/ecl_summary.1 rename to ThirdParty/Ert/applications/man/man1/ecl_summary.1 diff --git a/ThirdParty/Ert/libgeometry/applications/polygon_test.c b/ThirdParty/Ert/applications/polygon_test.c similarity index 100% rename from ThirdParty/Ert/libgeometry/applications/polygon_test.c rename to ThirdParty/Ert/applications/polygon_test.c diff --git a/ThirdParty/Ert/libecl_well/applications/ri_well_test.c b/ThirdParty/Ert/applications/well/ri_well_test.c similarity index 100% rename from ThirdParty/Ert/libecl_well/applications/ri_well_test.c rename to ThirdParty/Ert/applications/well/ri_well_test.c diff --git a/ThirdParty/Ert/libecl_well/applications/segment_info.c b/ThirdParty/Ert/applications/well/segment_info.c similarity index 100% rename from ThirdParty/Ert/libecl_well/applications/segment_info.c rename to ThirdParty/Ert/applications/well/segment_info.c diff --git a/ThirdParty/Ert/libecl_well/applications/well_CF_dump.c b/ThirdParty/Ert/applications/well/well_CF_dump.c similarity index 100% rename from ThirdParty/Ert/libecl_well/applications/well_CF_dump.c rename to ThirdParty/Ert/applications/well/well_CF_dump.c diff --git a/ThirdParty/Ert/cmake/Modules/FindCXX11Features.cmake b/ThirdParty/Ert/cmake/Modules/FindCXX11Features.cmake index 0b79c32344..13b25e3856 100644 --- a/ThirdParty/Ert/cmake/Modules/FindCXX11Features.cmake +++ b/ThirdParty/Ert/cmake/Modules/FindCXX11Features.cmake @@ -1,19 +1,22 @@ # # Module that checks for supported C++11 (former C++0x) features. # -if(CMAKE_VERSION VERSION_LESS 3.1) - if(NOT MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - endif() - if(NOT ERT_WINDOWS) - set( CMAKE_CXX_FLAGS_main "${CMAKE_CXX_FLAGS} -std=c++11") - endif() -else() - if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 11) - endif() - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) + +include(CheckCXXCompilerFlag) +if (NOT MSVC) + CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) + CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) + + if(COMPILER_SUPPORTS_CXX11) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + elseif(COMPILER_SUPPORTS_CXX0X) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") + else() + message(SEND_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.") + endif() endif() +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + set(CXX11FEATURES_FOUND TRUE) diff --git a/ThirdParty/Ert/cmake/ert_api_check.cmake b/ThirdParty/Ert/cmake/ert_api_check.cmake index 1362cd0235..4e0fbe9d74 100644 --- a/ThirdParty/Ert/cmake/ert_api_check.cmake +++ b/ThirdParty/Ert/cmake/ert_api_check.cmake @@ -8,72 +8,5 @@ # have a ERT_ prefix. The generated header is part of the api and can be # included by other header files in the ert source. -find_library( BLAS_LIBRARY NAMES blas) -if (BLAS_LIBRARY) - set(ERT_HAVE_BLAS ON) -endif() - -find_library( LAPACK_LIBRARY NAMES lapack) -if (LAPACK_LIBRARY) - set(ERT_HAVE_LAPACK ON) -else() - set(ERT_HAVE_LAPACK OFF) -endif() - #----------------------------------------------------------------- -find_library( ZLIB_LIBRARY NAMES z ) -find_path( ZLIB_HEADER zlib.h /usr/include ) -if (ZLIB_LIBRARY AND ZLIB_HEADER) - set( ERT_HAVE_ZLIB ON ) -else() - if(NOT DEFINED ZLIB_LIBRARY) - message(STATUS "ZLib library not found - zlib support will not be included." ) - endif() - if(NOT DEFINED ZLIB_HEADER) - message(STATUS "zlib.h not found - zlib support will not be included.") - endif() -endif() -#----------------------------------------------------------------- - -try_compile( ERT_HAVE_ISFINITE ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_isfinite.c ) -find_path( ERT_HAVE_GETOPT getopt.h /usr/include ) -find_path( ERT_HAVE_UNISTD unistd.h /usr/include ) - -check_function_exists( posix_spawn ERT_HAVE_SPAWN ) -check_function_exists( opendir ERT_HAVE_OPENDIR ) -check_function_exists( symlink ERT_HAVE_SYMLINK ) -check_function_exists( readlinkat ERT_HAVE_READLINKAT ) -check_function_exists( glob ERT_HAVE_GLOB ) -check_function_exists( getuid ERT_HAVE_GETUID ) -check_function_exists( regexec ERT_HAVE_REGEXP ) -check_function_exists( lockf ERT_HAVE_LOCKF ) - - -check_type_size(time_t SIZE_OF_TIME_T) -if (${SIZE_OF_TIME_T} EQUAL 8) - try_run( RUN_RESULT COMPILE_RESULT ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_mktime_before1970.c ) - if (${COMPILE_RESULT}) - if (${RUN_RESULT} EQUAL 0) - set( ERT_TIME_T_64BIT_ACCEPT_PRE1970 ON ) - endif() - endif() -endif() - - -if (ERT_WINDOWS) - if (CMAKE_SIZEOF_VOID_P EQUAL 8) - set( ERT_WINDOWS_LFS ON ) - endif() -endif() - - -if (HAVE_PTHREAD) - set( ERT_HAVE_THREAD_POOL ON ) -endif() - - -find_program(PING_PATH NAMES ping) -if (PING_PATH) - set( ERT_HAVE_PING ON ) -endif() diff --git a/ThirdParty/Ert/cmake/ert_build_check.cmake b/ThirdParty/Ert/cmake/ert_build_check.cmake index ea9d7b9c14..14a2e474c3 100644 --- a/ThirdParty/Ert/cmake/ert_build_check.cmake +++ b/ThirdParty/Ert/cmake/ert_build_check.cmake @@ -6,75 +6,3 @@ # # Check which affect the final api are implemented in the # ert_api_check.cmake file. - -find_library( PTHREAD_LIBRARY NAMES pthread ) -if (PTHREAD_LIBRARY) - set( HAVE_PTHREAD ON ) - set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} pthread) -endif() - -if (UNIX) - set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} m ) - set( ERT_EXTERNAL_UTIL_LIBS ${ERT_EXTERNAL_UTIL_LIBS} m ) -endif(UNIX) - - -check_function_exists( localtime_r HAVE_LOCALTIME_R ) -check_function_exists( gmtime_r HAVE_GMTIME_R ) -check_function_exists( realpath HAVE_REALPATH ) -check_function_exists( usleep HAVE__USLEEP ) -check_function_exists( fnmatch HAVE_FNMATCH ) -check_function_exists( ftruncate HAVE_FTRUNCATE ) -check_function_exists( round HAVE_ROUND ) -check_function_exists( GetTempPath HAVE_WINDOWS_GET_TEMP_PATH ) -check_function_exists( fork HAVE_FORK ) -check_function_exists( getpwuid HAVE_GETPWUID ) -check_function_exists( fsync HAVE_FSYNC ) -check_function_exists( setenv HAVE_POSIX_SETENV ) -check_function_exists( chmod HAVE_CHMOD ) -check_function_exists( pthread_timedjoin_np HAVE_TIMEDJOIN) -check_function_exists( pthread_yield_np HAVE_YIELD_NP) -check_function_exists( pthread_yield HAVE_YIELD) -check_function_exists( fseeko HAVE_FSEEKO ) -check_function_exists( timegm HAVE_TIMEGM ) - -check_function_exists( _mkdir HAVE_WINDOWS_MKDIR) -if (NOT HAVE_WINDOWS_MKDIR) - check_function_exists( mkdir HAVE_POSIX_MKDIR) -endif() - - -check_function_exists( _chdir HAVE_WINDOWS_CHDIR) -if (NOT HAVE_WINDOWS_CHDIR) - check_function_exists( chdir HAVE_POSIX_CHDIR) -endif() - -check_function_exists( _getcwd HAVE_WINDOWS_GETCWD) -if (NOT HAVE_WINDOWS_GETCWD) - check_function_exists( getcwd HAVE_POSIX_GETCWD) -endif() - - -include(CheckSymbolExists) -check_symbol_exists(_tzname time.h HAVE_WINDOWS_TZNAME) -check_symbol_exists( tzname time.h HAVE_TZNAME) - -find_path( HAVE_EXECINFO execinfo.h /usr/include ) - -try_compile( HAVE_VA_COPY ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_va_copy.c ) -try_compile( HAVE_SIGBUS ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_have_sigbus.c ) -try_compile( HAVE_PID_T ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_pid_t.c ) -try_compile( HAVE_MODE_T ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_mode_t.c ) - - -set( BUILD_CXX ON ) -try_compile( HAVE_CXX_SHARED_PTR ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/Tests/test_shared_ptr.cpp ) -if (NOT HAVE_CXX_SHARED_PTR) - set( BUILD_CXX OFF ) -endif() - -if (HAVE_FORK AND HAVE_PTHREAD AND HAVE_EXECINFO AND HAVE_GETPWUID) - set( HAVE_UTIL_ABORT_INTERCEPT ON) - set( HAVE_BACKTRACE ON) -endif() - diff --git a/ThirdParty/Ert/cmake/ert_lib_check.cmake b/ThirdParty/Ert/cmake/ert_lib_check.cmake index 2aa4c851f7..e8418d65ce 100644 --- a/ThirdParty/Ert/cmake/ert_lib_check.cmake +++ b/ThirdParty/Ert/cmake/ert_lib_check.cmake @@ -1,30 +1,3 @@ # This file contains various checks which will append to the list # $ERT_EXTERNAL_UTIL_LIBS which should contain all the external library # dependencies. Observe that all library dependencies go transitively -# through the ert_util library. - -if (ERT_HAVE_LAPACK) - set( ERT_EXTERNAL_UTIL_LIBS ${ERT_EXTERNAL_UTIL_LIBS} ${LAPACK_LIBRARY} ${BLAS_LIBRARY}) - set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LAPACK_LIBRARY} ${BLAS_LIBRARY}) -endif() - - -if (ERT_WINDOWS) - find_library( SHLWAPI_LIBRARY NAMES Shlwapi ) - set( ERT_EXTERNAL_UTIL_LIBS ${ERT_EXTERNAL_UTIL_LIBS} Shlwapi ) -endif() - - -if (ERT_HAVE_ZLIB) - set( ERT_EXTERNAL_UTIL_LIBS ${ERT_EXTERNAL_UTIL_LIBS} ${ZLIB_LIBRARY} ) -endif() - -if (HAVE_PTHREAD) - set( ERT_EXTERNAL_UTIL_LIBS ${ERT_EXTERNAL_UTIL_LIBS} ${PTHREAD_LIBRARY} ) -endif() - -find_library( DL_LIBRARY NAMES dl ) -find_path( DLFUNC_HEADER dlfcn.h ) -if (DL_LIBRARY AND DLFUNC_HEADER) - set( ERT_EXTERNAL_UTIL_LIBS ${ERT_EXTERNAL_UTIL_LIBS} ${DL_LIBRARY} ) -endif() \ No newline at end of file diff --git a/ThirdParty/Ert/docs/CMakeLists.txt b/ThirdParty/Ert/docs/CMakeLists.txt index 512cb8408a..3df3fbdcd6 100644 --- a/ThirdParty/Ert/docs/CMakeLists.txt +++ b/ThirdParty/Ert/docs/CMakeLists.txt @@ -1,85 +1,39 @@ -option( ERT_RST_DOC "Build RST based documentation" ON) -option( ERT_DOXY_DOC "Build doxygen documentation" ON) -option( ERT_DOXY_GRAPHICAL "Add graphics to doxygen documentation" OFF) +find_package(Sphinx REQUIRED) +if (SPHINX_FOUND) + set( ERT_DOC_INSTALL_PATH "" CACHE PATH "Absolute path to install documentation *in addition* to $PREFIX/documentation") + set( ERT_DOC_EXTERNAL_ROOT "" CACHE PATH "Path to site local ERT documentation") -if (NOT BUILD_ERT) - if (ERT_RST_DOC) - message(WARNING "Turning off ERT_RST_DOC. Depends on BUILD_ERT.") - set (ERT_RST_DOC OFF) - endif() - if (ERT_DOXY_DOC) - message(WARNING "Turning off ERT_DOXY_DOC. Depends on BUILD_ERT.") - set (ERT_DOXY_DOC OFF) - endif() -endif() - -if (ERT_RST_DOC) - find_package(Sphinx REQUIRED) - if (SPHINX_FOUND) - set( ERT_DOC_INSTALL_PATH "" CACHE PATH "Absolute path to install documentation *in addition* to $PREFIX/documentation") - set( ERT_DOC_EXTERNAL_ROOT "" CACHE PATH "Path to site local ERT documentation") - - file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/doc-src") - file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/doc-src/_static") - EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/user" "${PROJECT_BINARY_DIR}/doc-src/user") - - if (ERT_DOC_EXTERNAL_ROOT) - EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink "${ERT_DOC_EXTERNAL_ROOT}" "${PROJECT_BINARY_DIR}/doc-src/external-doc") - message(STATUS "Adding documentation link ${PROJECT_BINARY_DIR}/doc-src/external-doc -> ${ERT_DOC_EXTERNAL_ROOT}") - set( ERT_DOC_LINK external-doc/index ) - else() - set( ERT_DOC_LINK "" ) - endif() - - configure_file(index.rst.in ${PROJECT_BINARY_DIR}/doc-src/index.rst) - configure_file(conf.py.in ${PROJECT_BINARY_DIR}/doc-src/conf.py) - - if (BUILD_PYTHON) - EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/code" "${PROJECT_BINARY_DIR}/doc-src/code") - add_custom_target(api-doc ALL - COMMAND sphinx-apidoc -e -o doc-src/API/python ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX} - DEPENDS enkf - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) - endif() - - add_custom_target(rst-doc ALL - COMMAND sphinx-build -b html -d doc-src/doctrees doc-src documentation/rst - WORKING_DIRECTORY ${PROJECT_BINARY_DIR} - DEPENDS api-doc - ) + file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/doc-src") + file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/doc-src/_static") + EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/user" "${PROJECT_BINARY_DIR}/doc-src/user") + if (ERT_DOC_EXTERNAL_ROOT) + EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink "${ERT_DOC_EXTERNAL_ROOT}" "${PROJECT_BINARY_DIR}/doc-src/external-doc") + message(STATUS "Adding documentation link ${PROJECT_BINARY_DIR}/doc-src/external-doc -> ${ERT_DOC_EXTERNAL_ROOT}") + set( ERT_DOC_LINK external-doc/index ) else() - message(STATUS "Sphinx documentation tool not found - documentation not generated") + set( ERT_DOC_LINK "" ) endif() -endif() + configure_file(index.rst.in ${PROJECT_BINARY_DIR}/doc-src/index.rst) + configure_file(conf.py.in ${PROJECT_BINARY_DIR}/doc-src/conf.py) -if (ERT_DOXY_DOC) - find_package(Doxygen) - if (DOXYGEN_FOUND) - file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/documentation/doxy") - set( DOXYGEN_HAVE_DOT "NO" ) - if ( ERT_DOXY_GRAPHICAL) - if (DOXYGEN_DOT_FOUND) - set( DOXYGEN_HAVE_DOT "YES" ) - endif() - endif() - - if (BUILD_ERT) - SET( DOXYGEN_INPUT "${PROJECT_SOURCE_DIR}/libanalysis ${PROJECT_SOURCE_DIR}/libconfig ${PROJECT_SOURCE_DIR}/libecl ${PROJECT_SOURCE_DIR}/libecl_well ${PROJECT_SOURCE_DIR}/libeclxx ${PROJECT_SOURCE_DIR}/libenkf ${PROJECT_SOURCE_DIR}/libert_util ${PROJECT_SOURCE_DIR}/libert_utilxx ${PROJECT_SOURCE_DIR}/libgeometry ${PROJECT_SOURCE_DIR}/libjob_queue ${PROJECT_SOURCE_DIR}/librms ${PROJECT_SOURCE_DIR}/libsched") - else() - SET( DOXYGEN_INPUT "${PROJECT_SOURCE_DIR}/libecl ${PROJECT_SOURCE_DIR}/libecl_well ${PROJECT_SOURCE_DIR}/libeclxx ${PROJECT_SOURCE_DIR}/libert_util ${PROJECT_SOURCE_DIR}/libert_utilxx ${PROJECT_SOURCE_DIR}/libgeometry") - endif() - - configure_file(doxygen.cfg.in ${PROJECT_BINARY_DIR}/doxygen.cfg) - add_custom_target(doxy ALL - COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/doxygen.cfg - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/../ - COMMENT "Generating doxygen documentation" - DEPENDS enkf) - + if (BUILD_PYTHON) + add_custom_target(api-doc ALL + COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/code" "${PROJECT_BINARY_DIR}/doc-src/code" + COMMAND sphinx-apidoc -e -o doc-src/API/python ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX} + DEPENDS ecl + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) endif() -endif() + add_custom_target(rst-doc ALL + COMMAND sphinx-build -b html -d doc-src/doctrees doc-src documentation/rst + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + DEPENDS api-doc + ) + +else() + message(STATUS "Sphinx documentation tool not found - documentation not generated") +endif() INSTALL( DIRECTORY ${PROJECT_BINARY_DIR}/documentation DESTINATION ${CMAKE_INSTALL_PREFIX} ) diff --git a/ThirdParty/Ert/lib/CMakeLists.txt b/ThirdParty/Ert/lib/CMakeLists.txt new file mode 100644 index 0000000000..450bc95758 --- /dev/null +++ b/ThirdParty/Ert/lib/CMakeLists.txt @@ -0,0 +1,766 @@ +project(libecl-ecl C CXX) + +if (HAVE_PTHREAD) + # The block_fs filesystem is so heavily dependant on pthreads that it is + # not built if de not have pthreads. + list(APPEND opt_srcs util/thread_pool.c util/block_fs.c) +endif () + +if (LAPACK_FOUND) + list(APPEND opt_srcs util/matrix_lapack.c + util/matrix_blas.c + util/matrix_stat.c + util/regression.c + util/lars.c + util/stepwise.c +) +endif () + +if (HAVE_BACKTRACE) + list(APPEND opt_srcs util/util_abort_gnu.c) +else() + list(APPEND opt_srcs util/util_abort_simple.c) +endif() + +if (ERT_HAVE_GETUID AND ERT_HAVE_OPENDIR) + list(APPEND opt_srcs util/test_work_area.c util/util_getuid.c) +endif() + +if (ERT_HAVE_OPENDIR) + list(APPEND opt_srcs util/util_opendir.c) +endif() + +if (ERT_HAVE_SPAWN) + list(APPEND opt_srcs util/util_spawn.c) +endif() + +if (ERT_HAVE_LOCKF) + list(APPEND opt_srcs util/util_lockf.c) +endif () + +if (ERT_HAVE_REGEXP) + list(APPEND opt_srcs util/template_loop.c) +endif () + +if (ERT_HAVE_UNISTD) + list(APPEND opt_srcs util/path_stack.c) +endif () + +if (MSVC) + configure_file(include/ert/util/msvc_stdbool.h ert/util/stdbool.h) +endif () + +foreach (type int double bool long time_t size_t float) + set(TYPE ${type}) + configure_file(vector_template.h.in include/ert/util/${type}_vector.h) + configure_file(util/vector_template.c ${type}_vector.c) + list(APPEND opt_srcs ${CMAKE_CURRENT_BINARY_DIR}/${type}_vector.c) +endforeach () + +if (ZLIB_FOUND) + list(APPEND opt_srcs util/util_zlib.c) +endif () + +if (ERT_BUILD_CXX) + list(APPEND opt_srcs util/TestArea.cpp + ecl/FortIO.cpp + ecl/Smspec.cpp + ecl/EclFilename.cpp +) +endif () + +configure_file(build_config.h.in include/ert/util/build_config.h) +configure_file(ert_api_config.h.in include/ert/util/ert_api_config.h) + +add_library(ecl util/rng.c + util/lookup_table.c + util/statistics.c + util/mzran.c + util/set.c + util/hash_node.c + util/hash_sll.c + util/hash.c + util/node_data.c + util/node_ctype.c + util/util.c + util/util_env.c + util/util_symlink.c + util/util_lfs.c + util/msg.c + util/arg_pack.c + util/path_fmt.c + util/menu.c + util/subst_list.c + util/subst_func.c + util/vector.c + util/parser.c + util/stringlist.c + util/matrix.c + util/buffer.c + util/log.c + util/template.c + util/timer.c + util/time_interval.c + util/string_util.c + util/type_vector_functions.c + util/ui_return.c + util/ert_version.c + util/struct_vector.c + util/perm_vector.c + util/test_util.c + ${opt_srcs} + + ecl/ecl_rsthead.c + ecl/ecl_sum_tstep.c + ecl/ecl_rst_file.c + ecl/ecl_init_file.c + ecl/ecl_grid_cache.c + ecl/smspec_node.c + ecl/ecl_kw_grdecl.c + ecl/ecl_file_kw.c + ecl/ecl_file_view.c + ecl/ecl_grav.c + ecl/ecl_grav_calc.c + ecl/ecl_smspec.c + ecl/ecl_sum_data.c + ecl/ecl_util.c + ecl/ecl_kw.c + ecl/ecl_sum.c + ecl/ecl_sum_vector.c + ecl/fortio.c + ecl/ecl_rft_file.c + ecl/ecl_rft_node.c + ecl/ecl_rft_cell.c + ecl/ecl_grid.c + ecl/ecl_coarse_cell.c + ecl/ecl_box.c + ecl/ecl_io_config.c + ecl/ecl_file.c + ecl/ecl_region.c + ecl/ecl_subsidence.c + ecl/ecl_grid_dims.c + ecl/grid_dims.c + ecl/nnc_info.c + ecl/ecl_grav_common.c + ecl/nnc_vector.c + ecl/ecl_nnc_export.c + ecl/ecl_nnc_data.c + ecl/ecl_nnc_geometry.c + ecl/layer.c + ecl/fault_block.c + ecl/fault_block_layer.c + ecl/ecl_type.c + ecl/ecl_type_python.c + ecl/well_state.c + ecl/well_conn.c + ecl/well_info.c + ecl/well_ts.c + ecl/well_conn_collection.c + ecl/well_segment.c + ecl/well_segment_collection.c + ecl/well_branch_collection.c + ecl/well_rseg_loader.c + + geometry/geo_surface.c + geometry/geo_util.c + geometry/geo_pointset.c + geometry/geo_region.c + geometry/geo_polygon.c + geometry/geo_polygon_collection.c +) + +target_link_libraries(ecl PUBLIC ${m} + ${dl} + ${pthread} + ${blas} + ${lapack} + ${zlib} + ${shlwapi} +) + +target_include_directories(ecl + PUBLIC $ + $ + $ + PRIVATE ${ZLIB_INCLUDE_DIRS} + util + include + ${CMAKE_CURRENT_BINARY_DIR}/include +) + +target_compile_definitions(ecl PRIVATE + -DGIT_COMMIT=${GIT_COMMIT} + -DGIT_COMMIT_SHORT=${GIT_COMMIT_SHORT} + -DERT_VERSION_MAJOR=${ERT_VERSION_MAJOR} + -DERT_VERSION_MINOR=${ERT_VERSION_MINOR} + -DERT_VERSION_MICRO=${ERT_VERSION_MICRO} +) + +target_compile_options(ecl PUBLIC ${pthreadarg}) + +if (PING_PATH) + target_compile_definitions(ecl PRIVATE -DPING_CMD=${PING_PATH}) +endif() + +if (ERT_USE_OPENMP) + target_compile_options(ecl PUBLIC ${OpenMP_C_FLAGS}) + target_link_libraries( ecl PUBLIC ${OpenMP_C_FLAGS}) + target_link_libraries( ecl PUBLIC ${OpenMP_EXE_LINKER_FLAGS}) +endif () + +set_target_properties(ecl PROPERTIES + VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} + SOVERSION ${ERT_VERSION_MAJOR}) + +install(TARGETS ecl + EXPORT ecl-config + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +install(DIRECTORY include/ + DESTINATION include + PATTERN *.h +) +install(DIRECTORY include/ + DESTINATION include + PATTERN *.hpp EXCLUDE +) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ + DESTINATION include + PATTERN *.h +) + +if (ERT_BUILD_CXX) + install(DIRECTORY include/ + DESTINATION include + PATTERN *.hpp +) +endif () + +if (NOT BUILD_TESTS) + return () +endif () + +foreach (name ert_util_alloc_file_components + ert_util_approx_equal + ert_util_arg_pack + ert_util_before_after + ert_util_binary_split + ert_util_buffer + ert_util_clamp + ert_util_filename + ert_util_hash_test + ert_util_logh + ert_util_matrix + ert_util_parent_path + ert_util_PATH_test + ert_util_realpath + ert_util_relpath_test + ert_util_rng + ert_util_sprintf_escape + ert_util_sscan_test + ert_util_statistics + ert_util_strcat_test + ert_util_stringlist_test + ert_util_string_util + ert_util_strstr_int_format + ert_util_subst_list + ert_util_time_interval + ert_util_type_vector_functions + ert_util_ui_return + ert_util_vector_test + ert_util_datetime + ) + + add_executable(${name} util/tests/${name}.c) + target_link_libraries(${name} ecl) + add_test(NAME ${name} COMMAND ${name}) +endforeach () + +add_executable(ert_util_work_area util/tests/ert_util_work_area.c) +target_link_libraries(ert_util_work_area ecl) +add_test(NAME ert_util_work_area + COMMAND ert_util_work_area data2/file1 + ${CMAKE_CURRENT_SOURCE_DIR}/util/tests/data2/file2 + data2 + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/util/tests +) + +find_library( VALGRIND NAMES valgr ) +if (VALGRIND) + set(valgrind_cmd valgrind --error-exitcode=1 --tool=memcheck) +endif () + +add_executable(test_thread_pool util/tests/test_thread_pool.c) +target_link_libraries(test_thread_pool ecl) +add_test(NAME test_thread_pool COMMAND ${valgrind_cmd} test_thread_pool) + +add_executable(ert_util_cwd_test util/tests/ert_util_cwd_test.c) +target_link_libraries(ert_util_cwd_test ecl) +add_test(NAME ert_util_cwd_test COMMAND ert_util_cwd_test ${CMAKE_CURRENT_BINARY_DIR}) + +add_executable(ert_util_copy_file util/tests/ert_util_copy_file.c) +target_link_libraries(ert_util_copy_file ecl) +add_test(NAME ert_util_copy_file + COMMAND ert_util_copy_file + $) + +add_executable(ert_util_file_readable util/tests/ert_util_file_readable.c) +target_link_libraries(ert_util_file_readable ecl) +add_test(NAME ert_util_file_readable COMMAND ert_util_file_readable) + +add_executable(ert_util_path_stack_test util/tests/ert_util_path_stack_test.c) +target_link_libraries(ert_util_path_stack_test ecl) +add_test(NAME ert_util_path_stack_test COMMAND ert_util_path_stack_test + ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + +if (LAPACK_FOUND) + add_executable(ert_util_matrix_lapack util/tests/ert_util_matrix_lapack.c) + target_link_libraries(ert_util_matrix_lapack ecl) + add_test(NAME ert_util_matrix_lapack COMMAND ert_util_matrix_lapack) + + add_executable(ert_util_matrix_stat util/tests/ert_util_matrix_stat.c) + target_link_libraries(ert_util_matrix_stat ecl) + add_test(NAME ert_util_matrix_stat COMMAND ert_util_matrix_stat) +endif() + +if (HAVE_BACKTRACE) + add_executable(ert_util_abort_gnu_tests util/tests/ert_util_abort_gnu_tests.c) + target_link_libraries(ert_util_abort_gnu_tests ecl) + add_test(NAME ert_util_abort_gnu_tests COMMAND ert_util_abort_gnu_tests) + + add_executable(ert_util_addr2line util/tests/ert_util_addr2line.c) + target_link_libraries(ert_util_addr2line ecl) + add_test(NAME ert_util_addr2line COMMAND ert_util_addr2line) +endif() + +if (HAVE_UTIL_ABORT_INTERCEPT) + add_executable(ert_util_block_fs util/tests/ert_util_block_fs.c) + target_link_libraries(ert_util_block_fs ecl) + add_test(NAME ert_util_block_fs COMMAND ert_util_block_fs) + + add_executable(ert_util_struct_vector util/tests/ert_util_struct_vector.c) + target_link_libraries(ert_util_struct_vector ecl) + add_test(NAME ert_util_struct_vector COMMAND ert_util_struct_vector) + + add_executable(ert_util_type_vector_test util/tests/ert_util_type_vector_test.c) + target_link_libraries(ert_util_type_vector_test ecl) + add_test(NAME ert_util_type_vector_test COMMAND ert_util_type_vector_test) +endif() + +if (ERT_HAVE_SPAWN) + add_executable(ert_util_spawn util/tests/ert_util_spawn.c) + target_link_libraries(ert_util_spawn ecl) + add_test(NAME ert_util_spawn COMMAND ert_util_spawn) +endif() + +# +# ecl +# + +foreach (name ecl_alloc_cpgrid + ecl_alloc_grid_dxv_dyv_dzv + ecl_fault_block_layer + ecl_grid_add_nnc + ecl_grid_copy + ecl_grid_create + ecl_grid_DEPTHZ + ecl_grid_export + ecl_grid_init_fwrite + ecl_grid_reset_actnum + ecl_init_file + ecl_kw_cmp_string + ecl_kw_equal + ecl_kw_fread + ecl_kw_grdecl + ecl_kw_init + ecl_nnc_geometry + ecl_nnc_info_test + ecl_nnc_vector + ecl_rft_cell + ecl_rst_file + ecl_sum_writer + ecl_util_make_date_no_shift + ecl_util_month_range + ecl_valid_basename + test_ecl_nnc_data + ecl_nnc_pair + well_conn_collection + well_branch_collection + well_conn + well_state + well_segment + well_segment_conn + well_segment_collection + ecl_file + ) + add_executable(${name} ecl/tests/${name}.c) + target_link_libraries(${name} ecl) + add_test(NAME ${name} COMMAND ${name}) +endforeach () + +add_executable(ecl_grid_cell_contains ecl/tests/ecl_grid_cell_contains.c) +target_link_libraries(ecl_grid_cell_contains ecl) +add_test(NAME ecl_grid_cell_contains1 COMMAND ecl_grid_cell_contains) + +if (HAVE_UTIL_ABORT_INTERCEPT) + add_executable(ecl_grid_corner ecl/tests/ecl_grid_corner.c) + target_link_libraries(ecl_grid_corner ecl) + add_test(NAME ecl_grid_corner COMMAND ecl_grid_corner) + + add_executable(ecl_layer ecl/tests/ecl_layer.c) + target_link_libraries(ecl_layer ecl) + add_test(NAME ecl_layer COMMAND ecl_layer) +endif() + +add_executable(ecl_get_num_cpu ecl/tests/ecl_get_num_cpu_test.c) +target_link_libraries(ecl_get_num_cpu ecl) +add_test(NAME ecl_get_num_cpu COMMAND ecl_get_num_cpu + ${CMAKE_CURRENT_SOURCE_DIR}/ecl/tests/data/num_cpu1 + ${CMAKE_CURRENT_SOURCE_DIR}/ecl/tests/data/num_cpu2 + ${CMAKE_CURRENT_SOURCE_DIR}/ecl/tests/data/num_cpu3 + ${CMAKE_CURRENT_SOURCE_DIR}/ecl/tests/data/num_cpu4) + +# The ecl_win64 application is not built as a proper test integrated +# into the CTEST system. Should be invoked manually on Windows. +if (ERT_WINDOWS) + add_executable(ecl_lfs ecl/tests/ecl_lfs.c) + target_link_libraries(ecl_lfs ecl) +endif() + +# +# geometry +# + + +foreach (name geo_util_xlines geo_polygon geo_polygon_collection) + add_executable(${name} geometry/tests/${name}.c) + target_link_libraries(${name} ecl) + add_test(NAME ${name} COMMAND ${name}) +endforeach () + +if (ERT_BUILD_CXX) + foreach (test ert_util_unique_ptr ert_util_test_area_xx) + add_executable(${test} util/tests/${test}.cpp) + target_link_libraries(${test} ecl) + add_test(NAME ${test} COMMAND ${test}) + endforeach() + + foreach (test eclxx_kw eclxx_fortio eclxx_smspec eclxx_filename eclxx_types) + add_executable(${test} ecl/tests/${test}.cpp) + target_link_libraries(${test} ecl) + add_test(NAME ${test} COMMAND ${test}) + endforeach () +endif () + +if (NOT STATOIL_TESTDATA_ROOT) + return () +endif() + +# +# ecl +# + +if (PING_PATH) + add_executable(ert_util_ping util/tests/ert_util_ping.c) + target_link_libraries(ert_util_ping ecl) + add_test(NAME ert_util_ping COMMAND ert_util_ping) +endif () + + +add_executable(ecl_coarse_test ecl/tests/ecl_coarse_test.c) +target_link_libraries(ecl_coarse_test ecl) +add_test(NAME ecl_coarse_test COMMAND ecl_coarse_test + ${_eclpath}/LGCcase/LGC_TESTCASE2) + +add_executable(ecl_grid_layer_contains ecl/tests/ecl_grid_layer_contains.c) +target_link_libraries(ecl_grid_layer_contains ecl) +add_test(NAME ecl_grid_layer_contains1 COMMAND ecl_grid_layer_contains + ${_eclpath}/Gurbat/ECLIPSE.EGRID) +add_test(NAME ecl_grid_layer_contains2 COMMAND ecl_grid_layer_contains + ${_eclpath}/Mariner/MARINER.EGRID) + +add_executable(ecl_restart_test ecl/tests/ecl_restart_test.c) +target_link_libraries(ecl_restart_test ecl) +add_test(NAME ecl_restart_test COMMAND ecl_restart_test + ${_eclpath}/Gurbat/ECLIPSE.UNRST) + +add_executable(ecl_nnc_export ecl/tests/ecl_nnc_export.c) +target_link_libraries(ecl_nnc_export ecl) +add_test(NAME ecl_nnc_export1 COMMAND ecl_nnc_export ${_eclpath}/Gurbat/ECLIPSE TRUE) +add_test(NAME ecl_nnc_export2 COMMAND ecl_nnc_export ${_eclpath}/10kcase/TEST10K_FLT_LGR_NNC TRUE) +add_test(NAME ecl_nnc_export3 COMMAND ecl_nnc_export ${_eclpath}/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3 TRUE) +add_test(NAME ecl_nnc_export4 COMMAND ecl_nnc_export ${_eclpath}/DualPoro/DUAL_DIFF TRUE) +add_test(NAME ecl_nnc_export5 COMMAND ecl_nnc_export ${_eclpath}/DualPoro/DUALPORO TRUE) +add_test(NAME ecl_nnc_export6 COMMAND ecl_nnc_export ${_eclpath}/nestedLGRcase/TESTCASE_NESTEDLGR TRUE) +add_test(NAME ecl_nnc_export7 COMMAND ecl_nnc_export ${_eclpath}/TYRIHANS/BASE20150218_MULTFLT FALSE) + +add_executable(ecl_nnc_export_get_tran ecl/tests/ecl_nnc_export_get_tran.c) +target_link_libraries(ecl_nnc_export_get_tran ecl) +add_test(NAME ecl_nnc_export_get_tran COMMAND ecl_nnc_export_get_tran + ${_eclpath}/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3) + +add_executable(ecl_nnc_data_statoil_root ecl/tests/test_ecl_nnc_data_statoil_root.c) +target_link_libraries(ecl_nnc_data_statoil_root ecl) +add_test(NAME ecl_nnc_data_statoil_root COMMAND ecl_nnc_data_statoil_root + ${_eclpath}/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3 + ${_eclpath}/flow-nnc/Simple4/SIMPLE_SUMMARY4 + ${_eclpath}/flow-nnc/Gullfaks/GF_ACT_NEW_TEMP) + +add_executable(ecl_util_make_date_shift ecl/tests/ecl_util_make_date_shift.c) +target_link_libraries(ecl_util_make_date_shift ecl) +add_test(NAME ecl_util_make_date_shift COMMAND ecl_util_make_date_shift) + +add_executable(ecl_sum_case_exists ecl/tests/ecl_sum_case_exists.c) +target_link_libraries(ecl_sum_case_exists ecl) +add_test(NAME ecl_sum_case_exists COMMAND ecl_sum_case_exists + ${_eclpath}/Gurbat/ECLIPSE + ${_eclpath}/GurbatSummary/missingHeader/ECLIPSE + ${_eclpath}/GurbatSummary/missingData/ECLIPSE) + + +add_executable(ecl_grid_lgr_name ecl/tests/ecl_grid_lgr_name.c) +target_link_libraries(ecl_grid_lgr_name ecl) +add_test(NAME ecl_grid_lgr_name COMMAND ecl_grid_lgr_name + ${_eclpath}/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3.EGRID) + +add_executable(ecl_region ecl/tests/ecl_region.c) +target_link_libraries(ecl_region ecl) +add_test(NAME ecl_region COMMAND ecl_region ${_eclpath}/Gurbat/ECLIPSE.EGRID) + +add_test(NAME ecl_grid_cell_contains2 COMMAND ecl_grid_cell_contains ${_eclpath}/Gurbat/ECLIPSE.EGRID) +add_test(NAME ecl_grid_cell_contains3 COMMAND ecl_grid_cell_contains ${_eclpath}/FF12/FF12_2013B2.EGRID) +add_test(NAME ecl_grid_cell_contains4 COMMAND ecl_grid_cell_contains ${_eclpath}/Brazil/R3_ICD.EGRID) + +add_executable(ecl_grid_cell_contains_wellpath ecl/tests/ecl_grid_cell_contains_wellpath.c) +target_link_libraries(ecl_grid_cell_contains_wellpath ecl) +add_test(NAME ecl_grid_cell_contains_wellpath1 + COMMAND ecl_grid_cell_contains_wellpath + ${_eclpath}/CellContains/model/SMS-0.EGRID + ${_eclpath}/CellContains/R_PB-4H.jira) + +add_executable(ecl_grid_cell_volume ecl/tests/ecl_grid_cell_volume.c) +target_link_libraries(ecl_grid_cell_volume ecl) +add_test(NAME ecl_grid_cell_volume1 COMMAND ecl_grid_cell_volume) +add_test(NAME ecl_grid_cell_volume2 COMMAND ecl_grid_cell_volume ${_eclpath}/Gurbat/ECLIPSE.EGRID) +add_test(NAME ecl_grid_cell_volume3 COMMAND ecl_grid_cell_volume ${_eclpath}/Heidrun/Summary/FF12_2013B3_CLEAN_RS.EGRID) + +add_executable(ecl_region2region ecl/tests/ecl_region2region_test.c) +target_link_libraries(ecl_region2region ecl) +add_test(NAME ecl_region2region COMMAND ecl_region2region ${_eclpath}/R2R/R2R.SMSPEC) + +add_executable(ecl_grid_case ecl/tests/ecl_grid_case.c) +target_link_libraries(ecl_grid_case ecl) +add_test(NAME ecl_grid_case COMMAND ecl_grid_case + ${_eclpath}/Gurbat/ECLIPSE.EGRID + ${_eclpath}/Gurbat/ECLIPSE) + +add_executable(ecl_lgr_test ecl/tests/ecl_lgr_test.c) +target_link_libraries(ecl_lgr_test ecl) +add_test(NAME ecl_lgr_test1 COMMAND ecl_lgr_test ${_eclpath}/10kcase/TEST10K_FLT_LGR_NNC.EGRID) +add_test(NAME ecl_lgr_test2 COMMAND ecl_lgr_test ${_eclpath}/10kcase/TEST10K_FLT_LGR_NNC.GRID) +add_test(NAME ecl_lgr_test3 COMMAND ecl_lgr_test ${_eclpath}/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3.EGRID) + +add_executable(ecl_grid_simple ecl/tests/ecl_grid_simple.c) +target_link_libraries(ecl_grid_simple ecl) +add_test(NAME ecl_grid_simple COMMAND ecl_grid_simple ${_eclpath}/Gurbat/ECLIPSE.EGRID) + +add_test(NAME ecl_grid_ecl2015_2 COMMAND ecl_grid_simple + ${_eclpath}/Eclipse2015_NNC_BUG/FF15_2015B2_LGRM_RDI15_HIST_RDIREAL1_20142.EGRID) + +add_executable(ecl_grid_export_statoil ecl/tests/ecl_grid_export.c) +target_link_libraries(ecl_grid_export_statoil ecl) +add_test(NAME ecl_grid_export_statoil + COMMAND ecl_grid_export_statoil ${_eclpath}/Gurbat/ECLIPSE.EGRID) + +add_executable(ecl_grid_volume ecl/tests/ecl_grid_volume.c) +target_link_libraries(ecl_grid_volume ecl) +add_test(NAME ecl_grid_volume1 COMMAND ecl_grid_volume ${_eclpath}/Gurbat/ECLIPSE) +add_test(NAME ecl_grid_volume2 COMMAND ecl_grid_volume ${_eclpath}/VolumeTest/TEST1) +add_test(NAME ecl_grid_volume3 COMMAND ecl_grid_volume ${_eclpath}/OsebergSyd/Omega/OMEGA-0) +add_test(NAME ecl_grid_volume4 COMMAND ecl_grid_volume ${_eclpath}/Norne/reservoir_models/Norne_ATW2013/NORNE_ATW2013) + +# The grid volume test fails miserably on the test case given as example five; looking at +# the failures one could actually suspect that the ECLIPSE algorithm for PORV calculations +# has been different in this file - i.e. that the absolute value of the individual +# tetrahedron parts have been taken during the sum, and not at the end. At least the ert +# algorithm gets volumes ~ 0 whereas ECLIPSE reports ~10^9 for the same cell. +# add_test( ecl_grid_volume5 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_volume ${_eclpath}/Heidrun/Summary/FF12_2013B3_CLEAN_RS) + +add_executable(ecl_grid_dims ecl/tests/ecl_grid_dims.c) +target_link_libraries(ecl_grid_dims ecl) +add_test(NAME ecl_grid_dims0 COMMAND ecl_grid_dims) +add_test(NAME ecl_grid_dims1 COMMAND ecl_grid_dims ${_eclpath}/Gurbat/ECLIPSE.EGRID ${_eclpath}/Gurbat/ECLIPSE.INIT) +add_test(NAME ecl_grid_dims2 COMMAND ecl_grid_dims ${_eclpath}/Gurbat/ECLIPSE.GRID ${_eclpath}/Gurbat/ECLIPSE.INIT) +add_test(NAME ecl_grid_dims3 COMMAND ecl_grid_dims ${_eclpath}/Gurbat/ECLIPSE.EGRID) +add_test(NAME ecl_grid_dims4 COMMAND ecl_grid_dims ${_eclpath}/Gurbat/ECLIPSE.GRID ) +add_test(NAME ecl_grid_dims5 COMMAND ecl_grid_dims ${_eclpath}/AmalgLGRcase/TESTCASE_AMALG_LGR.EGRID) + +add_executable(ecl_nnc_test ecl/tests/ecl_nnc_test.c) +target_link_libraries(ecl_nnc_test ecl) +add_test(NAME ecl_nnc_test1 COMMAND ecl_nnc_test ${_eclpath}/Gurbat/ECLIPSE.EGRID ) +add_test(NAME ecl_nnc_test2 COMMAND ecl_nnc_test ${_eclpath}/10kcase/TEST10K_FLT_LGR_NNC.EGRID ) +add_test(NAME ecl_nnc_test3 COMMAND ecl_nnc_test ${_eclpath}/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3.EGRID) +add_test(NAME ecl_nnc_test4 COMMAND ecl_nnc_test ${_eclpath}/DualPoro/DUAL_DIFF.EGRID ) +add_test(NAME ecl_nnc_test5 COMMAND ecl_nnc_test ${_eclpath}/nestedLGRcase/TESTCASE_NESTEDLGR.EGRID) + +add_executable(ecl_layer_statoil ecl/tests/ecl_layer_statoil.c) +target_link_libraries(ecl_layer_statoil ecl) +add_test(NAME ecl_layer_statoil COMMAND ecl_layer_statoil + ${_eclpath}/Mariner/MARINER.EGRID + ${_eclpath}/Mariner/faultblock.grdecl) + +add_executable(ecl_dualp ecl/tests/ecl_dualp.c) +target_link_libraries(ecl_dualp ecl) +add_test(NAME ecl_dualp COMMAND ecl_dualp ${_eclpath}/LGCcase/LGC_TESTCASE2) + +add_executable(ecl_sum_test ecl/tests/ecl_sum_test.c) +target_link_libraries(ecl_sum_test ecl) +add_test(NAME ecl_sum_test COMMAND ecl_sum_test ${_eclpath}/Gurbat/ECLIPSE) + +add_executable(ecl_sum_report_step_equal ecl/tests/ecl_sum_report_step_equal.c) +target_link_libraries(ecl_sum_report_step_equal ecl) +add_test(NAME ecl_sum_report_step_equal1 COMMAND ecl_sum_report_step_equal ${_eclpath}/Gurbat/ECLIPSE ${_eclpath}/Snorre/SNORRE FALSE) +add_test(NAME ecl_sum_report_step_equal2 COMMAND ecl_sum_report_step_equal ${_eclpath}/Gurbat/ECLIPSE ${_eclpath}/Gurbat/ECLIPSE TRUE) +add_test(NAME ecl_sum_report_step_equal3 COMMAND ecl_sum_report_step_equal ${_eclpath}/Gurbat/ECLIPSE ${_eclpath}/modGurbat/extraMinistep/ECLIPSE TRUE) +add_test(NAME ecl_sum_report_step_equal4 COMMAND ecl_sum_report_step_equal ${_eclpath}/Gurbat/ECLIPSE ${_eclpath}/modGurbat/short/ECLIPSE FALSE) +add_test(NAME ecl_sum_report_step_equal5 COMMAND ecl_sum_report_step_equal ${_eclpath}/Gurbat/ECLIPSE ${_eclpath}/modGurbat/enkf/ECLIPSE FALSE) +add_test(NAME ecl_sum_report_step_equal6 COMMAND ecl_sum_report_step_equal ${_eclpath}/Snorre/SNORRE ${_eclpath}/Snorre2/SNORRE2 FALSE) + +add_executable(ecl_sum_report_step_compatible ecl/tests/ecl_sum_report_step_compatible.c) +target_link_libraries(ecl_sum_report_step_compatible ecl) +add_test(NAME ecl_sum_report_step_compatible1 COMMAND ecl_sum_report_step_compatible ${_eclpath}/Gurbat/ECLIPSE ${_eclpath}/Snorre/SNORRE FALSE) +add_test(NAME ecl_sum_report_step_compatible2 COMMAND ecl_sum_report_step_compatible ${_eclpath}/Gurbat/ECLIPSE ${_eclpath}/Gurbat/ECLIPSE TRUE) +add_test(NAME ecl_sum_report_step_compatible3 COMMAND ecl_sum_report_step_compatible ${_eclpath}/Gurbat/ECLIPSE ${_eclpath}/modGurbat/extraMinistep/ECLIPSE TRUE) +add_test(NAME ecl_sum_report_step_compatible4 COMMAND ecl_sum_report_step_compatible ${_eclpath}/Gurbat/ECLIPSE ${_eclpath}/modGurbat/short/ECLIPSE TRUE) +add_test(NAME ecl_sum_report_step_compatible5 COMMAND ecl_sum_report_step_compatible ${_eclpath}/Gurbat/ECLIPSE ${_eclpath}/modGurbat/enkf/ECLIPSE TRUE) +add_test(NAME ecl_sum_report_step_compatible6 COMMAND ecl_sum_report_step_equal ${_eclpath}/Snorre/SNORRE ${_eclpath}/Snorre2/SNORRE2 FALSE) + +add_executable(ecl_file_statoil ecl/tests/ecl_file_statoil.c) +target_link_libraries(ecl_file_statoil ecl) +add_test(NAME ecl_file_statoil + COMMAND ecl_file_statoil ${_eclpath}/Gurbat/ECLIPSE.UNRST ECLIPSE.UNRST) + +add_executable(ecl_fmt ecl/tests/ecl_fmt.c) +target_link_libraries(ecl_fmt ecl) +add_test(NAME ecl_fmt COMMAND ecl_fmt + ${_eclpath}/Gurbat/ECLIPSE.UNRST + ${_eclpath}/Gurbat/ECLIPSE.DATA) + + +add_executable(ecl_rsthead ecl/tests/ecl_rsthead.c) +target_link_libraries(ecl_rsthead ecl) +add_test(NAME ecl_rsthead COMMAND ecl_rsthead + ${_eclpath}/Gurbat/ECLIPSE.UNRST + ${_eclpath}/DualPoro/DUALPORO.X0005) + +add_executable(ecl_smspec ecl/tests/ecl_smspec.c) +target_link_libraries(ecl_smspec ecl) +add_test(NAME ecl_smspec COMMAND ecl_smspec + ${_eclpath}/Gurbat/ECLIPSE.SMSPEC + ${_eclpath}/Heidrun/Summary/FF12_2013B3_CLEAN_RS.SMSPEC) + + +add_executable(ecl_rft ecl/tests/ecl_rft.c) +target_link_libraries(ecl_rft ecl) +add_test(NAME ecl_rft_rft COMMAND ecl_rft ${_eclpath}/Gurbat/ECLIPSE.RFT RFT) +add_test(NAME ecl_rft_rft_rw COMMAND ecl_rft ${_eclpath}/Gurbat/ECLIPSE.RFT RFT_RW) +add_test(NAME ecl_rft_plt COMMAND ecl_rft ${_eclpath}/RFT/TEST1_1A.RFT PLT) +add_test(NAME ecl_rft_mswplt COMMAND ecl_rft ${_eclpath}/RFT/RFT2.RFT MSW-PLT) + +add_executable(ecl_grid_copy_statoil ecl/tests/ecl_grid_copy_statoil.c) +target_link_libraries(ecl_grid_copy_statoil ecl) + +add_test(NAME ecl_grid_copy_statoil1 COMMAND ecl_grid_copy_statoil ${_eclpath}/Gurbat/ECLIPSE.EGRID) +add_test(NAME ecl_grid_copy_statoil2 COMMAND ecl_grid_copy_statoil ${_eclpath}/Mariner/MARINER.EGRID) +add_test(NAME ecl_grid_copy_statoil3 COMMAND ecl_grid_copy_statoil ${_eclpath}/LGCcase/LGC_TESTCASE2.EGRID) +add_test(NAME ecl_grid_copy_statoil4 COMMAND ecl_grid_copy_statoil ${_eclpath}/10kcase/TEST10K_FLT_LGR_NNC.EGRID) + +add_executable(ecl_fault_block_layer_statoil ecl/tests/ecl_fault_block_layer_statoil.c) +target_link_libraries(ecl_fault_block_layer_statoil ecl) +add_test(NAME ecl_fault_block_layer_statoil COMMAND ecl_fault_block_layer_statoil + ${_eclpath}/Mariner/MARINER.EGRID + ${_eclpath}/Mariner/faultblock.grdecl) + +if (HAVE_UTIL_ABORT_INTERCEPT) + add_executable(ecl_fortio ecl/tests/ecl_fortio.c) + target_link_libraries( ecl_fortio ecl) + add_test(NAME ecl_fortio COMMAND ecl_fortio ${_eclpath}/Gurbat/ECLIPSE.UNRST) +endif() + +add_executable(well_state_load ecl/tests/well_state_load.c) +target_link_libraries( well_state_load ecl) + +add_executable(well_state_load_missing_RSEG ecl/tests/well_state_load_missing_RSEG.c) +target_link_libraries(well_state_load_missing_RSEG ecl) + +add_test(NAME well_state_load1 COMMAND well_state_load ${_eclpath}/Gurbat/ECLIPSE.EGRID + ${_eclpath}/Gurbat/ECLIPSE.X0030) +add_test(NAME well_state_load2 COMMAND well_state_load ${_eclpath}/MSWcase/MSW_CASE.EGRID + ${_eclpath}/MSWcase/MSW_CASE.X0021) +add_test(NAME well_state_load3 COMMAND well_state_load ${_eclpath}/Troll/MSW/MSW.EGRID + ${_eclpath}/Troll/MSW/MSW.X0123) +add_test(NAME well_state_load4 COMMAND well_state_load ${_eclpath}/Troll/MSW_LGR/LGR.EGRID + ${_eclpath}/Troll/MSW_LGR/LGR.X0095) +add_test(NAME well_state_load5 COMMAND well_state_load ${_eclpath}/10kcase/TEST10K_FLT_LGR_NNC.EGRID + ${_eclpath}/10kcase/TEST10K_FLT_LGR_NNC.X0061) +add_test(NAME well_state_load_missing_RSEG1 + COMMAND well_state_load_missing_RSEG ${_eclpath}/10kcase/TEST10K_FLT_LGR_NNC.EGRID + ${_eclpath}/10kcase/TEST10K_FLT_LGR_NNC.X0061) +add_test(NAME well_state_load_missing_RSEG2 + COMMAND well_state_load_missing_RSEG ${_eclpath}/Troll/MSW/MSW.EGRID + ${_eclpath}/Troll/MSW/MSW.X0123) + +add_executable(well_segment_load ecl/tests/well_segment_load.c) +target_link_libraries(well_segment_load ecl) +add_test(NAME well_segment_load + COMMAND well_segment_load ${_eclpath}/MSWcase/MSW_CASE.X0021) + +add_executable(well_segment_branch_conn_load ecl/tests/well_segment_branch_conn_load.c) +target_link_libraries(well_segment_branch_conn_load ecl) +add_test(NAME well_segment_branch_conn_load + COMMAND well_segment_branch_conn_load ${_eclpath}/MSWcase/MSW_CASE.X0021) + +add_executable(well_info ecl/tests/well_info.c) +target_link_libraries(well_info ecl) +add_test(NAME well_info COMMAND well_info ${_eclpath}/Gurbat/ECLIPSE.EGRID) + +add_executable(well_conn_CF ecl/tests/well_conn_CF.c) +target_link_libraries(well_conn_CF ecl) +add_test(NAME well_conn_CF COMMAND well_conn_CF ${_eclpath}/Gurbat/ECLIPSE.X0060) + +add_executable(well_conn_load ecl/tests/well_conn_load.c) +target_link_libraries(well_conn_load ecl) +add_test(NAME well_conn_load1 COMMAND well_conn_load ${_eclpath}/Gurbat/ECLIPSE.X0030 F) +add_test(NAME well_conn_load2 COMMAND well_conn_load ${_eclpath}/10kcase/TEST10K_FLT_LGR_NNC.X0021 F) +add_test(NAME well_conn_load3 COMMAND well_conn_load ${_eclpath}/MSWcase/MSW_CASE.X0021 T) +add_test(NAME well_conn_load4 COMMAND well_conn_load ${_eclpath}/AmalgLGRcase/TESTCASE_AMALG_LGR.X0021 F) +add_test(NAME well_conn_load5 COMMAND well_conn_load ${_eclpath}/DualPoro/DUALPORO.X0009 F) +add_test(NAME well_conn_load6 COMMAND well_conn_load ${_eclpath}/0.9.2_LGR/BASE_REF_XY3Z1_T30_WI.X0003 F) + +add_executable(well_ts ecl/tests/well_ts.c) +target_link_libraries(well_ts ecl) +add_test(NAME well_ts COMMAND well_ts ${_eclpath}/CO2case/BASE_CASE) + +add_executable(well_dualp ecl/tests/well_dualp.c) +target_link_libraries(well_dualp ecl) +add_test(NAME well_dualp COMMAND well_dualp + ${_eclpath}/Gurbat/ECLIPSE.UNRST + ${_eclpath}/DualPoro/DUALPORO.X0005) + +add_executable(well_lgr_load ecl/tests/well_lgr_load.c) +target_link_libraries(well_lgr_load ecl) + +add_test(NAME well_lgr_load1 COMMAND well_lgr_load ${_eclpath}/0.9.2_LGR/BASE_REF_XY3Z1_T30_WI.EGRID + ${_eclpath}/0.9.2_LGR/BASE_REF_XY3Z1_T30_WI.X0003) +add_test(NAME well_lgr_load2 COMMAND well_lgr_load ${_eclpath}/AmalgLGRcase/TESTCASE_AMALG_LGR.EGRID + ${_eclpath}/AmalgLGRcase/TESTCASE_AMALG_LGR.X0016) + +# +# geometry +# +add_executable(geo_surface geometry/tests/geo_surface.c) +target_link_libraries(geo_surface ecl) +add_test(NAME geo_surface COMMAND geo_surface + ${_geopath}/Surface.irap + ${_geopath}/Surface_incompatible.irap) diff --git a/ThirdParty/Ert/libert_util/include/ert/util/build_config.h.in b/ThirdParty/Ert/lib/build_config.h.in similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/build_config.h.in rename to ThirdParty/Ert/lib/build_config.h.in diff --git a/ThirdParty/Ert/libeclxx/src/EclFilename.cpp b/ThirdParty/Ert/lib/ecl/EclFilename.cpp similarity index 100% rename from ThirdParty/Ert/libeclxx/src/EclFilename.cpp rename to ThirdParty/Ert/lib/ecl/EclFilename.cpp diff --git a/ThirdParty/Ert/libeclxx/src/FortIO.cpp b/ThirdParty/Ert/lib/ecl/FortIO.cpp similarity index 100% rename from ThirdParty/Ert/libeclxx/src/FortIO.cpp rename to ThirdParty/Ert/lib/ecl/FortIO.cpp diff --git a/ThirdParty/Ert/libeclxx/src/Smspec.cpp b/ThirdParty/Ert/lib/ecl/Smspec.cpp similarity index 92% rename from ThirdParty/Ert/libeclxx/src/Smspec.cpp rename to ThirdParty/Ert/lib/ecl/Smspec.cpp index c12223f3f5..5e13d6917f 100644 --- a/ThirdParty/Ert/libeclxx/src/Smspec.cpp +++ b/ThirdParty/Ert/lib/ecl/Smspec.cpp @@ -37,8 +37,13 @@ namespace ERT { {} smspec_node::smspec_node( const std::string& keyword ) : - smspec_node( ECL_SMSPEC_FIELD_VAR, "", keyword.c_str(), - "", default_join, dummy_dims, 0 ) + smspec_node( ecl_smspec_identify_var_type( keyword.c_str() ), + "", + keyword.c_str(), + "", + default_join, + dummy_dims, + 0 ) {} smspec_node::smspec_node( diff --git a/ThirdParty/Ert/libecl/src/ecl_box.c b/ThirdParty/Ert/lib/ecl/ecl_box.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_box.c rename to ThirdParty/Ert/lib/ecl/ecl_box.c diff --git a/ThirdParty/Ert/libecl/src/ecl_coarse_cell.c b/ThirdParty/Ert/lib/ecl/ecl_coarse_cell.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_coarse_cell.c rename to ThirdParty/Ert/lib/ecl/ecl_coarse_cell.c diff --git a/ThirdParty/Ert/libecl/src/ecl_file.c b/ThirdParty/Ert/lib/ecl/ecl_file.c similarity index 79% rename from ThirdParty/Ert/libecl/src/ecl_file.c rename to ThirdParty/Ert/lib/ecl/ecl_file.c index 5a5f3c695f..aab15002d7 100644 --- a/ThirdParty/Ert/libecl/src/ecl_file.c +++ b/ThirdParty/Ert/lib/ecl/ecl_file.c @@ -677,12 +677,87 @@ void ecl_file_free__(void * arg) { /****************************************************************************/ -/* Here we include a file with functions specialized to work with - restart files. Observe that the files ecl_rstfile.c is compiled as - part of the same compilation unit as ecl_file.c +/* Functions specialized to work with restart files. */ + +/* Query functions. */ +/** + Will look through all the INTEHEAD kw instances of the current + ecl_file and look for @sim_time. If the value is found true is + returned, otherwise false. */ -#include "ecl_rstfile.c" +bool ecl_file_has_sim_time( const ecl_file_type * ecl_file , time_t sim_time) { + return ecl_file_view_has_sim_time( ecl_file->active_view , sim_time ); +} + + +/* + This function will determine the restart block corresponding to the + world time @sim_time; if @sim_time can not be found the function + will return 0. + + The returned index is the 'occurence number' in the restart file, + i.e. in the (quite typical case) that not all report steps are + present the return value will not agree with report step. + + The return value from this function can then be used to get a + corresponding solution field directly, or the file map can + restricted to this block. + + Direct access: + + int index = ecl_file_get_restart_index( ecl_file , sim_time ); + if (index >= 0) { + ecl_kw_type * pressure_kw = ecl_file_iget_named_kw( ecl_file , "PRESSURE" , index ); + .... + } + + + Using block restriction: + + int index = ecl_file_get_restart_index( ecl_file , sim_time ); + if (index >= 0) { + ecl_file_iselect_rstblock( ecl_file , index ); + { + ecl_kw_type * pressure_kw = ecl_file_iget_named_kw( ecl_file , "PRESSURE" , 0 ); + .... + } + } + + Specially in the case of LGRs the block restriction should be used. + */ + +int ecl_file_get_restart_index( const ecl_file_type * ecl_file , time_t sim_time) { + int active_index = ecl_file_view_find_sim_time( ecl_file->active_view , sim_time ); + return active_index; +} + + +/** + Will look through all the SEQNUM kw instances of the current + ecl_file and look for @report_step. If the value is found true is + returned, otherwise false. +*/ + +bool ecl_file_has_report_step( const ecl_file_type * ecl_file , int report_step) { + return ecl_file_view_has_report_step( ecl_file->active_view , report_step ); +} + + +/** + This function will look up the INTEHEAD keyword in a ecl_file_type + instance, and calculate simulation date from this instance. + + Will return -1 if the requested INTEHEAD keyword can not be found. +*/ + +time_t ecl_file_iget_restart_sim_date( const ecl_file_type * restart_file , int index ) { + return ecl_file_view_iget_restart_sim_date( restart_file->active_view , index ); +} + +double ecl_file_iget_restart_sim_days( const ecl_file_type * restart_file , int index ) { + return ecl_file_view_iget_restart_sim_days( restart_file->active_view , index ); +} /*****************************************************************/ /* Two small lookup functions which consider the INTEHEAD keyword, @@ -799,4 +874,121 @@ bool ecl_file_save_kw( const ecl_file_type * ecl_file , const ecl_kw_type * ecl_ } -#include "ecl_file_deprecated.c" +/* DEPRECATED */ +void ecl_file_push_block( ecl_file_type * ecl_file ) { + vector_append_ref( ecl_file->map_stack , ecl_file->active_view ); +} + +void ecl_file_pop_block( ecl_file_type * ecl_file ) { + ecl_file->active_view = vector_pop_back( ecl_file->map_stack ); +} + + +static ecl_file_view_type * ecl_file_get_relative_blockview( ecl_file_type * ecl_file , const char * kw , int occurence) { + ecl_file_view_type * view = ecl_file_view_add_blockview( ecl_file->active_view , kw , occurence ); + return view; +} + + + +bool ecl_file_subselect_block( ecl_file_type * ecl_file , const char * kw , int occurence) { + ecl_file_view_type * blockmap = ecl_file_get_relative_blockview( ecl_file , kw , occurence); + if (blockmap != NULL) { + ecl_file->active_view = blockmap; + return true; + } else + return false; +} + + +bool ecl_file_select_block( ecl_file_type * ecl_file , const char * kw , int occurence ) { + ecl_file_view_type * blockmap = ecl_file_get_global_blockview( ecl_file , kw , occurence); + if (blockmap != NULL) { + ecl_file->active_view = blockmap; + return true; + } else + return false; +} + + +/* + Will select restart block nr @seqnum_index - without considering + report_steps or simulation time. +*/ +bool ecl_file_iselect_rstblock( ecl_file_type * ecl_file , int seqnum_index ) { + return ecl_file_select_block( ecl_file , SEQNUM_KW , seqnum_index ); +} + + +bool ecl_file_select_rstblock_sim_time( ecl_file_type * ecl_file , time_t sim_time) { + int seqnum_index = ecl_file_view_seqnum_index_from_sim_time( ecl_file->global_view , sim_time ); + + if (seqnum_index >= 0) + return ecl_file_iselect_rstblock( ecl_file , seqnum_index); + else + return false; +} + + +bool ecl_file_select_rstblock_report_step( ecl_file_type * ecl_file , int report_step) { + int global_index = ecl_file_view_find_kw_value( ecl_file->global_view , SEQNUM_KW , &report_step); + if ( global_index >= 0) { + int seqnum_index = ecl_file_view_iget_occurence( ecl_file->global_view , global_index ); + return ecl_file_iselect_rstblock( ecl_file , seqnum_index); + } else + return false; +} + + +/******************************************************************/ + +static ecl_file_type * ecl_file_open_rstblock_report_step__( const char * filename , int report_step , int flags) { + ecl_file_type * ecl_file = ecl_file_open( filename , flags ); + if (ecl_file) { + if (!ecl_file_select_rstblock_report_step( ecl_file , report_step )) { + ecl_file_close( ecl_file ); + ecl_file = NULL; + } + } + return ecl_file; +} + +ecl_file_type * ecl_file_open_rstblock_report_step( const char * filename , int report_step , int flags) { + return ecl_file_open_rstblock_report_step__(filename , report_step , flags ); +} + + +/******************************************************************/ + +static ecl_file_type * ecl_file_open_rstblock_sim_time__( const char * filename , time_t sim_time, int flags ) { + ecl_file_type * ecl_file = ecl_file_open( filename , flags ); + if (ecl_file) { + if (!ecl_file_select_rstblock_sim_time( ecl_file , sim_time)) { + ecl_file_close( ecl_file ); + ecl_file = NULL; + } + } + return ecl_file; +} + +ecl_file_type * ecl_file_open_rstblock_sim_time( const char * filename , time_t sim_time, int flags) { + return ecl_file_open_rstblock_sim_time__( filename , sim_time , flags ); +} + +/******************************************************************/ + +static ecl_file_type * ecl_file_iopen_rstblock__( const char * filename , int seqnum_index, int flags ) { + ecl_file_type * ecl_file = ecl_file_open( filename , flags ); + if (ecl_file) { + if (!ecl_file_iselect_rstblock( ecl_file , seqnum_index )) { + ecl_file_close( ecl_file ); + ecl_file = NULL; + } + } + return ecl_file; +} + + +ecl_file_type * ecl_file_iopen_rstblock( const char * filename , int seqnum_index , int flags) { + return ecl_file_iopen_rstblock__(filename , seqnum_index , flags ); +} diff --git a/ThirdParty/Ert/libecl/src/ecl_file_kw.c b/ThirdParty/Ert/lib/ecl/ecl_file_kw.c similarity index 99% rename from ThirdParty/Ert/libecl/src/ecl_file_kw.c rename to ThirdParty/Ert/lib/ecl/ecl_file_kw.c index 4a137974c2..ab72cdbedb 100644 --- a/ThirdParty/Ert/libecl/src/ecl_file_kw.c +++ b/ThirdParty/Ert/lib/ecl/ecl_file_kw.c @@ -318,6 +318,7 @@ void ecl_file_kw_inplace_fwrite( ecl_file_kw_type * file_kw , fortio_type * fort ecl_file_kw_assert_kw( file_kw ); fortio_fseek( fortio , file_kw->file_offset , SEEK_SET ); ecl_kw_fskip_header( fortio ); + fortio_fclean(fortio); ecl_kw_fwrite_data( file_kw->kw , fortio ); } diff --git a/ThirdParty/Ert/libecl/src/ecl_file_view.c b/ThirdParty/Ert/lib/ecl/ecl_file_view.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_file_view.c rename to ThirdParty/Ert/lib/ecl/ecl_file_view.c diff --git a/ThirdParty/Ert/libecl/src/ecl_grav.c b/ThirdParty/Ert/lib/ecl/ecl_grav.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_grav.c rename to ThirdParty/Ert/lib/ecl/ecl_grav.c diff --git a/ThirdParty/Ert/libecl/src/ecl_grav_calc.c b/ThirdParty/Ert/lib/ecl/ecl_grav_calc.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_grav_calc.c rename to ThirdParty/Ert/lib/ecl/ecl_grav_calc.c diff --git a/ThirdParty/Ert/libecl/src/ecl_grav_common.c b/ThirdParty/Ert/lib/ecl/ecl_grav_common.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_grav_common.c rename to ThirdParty/Ert/lib/ecl/ecl_grav_common.c diff --git a/ThirdParty/Ert/libecl/src/ecl_grid.c b/ThirdParty/Ert/lib/ecl/ecl_grid.c similarity index 99% rename from ThirdParty/Ert/libecl/src/ecl_grid.c rename to ThirdParty/Ert/lib/ecl/ecl_grid.c index 0e2dd610ef..945f6d41f7 100644 --- a/ThirdParty/Ert/libecl/src/ecl_grid.c +++ b/ThirdParty/Ert/lib/ecl/ecl_grid.c @@ -3953,20 +3953,6 @@ static bool tetrahedron_by_points_contains(const point_type * p0, return tetrahedron_contains(pro_tet, *p); } -static bool tetrahedron_positive_volume(const point_type * p0, - const point_type * p1, - const point_type * p2, - const point_type * p3) { - - tetrahedron_type pro_tet; - pro_tet.p0 = *p0; - pro_tet.p1 = *p1; - pro_tet.p2 = *p2; - pro_tet.p3 = *p3; - - return tetrahedron_volume6(pro_tet) >= 0; -} - /* Returns true if and only if the cell "cell" decomposed by "method" contains the point "p". This is done by decomposing the cell into 5 tetrahedrons according to the decomposition @@ -4001,34 +3987,19 @@ static bool concave_cell_contains( const ecl_cell_type * cell, int method, const }; // Test for containment in cell core - bool contained = tetrahedron_by_points_contains(dia[0][0], dia[1][0], dia[0][1], dia[1][1], p); + if (tetrahedron_by_points_contains(dia[0][0], dia[1][0], dia[0][1], dia[1][1], p)) + return true; // Test for containment in protrusions for(int i = 0; i < 2; ++i) { - if(tetrahedron_by_points_contains(dia[i][0], dia[i][1], dia[(i+1)%2][0], extra[i][0], p)) { - contained = true; + if(tetrahedron_by_points_contains(dia[i][0], dia[i][1], dia[(i+1)%2][0], extra[i][0], p)) + return true; - bool on_inner_faces = false; - on_inner_faces |= triangle_contains3d(dia[i][0], dia[(i+1)%2][0], extra[i][0], p); - on_inner_faces |= triangle_contains3d(dia[i][1], dia[(i+1)%2][0], extra[i][0], p); - - if(!on_inner_faces && !tetrahedron_positive_volume(dia[i][0], dia[i][1], dia[(i+1)%2][0], extra[i][0])) - return false; - } - - if(tetrahedron_by_points_contains(dia[i][0], dia[(i+1)%2][1], dia[i][1], extra[i][1], p)) { - contained = true; - - bool on_inner_faces = false; - on_inner_faces |= triangle_contains3d(dia[i][0], dia[(i+1)%2][1], extra[i][1], p); - on_inner_faces |= triangle_contains3d(dia[i][1], dia[(i+1)%2][1], extra[i][1], p); - - if(!on_inner_faces && !tetrahedron_positive_volume(dia[i][0], dia[(i+1)%2][1], dia[i][1], extra[i][1])) - return false; - } + if(tetrahedron_by_points_contains(dia[i][0], dia[(i+1)%2][1], dia[i][1], extra[i][1], p)) + return true; } - return contained; + return false; } /* @@ -4066,14 +4037,8 @@ bool ecl_grid_cell_contains_xyz3( const ecl_grid_type * ecl_grid , int i, int j bool max_k = (k == ecl_grid->nz-1); face_status_enum face_status = ecl_grid_on_cell_face(cell, method, &p, max_i, max_j, max_k); - if(face_status != NOT_ON_FACE) { - // Since we might get false positives in the case when the cells - // projections to the xy-plane is concave, we still check whether - // the point is contained in the cell if it face_status is - // BELONGS_TO_CELL. - if(face_status == BELONGS_TO_OTHER) - return false; - } + if(face_status != NOT_ON_FACE) + return face_status == BELONGS_TO_CELL; // Twisted cells if (ecl_cell_get_twist(cell) > 0) { @@ -5068,6 +5033,9 @@ ecl_grid_type * ecl_grid_get_lgr(const ecl_grid_type * main_grid, const char * _ */ bool ecl_grid_has_lgr(const ecl_grid_type * main_grid, const char * __lgr_name) { + if(!__lgr_name) + return false; + __assert_main_grid( main_grid ); { char * lgr_name = util_alloc_strip_copy( __lgr_name ); @@ -5077,6 +5045,18 @@ bool ecl_grid_has_lgr(const ecl_grid_type * main_grid, const char * __lgr_name) } } +bool ecl_grid_has_lgr_nr(const ecl_grid_type * main_grid, int lgr_nr) { + __assert_main_grid( main_grid ); + { + if (int_vector_size( main_grid->lgr_index_map ) > lgr_nr) + return true; + else + return false; + } +} + + + int ecl_grid_get_num_coarse_groups( const ecl_grid_type * main_grid ) { return vector_get_size( main_grid->coarse_cells ); @@ -5812,8 +5792,8 @@ static const float * ecl_grid_get_mapaxes( const ecl_grid_type * grid ) { return grid->mapaxes; } -static ecl_kw_type * ecl_grid_alloc_mapaxes_kw( const float * mapaxes ) { - return ecl_kw_alloc_new( MAPAXES_KW , 6 , ECL_FLOAT , mapaxes); +ecl_kw_type * ecl_grid_alloc_mapaxes_kw( const ecl_grid_type * grid ) { + return ecl_kw_alloc_new( MAPAXES_KW , 6 , ECL_FLOAT , grid->mapaxes); } static ecl_kw_type * ecl_grid_alloc_mapunits_kw( ert_ecl_unit_enum output_unit ) { @@ -5872,8 +5852,8 @@ static float ecl_grid_output_scaling( const ecl_grid_type * grid , ert_ecl_unit_ } -static void ecl_grid_fwrite_mapaxes( const float * mapaxes , fortio_type * fortio) { - ecl_kw_type * mapaxes_kw = ecl_grid_alloc_mapaxes_kw( mapaxes ); +static void ecl_grid_fwrite_mapaxes( const ecl_grid_type * grid , fortio_type * fortio) { + ecl_kw_type * mapaxes_kw = ecl_grid_alloc_mapaxes_kw( grid ); ecl_kw_fwrite( mapaxes_kw , fortio ); ecl_kw_free( mapaxes_kw ); } @@ -5896,7 +5876,7 @@ static void ecl_grid_fwrite_main_GRID_headers( const ecl_grid_type * ecl_grid , ecl_grid_fwrite_mapunits( fortio , output_unit ); if (ecl_grid->use_mapaxes) - ecl_grid_fwrite_mapaxes( ecl_grid->mapaxes , fortio ); + ecl_grid_fwrite_mapaxes( ecl_grid , fortio ); ecl_grid_fwrite_gridunits( fortio , output_unit ); } @@ -6035,7 +6015,7 @@ static void ecl_grid_fwrite_main_EGRID_header( const ecl_grid_type * grid , fort ecl_grid_fwrite_mapunits( fortio , output_unit ); if (mapaxes != NULL) - ecl_grid_fwrite_mapaxes( mapaxes , fortio ); + ecl_grid_fwrite_mapaxes( grid , fortio ); ecl_grid_fwrite_gridunits( fortio , output_unit); } @@ -6286,11 +6266,25 @@ float * ecl_grid_alloc_zcorn_data( const ecl_grid_type * grid ) { ecl_kw_type * ecl_grid_alloc_zcorn_kw( const ecl_grid_type * grid ) { - ecl_kw_type * zcorn_kw = ecl_kw_alloc( ZCORN_KW , 8 * grid->size , ECL_FLOAT); - ecl_grid_init_zcorn_data( grid , ecl_kw_get_void_ptr( zcorn_kw )); + ecl_kw_type * zcorn_kw = ecl_kw_alloc( ZCORN_KW , ecl_grid_get_zcorn_size(grid), ECL_FLOAT); + ecl_grid_init_zcorn_data(grid , ecl_kw_get_void_ptr(zcorn_kw)); return zcorn_kw; } +ecl_kw_type * ecl_grid_alloc_coord_kw( const ecl_grid_type * grid) { + if(grid->coord_kw) + return ecl_kw_alloc_copy(grid->coord_kw); + + ecl_kw_type * coord_kw = ecl_kw_alloc( + COORD_KW, + ECL_GRID_COORD_SIZE(grid->nx, grid->ny), + ECL_FLOAT + ); + ecl_grid_init_coord_data(grid, ecl_kw_get_float_ptr(coord_kw)); + + return coord_kw; +} + int ecl_grid_get_coord_size( const ecl_grid_type * grid) { return ECL_GRID_COORD_SIZE( grid->nx , grid->ny ); @@ -6681,7 +6675,7 @@ void ecl_grid_fprintf_grdecl2(ecl_grid_type * grid , FILE * stream , ert_ecl_uni } if (grid->use_mapaxes) { - ecl_kw_type * mapaxes_kw = ecl_grid_alloc_mapaxes_kw( grid->mapaxes ); + ecl_kw_type * mapaxes_kw = ecl_grid_alloc_mapaxes_kw( grid ); ecl_kw_fprintf_grdecl( mapaxes_kw , stream ); ecl_kw_free( mapaxes_kw ); } diff --git a/ThirdParty/Ert/libecl/src/ecl_grid_cache.c b/ThirdParty/Ert/lib/ecl/ecl_grid_cache.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_grid_cache.c rename to ThirdParty/Ert/lib/ecl/ecl_grid_cache.c diff --git a/ThirdParty/Ert/libecl/src/ecl_grid_dims.c b/ThirdParty/Ert/lib/ecl/ecl_grid_dims.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_grid_dims.c rename to ThirdParty/Ert/lib/ecl/ecl_grid_dims.c diff --git a/ThirdParty/Ert/libecl/src/ecl_init_file.c b/ThirdParty/Ert/lib/ecl/ecl_init_file.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_init_file.c rename to ThirdParty/Ert/lib/ecl/ecl_init_file.c diff --git a/ThirdParty/Ert/libecl/src/ecl_io_config.c b/ThirdParty/Ert/lib/ecl/ecl_io_config.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_io_config.c rename to ThirdParty/Ert/lib/ecl/ecl_io_config.c diff --git a/ThirdParty/Ert/libecl/src/ecl_kw.c b/ThirdParty/Ert/lib/ecl/ecl_kw.c similarity index 99% rename from ThirdParty/Ert/libecl/src/ecl_kw.c rename to ThirdParty/Ert/lib/ecl/ecl_kw.c index d562f1a09a..34d1fd57c3 100644 --- a/ThirdParty/Ert/libecl/src/ecl_kw.c +++ b/ThirdParty/Ert/lib/ecl/ecl_kw.c @@ -474,9 +474,6 @@ static void ecl_kw_set_shared_ref(ecl_kw_type * ecl_kw , void *data_ptr) { static void ecl_kw_initialize(ecl_kw_type * ecl_kw , const char *header , int size , ecl_data_type data_type) { ecl_kw_set_data_type(ecl_kw, data_type); - if (strlen(header) > ECL_STRING8_LENGTH) - util_abort("%s: Fatal error: ecl_header_name:%s is longer than eight characters - aborting \n",__func__,header); - ecl_kw_set_header_name(ecl_kw , header); ecl_kw->size = size; } @@ -1474,11 +1471,17 @@ void ecl_kw_free_data(ecl_kw_type *ecl_kw) { void ecl_kw_set_header_name(ecl_kw_type * ecl_kw , const char * header) { ecl_kw->header8 = realloc(ecl_kw->header8 , ECL_STRING8_LENGTH + 1); - sprintf(ecl_kw->header8 , "%-8s" , header); + if (strlen(header) <= 8) { + sprintf(ecl_kw->header8 , "%-8s" , header); + + /* Internalizing a header without the trailing spaces as well. */ + util_safe_free( ecl_kw->header ); + ecl_kw->header = util_alloc_strip_copy( ecl_kw->header8 ); + } + else { + ecl_kw->header = util_alloc_copy(header, strlen( header ) + 1); + } - /* Internalizing a header without the trailing spaces as well. */ - util_safe_free( ecl_kw->header ); - ecl_kw->header = util_alloc_strip_copy( ecl_kw->header8 ); } @@ -1711,9 +1714,14 @@ void ecl_kw_fwrite_header(const ecl_kw_type *ecl_kw , fortio_type *fortio) { } -void ecl_kw_fwrite(const ecl_kw_type *ecl_kw , fortio_type *fortio) { +bool ecl_kw_fwrite(const ecl_kw_type *ecl_kw , fortio_type *fortio) { + if (strlen(ecl_kw_get_header( ecl_kw)) > ECL_STRING8_LENGTH) { + fortio_fwrite_error(fortio); + return false; + } ecl_kw_fwrite_header(ecl_kw , fortio); ecl_kw_fwrite_data(ecl_kw , fortio); + return true; } diff --git a/ThirdParty/Ert/libecl/src/ecl_kw_functions.c b/ThirdParty/Ert/lib/ecl/ecl_kw_functions.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_kw_functions.c rename to ThirdParty/Ert/lib/ecl/ecl_kw_functions.c diff --git a/ThirdParty/Ert/libecl/src/ecl_kw_grdecl.c b/ThirdParty/Ert/lib/ecl/ecl_kw_grdecl.c similarity index 86% rename from ThirdParty/Ert/libecl/src/ecl_kw_grdecl.c rename to ThirdParty/Ert/lib/ecl/ecl_kw_grdecl.c index bf44d6cff3..8149fca1dd 100644 --- a/ThirdParty/Ert/libecl/src/ecl_kw_grdecl.c +++ b/ThirdParty/Ert/lib/ecl/ecl_kw_grdecl.c @@ -25,6 +25,7 @@ #include #include +#define MAX_GRDECL_HEADER_SIZE 512 /* This file is devoted to different routines for reading and writing @@ -74,7 +75,7 @@ bool ecl_kw_grdecl_fseek_next_kw( FILE * stream ) { long start_pos = util_ftell( stream ); long current_pos; - char next_kw[256]; + char next_kw[MAX_GRDECL_HEADER_SIZE]; /* Determine if the current position of the file pointer is at the @@ -146,7 +147,7 @@ bool ecl_kw_grdecl_fseek_next_kw( FILE * stream ) { char * ecl_kw_grdecl_alloc_next_header( FILE * stream ) { if (ecl_kw_grdecl_fseek_next_kw( stream )) { - char next_kw[256]; + char next_kw[MAX_GRDECL_HEADER_SIZE]; fscanf( stream , "%s" , next_kw); return util_alloc_string_copy( next_kw ); } else @@ -187,89 +188,7 @@ static bool ecl_kw_grdecl_fseek_kw__(const char * kw , FILE * stream) { -// static bool ecl_kw_grdecl_fseek_kw__OLD(const char * kw , FILE * stream) { -// const int newline_char = '\n'; -// long int init_pos = ftell(stream); -// -// if (util_fseek_string(stream , kw , false , true)) { -// /* -// OK the keyword is found in the file; now we must verify that: -// -// 1. It is terminated with a blank, i.e. when searching for -// 'COORD' we do not want a positive on 'COORDSYS'. -// -// 2. That the keyword indeed starts with a isspace() character; we -// are not interested in the 'SYS' in 'COORDSYS'. -// -// 3. That the current location is not a comment section. -// */ -// long int kw_pos = ftell( stream ); -// bool valid_kw = false; -// int c; -// -// fseek( stream , strlen(kw) , SEEK_CUR); // Seek to end of kw -// c = fgetc( stream ); // Read one character -// fseek( stream , kw_pos , SEEK_SET ); // Seek back to beginning of kw -// -// if (isspace(c)) { -// if (kw_pos > 0) { -// fseek( stream , kw_pos - 1 , SEEK_SET); -// c = fgetc( stream ); -// if (isspace(c)) -// // OK - we have verifed that the kw string we have found both -// // starts and ends with a isspace() character. -// valid_kw = true; -// } else -// valid_kw = true; // kw is at the very beginning of the file. -// } -// -// -// if (valid_kw) { -// // OK - the kw is validly terminated with a space/tab/newline; now -// // we must verify that it is not in a comment section. -// if (kw_pos >= strlen(ECL_COMMENT_STRING) ) { // Must have this check to avoid infinite spinning -// // when the keyword is in the very beginning of the file. -// fseek( stream , 1 , SEEK_CUR ); -// while (true) { -// fseek( stream , -2 , SEEK_CUR ); -// c = fgetc( stream ); -// if ((c == newline_char) || (ftell(stream) == 0)) -// break; -// } -// { -// // We have gone as far back as necessary. -// int line_length = kw_pos - ftell( stream ); -// char * line = util_malloc(line_length + 1 , __func__); -// -// fread( stream , sizeof * line , line_length , stream); -// line[line_length] = '\0'; -// -// if (strstr( line , ECL_COMMENT_STRING) == NULL) -// // We are not in a commen section. -// valid_kw = true; -// else -// valid_kw = false; -// -// free( line ); -// } -// } -// } else -// valid_kw = false; -// -// if (valid_kw) -// return true; -// else { -// fseek( stream , strlen(kw) , SEEK_CUR ); // Skip over the kw so we don't find it again. -// if (ecl_kw_grdecl_fseek_kw__(kw , stream)) -// return true; -// else { -// fseek( stream , init_pos , SEEK_SET ); -// return false; -// } -// } -// } else -// return false; -// } + bool ecl_kw_grdecl_fseek_kw(const char * kw , bool rewind , FILE * stream) { @@ -291,7 +210,6 @@ bool ecl_kw_grdecl_fseek_kw(const char * kw , bool rewind , FILE * stream) { - /** Observe that this function does not preserve the '*' structure which (might) have been used in the input. @@ -476,9 +394,9 @@ static char * fscanf_alloc_grdecl_data( const char * header , bool strict , ecl_ The ecl_kw class has a quite deeply wired assumption that the header is a string of length 8 (I hope/think that is an ECLIPSE - limitation), and the the class is not able to create ecl_kw - instances with header length of more than 8 characters - code will - abort hard if @kw is longer than 8 characters. + limitation). The class cannot read/write kw with headers longer than 8 bytes. + ecl_kw_grdecl is a workaround allowing for reading/writing kw with long + headers. ----------------------------------------------------------------- @@ -517,6 +435,9 @@ static char * fscanf_alloc_grdecl_data( const char * header , bool strict , ecl_ */ static ecl_kw_type * __ecl_kw_fscanf_alloc_grdecl__(FILE * stream , const char * header , bool strict , int size , ecl_data_type data_type) { + if (header && strlen(header) >MAX_GRDECL_HEADER_SIZE) + util_abort("%s cannot read KW of more than %d bytes. strlen(header) == %d\n", __func__, MAX_GRDECL_HEADER_SIZE, strlen(header) ); + if (!ecl_type_is_numeric(data_type)) util_abort("%s: sorry only types FLOAT, INT and DOUBLE supported\n",__func__); @@ -525,7 +446,7 @@ static ecl_kw_type * __ecl_kw_fscanf_alloc_grdecl__(FILE * stream , const char * return NULL; /* Could not find it. */ { - char file_header[9]; + char file_header[MAX_GRDECL_HEADER_SIZE]; if (fscanf(stream , "%s" , file_header) == 1) { int kw_size; char * data = fscanf_alloc_grdecl_data( file_header , strict , data_type , &kw_size , stream ); diff --git a/ThirdParty/Ert/lib/ecl/ecl_nnc_data.c b/ThirdParty/Ert/lib/ecl/ecl_nnc_data.c new file mode 100644 index 0000000000..a8435278b8 --- /dev/null +++ b/ThirdParty/Ert/lib/ecl/ecl_nnc_data.c @@ -0,0 +1,280 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + The file 'ecl_file_view.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ERT is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU General Public License at + for more details. +*/ + +#define ECL_NNC_DATA_TYPE_ID 83756236 + +#include +#include +#include +#include +#include +#include + +enum kw_data_type { + TRANS_DATA = 1, + WTR_FLUX_DATA = 2, + OIL_FLUX_DATA = 3, + GAS_FLUX_DATA = 4 +}; + +struct ecl_nnc_data_struct { + UTIL_TYPE_ID_DECLARATION; + int size; + double * values; +}; + + +static const char * ecl_nnc_data_get_str_kw(int kw_type, int grid1, int grid2) { + char * kw = NULL; + switch (kw_type) { + + case TRANS_DATA: + if (grid1 == grid2) + kw = TRANNNC_KW; + else if (grid1 == 0) + kw = TRANGL_KW; + else + kw = TRANLL_KW; + break; + + case WTR_FLUX_DATA: + if (grid1 == grid2) + kw = FLRWATNNC_KW; + else if (grid1 == 0) + kw = FLRWATLG_KW; + else + kw = FLRWATLL_KW; + break; + + case OIL_FLUX_DATA: + if (grid1 == grid2) + kw = FLROILNNC_KW; + else if (grid1 == 0) + kw = FLROILLG_KW; + else + kw = FLROILLL_KW; + break; + + case GAS_FLUX_DATA: + if (grid1 == grid2) + kw = FLRGASNNC_KW; + else if (grid1 == 0) + kw = FLRGASLG_KW; + else + kw = FLRGASLL_KW; + break; + + default: + kw = NULL; + + } + return kw; +} + + +static ecl_kw_type * ecl_nnc_data_get_gl_kw( const ecl_file_view_type * init_file_view , const char * kw, int kw_type, int lgr_nr) { + ecl_kw_type * return_kw = NULL; + + if (kw != NULL) + if (lgr_nr == 0) { + if(ecl_file_view_has_kw(init_file_view, kw)) + return_kw = ecl_file_view_iget_named_kw(init_file_view, kw, 0); + } else { + { + const int file_num_kw = ecl_file_view_get_size( init_file_view ); + int global_kw_index = 0; + bool finished = false; + bool correct_lgrheadi = false; + int head_index = 0; + int steps = 0; + + while(!finished){ + ecl_kw_type * ecl_kw = ecl_file_view_iget_kw( init_file_view , global_kw_index ); + const char *current_kw = ecl_kw_get_header(ecl_kw); + if (strcmp( LGRHEADI_KW , current_kw) == 0) { + if (ecl_kw_iget_int( ecl_kw , LGRHEADI_LGR_NR_INDEX) == lgr_nr) { + correct_lgrheadi = true; + head_index = global_kw_index; + }else{ + correct_lgrheadi = false; + } + } + if(correct_lgrheadi) { + if (strcmp(kw, current_kw) == 0) { + steps = global_kw_index - head_index; /* This is to calculate who fare from lgrheadi we found the TRANGL/TRANNNC key word */ + if (kw_type != TRANS_DATA || steps == 3 || steps == 4 || steps == 6) { /* We only support a file format where TRANNNC is 3 steps and TRANGL is 4 or 6 steps from LGRHEADI */ + return_kw = ecl_kw; + finished = true; + break; + } + } + } + global_kw_index++; + if (global_kw_index == file_num_kw) + finished = true; + } + } + } + return return_kw; +} + + +static ecl_kw_type * ecl_nnc_data_get_tranll_kw( const ecl_grid_type * grid , const ecl_file_view_type * init_file_view , int lgr_nr1, int lgr_nr2 ) { + const char * lgr_name1 = ecl_grid_get_lgr_name( grid , lgr_nr1 ); + const char * lgr_name2 = ecl_grid_get_lgr_name( grid , lgr_nr2 ); + + ecl_kw_type * tran_kw = NULL; + const int file_num_kw = ecl_file_view_get_size( init_file_view ); + int global_kw_index = 0; + + while (true) { + if (global_kw_index >= file_num_kw) + break; + { + ecl_kw_type * ecl_kw = ecl_file_view_iget_kw( init_file_view , global_kw_index ); + if (strcmp( LGRJOIN_KW , ecl_kw_get_header( ecl_kw)) == 0) { + + if (ecl_kw_icmp_string( ecl_kw , 0 , lgr_name1) && ecl_kw_icmp_string( ecl_kw , 1 , lgr_name2)) { + tran_kw = ecl_file_view_iget_kw( init_file_view , global_kw_index + 1); + break; + } + } + global_kw_index++; + } + } + + return tran_kw; +} + + +static ecl_kw_type * ecl_nnc_data_get_kw( const ecl_grid_type * grid, const ecl_file_view_type * init_file_view, int lgr_nr1, int lgr_nr2 , int kw_type) { + + const char * kw = ecl_nnc_data_get_str_kw(kw_type, lgr_nr1, lgr_nr2); + if (lgr_nr1 == 0 || lgr_nr1 == lgr_nr2) + return ecl_nnc_data_get_gl_kw( init_file_view , kw, kw_type, lgr_nr2 ); + else + if (kw_type == TRANS_DATA) + return ecl_nnc_data_get_tranll_kw( grid , init_file_view , lgr_nr1 , lgr_nr2 ); + else + return NULL; +} + +static void assert_correct_kw_count(ecl_kw_type * kw, char * function_name, bool check_kw_count, int correct_kw_count, int kw_count) { + if (check_kw_count & (correct_kw_count != kw_count)) + util_abort("In function %s, reading kw: %s. %d != %d", function_name, ecl_kw_get_header(kw), correct_kw_count, kw_count); +} + + +static void ecl_nnc_data_set_values(ecl_nnc_data_type * data, const ecl_grid_type * grid, const ecl_nnc_geometry_type * nnc_geo, const ecl_file_view_type * init_file, int kw_type) { + + int current_grid1 = -1; + int current_grid2 = -1; + ecl_kw_type * current_kw = NULL; + int correct_kw_count = 0; + int kw_count = 0; + bool check_kw_count = false; + int nnc_size = ecl_nnc_geometry_size( nnc_geo ); + + for (int nnc_index = 0; nnc_index < nnc_size; nnc_index++) { + const ecl_nnc_pair_type * pair = ecl_nnc_geometry_iget( nnc_geo, nnc_index ); + int grid1 = pair->grid_nr1; + int grid2 = pair->grid_nr2; + + if (grid1 != current_grid1 || grid2 != current_grid2) { + current_grid1 = grid1; + current_grid2 = grid2; + assert_correct_kw_count(current_kw, __func__, check_kw_count, correct_kw_count, kw_count); + current_kw = ecl_nnc_data_get_kw( grid, init_file, grid1 , grid2 , kw_type); + kw_count = 0; + if (current_kw) { + correct_kw_count = ecl_kw_get_size( current_kw ); + check_kw_count = true; + data->size = nnc_index + correct_kw_count; + } + else { + check_kw_count = false; + printf("Warning: failed to obtain kw from file in function %s. ", __func__); + printf("Grid1: %d, Grid2 %d\n", current_grid1, current_grid2); + } + } + if (current_kw) { + data->values[nnc_index] = ecl_kw_iget_as_double(current_kw, pair->input_index); + kw_count++; + } + else + data->values[nnc_index] = -1; + } + assert_correct_kw_count(current_kw, __func__, check_kw_count, correct_kw_count, kw_count); +} + +static ecl_nnc_data_type * ecl_nnc_data_alloc__(const ecl_grid_type * grid, const ecl_nnc_geometry_type * nnc_geo, const ecl_file_view_type * init_file, int kw_type) { + ecl_nnc_data_type * data = util_malloc(sizeof * data); + + data->size = 0; + + int nnc_size = ecl_nnc_geometry_size( nnc_geo ); + + data->values = util_malloc( nnc_size * sizeof(double)); + + ecl_nnc_data_set_values(data, grid, nnc_geo, init_file, kw_type); + + return data; +} + +ecl_nnc_data_type * ecl_nnc_data_alloc_tran(const ecl_grid_type * grid, const ecl_nnc_geometry_type * nnc_geo, const ecl_file_view_type * init_file) { + return ecl_nnc_data_alloc__(grid, nnc_geo, init_file, TRANS_DATA); +} + +ecl_nnc_data_type * ecl_nnc_data_alloc_wat_flux(const ecl_grid_type * grid, const ecl_nnc_geometry_type * nnc_geo, const ecl_file_view_type * init_file) { + return ecl_nnc_data_alloc__(grid, nnc_geo, init_file, WTR_FLUX_DATA); +} + +ecl_nnc_data_type * ecl_nnc_data_alloc_oil_flux(const ecl_grid_type * grid, const ecl_nnc_geometry_type * nnc_geo, const ecl_file_view_type * init_file) { + return ecl_nnc_data_alloc__(grid, nnc_geo, init_file, OIL_FLUX_DATA); +} + +ecl_nnc_data_type * ecl_nnc_data_alloc_gas_flux(const ecl_grid_type * grid, const ecl_nnc_geometry_type * nnc_geo, const ecl_file_view_type * init_file) { + return ecl_nnc_data_alloc__(grid, nnc_geo, init_file, GAS_FLUX_DATA); +} + +void ecl_nnc_data_free(ecl_nnc_data_type * data) { + free(data->values); + free(data); +} + + + +int ecl_nnc_data_get_size(ecl_nnc_data_type * data) { + return data->size; +} + +const double * ecl_nnc_data_get_values( const ecl_nnc_data_type * data ) { + return data->values; +} + + +double ecl_nnc_data_iget_value(const ecl_nnc_data_type * data, int index) { + if (index < data->size) + return data->values[index]; + else + util_abort("%s: index value:%d out range: [0,%d) \n",__func__ , index , data->size); +} + + + + diff --git a/ThirdParty/Ert/libecl/src/ecl_nnc_export.c b/ThirdParty/Ert/lib/ecl/ecl_nnc_export.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_nnc_export.c rename to ThirdParty/Ert/lib/ecl/ecl_nnc_export.c diff --git a/ThirdParty/Ert/libecl/src/ecl_nnc_geometry.c b/ThirdParty/Ert/lib/ecl/ecl_nnc_geometry.c similarity index 95% rename from ThirdParty/Ert/libecl/src/ecl_nnc_geometry.c rename to ThirdParty/Ert/lib/ecl/ecl_nnc_geometry.c index 378112cced..064862c16a 100644 --- a/ThirdParty/Ert/libecl/src/ecl_nnc_geometry.c +++ b/ThirdParty/Ert/lib/ecl/ecl_nnc_geometry.c @@ -124,3 +124,11 @@ const ecl_nnc_pair_type * ecl_nnc_geometry_iget( const ecl_nnc_geometry_type * n return struct_vector_iget_ptr( nnc_geo->data , index ); } + + +bool ecl_nnc_geometry_same_kw( const ecl_nnc_pair_type * nnc1 , const ecl_nnc_pair_type * nnc2) { + if ((nnc1->grid_nr1 == nnc2->grid_nr1) && (nnc1->grid_nr2 == nnc2->grid_nr2)) + return true; + else + return false; +} diff --git a/ThirdParty/Ert/libecl/src/ecl_region.c b/ThirdParty/Ert/lib/ecl/ecl_region.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_region.c rename to ThirdParty/Ert/lib/ecl/ecl_region.c diff --git a/ThirdParty/Ert/libecl/src/ecl_rft_cell.c b/ThirdParty/Ert/lib/ecl/ecl_rft_cell.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_rft_cell.c rename to ThirdParty/Ert/lib/ecl/ecl_rft_cell.c diff --git a/ThirdParty/Ert/libecl/src/ecl_rft_file.c b/ThirdParty/Ert/lib/ecl/ecl_rft_file.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_rft_file.c rename to ThirdParty/Ert/lib/ecl/ecl_rft_file.c diff --git a/ThirdParty/Ert/libecl/src/ecl_rft_node.c b/ThirdParty/Ert/lib/ecl/ecl_rft_node.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_rft_node.c rename to ThirdParty/Ert/lib/ecl/ecl_rft_node.c diff --git a/ThirdParty/Ert/libecl/src/ecl_rst_file.c b/ThirdParty/Ert/lib/ecl/ecl_rst_file.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_rst_file.c rename to ThirdParty/Ert/lib/ecl/ecl_rst_file.c diff --git a/ThirdParty/Ert/libecl/src/ecl_rsthead.c b/ThirdParty/Ert/lib/ecl/ecl_rsthead.c similarity index 96% rename from ThirdParty/Ert/libecl/src/ecl_rsthead.c rename to ThirdParty/Ert/lib/ecl/ecl_rsthead.c index e515df45fd..e8d9cef33a 100644 --- a/ThirdParty/Ert/libecl/src/ecl_rsthead.c +++ b/ThirdParty/Ert/lib/ecl/ecl_rsthead.c @@ -88,8 +88,7 @@ ecl_rsthead_type * ecl_rsthead_alloc_from_kw( int report_step , const ecl_kw_typ // The only derived quantity rsthead->sim_time = rsthead_date( rsthead->day , rsthead->month , rsthead->year ); } - if (doubhead_kw) - rsthead->sim_days = ecl_kw_iget_double( doubhead_kw , DOUBHEAD_DAYS_INDEX ); + rsthead->sim_days = ecl_kw_iget_double( doubhead_kw , DOUBHEAD_DAYS_INDEX ); if (logihead_kw) rsthead->dualp = ecl_kw_iget_bool( logihead_kw , LOGIHEAD_DUALP_INDEX); @@ -110,15 +109,12 @@ ecl_rsthead_type * ecl_rsthead_alloc_from_kw( int report_step , const ecl_kw_typ ecl_rsthead_type * ecl_rsthead_alloc( const ecl_file_view_type * rst_view, int report_step) { const ecl_kw_type * intehead_kw = ecl_file_view_iget_named_kw( rst_view , INTEHEAD_KW , 0); - const ecl_kw_type * doubhead_kw = NULL; + const ecl_kw_type * doubhead_kw = ecl_file_view_iget_named_kw( rst_view , DOUBHEAD_KW , 0); const ecl_kw_type * logihead_kw = NULL; if (ecl_file_view_has_kw(rst_view, LOGIHEAD_KW)) logihead_kw = ecl_file_view_iget_named_kw( rst_view , LOGIHEAD_KW , 0); - if (ecl_file_view_has_kw(rst_view, DOUBHEAD_KW)) - doubhead_kw = ecl_file_view_iget_named_kw(rst_view, DOUBHEAD_KW, 0); - if (ecl_file_view_has_kw( rst_view , SEQNUM_KW)) { const ecl_kw_type * seqnum_kw = ecl_file_view_iget_named_kw( rst_view , SEQNUM_KW , 0); report_step = ecl_kw_iget_int( seqnum_kw , 0); diff --git a/ThirdParty/Ert/libecl/src/ecl_smspec.c b/ThirdParty/Ert/lib/ecl/ecl_smspec.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_smspec.c rename to ThirdParty/Ert/lib/ecl/ecl_smspec.c diff --git a/ThirdParty/Ert/libecl/src/ecl_subsidence.c b/ThirdParty/Ert/lib/ecl/ecl_subsidence.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_subsidence.c rename to ThirdParty/Ert/lib/ecl/ecl_subsidence.c diff --git a/ThirdParty/Ert/libecl/src/ecl_sum.c b/ThirdParty/Ert/lib/ecl/ecl_sum.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_sum.c rename to ThirdParty/Ert/lib/ecl/ecl_sum.c diff --git a/ThirdParty/Ert/libecl/src/ecl_sum_data.c b/ThirdParty/Ert/lib/ecl/ecl_sum_data.c similarity index 90% rename from ThirdParty/Ert/libecl/src/ecl_sum_data.c rename to ThirdParty/Ert/lib/ecl/ecl_sum_data.c index c8871fb84d..c8cdffd078 100644 --- a/ThirdParty/Ert/libecl/src/ecl_sum_data.c +++ b/ThirdParty/Ert/lib/ecl/ecl_sum_data.c @@ -471,18 +471,13 @@ double ecl_sum_data_get_sim_length( const ecl_sum_data_type * data ) { */ bool ecl_sum_data_check_sim_time( const ecl_sum_data_type * data , time_t sim_time) { - if (time_interval_contains( data->sim_time , sim_time ) || (sim_time == time_interval_get_end( data->sim_time))) - return true; - else - return false; + return (time_interval_contains(data->sim_time, sim_time) + || (sim_time == time_interval_get_end(data->sim_time))); } bool ecl_sum_data_check_sim_days( const ecl_sum_data_type * data , double sim_days) { - if ((sim_days < data->days_start) || ( sim_days > data->sim_length)) - return false; - else - return true; + return sim_days >= data->days_start && sim_days <= data->sim_length; } @@ -526,10 +521,10 @@ bool ecl_sum_data_check_sim_days( const ecl_sum_data_type * data , double sim_da static int ecl_sum_data_get_index_from_sim_time( const ecl_sum_data_type * data , time_t sim_time) { - time_t data_start_time = time_interval_get_start( data->sim_time ); - time_t sim_end = time_interval_get_end( data->sim_time ); + time_t data_start_time = time_interval_get_start(data->sim_time); + time_t sim_end = time_interval_get_end(data->sim_time); - if (!ecl_sum_data_check_sim_time( data , sim_time )) { + if (!ecl_sum_data_check_sim_time(data, sim_time)) { fprintf(stderr , "Simulation start: "); util_fprintf_date_utc( ecl_smspec_get_start_time( data->smspec ) , stderr ); fprintf(stderr , "Data start......: "); util_fprintf_date_utc( data_start_time , stderr ); fprintf(stderr , "Simulation end .: "); util_fprintf_date_utc( sim_end , stderr ); @@ -543,47 +538,25 @@ static int ecl_sum_data_get_index_from_sim_time( const ecl_sum_data_type * data perfectly well be 'holes' in the time domain, because of e.g. the RPTONLY keyword. */ - { - int low_index = 0; - int high_index = vector_get_size( data->data ); - int internal_index = INVALID_MINISTEP_NR; + int low_index = 0; + int high_index = vector_get_size(data->data) - 1; - while (internal_index < 0) { - if (low_index == high_index) - internal_index = low_index; - else { - int center_index = 0.5*( low_index + high_index ); - const ecl_sum_tstep_type * ministep = ecl_sum_data_iget_ministep( data , center_index ); + // perform binary search + while (low_index+1 < high_index) { + int center_index = (low_index + high_index) / 2; + const ecl_sum_tstep_type * center_step = ecl_sum_data_iget_ministep(data, center_index); + const time_t center_time = ecl_sum_tstep_get_sim_time(center_step); - if ((high_index - low_index) == 1) { - /* Degenerate special case. */ - if (sim_time < ecl_sum_tstep_get_sim_time( ministep )) - internal_index = low_index; - else - internal_index = high_index; - } else { - if (sim_time > ecl_sum_tstep_get_sim_time( ministep )) /* Low-----Center---X---High */ - low_index = center_index; - else { - time_t prev_time = data_start_time; - if (center_index > 0) { - const ecl_sum_tstep_type * prev_step = ecl_sum_data_iget_ministep( data , center_index - 1 ); - prev_time = ecl_sum_tstep_get_sim_time( prev_step ); - } - - if (prev_time < sim_time) - internal_index = center_index; /* Found it */ - else - high_index = center_index; - } - } - } - } - return internal_index; + if (sim_time > center_time) + low_index = center_index; + else + high_index = center_index; } -} + const ecl_sum_tstep_type * low_step = ecl_sum_data_iget_ministep(data, low_index); + return sim_time <= ecl_sum_tstep_get_sim_time(low_step) ? low_index : high_index; +} int ecl_sum_data_get_index_from_sim_days( const ecl_sum_data_type * data , double sim_days) { time_t sim_time = ecl_smspec_get_start_time( data->smspec ); @@ -594,7 +567,7 @@ int ecl_sum_data_get_index_from_sim_days( const ecl_sum_data_type * data , doubl /** This function will take a true time 'sim_time' as input. The - ministep indices bracketing this sim_time is identified, and the + ministep indices bracketing this sim_time are identified, and the corresponding weights are calculated. The actual value we are interested in can then be computed with the @@ -616,40 +589,40 @@ int ecl_sum_data_get_index_from_sim_days( const ecl_sum_data_type * data , doubl function should be used), consult documentation at the top of this file. */ +void ecl_sum_data_init_interp_from_sim_time(const ecl_sum_data_type* data, + time_t sim_time, + int* index1, + int* index2, + double* weight1, + double* weight2) { + int idx = ecl_sum_data_get_index_from_sim_time(data, sim_time); - - -void ecl_sum_data_init_interp_from_sim_time( const ecl_sum_data_type * data , time_t sim_time, int *_index1, int *_index2 , double * _weight1 , double *_weight2) { - int index2 = ecl_sum_data_get_index_from_sim_time( data , sim_time); - int index1; - const ecl_sum_tstep_type * ministep2 = ecl_sum_data_iget_ministep( data , index2 ); - const ecl_sum_tstep_type * ministep1; - time_t sim_time2 = ecl_sum_tstep_get_sim_time( ministep2 ); - - - index1 = index2; - while (true) { - index1--; - ministep1 = ecl_sum_data_iget_ministep( data , index1 ); - { - time_t sim_time1 = ecl_sum_tstep_get_sim_time( ministep1 ); - if (sim_time1 < sim_time2) - break; - } - if (index1 == 0) - util_abort("%s: Hmm internal error?? \n",__func__); + // if sim_time is first date, idx=0 and then we cannot interpolate, so we give + // weight 1 to index1=index2=0. + if (idx == 0) { + *index1 = 0; + *index2 = 0; + *weight1 = 1; + *weight2 = 0; + return; } - { - double weight2 = (sim_time - ecl_sum_tstep_get_sim_time( ministep1 )); - double weight1 = -(sim_time - ecl_sum_tstep_get_sim_time( ministep2 )); + const ecl_sum_tstep_type * ministep1 = ecl_sum_data_iget_ministep(data, idx-1); + const ecl_sum_tstep_type * ministep2 = ecl_sum_data_iget_ministep(data, idx); + time_t sim_time1 = ecl_sum_tstep_get_sim_time(ministep1); + time_t sim_time2 = ecl_sum_tstep_get_sim_time(ministep2); - *_index1 = index1; - *_index2 = index2; - *_weight1 = weight1 / ( weight1 + weight2 ); - *_weight2 = weight2 / ( weight1 + weight2 ); - } + *index1 = idx-1; + *index2 = idx; + + // weights the interpolation each of the ministeps according to distance from sim_time + double time_diff = sim_time2 - sim_time1; + double time_dist1 = (sim_time - sim_time1); + double time_dist2 = -(sim_time - sim_time2); + + *weight1 = time_dist2 / time_diff; + *weight2 = time_dist1 / time_diff; } @@ -661,51 +634,42 @@ void ecl_sum_data_init_interp_from_sim_days( const ecl_sum_data_type * data , do } -double_vector_type * ecl_sum_data_alloc_seconds_solution( const ecl_sum_data_type * data , const smspec_node_type * node , double cmp_value, bool rates_clamp_lower) { - double_vector_type * solution = double_vector_alloc( 0, 0); - const int param_index = smspec_node_get_params_index( node ); - const int size = vector_get_size( data->data); - const double is_rate = smspec_node_is_rate( node ); +double_vector_type * ecl_sum_data_alloc_seconds_solution(const ecl_sum_data_type * data, const smspec_node_type * node, double cmp_value, bool rates_clamp_lower) { + double_vector_type * solution = double_vector_alloc(0, 0); + const int param_index = smspec_node_get_params_index(node); + const int size = vector_get_size(data->data); - if (size > 1) { - int index = 0; - const ecl_sum_tstep_type * ministep = ecl_sum_data_iget_ministep( data , index ); - const ecl_sum_tstep_type * prev_ministep; - double value = ecl_sum_tstep_iget( ministep , param_index ); - double prev_value; + if (size <= 1) + return solution; - while (true) { - index++; - if (index >= size) - break; + for (int index = 0; index < size; ++index) { + int prev_index = util_int_max(0, index-1); - prev_ministep = ministep; - prev_value = value; + const ecl_sum_tstep_type * ministep = ecl_sum_data_iget_ministep(data, index); + const ecl_sum_tstep_type * prev_ministep = ecl_sum_data_iget_ministep(data, prev_index); + double value = ecl_sum_tstep_iget(ministep, param_index); + double prev_value = ecl_sum_tstep_iget(prev_ministep, param_index); - ministep = ecl_sum_data_iget_ministep( data , index ); - value = ecl_sum_tstep_iget( ministep , param_index ); + // cmp_value in interval value (closed) and prev_value (open) + bool contained = value == cmp_value; + contained |= (util_double_min(prev_value, value) < cmp_value) && + (cmp_value < util_double_max(prev_value, value)); - if ((value == cmp_value) || - (((value - cmp_value) * (cmp_value - prev_value)) > 0)) { - double time1 = ecl_sum_tstep_get_sim_seconds( prev_ministep ); - double time2 = ecl_sum_tstep_get_sim_seconds( ministep ); + if (!contained) + continue; - if (is_rate) { - if (rates_clamp_lower) - double_vector_append( solution , time1 + 1 ); - else - double_vector_append( solution , time2 ); - } else { - double slope = (value - prev_value) / (time2 - time1); - double seconds = (cmp_value - prev_value) / slope + time1; + double prev_time = ecl_sum_tstep_get_sim_seconds(prev_ministep); + double time = ecl_sum_tstep_get_sim_seconds(ministep); - double_vector_append( solution , seconds ); - } + if (smspec_node_is_rate(node)) { + double_vector_append(solution, rates_clamp_lower ? prev_time + 1 : time); + } else { + double slope = (value - prev_value) / (time - prev_time); + double seconds = (cmp_value - prev_value)/slope + prev_time; - } + double_vector_append(solution, seconds); } } - return solution; } @@ -1216,35 +1180,32 @@ double ecl_sum_data_interp_get(const ecl_sum_data_type * data , int time_index1 } -void ecl_sum_data_fwrite_interp_csv_line(const ecl_sum_data_type * data , time_t sim_time, const ecl_sum_vector_type * keylist, FILE *fp){ - int num_keywords = ecl_sum_vector_get_size(keylist); - double weight1 , weight2; - int time_index1 , time_index2; +void ecl_sum_data_fwrite_interp_csv_line(const ecl_sum_data_type * data, time_t sim_time, const ecl_sum_vector_type * keylist, FILE *fp){ + int num_keywords = ecl_sum_vector_get_size(keylist); + double weight1, weight2; + int time_index1, time_index2; + + ecl_sum_data_init_interp_from_sim_time(data, sim_time, &time_index1, &time_index2, &weight1, &weight2); + + for (int i = 0; i < num_keywords; i++) { + int params_index = ecl_sum_vector_iget_param_index(keylist, i); + double value = 0.0; - int i; - - ecl_sum_data_init_interp_from_sim_time( data , sim_time , &time_index1 , &time_index2 , &weight1 , &weight2); - for(i = 0; i< num_keywords; i++ ){ - bool is_rate = ecl_sum_vector_iget_is_rate(keylist, i); - int params_index = ecl_sum_vector_iget_param_index(keylist , i); - if(is_rate){ - int time_index; - if (sim_time == time_interval_get_start( data->sim_time )) - time_index = 0; - else - time_index = ecl_sum_data_get_index_from_sim_time( data , sim_time ); - - value = ecl_sum_data_iget( data , time_index , params_index); - } else { - value = ecl_sum_data_interp_get( data , time_index1 , time_index2 , weight1 , weight2 , params_index); - - } - if(i == 0){ - fprintf(fp , "%f",value); - }else{ - fprintf(fp , ",%f",value); - } + bool is_rate = ecl_sum_vector_iget_is_rate(keylist, i); + if (is_rate) { + int time_index = ecl_sum_data_get_index_from_sim_time(data, sim_time); + // uses step function since it is a rate + value = ecl_sum_data_iget(data, time_index, params_index); + } else { + // uses interpolation between timesteps + value = ecl_sum_data_interp_get(data, time_index1, time_index2, weight1, weight2, params_index); } + + if (i == 0) + fprintf(fp, "%f", value); + else + fprintf(fp, ",%f", value); + } } @@ -1253,7 +1214,6 @@ void ecl_sum_data_fwrite_interp_csv_line(const ecl_sum_data_type * data , time_t double ecl_sum_data_get_from_sim_time( const ecl_sum_data_type * data , time_t sim_time , const smspec_node_type * smspec_node) { int params_index = smspec_node_get_params_index( smspec_node ); if (smspec_node_is_rate( smspec_node )) { - int time_index; /* In general the mapping from sim_time to index is based on half open intervals, which are closed in the upper end: @@ -1267,11 +1227,7 @@ double ecl_sum_data_get_from_sim_time( const ecl_sum_data_type * data , time_t s with the ECLIPSE results if you ask for a value interpolated to the starting time. */ - if (sim_time == time_interval_get_start( data->sim_time )) - time_index = 0; - else - time_index = ecl_sum_data_get_index_from_sim_time( data , sim_time ); - + int time_index = ecl_sum_data_get_index_from_sim_time( data , sim_time ); return ecl_sum_data_iget( data , time_index , params_index); } else { /* Interpolated lookup based on two (hopefully) consecutive ministeps. */ diff --git a/ThirdParty/Ert/libecl/src/ecl_sum_file.c b/ThirdParty/Ert/lib/ecl/ecl_sum_file.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_sum_file.c rename to ThirdParty/Ert/lib/ecl/ecl_sum_file.c diff --git a/ThirdParty/Ert/libecl/src/ecl_sum_index.c b/ThirdParty/Ert/lib/ecl/ecl_sum_index.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_sum_index.c rename to ThirdParty/Ert/lib/ecl/ecl_sum_index.c diff --git a/ThirdParty/Ert/libecl/src/ecl_sum_tstep.c b/ThirdParty/Ert/lib/ecl/ecl_sum_tstep.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_sum_tstep.c rename to ThirdParty/Ert/lib/ecl/ecl_sum_tstep.c diff --git a/ThirdParty/Ert/libecl/src/ecl_sum_vector.c b/ThirdParty/Ert/lib/ecl/ecl_sum_vector.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_sum_vector.c rename to ThirdParty/Ert/lib/ecl/ecl_sum_vector.c diff --git a/ThirdParty/Ert/libecl/src/ecl_type.c b/ThirdParty/Ert/lib/ecl/ecl_type.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_type.c rename to ThirdParty/Ert/lib/ecl/ecl_type.c diff --git a/ThirdParty/Ert/libecl/src/ecl_type_python.c b/ThirdParty/Ert/lib/ecl/ecl_type_python.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_type_python.c rename to ThirdParty/Ert/lib/ecl/ecl_type_python.c diff --git a/ThirdParty/Ert/libecl/src/ecl_util.c b/ThirdParty/Ert/lib/ecl/ecl_util.c similarity index 100% rename from ThirdParty/Ert/libecl/src/ecl_util.c rename to ThirdParty/Ert/lib/ecl/ecl_util.c diff --git a/ThirdParty/Ert/libecl/src/fault_block.c b/ThirdParty/Ert/lib/ecl/fault_block.c similarity index 98% rename from ThirdParty/Ert/libecl/src/fault_block.c rename to ThirdParty/Ert/lib/ecl/fault_block.c index cb84df721e..d0b4f91e86 100644 --- a/ThirdParty/Ert/libecl/src/fault_block.c +++ b/ThirdParty/Ert/lib/ecl/fault_block.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #define FAULT_BLOCK_ID 3297376 @@ -50,7 +51,7 @@ UTIL_IS_INSTANCE_FUNCTION( fault_block , FAULT_BLOCK_ID ) static UTIL_SAFE_CAST_FUNCTION( fault_block , FAULT_BLOCK_ID ) -static fault_block_type * fault_block_alloc( const fault_block_layer_type * parent_layer , int block_id ) { +fault_block_type * fault_block_alloc( const fault_block_layer_type * parent_layer , int block_id ) { fault_block_type * block = util_malloc( sizeof * block ); UTIL_TYPE_ID_INIT( block , FAULT_BLOCK_ID ); block->parent_layer = parent_layer; @@ -77,7 +78,7 @@ int fault_block_get_id( const fault_block_type * block ) { } -static void fault_block_free( fault_block_type * block ) { +void fault_block_free( fault_block_type * block ) { int_vector_free( block->i_list ); int_vector_free( block->j_list ); int_vector_free( block->region_list ); diff --git a/ThirdParty/Ert/libecl/src/fault_block_layer.c b/ThirdParty/Ert/lib/ecl/fault_block_layer.c similarity index 97% rename from ThirdParty/Ert/libecl/src/fault_block_layer.c rename to ThirdParty/Ert/lib/ecl/fault_block_layer.c index 87c899f118..9466515b42 100644 --- a/ThirdParty/Ert/libecl/src/fault_block_layer.c +++ b/ThirdParty/Ert/lib/ecl/fault_block_layer.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #define FAULT_BLOCK_LAYER_ID 2297476 @@ -34,21 +35,18 @@ the fault_block.c file; however the fault blocks should be closely linked to the layer object in the fault_block_layer structure - it is therefor not possible/legal to create a fault block instance by - itself. To support that encapsulation the fault_block.c file is - included here, and the functions: + itself. To support that encapsulation the fault_block.c file is included + here, and the functions: fault_block_alloc(); fault_block_free(); Which must be called through the fault_block_layer class are made - static. + declared here. */ -static fault_block_type * fault_block_alloc( const fault_block_layer_type * parent_layer , int block_id ); -static void fault_block_free( fault_block_type * block ); - -#include "fault_block.c" - +fault_block_type * fault_block_alloc( const fault_block_layer_type * parent_layer , int block_id ); +void fault_block_free( fault_block_type * block, int block_id ); struct fault_block_layer_struct { UTIL_TYPE_ID_DECLARATION; diff --git a/ThirdParty/Ert/libecl/src/fortio.c b/ThirdParty/Ert/lib/ecl/fortio.c similarity index 95% rename from ThirdParty/Ert/libecl/src/fortio.c rename to ThirdParty/Ert/lib/ecl/fortio.c index 5cc6f43860..8b3856b6e5 100644 --- a/ThirdParty/Ert/libecl/src/fortio.c +++ b/ThirdParty/Ert/lib/ecl/fortio.c @@ -88,7 +88,7 @@ struct fortio_struct { Observe that the semantics of the fortio_fseek() function depends on whether the file is writable. */ - bool readable; + bool writable; offset_type read_size; }; @@ -96,15 +96,16 @@ struct fortio_struct { UTIL_IS_INSTANCE_FUNCTION( fortio , FORTIO_ID ); UTIL_SAFE_CAST_FUNCTION( fortio, FORTIO_ID ); -static fortio_type * fortio_alloc__(const char *filename , bool fmt_file , bool endian_flip_header , bool stream_owner , bool readable) { +static fortio_type * fortio_alloc__(const char *filename , bool fmt_file , bool endian_flip_header , bool stream_owner , bool writable) { fortio_type * fortio = util_malloc(sizeof * fortio ); UTIL_TYPE_ID_INIT( fortio, FORTIO_ID ); fortio->filename = util_alloc_string_copy(filename); fortio->endian_flip_header = endian_flip_header; fortio->fmt_file = fmt_file; fortio->stream_owner = stream_owner; - fortio->read_size = 0; - fortio->readable = readable; + fortio->writable = writable; + fortio->read_size = 0; + return fortio; } @@ -207,10 +208,9 @@ static void fortio_init_size(fortio_type * fortio) { -fortio_type * fortio_alloc_FILE_wrapper(const char *filename , bool endian_flip_header , bool fmt_file , bool readable , FILE * stream) { - fortio_type * fortio = fortio_alloc__(filename , fmt_file , endian_flip_header , false , readable); +fortio_type * fortio_alloc_FILE_wrapper(const char *filename , bool endian_flip_header , bool fmt_file , bool writable , FILE * stream) { + fortio_type * fortio = fortio_alloc__(filename , fmt_file , endian_flip_header , false , writable); fortio->stream = stream; - fortio_init_size( fortio ); return fortio; } @@ -291,7 +291,7 @@ static FILE * fortio_fopen_append( const char * filename , bool fmt_file ) { fortio_type * fortio_open_reader(const char *filename , bool fmt_file , bool endian_flip_header) { FILE * stream = fortio_fopen_read( filename , fmt_file ); if (stream) { - fortio_type *fortio = fortio_alloc__(filename , fmt_file , endian_flip_header , true , true); + fortio_type *fortio = fortio_alloc__(filename , fmt_file , endian_flip_header , true , false); fortio->stream = stream; fortio->fopen_mode = fortio_fopen_read_mode( fmt_file ); fortio_init_size( fortio ); @@ -306,7 +306,7 @@ fortio_type * fortio_open_reader(const char *filename , bool fmt_file , bool end fortio_type * fortio_open_writer(const char *filename , bool fmt_file , bool endian_flip_header ) { FILE * stream = fortio_fopen_write( filename , fmt_file ); if (stream) { - fortio_type *fortio = fortio_alloc__(filename , fmt_file , endian_flip_header, true , false); + fortio_type *fortio = fortio_alloc__(filename , fmt_file , endian_flip_header, true , true); fortio->stream = stream; fortio->fopen_mode = fortio_fopen_write_mode( fmt_file ); fortio_init_size( fortio ); @@ -333,7 +333,7 @@ fortio_type * fortio_open_readwrite(const char *filename , bool fmt_file , bool fortio_type * fortio_open_append(const char *filename , bool fmt_file , bool endian_flip_header) { FILE * stream = fortio_fopen_append( filename , fmt_file ); if (stream) { - fortio_type *fortio = fortio_alloc__(filename , fmt_file , endian_flip_header , true , false); + fortio_type *fortio = fortio_alloc__(filename , fmt_file , endian_flip_header , true , true); fortio->stream = stream; fortio->fopen_mode = fortio_fopen_append_mode( fmt_file ); @@ -488,6 +488,17 @@ void fortio_data_fseek(fortio_type* fortio, offset_type data_offset, size_t data } } +int fortio_fclean(fortio_type * fortio) { + long current_pos = ftell(fortio->stream); + if(current_pos == -1) + return -1; + + int flush_status = fflush(fortio->stream); + if(flush_status != 0) + return flush_status; + + return fseek(fortio->stream, current_pos, SEEK_SET); +} bool fortio_complete_read(fortio_type *fortio , int record_size) { int trailer; @@ -749,16 +760,17 @@ static bool fortio_fseek__(fortio_type * fortio , offset_type offset , int whenc The semantics of this function depends on the readbale flag of the fortio structure: - readable == false: Ordinary fseek() semantics. + writable == true: Ordinary fseek() semantics which can potentially + grow the file. - readable == true: The function will only seek within the range of + writable == false: The function will only seek within the range of the file, and fail if you try to seek beyond the EOF marker. */ bool fortio_fseek( fortio_type * fortio , offset_type offset , int whence) { - if (!fortio->readable) + if (fortio->writable) return fortio_fseek__( fortio , offset , whence ); else { offset_type new_offset = 0; @@ -819,6 +831,17 @@ bool fortio_read_at_eof( fortio_type * fortio ) { } +/* + When this function is called the underlying file is unlinked, and + the entry will be removed from the filsystem. Subsequent calls which + write to this file will still (superficially) succeed. +*/ + +void fortio_fwrite_error(fortio_type * fortio) { + if (fortio->writable) + unlink( fortio->filename ); +} + /*****************************************************************/ void fortio_fflush(fortio_type * fortio) { fflush( fortio->stream); } diff --git a/ThirdParty/Ert/libecl/src/grid_dims.c b/ThirdParty/Ert/lib/ecl/grid_dims.c similarity index 100% rename from ThirdParty/Ert/libecl/src/grid_dims.c rename to ThirdParty/Ert/lib/ecl/grid_dims.c diff --git a/ThirdParty/Ert/libecl/src/layer.c b/ThirdParty/Ert/lib/ecl/layer.c similarity index 100% rename from ThirdParty/Ert/libecl/src/layer.c rename to ThirdParty/Ert/lib/ecl/layer.c diff --git a/ThirdParty/Ert/libecl/src/nnc_info.c b/ThirdParty/Ert/lib/ecl/nnc_info.c similarity index 100% rename from ThirdParty/Ert/libecl/src/nnc_info.c rename to ThirdParty/Ert/lib/ecl/nnc_info.c diff --git a/ThirdParty/Ert/libecl/src/nnc_vector.c b/ThirdParty/Ert/lib/ecl/nnc_vector.c similarity index 100% rename from ThirdParty/Ert/libecl/src/nnc_vector.c rename to ThirdParty/Ert/lib/ecl/nnc_vector.c diff --git a/ThirdParty/Ert/libecl/src/overview.txt b/ThirdParty/Ert/lib/ecl/overview.txt similarity index 100% rename from ThirdParty/Ert/libecl/src/overview.txt rename to ThirdParty/Ert/lib/ecl/overview.txt diff --git a/ThirdParty/Ert/libecl/src/readme.overview b/ThirdParty/Ert/lib/ecl/readme.overview similarity index 100% rename from ThirdParty/Ert/libecl/src/readme.overview rename to ThirdParty/Ert/lib/ecl/readme.overview diff --git a/ThirdParty/Ert/libecl/src/smspec_node.c b/ThirdParty/Ert/lib/ecl/smspec_node.c similarity index 100% rename from ThirdParty/Ert/libecl/src/smspec_node.c rename to ThirdParty/Ert/lib/ecl/smspec_node.c diff --git a/ThirdParty/Ert/libecl/tests/data/num_cpu1 b/ThirdParty/Ert/lib/ecl/tests/data/num_cpu1 similarity index 100% rename from ThirdParty/Ert/libecl/tests/data/num_cpu1 rename to ThirdParty/Ert/lib/ecl/tests/data/num_cpu1 diff --git a/ThirdParty/Ert/libecl/tests/data/num_cpu2 b/ThirdParty/Ert/lib/ecl/tests/data/num_cpu2 similarity index 100% rename from ThirdParty/Ert/libecl/tests/data/num_cpu2 rename to ThirdParty/Ert/lib/ecl/tests/data/num_cpu2 diff --git a/ThirdParty/Ert/libecl/tests/data/num_cpu3 b/ThirdParty/Ert/lib/ecl/tests/data/num_cpu3 similarity index 100% rename from ThirdParty/Ert/libecl/tests/data/num_cpu3 rename to ThirdParty/Ert/lib/ecl/tests/data/num_cpu3 diff --git a/ThirdParty/Ert/libecl/tests/data/num_cpu4 b/ThirdParty/Ert/lib/ecl/tests/data/num_cpu4 similarity index 100% rename from ThirdParty/Ert/libecl/tests/data/num_cpu4 rename to ThirdParty/Ert/lib/ecl/tests/data/num_cpu4 diff --git a/ThirdParty/Ert/libecl/tests/ecl_alloc_cpgrid.c b/ThirdParty/Ert/lib/ecl/tests/ecl_alloc_cpgrid.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_alloc_cpgrid.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_alloc_cpgrid.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_alloc_grid_dxv_dyv_dzv.c b/ThirdParty/Ert/lib/ecl/tests/ecl_alloc_grid_dxv_dyv_dzv.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_alloc_grid_dxv_dyv_dzv.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_alloc_grid_dxv_dyv_dzv.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_coarse_test.c b/ThirdParty/Ert/lib/ecl/tests/ecl_coarse_test.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_coarse_test.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_coarse_test.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_dualp.c b/ThirdParty/Ert/lib/ecl/tests/ecl_dualp.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_dualp.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_dualp.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_fault_block_collection_statoil.c b/ThirdParty/Ert/lib/ecl/tests/ecl_fault_block_collection_statoil.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_fault_block_collection_statoil.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_fault_block_collection_statoil.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_fault_block_layer.c b/ThirdParty/Ert/lib/ecl/tests/ecl_fault_block_layer.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_fault_block_layer.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_fault_block_layer.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_fault_block_layer_statoil.c b/ThirdParty/Ert/lib/ecl/tests/ecl_fault_block_layer_statoil.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_fault_block_layer_statoil.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_fault_block_layer_statoil.c diff --git a/ThirdParty/Ert/lib/ecl/tests/ecl_file.c b/ThirdParty/Ert/lib/ecl/tests/ecl_file.c new file mode 100644 index 0000000000..2a8246e285 --- /dev/null +++ b/ThirdParty/Ert/lib/ecl/tests/ecl_file.c @@ -0,0 +1,92 @@ + +/* + Copyright (C) 2013 Statoil ASA, Norway. + + The file 'ecl_file.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ERT is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU General Public License at + for more details. +*/ +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +void test_writable(size_t data_size) { + test_work_area_type * work_area = test_work_area_alloc("ecl_file_writable"); + const char * data_file_name = "test_file"; + + ecl_kw_type * kw = ecl_kw_alloc("TEST_KW", data_size, ECL_INT); + for(int i = 0; i < data_size; ++i) + ecl_kw_iset_int(kw, i, ((i*37)+11)%data_size); + + fortio_type * fortio = fortio_open_writer(data_file_name, false, true); + ecl_kw_fwrite(kw, fortio); + fortio_fclose(fortio); + + for(int i = 0; i < 4; ++i) { + ecl_file_type * ecl_file = ecl_file_open(data_file_name, ECL_FILE_WRITABLE); + ecl_kw_type * loaded_kw = ecl_file_view_iget_kw( + ecl_file_get_global_view(ecl_file), + 0); + test_assert_true(ecl_kw_equal(kw, loaded_kw)); + + ecl_file_save_kw(ecl_file, loaded_kw); + ecl_file_close(ecl_file); + } + + ecl_kw_free(kw); + test_work_area_free( work_area ); +} + +void test_truncated() { + test_work_area_type * work_area = test_work_area_alloc("ecl_file_truncated" ); + { + ecl_grid_type * grid = ecl_grid_alloc_rectangular(20,20,20,1,1,1,NULL); + ecl_grid_fwrite_EGRID2( grid , "TEST.EGRID", ECL_METRIC_UNITS ); + ecl_grid_free( grid ); + } + { + ecl_file_type * ecl_file = ecl_file_open("TEST.EGRID" , 0 ); + test_assert_true( ecl_file_is_instance( ecl_file ) ); + ecl_file_close( ecl_file ); + } + + { + offset_type file_size = util_file_size( "TEST.EGRID"); + FILE * stream = util_fopen("TEST.EGRID" , "r+"); + util_ftruncate( stream , file_size / 2 ); + fclose( stream ); + } + { + ecl_file_type * ecl_file = ecl_file_open("TEST.EGRID" , 0 ); + test_assert_NULL( ecl_file ); + } + test_work_area_free( work_area ); +} + + +int main( int argc , char ** argv) { + test_writable(10); + test_writable(1337); + test_truncated(); + exit(0); +} diff --git a/ThirdParty/Ert/libecl/tests/ecl_file.c b/ThirdParty/Ert/lib/ecl/tests/ecl_file_statoil.c similarity index 97% rename from ThirdParty/Ert/libecl/tests/ecl_file.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_file_statoil.c index fa6d19995d..c1cbcc0d03 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_file.c +++ b/ThirdParty/Ert/lib/ecl/tests/ecl_file_statoil.c @@ -1,8 +1,8 @@ /* - Copyright (C) 2013 Statoil ASA, Norway. + Copyright (C) 2017 Statoil ASA, Norway. - The file 'ecl_file.c' is part of ERT - Ensemble based Reservoir Tool. + The file 'ecl_file_statoil.c' is part of ERT - Ensemble based Reservoir Tool. ERT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/ThirdParty/Ert/libecl/tests/ecl_fmt.c b/ThirdParty/Ert/lib/ecl/tests/ecl_fmt.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_fmt.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_fmt.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_fortio.c b/ThirdParty/Ert/lib/ecl/tests/ecl_fortio.c similarity index 93% rename from ThirdParty/Ert/libecl/tests/ecl_fortio.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_fortio.c index c722d49abd..58013a7039 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_fortio.c +++ b/ThirdParty/Ert/lib/ecl/tests/ecl_fortio.c @@ -276,6 +276,25 @@ void test_fseek() { +void test_write_failure() { + test_work_area_type * work_area = test_work_area_alloc("fortio_fseek" ); + { + fortio_type * fortio = fortio_open_writer("PRESSURE" , false , true); + void * buffer = util_malloc( 100 ); + + fortio_fwrite_record( fortio , buffer , 100); + test_assert_true( util_file_exists( "PRESSURE")); + fortio_fwrite_error( fortio ); + test_assert_false( util_file_exists( "PRESSURE")); + fortio_fwrite_record( fortio , buffer , 100); + free( buffer ); + fortio_fclose( fortio ); + test_assert_false( util_file_exists( "PRESSURE")); + + } + test_work_area_free( work_area ); +} + int main( int argc , char ** argv) { util_install_signals(); @@ -304,6 +323,8 @@ int main( int argc , char ** argv) { test_work_area_free( work_area ); } + test_write_failure(); + exit(0); } } diff --git a/ThirdParty/Ert/libecl/tests/ecl_get_num_cpu_test.c b/ThirdParty/Ert/lib/ecl/tests/ecl_get_num_cpu_test.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_get_num_cpu_test.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_get_num_cpu_test.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_DEPTHZ.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_DEPTHZ.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_DEPTHZ.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_DEPTHZ.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_add_nnc.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_add_nnc.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_add_nnc.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_add_nnc.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_case.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_case.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_case.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_case.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_cell_contains.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_cell_contains.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_cell_contains.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_cell_contains.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_cell_contains_wellpath.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_cell_contains_wellpath.c similarity index 65% rename from ThirdParty/Ert/libecl/tests/ecl_grid_cell_contains_wellpath.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_cell_contains_wellpath.c index 0afc83b1c1..3babe99cdb 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_grid_cell_contains_wellpath.c +++ b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_cell_contains_wellpath.c @@ -71,6 +71,25 @@ vector_type * load_expected( const ecl_grid_type * grid, const char * filename ) } +int test_well_point(const ecl_grid_type * grid, const point_type * expected) { + int g = ecl_grid_get_global_index_from_xyz(grid , expected->x, expected->y , expected->z , 0 ); + if (g != ecl_grid_get_global_index3(grid, expected->i,expected->j, expected->k)) { + int i,j,k; + ecl_grid_get_ijk1(grid, g, &i, &j, &k); + bool g_contains_xyz = ecl_grid_cell_contains_xyz1( grid, expected->g , expected->x , expected->y, expected->z); + fprintf(stderr, "(%g,%g,%g) differs: EclGrid: %d:(%d,%d,%d) Expected: %d:(%d,%d,%d) contains:%d\n", + expected->x, expected->y, expected->z, + g, i,j,k, + expected->g, expected->i, expected->j, expected->k, + g_contains_xyz); + } + if (!expected->skip) + test_assert_int_equal( g , ecl_grid_get_global_index3(grid, expected->i,expected->j, expected->k)); + else { + if ( g != ecl_grid_get_global_index3(grid, expected->i,expected->j, expected->k)) + fprintf(stderr," ** Skipping failed test for point: %g %g %g \n", expected->x, expected->y, expected->z); + } +} int main(int argc , char ** argv) { util_install_signals(); @@ -80,19 +99,7 @@ int main(int argc , char ** argv) { for (int c=0; c < vector_get_size( expected ); c++) { const point_type * p = vector_iget_const( expected , c ); - int g = ecl_grid_get_global_index_from_xyz(grid , p->x, p->y , p->z , 0 ); - if (g != ecl_grid_get_global_index3(grid, p->i,p->j, p->k)) { - int i,j,k; - ecl_grid_get_ijk1(grid, g, &i, &j, &k); - fprintf(stderr,"point:%d (%g,%g,%g), Simulated: %d:(%d,%d,%d) Expected: %d:(%d,%d,%d) contains:%d\n", - c , p->x, p->y, p->z, g, i,j,k, p->g, p->i, p->j, p->k, ecl_grid_cell_contains_xyz1( grid, p->g , p->x , p->y, p->z)); - } - if (!p->skip) - test_assert_int_equal( g , ecl_grid_get_global_index3(grid, p->i,p->j, p->k)); - else { - if ( g != ecl_grid_get_global_index3(grid, p->i,p->j, p->k)) - fprintf(stderr," ** Skipping failed test for point:%d \n",c); - } + test_well_point(grid, p); } ecl_grid_free( grid ); vector_free( expected ); diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_cell_volume.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_cell_volume.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_cell_volume.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_cell_volume.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_copy.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_copy.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_copy.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_copy.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_copy_statoil.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_copy_statoil.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_copy_statoil.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_copy_statoil.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_corner.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_corner.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_corner.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_corner.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_create.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_create.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_create.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_create.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_dims.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_dims.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_dims.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_dims.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_export.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_export.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_export.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_export.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_fwrite.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_fwrite.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_fwrite.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_fwrite.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_init_fwrite.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_init_fwrite.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_init_fwrite.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_init_fwrite.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_layer_contains.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_layer_contains.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_layer_contains.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_layer_contains.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_lgr_name.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_lgr_name.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_lgr_name.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_lgr_name.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_reset_actnum.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_reset_actnum.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_reset_actnum.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_reset_actnum.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_simple.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_simple.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_simple.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_simple.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_grid_volume.c b/ThirdParty/Ert/lib/ecl/tests/ecl_grid_volume.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_grid_volume.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_grid_volume.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_init_file.c b/ThirdParty/Ert/lib/ecl/tests/ecl_init_file.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_init_file.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_init_file.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_kw_cmp_string.c b/ThirdParty/Ert/lib/ecl/tests/ecl_kw_cmp_string.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_kw_cmp_string.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_kw_cmp_string.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_kw_equal.c b/ThirdParty/Ert/lib/ecl/tests/ecl_kw_equal.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_kw_equal.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_kw_equal.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_kw_fread.c b/ThirdParty/Ert/lib/ecl/tests/ecl_kw_fread.c similarity index 57% rename from ThirdParty/Ert/libecl/tests/ecl_kw_fread.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_kw_fread.c index be6fd6569b..4174a7e01c 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_kw_fread.c +++ b/ThirdParty/Ert/lib/ecl/tests/ecl_kw_fread.c @@ -22,8 +22,11 @@ #include #include +#include #include #include +#include +#include void test_truncated(const char * filename , offset_type truncate_size) { @@ -74,9 +77,57 @@ void test_fread_alloc() { test_work_area_free( work_area ); } +void test_kw_io_charlength() { + test_work_area_type * work_area = test_work_area_alloc("ecl_kw_io_charlength"); + { + const char * KW0 = "QWERTYUI"; + const char * KW1 = "ABCDEFGHIJTTTTTTTTTTTTTTTTTTTTTTABCDEFGHIJKLMNOP"; + ecl_kw_type * ecl_kw_out0 = ecl_kw_alloc(KW0 , 5, ECL_FLOAT); + ecl_kw_type * ecl_kw_out1 = ecl_kw_alloc(KW1 , 5, ECL_FLOAT); + for (int i=0; i < ecl_kw_get_size( ecl_kw_out1); i++) { + ecl_kw_iset_float( ecl_kw_out0 , i , i*1.5 ); + ecl_kw_iset_float( ecl_kw_out1 , i , i*1.5 ); + } + + { + fortio_type * f = fortio_open_writer( "TEST1" , false, ECL_ENDIAN_FLIP ); + test_assert_true( ecl_kw_fwrite( ecl_kw_out0, f )); + test_assert_false(ecl_kw_fwrite( ecl_kw_out1, f )); + fortio_fclose( f ); + } + + { + test_assert_false( util_file_exists( "TEST1")); + } + + { + FILE * file = util_fopen("TEST2", "w"); + ecl_kw_fprintf_grdecl(ecl_kw_out1 , file); + fclose(file); + } + + { + FILE * file = util_fopen("TEST2", "r"); + ecl_kw_type * ecl_kw_in = ecl_kw_fscanf_alloc_grdecl( file , KW1 , -1 , ECL_FLOAT); + test_assert_string_equal(KW1, ecl_kw_get_header(ecl_kw_in) ); + test_assert_int_equal(5, ecl_kw_get_size( ecl_kw_in) ); + + test_assert_double_equal(ecl_kw_iget_as_double(ecl_kw_in, 0), 0.0); + test_assert_double_equal(ecl_kw_iget_as_double(ecl_kw_in, 4), 6.0); + + fclose(file); + } + + ecl_kw_free( ecl_kw_out0 ); + ecl_kw_free( ecl_kw_out1 ); + } + test_work_area_free( work_area ); +} + int main(int argc , char ** argv) { test_fread_alloc(); + test_kw_io_charlength(); exit(0); } diff --git a/ThirdParty/Ert/libecl/tests/ecl_kw_grdecl.c b/ThirdParty/Ert/lib/ecl/tests/ecl_kw_grdecl.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_kw_grdecl.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_kw_grdecl.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_kw_init.c b/ThirdParty/Ert/lib/ecl/tests/ecl_kw_init.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_kw_init.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_kw_init.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_layer.c b/ThirdParty/Ert/lib/ecl/tests/ecl_layer.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_layer.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_layer.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_layer_statoil.c b/ThirdParty/Ert/lib/ecl/tests/ecl_layer_statoil.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_layer_statoil.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_layer_statoil.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_lfs.c b/ThirdParty/Ert/lib/ecl/tests/ecl_lfs.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_lfs.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_lfs.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_lgr_name.c b/ThirdParty/Ert/lib/ecl/tests/ecl_lgr_name.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_lgr_name.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_lgr_name.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_lgr_test.c b/ThirdParty/Ert/lib/ecl/tests/ecl_lgr_test.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_lgr_test.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_lgr_test.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_nnc_export.c b/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_export.c similarity index 97% rename from ThirdParty/Ert/libecl/tests/ecl_nnc_export.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_nnc_export.c index 527530435a..6cafe9402e 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_nnc_export.c +++ b/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_export.c @@ -28,6 +28,7 @@ #include #include #include +#include @@ -234,6 +235,9 @@ void test_export(const char * name, bool have_tran_data) { { ecl_nnc_geometry_type * nnc_geo = ecl_nnc_geometry_alloc( grid ); + ecl_file_view_type * view_file = ecl_file_get_global_view( init_file ); + ecl_nnc_data_type * nnc_geo_data = ecl_nnc_data_alloc_tran(grid, nnc_geo, view_file); + test_assert_int_equal( ecl_nnc_export_get_size( grid ), ecl_nnc_geometry_size( nnc_geo )); for (int i=0; i < ecl_nnc_geometry_size( nnc_geo ); i++) { const ecl_nnc_pair_type *nnc_pair = ecl_nnc_geometry_iget( nnc_geo , i ); @@ -243,7 +247,10 @@ void test_export(const char * name, bool have_tran_data) { test_assert_int_equal( nnc_pair->grid_nr2 , nnc1->grid_nr2 ); test_assert_int_equal( nnc_pair->global_index1 , nnc1->global_index1 ); test_assert_int_equal( nnc_pair->global_index2 , nnc1->global_index2 ); + test_assert_double_equal(ecl_nnc_data_iget_value(nnc_geo_data, i), nnc1->trans); + } + ecl_nnc_data_free (nnc_geo_data ); ecl_nnc_geometry_free( nnc_geo ); } diff --git a/ThirdParty/Ert/libecl/tests/ecl_nnc_export_get_tran.c b/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_export_get_tran.c similarity index 99% rename from ThirdParty/Ert/libecl/tests/ecl_nnc_export_get_tran.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_nnc_export_get_tran.c index 8c2673837d..881a4d3265 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_nnc_export_get_tran.c +++ b/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_export_get_tran.c @@ -7,7 +7,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + ll ERT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/ThirdParty/Ert/libecl/tests/ecl_nnc_geometry.c b/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_geometry.c similarity index 56% rename from ThirdParty/Ert/libecl/tests/ecl_nnc_geometry.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_nnc_geometry.c index 276a7a30c1..1b2d0af2d7 100644 --- a/ThirdParty/Ert/libecl/tests/ecl_nnc_geometry.c +++ b/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_geometry.c @@ -36,20 +36,38 @@ void test_create_empty() { } void test_create_simple() { - int nx = 10; - int ny = 10; - int nz = 10; - ecl_grid_type * grid0 = ecl_grid_alloc_rectangular(nx,ny,nz,1,1,1,NULL); - - ecl_grid_add_self_nnc(grid0, 0 ,nx*ny + 0, 0 ); - ecl_grid_add_self_nnc(grid0, 1 ,nx*ny + 1, 1 ); - ecl_grid_add_self_nnc(grid0, 2 ,nx*ny + 2, 2 ); + test_work_area_type * work_area = test_work_area_alloc("nnc-INIT"); { - ecl_nnc_geometry_type * nnc_geo = ecl_nnc_geometry_alloc( grid0 ); - test_assert_int_equal( ecl_nnc_geometry_size( nnc_geo ) , 3 ); - ecl_nnc_geometry_free( nnc_geo ); + int nx = 10; + int ny = 10; + int nz = 10; + ecl_grid_type * grid0 = ecl_grid_alloc_rectangular(nx,ny,nz,1,1,1,NULL); + + ecl_grid_add_self_nnc(grid0, 0 ,nx*ny + 0, 0 ); + ecl_grid_add_self_nnc(grid0, 1 ,nx*ny + 1, 1 ); + ecl_grid_add_self_nnc(grid0, 2 ,nx*ny + 2, 2 ); + { + ecl_nnc_geometry_type * nnc_geo = ecl_nnc_geometry_alloc( grid0 ); + test_assert_int_equal( ecl_nnc_geometry_size( nnc_geo ) , 3 ); + + /* + Create a dummy INIT file which *ony* contains a TRANNC keyword with the correct size. + */ + { + ecl_kw_type * trann_nnc = ecl_kw_alloc(TRANNNC_KW , ecl_nnc_geometry_size( nnc_geo ), ECL_FLOAT); + fortio_type * f = fortio_open_writer( "TEST.INIT" , false, ECL_ENDIAN_FLIP ); + + for (int i=0; i < ecl_kw_get_size( trann_nnc); i++) + ecl_kw_iset_float( trann_nnc , i , i*1.0 ); + + ecl_kw_fwrite( trann_nnc , f ); + fortio_fclose( f ); + ecl_kw_free( trann_nnc ); + } + } + ecl_grid_free( grid0 ); } - ecl_grid_free( grid0 ); + test_work_area_free( work_area ); } diff --git a/ThirdParty/Ert/libecl/tests/ecl_nnc_index_list.c b/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_index_list.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_nnc_index_list.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_nnc_index_list.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_nnc_index_list_grid.c b/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_index_list_grid.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_nnc_index_list_grid.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_nnc_index_list_grid.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_nnc_info_test.c b/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_info_test.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_nnc_info_test.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_nnc_info_test.c diff --git a/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_pair.c b/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_pair.c new file mode 100644 index 0000000000..4de0c83190 --- /dev/null +++ b/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_pair.c @@ -0,0 +1,45 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + The file 'ecl_nnc_pair.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ERT is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU General Public License at + for more details. +*/ +#include +#include + +#include +#include + +#include + +void test_pair( int grid1_1 , int grid1_2 , int grid2_1, int grid2_2, bool expected) { + ecl_nnc_pair_type pair1 = {.grid_nr1 = grid1_1, .grid_nr2 = grid1_2, + .global_index1 = 0, + .global_index2 = 0}; + + ecl_nnc_pair_type pair2 = {.grid_nr1 = grid2_1, .grid_nr2 = grid2_2, + .global_index1 = 0, + .global_index2 = 0}; + + test_assert_bool_equal( ecl_nnc_geometry_same_kw( &pair1 , &pair2 ), expected); +} + + + +int main(int argc , char ** argv) { + test_pair(1,1, 1,1, true); + test_pair(1,3, 1,3, true); + test_pair(1,1, 3,3, false); + test_pair(1,3, 3,1, false); +} diff --git a/ThirdParty/Ert/libecl/tests/ecl_nnc_test.c b/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_test.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_nnc_test.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_nnc_test.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_nnc_vector.c b/ThirdParty/Ert/lib/ecl/tests/ecl_nnc_vector.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_nnc_vector.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_nnc_vector.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_region.c b/ThirdParty/Ert/lib/ecl/tests/ecl_region.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_region.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_region.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_region2region_test.c b/ThirdParty/Ert/lib/ecl/tests/ecl_region2region_test.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_region2region_test.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_region2region_test.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_restart_test.c b/ThirdParty/Ert/lib/ecl/tests/ecl_restart_test.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_restart_test.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_restart_test.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_rft.c b/ThirdParty/Ert/lib/ecl/tests/ecl_rft.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_rft.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_rft.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_rft_cell.c b/ThirdParty/Ert/lib/ecl/tests/ecl_rft_cell.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_rft_cell.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_rft_cell.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_rst_file.c b/ThirdParty/Ert/lib/ecl/tests/ecl_rst_file.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_rst_file.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_rst_file.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_rsthead.c b/ThirdParty/Ert/lib/ecl/tests/ecl_rsthead.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_rsthead.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_rsthead.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_smspec.c b/ThirdParty/Ert/lib/ecl/tests/ecl_smspec.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_smspec.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_smspec.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_sum_case_exists.c b/ThirdParty/Ert/lib/ecl/tests/ecl_sum_case_exists.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_sum_case_exists.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_sum_case_exists.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_sum_report_step_compatible.c b/ThirdParty/Ert/lib/ecl/tests/ecl_sum_report_step_compatible.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_sum_report_step_compatible.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_sum_report_step_compatible.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_sum_report_step_equal.c b/ThirdParty/Ert/lib/ecl/tests/ecl_sum_report_step_equal.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_sum_report_step_equal.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_sum_report_step_equal.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_sum_test.c b/ThirdParty/Ert/lib/ecl/tests/ecl_sum_test.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_sum_test.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_sum_test.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_sum_writer.c b/ThirdParty/Ert/lib/ecl/tests/ecl_sum_writer.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_sum_writer.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_sum_writer.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_util_make_date_no_shift.c b/ThirdParty/Ert/lib/ecl/tests/ecl_util_make_date_no_shift.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_util_make_date_no_shift.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_util_make_date_no_shift.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_util_make_date_shift.c b/ThirdParty/Ert/lib/ecl/tests/ecl_util_make_date_shift.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_util_make_date_shift.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_util_make_date_shift.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_util_month_range.c b/ThirdParty/Ert/lib/ecl/tests/ecl_util_month_range.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_util_month_range.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_util_month_range.c diff --git a/ThirdParty/Ert/libecl/tests/ecl_valid_basename.c b/ThirdParty/Ert/lib/ecl/tests/ecl_valid_basename.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/ecl_valid_basename.c rename to ThirdParty/Ert/lib/ecl/tests/ecl_valid_basename.c diff --git a/ThirdParty/Ert/libeclxx/tests/eclxx_filename.cpp b/ThirdParty/Ert/lib/ecl/tests/eclxx_filename.cpp similarity index 100% rename from ThirdParty/Ert/libeclxx/tests/eclxx_filename.cpp rename to ThirdParty/Ert/lib/ecl/tests/eclxx_filename.cpp diff --git a/ThirdParty/Ert/libeclxx/tests/eclxx_fortio.cpp b/ThirdParty/Ert/lib/ecl/tests/eclxx_fortio.cpp similarity index 100% rename from ThirdParty/Ert/libeclxx/tests/eclxx_fortio.cpp rename to ThirdParty/Ert/lib/ecl/tests/eclxx_fortio.cpp diff --git a/ThirdParty/Ert/libeclxx/tests/eclxx_kw.cpp b/ThirdParty/Ert/lib/ecl/tests/eclxx_kw.cpp similarity index 100% rename from ThirdParty/Ert/libeclxx/tests/eclxx_kw.cpp rename to ThirdParty/Ert/lib/ecl/tests/eclxx_kw.cpp diff --git a/ThirdParty/Ert/libeclxx/tests/eclxx_smspec.cpp b/ThirdParty/Ert/lib/ecl/tests/eclxx_smspec.cpp similarity index 96% rename from ThirdParty/Ert/libeclxx/tests/eclxx_smspec.cpp rename to ThirdParty/Ert/lib/ecl/tests/eclxx_smspec.cpp index fc18110fa9..0fd3e89a2f 100644 --- a/ThirdParty/Ert/libeclxx/tests/eclxx_smspec.cpp +++ b/ThirdParty/Ert/lib/ecl/tests/eclxx_smspec.cpp @@ -89,6 +89,12 @@ void test_smspec_block() { test_assert_true( block.num() == 556 ); } +void test_smspec_misc() { + ERT::smspec_node tcpu( "TCPU" ); + test_assert_true( tcpu.type() == ECL_SMSPEC_MISC_VAR ); +} + + void test_smspec_region() { std::string kw( "ROIP" ); int dims[ 3 ] = { 10, 10, 10 }; @@ -120,4 +126,5 @@ int main (int argc, char **argv) { test_smspec_block(); test_smspec_region(); test_smspec_completion(); + test_smspec_misc(); } diff --git a/ThirdParty/Ert/libeclxx/tests/eclxx_types.cpp b/ThirdParty/Ert/lib/ecl/tests/eclxx_types.cpp similarity index 100% rename from ThirdParty/Ert/libeclxx/tests/eclxx_types.cpp rename to ThirdParty/Ert/lib/ecl/tests/eclxx_types.cpp diff --git a/ThirdParty/Ert/libecl/tests/rft_test.c b/ThirdParty/Ert/lib/ecl/tests/rft_test.c similarity index 100% rename from ThirdParty/Ert/libecl/tests/rft_test.c rename to ThirdParty/Ert/lib/ecl/tests/rft_test.c diff --git a/ThirdParty/Ert/lib/ecl/tests/test_ecl_nnc_data.c b/ThirdParty/Ert/lib/ecl/tests/test_ecl_nnc_data.c new file mode 100644 index 0000000000..b1837bc107 --- /dev/null +++ b/ThirdParty/Ert/lib/ecl/tests/test_ecl_nnc_data.c @@ -0,0 +1,102 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + The file 'test_ecl_nnc_data.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ERT is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU General Public License at + for more details. +*/ + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + + + +void test_alloc_global_only(bool data_in_file) { + test_work_area_type * work_area = test_work_area_alloc("nnc-INIT"); + { + int nx = 10; + int ny = 10; + int nz = 10; + ecl_grid_type * grid0 = ecl_grid_alloc_rectangular(nx,ny,nz,1,1,1,NULL); + + ecl_grid_add_self_nnc(grid0, 0 ,nx*ny + 0, 0 ); + ecl_grid_add_self_nnc(grid0, 1 ,nx*ny + 1, 1 ); + ecl_grid_add_self_nnc(grid0, 2 ,nx*ny + 2, 2 ); + { + ecl_nnc_geometry_type * nnc_geo = ecl_nnc_geometry_alloc( grid0 ); + test_assert_int_equal( ecl_nnc_geometry_size( nnc_geo ) , 3 ); + /* + Create a dummy INIT file which *ony* contains a TRANNC keyword with the correct size. + */ + { + ecl_kw_type * trann_nnc = ecl_kw_alloc(TRANNNC_KW , ecl_nnc_geometry_size( nnc_geo ), ECL_FLOAT); + fortio_type * f = fortio_open_writer( "TEST.INIT" , false, ECL_ENDIAN_FLIP ); + + if (data_in_file) { + for (int i=0; i < ecl_kw_get_size( trann_nnc); i++) + ecl_kw_iset_float( trann_nnc , i , i*1.5 ); + + ecl_kw_fwrite( trann_nnc , f ); + } + fortio_fclose( f ); + ecl_kw_free( trann_nnc ); + } + + ecl_file_type * init_file = ecl_file_open( "TEST.INIT" , 0 ); + ecl_file_view_type * view_file = ecl_file_get_global_view( init_file ); + + ecl_nnc_data_type * nnc_geo_data = ecl_nnc_data_alloc_tran(grid0, nnc_geo, view_file); + int nnc_data_size = ecl_nnc_data_get_size( nnc_geo_data ); + + if (data_in_file) { + + test_assert_true( ecl_file_view_has_kw( view_file, TRANNNC_KW) ); + test_assert_true(nnc_data_size == 3); + double * values = ecl_nnc_data_get_values( nnc_geo_data ); + test_assert_double_equal(values[0] , 0); + test_assert_double_equal(values[1] , 1.5); + test_assert_double_equal(values[2] , 3.0); + } + else + test_assert_true(nnc_data_size == 0); + + ecl_nnc_data_free( nnc_geo_data ); + ecl_nnc_geometry_free( nnc_geo ); + ecl_file_close(init_file); + } + ecl_grid_free( grid0 ); + } + test_work_area_free( work_area ); +} + + + + + +int main(int argc , char ** argv) { + + test_alloc_global_only(true); + test_alloc_global_only(false); + + return 0; +} diff --git a/ThirdParty/Ert/lib/ecl/tests/test_ecl_nnc_data_statoil_root.c b/ThirdParty/Ert/lib/ecl/tests/test_ecl_nnc_data_statoil_root.c new file mode 100644 index 0000000000..90bdf8accc --- /dev/null +++ b/ThirdParty/Ert/lib/ecl/tests/test_ecl_nnc_data_statoil_root.c @@ -0,0 +1,128 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + The file 'test_ecl_nnc_data_statoil.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ERT is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU General Public License at + for more details. +*/ + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + + +void assert_data_values_read(ecl_nnc_data_type * nnc_data) { + int data_size = ecl_nnc_data_get_size(nnc_data); + for (int n = 0; n < data_size; n++) { + test_assert_double_not_equal(-1.0, ecl_nnc_data_iget_value(nnc_data, n)); + } +} + +int find_index(ecl_nnc_geometry_type * nnc_geo, int grid1, int grid2, int indx1, int indx2) { + int index = -1; + int nnc_size = ecl_nnc_geometry_size( nnc_geo ); + for (int n = 0; n < nnc_size; n++) { + ecl_nnc_pair_type * pair = ecl_nnc_geometry_iget( nnc_geo, n ); + if (pair->grid_nr1 == grid1 && pair->grid_nr2 == grid2) + if (pair->global_index1 == indx1 && pair->global_index2 ==indx2) { + index = n; + break; + } + } + return index; +} + + +void test_alloc_file_tran(char * filename) { + char * grid_file_name = ecl_util_alloc_filename(NULL , filename , ECL_EGRID_FILE , false , -1); + char * init_file_name = ecl_util_alloc_filename(NULL , filename , ECL_INIT_FILE , false , -1); + ecl_file_type * init_file = ecl_file_open( init_file_name , 0 ); + ecl_grid_type * grid = ecl_grid_alloc( grid_file_name ); + ecl_nnc_geometry_type * nnc_geo = ecl_nnc_geometry_alloc( grid ); + ecl_file_view_type * view_file = ecl_file_get_global_view( init_file ); + + ecl_nnc_data_type * nnc_geo_data = ecl_nnc_data_alloc_tran(grid, nnc_geo, view_file); + test_assert_true( ecl_nnc_geometry_size(nnc_geo) == ecl_nnc_data_get_size(nnc_geo_data) ); + + //These numerical values are hand-tuned the specific input file at: + //${_eclpath}/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3 + int index; + + index = find_index( nnc_geo, 0, 0, 541, 14507); + test_assert_double_equal(13.784438, ecl_nnc_data_iget_value( nnc_geo_data, index) ); + + index = find_index( nnc_geo, 0, 0, 48365, 118191); + test_assert_double_equal(0.580284 , ecl_nnc_data_iget_value( nnc_geo_data, index) ); + + index = find_index( nnc_geo, 0, 19, 42830, 211); + test_assert_double_equal(0.571021 , ecl_nnc_data_iget_value( nnc_geo_data, index) ); + + index = find_index( nnc_geo, 0, 79, 132406, 76); + test_assert_double_equal(37.547710 , ecl_nnc_data_iget_value( nnc_geo_data, index) ); + + index = find_index( nnc_geo, 18, 12, 303, 115); + test_assert_double_equal(0.677443 , ecl_nnc_data_iget_value( nnc_geo_data, index) ); + + index = find_index( nnc_geo, 72, 71, 255, 179); + test_assert_double_equal(0.045813 , ecl_nnc_data_iget_value( nnc_geo_data, index) ); + + index = find_index( nnc_geo, 110, 109, 271, 275); + test_assert_double_equal(16.372242 , ecl_nnc_data_iget_value( nnc_geo_data, index) ); + + ecl_nnc_data_free(nnc_geo_data); + ecl_nnc_geometry_free(nnc_geo); + ecl_grid_free(grid); + ecl_file_close(init_file); + free(grid_file_name); + free(init_file_name); + +} + + +void test_alloc_file_flux(char * filename, int file_num) { + char * grid_file_name = ecl_util_alloc_filename(NULL , filename , ECL_EGRID_FILE , false , -1); + char * restart_file_name = ecl_util_alloc_filename(NULL , filename , ECL_RESTART_FILE , false , file_num); + + ecl_file_type * restart_file = ecl_file_open( restart_file_name , 0 ); + ecl_grid_type * grid = ecl_grid_alloc( grid_file_name ); + ecl_nnc_geometry_type * nnc_geo = ecl_nnc_geometry_alloc( grid ); + { + ecl_file_view_type * view_file = ecl_file_get_global_view( restart_file ); + + ecl_nnc_data_type * nnc_flux_data = ecl_nnc_data_alloc_wat_flux(grid, nnc_geo, view_file); + assert_data_values_read(nnc_flux_data); + ecl_nnc_data_free( nnc_flux_data ); + } + ecl_nnc_geometry_free(nnc_geo); + ecl_grid_free(grid); + ecl_file_close(restart_file); + free(grid_file_name); + free(restart_file_name); +} + + +int main(int argc , char ** argv) { + test_alloc_file_tran(argv[1]); + test_alloc_file_flux(argv[2], 0); + test_alloc_file_flux(argv[2], 6); + return 0; +} diff --git a/ThirdParty/Ert/libecl_well/tests/well_branch_collection.c b/ThirdParty/Ert/lib/ecl/tests/well_branch_collection.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_branch_collection.c rename to ThirdParty/Ert/lib/ecl/tests/well_branch_collection.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_conn.c b/ThirdParty/Ert/lib/ecl/tests/well_conn.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_conn.c rename to ThirdParty/Ert/lib/ecl/tests/well_conn.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_conn_CF.c b/ThirdParty/Ert/lib/ecl/tests/well_conn_CF.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_conn_CF.c rename to ThirdParty/Ert/lib/ecl/tests/well_conn_CF.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_conn_collection.c b/ThirdParty/Ert/lib/ecl/tests/well_conn_collection.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_conn_collection.c rename to ThirdParty/Ert/lib/ecl/tests/well_conn_collection.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_conn_load.c b/ThirdParty/Ert/lib/ecl/tests/well_conn_load.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_conn_load.c rename to ThirdParty/Ert/lib/ecl/tests/well_conn_load.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_dualp.c b/ThirdParty/Ert/lib/ecl/tests/well_dualp.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_dualp.c rename to ThirdParty/Ert/lib/ecl/tests/well_dualp.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_info.c b/ThirdParty/Ert/lib/ecl/tests/well_info.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_info.c rename to ThirdParty/Ert/lib/ecl/tests/well_info.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_lgr_load.c b/ThirdParty/Ert/lib/ecl/tests/well_lgr_load.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_lgr_load.c rename to ThirdParty/Ert/lib/ecl/tests/well_lgr_load.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_segment.c b/ThirdParty/Ert/lib/ecl/tests/well_segment.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_segment.c rename to ThirdParty/Ert/lib/ecl/tests/well_segment.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_segment_branch_conn_load.c b/ThirdParty/Ert/lib/ecl/tests/well_segment_branch_conn_load.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_segment_branch_conn_load.c rename to ThirdParty/Ert/lib/ecl/tests/well_segment_branch_conn_load.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_segment_collection.c b/ThirdParty/Ert/lib/ecl/tests/well_segment_collection.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_segment_collection.c rename to ThirdParty/Ert/lib/ecl/tests/well_segment_collection.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_segment_conn.c b/ThirdParty/Ert/lib/ecl/tests/well_segment_conn.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_segment_conn.c rename to ThirdParty/Ert/lib/ecl/tests/well_segment_conn.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_segment_conn_load.c b/ThirdParty/Ert/lib/ecl/tests/well_segment_conn_load.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_segment_conn_load.c rename to ThirdParty/Ert/lib/ecl/tests/well_segment_conn_load.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_segment_load.c b/ThirdParty/Ert/lib/ecl/tests/well_segment_load.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_segment_load.c rename to ThirdParty/Ert/lib/ecl/tests/well_segment_load.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_state.c b/ThirdParty/Ert/lib/ecl/tests/well_state.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_state.c rename to ThirdParty/Ert/lib/ecl/tests/well_state.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_state_load.c b/ThirdParty/Ert/lib/ecl/tests/well_state_load.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_state_load.c rename to ThirdParty/Ert/lib/ecl/tests/well_state_load.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_state_load_missing_RSEG.c b/ThirdParty/Ert/lib/ecl/tests/well_state_load_missing_RSEG.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_state_load_missing_RSEG.c rename to ThirdParty/Ert/lib/ecl/tests/well_state_load_missing_RSEG.c diff --git a/ThirdParty/Ert/libecl_well/tests/well_ts.c b/ThirdParty/Ert/lib/ecl/tests/well_ts.c similarity index 100% rename from ThirdParty/Ert/libecl_well/tests/well_ts.c rename to ThirdParty/Ert/lib/ecl/tests/well_ts.c diff --git a/ThirdParty/Ert/libecl_well/src/well_branch_collection.c b/ThirdParty/Ert/lib/ecl/well_branch_collection.c similarity index 100% rename from ThirdParty/Ert/libecl_well/src/well_branch_collection.c rename to ThirdParty/Ert/lib/ecl/well_branch_collection.c diff --git a/ThirdParty/Ert/libecl_well/src/well_conn.c b/ThirdParty/Ert/lib/ecl/well_conn.c similarity index 100% rename from ThirdParty/Ert/libecl_well/src/well_conn.c rename to ThirdParty/Ert/lib/ecl/well_conn.c diff --git a/ThirdParty/Ert/libecl_well/src/well_conn_collection.c b/ThirdParty/Ert/lib/ecl/well_conn_collection.c similarity index 100% rename from ThirdParty/Ert/libecl_well/src/well_conn_collection.c rename to ThirdParty/Ert/lib/ecl/well_conn_collection.c diff --git a/ThirdParty/Ert/libecl_well/src/well_info.c b/ThirdParty/Ert/lib/ecl/well_info.c similarity index 100% rename from ThirdParty/Ert/libecl_well/src/well_info.c rename to ThirdParty/Ert/lib/ecl/well_info.c diff --git a/ThirdParty/Ert/libecl_well/src/well_rseg_loader.c b/ThirdParty/Ert/lib/ecl/well_rseg_loader.c similarity index 100% rename from ThirdParty/Ert/libecl_well/src/well_rseg_loader.c rename to ThirdParty/Ert/lib/ecl/well_rseg_loader.c diff --git a/ThirdParty/Ert/libecl_well/src/well_segment.c b/ThirdParty/Ert/lib/ecl/well_segment.c similarity index 100% rename from ThirdParty/Ert/libecl_well/src/well_segment.c rename to ThirdParty/Ert/lib/ecl/well_segment.c diff --git a/ThirdParty/Ert/libecl_well/src/well_segment_collection.c b/ThirdParty/Ert/lib/ecl/well_segment_collection.c similarity index 100% rename from ThirdParty/Ert/libecl_well/src/well_segment_collection.c rename to ThirdParty/Ert/lib/ecl/well_segment_collection.c diff --git a/ThirdParty/Ert/libecl_well/src/well_state.c b/ThirdParty/Ert/lib/ecl/well_state.c similarity index 100% rename from ThirdParty/Ert/libecl_well/src/well_state.c rename to ThirdParty/Ert/lib/ecl/well_state.c diff --git a/ThirdParty/Ert/libecl_well/src/well_ts.c b/ThirdParty/Ert/lib/ecl/well_ts.c similarity index 100% rename from ThirdParty/Ert/libecl_well/src/well_ts.c rename to ThirdParty/Ert/lib/ecl/well_ts.c diff --git a/ThirdParty/Ert/libert_util/include/ert/util/ert_api_config.h.in b/ThirdParty/Ert/lib/ert_api_config.h.in similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/ert_api_config.h.in rename to ThirdParty/Ert/lib/ert_api_config.h.in diff --git a/ThirdParty/Ert/libgeometry/src/geo_pointset.c b/ThirdParty/Ert/lib/geometry/geo_pointset.c similarity index 100% rename from ThirdParty/Ert/libgeometry/src/geo_pointset.c rename to ThirdParty/Ert/lib/geometry/geo_pointset.c diff --git a/ThirdParty/Ert/libgeometry/src/geo_polygon.c b/ThirdParty/Ert/lib/geometry/geo_polygon.c similarity index 100% rename from ThirdParty/Ert/libgeometry/src/geo_polygon.c rename to ThirdParty/Ert/lib/geometry/geo_polygon.c diff --git a/ThirdParty/Ert/libgeometry/src/geo_polygon_collection.c b/ThirdParty/Ert/lib/geometry/geo_polygon_collection.c similarity index 100% rename from ThirdParty/Ert/libgeometry/src/geo_polygon_collection.c rename to ThirdParty/Ert/lib/geometry/geo_polygon_collection.c diff --git a/ThirdParty/Ert/libgeometry/src/geo_region.c b/ThirdParty/Ert/lib/geometry/geo_region.c similarity index 100% rename from ThirdParty/Ert/libgeometry/src/geo_region.c rename to ThirdParty/Ert/lib/geometry/geo_region.c diff --git a/ThirdParty/Ert/libgeometry/src/geo_surface.c b/ThirdParty/Ert/lib/geometry/geo_surface.c similarity index 100% rename from ThirdParty/Ert/libgeometry/src/geo_surface.c rename to ThirdParty/Ert/lib/geometry/geo_surface.c diff --git a/ThirdParty/Ert/libgeometry/src/geo_util.c b/ThirdParty/Ert/lib/geometry/geo_util.c similarity index 100% rename from ThirdParty/Ert/libgeometry/src/geo_util.c rename to ThirdParty/Ert/lib/geometry/geo_util.c diff --git a/ThirdParty/Ert/libgeometry/tests/geo_polygon.c b/ThirdParty/Ert/lib/geometry/tests/geo_polygon.c similarity index 100% rename from ThirdParty/Ert/libgeometry/tests/geo_polygon.c rename to ThirdParty/Ert/lib/geometry/tests/geo_polygon.c diff --git a/ThirdParty/Ert/libgeometry/tests/geo_polygon_collection.c b/ThirdParty/Ert/lib/geometry/tests/geo_polygon_collection.c similarity index 100% rename from ThirdParty/Ert/libgeometry/tests/geo_polygon_collection.c rename to ThirdParty/Ert/lib/geometry/tests/geo_polygon_collection.c diff --git a/ThirdParty/Ert/libgeometry/tests/geo_surface.c b/ThirdParty/Ert/lib/geometry/tests/geo_surface.c similarity index 100% rename from ThirdParty/Ert/libgeometry/tests/geo_surface.c rename to ThirdParty/Ert/lib/geometry/tests/geo_surface.c diff --git a/ThirdParty/Ert/libgeometry/tests/geo_util_xlines.c b/ThirdParty/Ert/lib/geometry/tests/geo_util_xlines.c similarity index 100% rename from ThirdParty/Ert/libgeometry/tests/geo_util_xlines.c rename to ThirdParty/Ert/lib/geometry/tests/geo_util_xlines.c diff --git a/ThirdParty/Ert/libeclxx/include/ert/ecl/EclFilename.hpp b/ThirdParty/Ert/lib/include/ert/ecl/EclFilename.hpp similarity index 100% rename from ThirdParty/Ert/libeclxx/include/ert/ecl/EclFilename.hpp rename to ThirdParty/Ert/lib/include/ert/ecl/EclFilename.hpp diff --git a/ThirdParty/Ert/libeclxx/include/ert/ecl/EclKW.hpp b/ThirdParty/Ert/lib/include/ert/ecl/EclKW.hpp similarity index 100% rename from ThirdParty/Ert/libeclxx/include/ert/ecl/EclKW.hpp rename to ThirdParty/Ert/lib/include/ert/ecl/EclKW.hpp diff --git a/ThirdParty/Ert/libeclxx/include/ert/ecl/FortIO.hpp b/ThirdParty/Ert/lib/include/ert/ecl/FortIO.hpp similarity index 100% rename from ThirdParty/Ert/libeclxx/include/ert/ecl/FortIO.hpp rename to ThirdParty/Ert/lib/include/ert/ecl/FortIO.hpp diff --git a/ThirdParty/Ert/libeclxx/include/ert/ecl/Smspec.hpp b/ThirdParty/Ert/lib/include/ert/ecl/Smspec.hpp similarity index 100% rename from ThirdParty/Ert/libeclxx/include/ert/ecl/Smspec.hpp rename to ThirdParty/Ert/lib/include/ert/ecl/Smspec.hpp diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_box.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_box.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_box.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_box.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_coarse_cell.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_coarse_cell.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_coarse_cell.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_coarse_cell.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_endian_flip.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_endian_flip.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_endian_flip.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_endian_flip.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_file.h similarity index 98% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_file.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_file.h index d7186ada55..8c2d2c78ee 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file.h +++ b/ThirdParty/Ert/lib/include/ert/ecl/ecl_file.h @@ -85,6 +85,7 @@ extern "C" { int ecl_file_iget_named_size( const ecl_file_type * file , const char * kw , int ith); void ecl_file_indexed_read(const ecl_file_type * file , const char * kw, int index, const int_vector_type * index_map, char* buffer); + ecl_file_view_type * ecl_file_get_global_blockview( ecl_file_type * ecl_file , const char * kw , int occurence); ecl_file_view_type * ecl_file_alloc_global_blockview( ecl_file_type * ecl_file , const char * kw , int occurence); ecl_file_view_type * ecl_file_get_global_view( ecl_file_type * ecl_file ); ecl_file_view_type * ecl_file_get_active_view( ecl_file_type * ecl_file ); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_kw.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_file_kw.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_kw.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_file_kw.h diff --git a/ThirdParty/Ert/lib/include/ert/ecl/ecl_file_view.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_file_view.h new file mode 100644 index 0000000000..152f007ea9 --- /dev/null +++ b/ThirdParty/Ert/lib/include/ert/ecl/ecl_file_view.h @@ -0,0 +1,108 @@ +/* + Copyright (C) 2016 Statoil ASA, Norway. + + This file is part of ERT - Ensemble based Reservoir Tool. + + ERT is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ERT is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU General Public License at + for more details. +*/ + + +#ifndef ERT_ECL_FILE_VIEW_H +#define ERT_ECL_FILE_VIEW_H + +#include +#include + +#include +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum { + ECL_FILE_CLOSE_STREAM = 1 , /* + This flag will close the underlying FILE object between each access; this is + mainly to save filedescriptors in cases where many ecl_file instances are open at + the same time. */ + // + ECL_FILE_WRITABLE = 2 /* + This flag opens the file in a mode where it can be updated and modified, but it + must still exist and be readable. I.e. this should not compared with the normal: + fopen(filename , "w") where an existing file is truncated to zero upon successfull + open. + */ +} ecl_file_flag_type; + + +typedef struct ecl_file_view_struct ecl_file_view_type; + + bool ecl_file_view_flags_set( const ecl_file_view_type * file_view, int query_flags); + bool ecl_file_view_check_flags( int state_flags , int query_flags); + + ecl_file_view_type * ecl_file_view_alloc( fortio_type * fortio , int * flags , inv_map_type * inv_map , bool owner ); + int ecl_file_view_get_global_index( const ecl_file_view_type * ecl_file_view , const char * kw , int ith); + void ecl_file_view_make_index( ecl_file_view_type * ecl_file_view ); + bool ecl_file_view_has_kw( const ecl_file_view_type * ecl_file_view, const char * kw); + ecl_file_kw_type * ecl_file_view_iget_file_kw( const ecl_file_view_type * ecl_file_view , int global_index); + ecl_file_kw_type * ecl_file_view_iget_named_file_kw( const ecl_file_view_type * ecl_file_view , const char * kw, int ith); + ecl_kw_type * ecl_file_view_iget_kw( const ecl_file_view_type * ecl_file_view , int index); + void ecl_file_view_index_fload_kw(const ecl_file_view_type * ecl_file_view, const char* kw, int index, const int_vector_type * index_map, char* buffer); + int ecl_file_view_find_kw_value( const ecl_file_view_type * ecl_file_view , const char * kw , const void * value); + const char * ecl_file_view_iget_distinct_kw( const ecl_file_view_type * ecl_file_view , int index); + int ecl_file_view_get_num_distinct_kw( const ecl_file_view_type * ecl_file_view ); + int ecl_file_view_get_size( const ecl_file_view_type * ecl_file_view ); + ecl_data_type ecl_file_view_iget_data_type( const ecl_file_view_type * ecl_file_view , int index); + int ecl_file_view_iget_size( const ecl_file_view_type * ecl_file_view , int index); + const char * ecl_file_view_iget_header( const ecl_file_view_type * ecl_file_view , int index); + ecl_kw_type * ecl_file_view_iget_named_kw( const ecl_file_view_type * ecl_file_view , const char * kw, int ith); + ecl_data_type ecl_file_view_iget_named_data_type( const ecl_file_view_type * ecl_file_view , const char * kw , int ith); + int ecl_file_view_iget_named_size( const ecl_file_view_type * ecl_file_view , const char * kw , int ith); + void ecl_file_view_replace_kw( ecl_file_view_type * ecl_file_view , ecl_kw_type * old_kw , ecl_kw_type * new_kw , bool insert_copy); + bool ecl_file_view_load_all( ecl_file_view_type * ecl_file_view ); + void ecl_file_view_add_kw( ecl_file_view_type * ecl_file_view , ecl_file_kw_type * file_kw); + void ecl_file_view_free( ecl_file_view_type * ecl_file_view ); + void ecl_file_view_free__( void * arg ); + int ecl_file_view_get_num_named_kw(const ecl_file_view_type * ecl_file_view , const char * kw); + void ecl_file_view_fwrite( const ecl_file_view_type * ecl_file_view , fortio_type * target , int offset); + int ecl_file_view_iget_occurence( const ecl_file_view_type * ecl_file_view , int global_index); + void ecl_file_view_fprintf_kw_list(const ecl_file_view_type * ecl_file_view , FILE * stream); + ecl_file_view_type * ecl_file_view_add_blockview(const ecl_file_view_type * ecl_file_view , const char * header, int occurence); + ecl_file_view_type * ecl_file_view_add_blockview2(const ecl_file_view_type * ecl_file_view , const char * start_kw, const char * end_kw, int occurence); + ecl_file_view_type * ecl_file_view_add_restart_view(ecl_file_view_type * file_view , int seqnum_index, int report_step , time_t sim_time, double sim_days); + ecl_file_view_type * ecl_file_view_alloc_blockview(const ecl_file_view_type * ecl_file_view , const char * header, int occurence); + ecl_file_view_type * ecl_file_view_alloc_blockview2(const ecl_file_view_type * ecl_file_view , const char * start_kw, const char * end_kw, int occurence); + + void ecl_file_view_add_child( ecl_file_view_type * parent , ecl_file_view_type * child); + bool ecl_file_view_drop_flag( ecl_file_view_type * file_view , int flag); + void ecl_file_view_add_flag( ecl_file_view_type * file_view , int flag); + + int ecl_file_view_seqnum_index_from_sim_time( ecl_file_view_type * parent_map , time_t sim_time); + bool ecl_file_view_has_sim_time( const ecl_file_view_type * ecl_file_view , time_t sim_time); + int ecl_file_view_find_sim_time(const ecl_file_view_type * ecl_file_view , time_t sim_time); + double ecl_file_view_iget_restart_sim_days(const ecl_file_view_type * ecl_file_view , int seqnum_index); + time_t ecl_file_view_iget_restart_sim_date(const ecl_file_view_type * ecl_file_view , int seqnum_index); + bool ecl_file_view_has_report_step( const ecl_file_view_type * ecl_file_view , int report_step); + + ecl_file_view_type * ecl_file_view_add_summary_view( ecl_file_view_type * file_view , int report_step ); + const char * ecl_file_view_get_src_file( const ecl_file_view_type * file_view ); + void ecl_file_view_fclose_stream( ecl_file_view_type * file_view ); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grav.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_grav.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_grav.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_grav.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grav_calc.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_grav_calc.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_grav_calc.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_grav_calc.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grav_common.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_grav_common.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_grav_common.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_grav_common.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_grid.h similarity index 99% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_grid.h index fdea668183..3c9cd71060 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid.h +++ b/ThirdParty/Ert/lib/include/ert/ecl/ecl_grid.h @@ -188,6 +188,7 @@ extern "C" { ecl_grid_type * ecl_grid_get_lgr_from_lgr_nr(const ecl_grid_type * main_grid, int lgr_nr); ecl_grid_type * ecl_grid_get_lgr(const ecl_grid_type * main_grid, const char * __lgr_name); bool ecl_grid_has_lgr(const ecl_grid_type * main_grid, const char * __lgr_name); + bool ecl_grid_has_lgr_nr(const ecl_grid_type * main_grid, int lgr_nr); const char * ecl_grid_iget_lgr_name( const ecl_grid_type * ecl_grid , int lgr_index); const char * ecl_grid_get_lgr_name( const ecl_grid_type * ecl_grid , int lgr_nr); stringlist_type * ecl_grid_alloc_lgr_name_list(const ecl_grid_type * ecl_grid); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid_cache.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_grid_cache.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid_cache.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_grid_cache.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid_dims.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_grid_dims.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_grid_dims.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_grid_dims.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_init_file.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_init_file.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_init_file.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_init_file.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_io_config.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_io_config.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_io_config.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_io_config.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_kw.h similarity index 99% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_kw.h index 72a74fd20f..72fdc1d5f0 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw.h +++ b/ThirdParty/Ert/lib/include/ert/ecl/ecl_kw.h @@ -105,7 +105,7 @@ extern "C" { void ecl_kw_get_memcpy_double_data(const ecl_kw_type *ecl_kw , double *target); void ecl_kw_get_memcpy_int_data(const ecl_kw_type *ecl_kw , int *target); void ecl_kw_set_memcpy_data(ecl_kw_type * , const void *); - void ecl_kw_fwrite(const ecl_kw_type *, fortio_type *); + bool ecl_kw_fwrite(const ecl_kw_type *, fortio_type *); void ecl_kw_iget(const ecl_kw_type *, int , void *); void ecl_kw_iset(ecl_kw_type *ecl_kw , int i , const void *iptr); void ecl_kw_iset_char_ptr( ecl_kw_type * ecl_kw , int index, const char * s); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw_grdecl.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_kw_grdecl.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw_grdecl.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_kw_grdecl.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw_magic.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_kw_magic.h similarity index 97% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw_magic.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_kw_magic.h index 846ad40765..238819a6c2 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_kw_magic.h +++ b/ThirdParty/Ert/lib/include/ert/ecl/ecl_kw_magic.h @@ -380,6 +380,17 @@ values (2e20) are denoted with '*'. #define RFIPWAT_KW "RFIPWAT" #define RFIPOIL_KW "RFIPOIL" +#define FLRWATNNC_KW "FLRWATN+" //nnc wtr flux, grid1 == grid2 +#define FLROILNNC_KW "FLROILN+" //nnc oil flux, grid1 == grid2 +#define FLRGASNNC_KW "FLRGASN+" //nnc gas flux, grid1 == grid2 + +#define FLRWATLG_KW "FLRWATL+" //nnc wtr flux, grid1 == 0, grid != 0 +#define FLROILLG_KW "FLROILL+" //nnc oil flux, grid1 == 0, grid != 0 +#define FLRGASLG_KW "FLRGASL+" //nnc gas flux, grid1 == 0, grid != 0 + +#define FLRWATLL_KW "FLRWATA+" //nnc wtr flux, grid1 != 0, grid2 != 0, grid1 != grid2 +#define FLROILLL_KW "FLROILA+" //nnc oil flux, grid1 != 0, grid2 != 0, grid1 != grid2 +#define FLRGASLL_KW "FLRGASA+" //nnc gas flux, grid1 != 0, grid2 != 0, grid1 != grid2 #define INTEHEAD_NWELLS_INDEX 16 // Number of wells #define INTEHEAD_NIWELZ_INDEX 24 // Number of elements pr. well in the IWEL array. diff --git a/ThirdParty/Ert/lib/include/ert/ecl/ecl_nnc_data.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_nnc_data.h new file mode 100644 index 0000000000..ffc7493bdf --- /dev/null +++ b/ThirdParty/Ert/lib/include/ert/ecl/ecl_nnc_data.h @@ -0,0 +1,46 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + The file 'ecl_nnc_geometry.h' is part of ERT - Ensemble based Reservoir Tool. + + ERT is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ERT is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU General Public License at + for more details. +*/ + +#ifndef ECL_NNC_DATA_H +#define ECL_NNC_DATA_H +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#include +#include + +typedef struct ecl_nnc_data_struct ecl_nnc_data_type; + +ecl_nnc_data_type * ecl_nnc_data_alloc_tran(const ecl_grid_type * grid, const ecl_nnc_geometry_type * nnc_geo, const ecl_file_view_type * init_file); +ecl_nnc_data_type * ecl_nnc_data_alloc_wat_flux(const ecl_grid_type * grid, const ecl_nnc_geometry_type * nnc_geo, const ecl_file_view_type * init_file); +ecl_nnc_data_type * ecl_nnc_data_alloc_oil_flux(const ecl_grid_type * grid, const ecl_nnc_geometry_type * nnc_geo, const ecl_file_view_type * init_file); +ecl_nnc_data_type * ecl_nnc_data_alloc_gas_flux(const ecl_grid_type * grid, const ecl_nnc_geometry_type * nnc_geo, const ecl_file_view_type * init_file); +void ecl_nnc_data_free(ecl_nnc_data_type * data); + +int ecl_nnc_data_get_size(ecl_nnc_data_type * data); +const double * ecl_nnc_data_get_values( const ecl_nnc_data_type * data ); + +double ecl_nnc_data_iget_value(const ecl_nnc_data_type * data, int index); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_nnc_export.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_nnc_export.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_nnc_export.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_nnc_export.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_nnc_geometry.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_nnc_geometry.h similarity index 92% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_nnc_geometry.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_nnc_geometry.h index 743d45f33a..fdd002077c 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_nnc_geometry.h +++ b/ThirdParty/Ert/lib/include/ert/ecl/ecl_nnc_geometry.h @@ -43,6 +43,7 @@ void ecl_nnc_geometry_free( ecl_nnc_geometry_type * nnc_geo ecl_nnc_geometry_type * ecl_nnc_geometry_alloc( const ecl_grid_type * grid ); int ecl_nnc_geometry_size( const ecl_nnc_geometry_type * nnc_geo ); const ecl_nnc_pair_type * ecl_nnc_geometry_iget( const ecl_nnc_geometry_type * nnc_geo , int index); +bool ecl_nnc_geometry_same_kw( const ecl_nnc_pair_type * nnc1 , const ecl_nnc_pair_type * nnc2); #ifdef __cplusplus } diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_region.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_region.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_region.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_region.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_rft_cell.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_rft_cell.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_rft_cell.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_rft_cell.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_rft_file.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_rft_file.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_rft_file.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_rft_file.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_rft_node.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_rft_node.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_rft_node.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_rft_node.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_rst_file.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_rst_file.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_rst_file.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_rst_file.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_rsthead.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_rsthead.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_rsthead.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_rsthead.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_smspec.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_smspec.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_smspec.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_smspec.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_subsidence.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_subsidence.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_subsidence.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_subsidence.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_sum.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_sum.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_data.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_sum_data.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_data.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_sum_data.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_index.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_sum_index.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_index.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_sum_index.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_tstep.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_sum_tstep.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_tstep.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_sum_tstep.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_vector.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_sum_vector.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_sum_vector.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_sum_vector.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_type.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_type.h similarity index 86% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_type.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_type.h index 7a596ddcf3..4848e34dc7 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_type.h +++ b/ThirdParty/Ert/lib/include/ert/ecl/ecl_type.h @@ -71,50 +71,35 @@ typedef enum { #define ECL_STRING10_LENGTH 10 // 'Normal' 8 characters 'CHAR' type. #define ECL_TYPE_LENGTH 4 - -#ifdef __cplusplus -} -#endif - - -#ifdef __cplusplus - struct ecl_type_struct { const ecl_type_enum type; const size_t element_size; - - ecl_type_struct( ecl_type_enum t, size_t es) : - type( t ), - element_size( es ) - {} }; -#define ECL_INT ecl_data_type( ECL_INT_TYPE, sizeof(int)) -#define ECL_FLOAT ecl_data_type( ECL_FLOAT_TYPE, sizeof(float)) -#define ECL_DOUBLE ecl_data_type( ECL_DOUBLE_TYPE, sizeof(double)) -#define ECL_BOOL ecl_data_type( ECL_BOOL_TYPE, sizeof(int)) -#define ECL_CHAR ecl_data_type( ECL_CHAR_TYPE, ECL_STRING8_LENGTH + 1) -#define ECL_MESS ecl_data_type( ECL_MESS_TYPE, 0) -#define ECL_STRING(size) ecl_data_type(ECL_STRING_TYPE, size + 1) +#ifdef __cplusplus + +#define ECL_INT ecl_data_type{ ECL_INT_TYPE, sizeof(int)} +#define ECL_FLOAT ecl_data_type{ ECL_FLOAT_TYPE, sizeof(float)} +#define ECL_DOUBLE ecl_data_type{ ECL_DOUBLE_TYPE, sizeof(double)} +#define ECL_BOOL ecl_data_type{ ECL_BOOL_TYPE, sizeof(int)} +#define ECL_CHAR ecl_data_type{ ECL_CHAR_TYPE, ECL_STRING8_LENGTH + 1} +#define ECL_MESS ecl_data_type{ ECL_MESS_TYPE, 0} +#define ECL_STRING(size) ecl_data_type{ECL_STRING_TYPE, (size) + 1} + +} #else -struct ecl_type_struct { - const ecl_type_enum type; - const size_t element_size; -}; - #define ECL_CHAR (ecl_data_type) {.type = ECL_CHAR_TYPE, .element_size = ECL_STRING8_LENGTH + 1} #define ECL_INT (ecl_data_type) {.type = ECL_INT_TYPE, .element_size = sizeof(int)} #define ECL_FLOAT (ecl_data_type) {.type = ECL_FLOAT_TYPE, .element_size = sizeof(float)} #define ECL_DOUBLE (ecl_data_type) {.type = ECL_DOUBLE_TYPE, .element_size = sizeof(double)} #define ECL_BOOL (ecl_data_type) {.type = ECL_BOOL_TYPE, .element_size = sizeof(int)} #define ECL_MESS (ecl_data_type) {.type = ECL_MESS_TYPE, .element_size = 0} -#define ECL_STRING(size) (ecl_data_type) {.type = ECL_STRING_TYPE, .element_size = size + 1} +#define ECL_STRING(size) (ecl_data_type) {.type = ECL_STRING_TYPE, .element_size = (size) + 1} #endif - #ifdef __cplusplus extern "C" { #endif diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_units.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_units.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_units.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_units.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_util.h b/ThirdParty/Ert/lib/include/ert/ecl/ecl_util.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/ecl_util.h rename to ThirdParty/Ert/lib/include/ert/ecl/ecl_util.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/fault_block.h b/ThirdParty/Ert/lib/include/ert/ecl/fault_block.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/fault_block.h rename to ThirdParty/Ert/lib/include/ert/ecl/fault_block.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/fault_block_layer.h b/ThirdParty/Ert/lib/include/ert/ecl/fault_block_layer.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/fault_block_layer.h rename to ThirdParty/Ert/lib/include/ert/ecl/fault_block_layer.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/fortio.h b/ThirdParty/Ert/lib/include/ert/ecl/fortio.h similarity index 97% rename from ThirdParty/Ert/libecl/include/ert/ecl/fortio.h rename to ThirdParty/Ert/lib/include/ert/ecl/fortio.h index 6781f25d06..55d253af06 100644 --- a/ThirdParty/Ert/libecl/include/ert/ecl/fortio.h +++ b/ThirdParty/Ert/lib/include/ert/ecl/fortio.h @@ -73,12 +73,14 @@ typedef struct fortio_struct fortio_type; void fortio_data_fseek(fortio_type* fortio, offset_type data_offset, size_t data_element, const int element_size, const int element_count, const int block_size); int fortio_fileno( fortio_type * fortio ); bool fortio_ftruncate( fortio_type * fortio , offset_type size); + int fortio_fclean(fortio_type * fortio); bool fortio_fclose_stream( fortio_type * fortio ); bool fortio_fopen_stream( fortio_type * fortio ); bool fortio_stream_is_open( const fortio_type * fortio ); bool fortio_assert_stream_open( fortio_type * fortio ); bool fortio_read_at_eof( fortio_type * fortio ); + void fortio_fwrite_error(fortio_type * fortio); UTIL_IS_INSTANCE_HEADER( fortio ); UTIL_SAFE_CAST_HEADER( fortio ); diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/grid_dims.h b/ThirdParty/Ert/lib/include/ert/ecl/grid_dims.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/grid_dims.h rename to ThirdParty/Ert/lib/include/ert/ecl/grid_dims.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/layer.h b/ThirdParty/Ert/lib/include/ert/ecl/layer.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/layer.h rename to ThirdParty/Ert/lib/include/ert/ecl/layer.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/nnc_info.h b/ThirdParty/Ert/lib/include/ert/ecl/nnc_info.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/nnc_info.h rename to ThirdParty/Ert/lib/include/ert/ecl/nnc_info.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/nnc_vector.h b/ThirdParty/Ert/lib/include/ert/ecl/nnc_vector.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/nnc_vector.h rename to ThirdParty/Ert/lib/include/ert/ecl/nnc_vector.h diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/smspec_node.h b/ThirdParty/Ert/lib/include/ert/ecl/smspec_node.h similarity index 100% rename from ThirdParty/Ert/libecl/include/ert/ecl/smspec_node.h rename to ThirdParty/Ert/lib/include/ert/ecl/smspec_node.h diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_branch_collection.h b/ThirdParty/Ert/lib/include/ert/ecl_well/well_branch_collection.h similarity index 100% rename from ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_branch_collection.h rename to ThirdParty/Ert/lib/include/ert/ecl_well/well_branch_collection.h diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_conn.h b/ThirdParty/Ert/lib/include/ert/ecl_well/well_conn.h similarity index 100% rename from ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_conn.h rename to ThirdParty/Ert/lib/include/ert/ecl_well/well_conn.h diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_conn_collection.h b/ThirdParty/Ert/lib/include/ert/ecl_well/well_conn_collection.h similarity index 100% rename from ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_conn_collection.h rename to ThirdParty/Ert/lib/include/ert/ecl_well/well_conn_collection.h diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_const.h b/ThirdParty/Ert/lib/include/ert/ecl_well/well_const.h similarity index 100% rename from ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_const.h rename to ThirdParty/Ert/lib/include/ert/ecl_well/well_const.h diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_info.h b/ThirdParty/Ert/lib/include/ert/ecl_well/well_info.h similarity index 100% rename from ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_info.h rename to ThirdParty/Ert/lib/include/ert/ecl_well/well_info.h diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_rseg_loader.h b/ThirdParty/Ert/lib/include/ert/ecl_well/well_rseg_loader.h similarity index 100% rename from ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_rseg_loader.h rename to ThirdParty/Ert/lib/include/ert/ecl_well/well_rseg_loader.h diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_segment.h b/ThirdParty/Ert/lib/include/ert/ecl_well/well_segment.h similarity index 100% rename from ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_segment.h rename to ThirdParty/Ert/lib/include/ert/ecl_well/well_segment.h diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_segment_collection.h b/ThirdParty/Ert/lib/include/ert/ecl_well/well_segment_collection.h similarity index 100% rename from ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_segment_collection.h rename to ThirdParty/Ert/lib/include/ert/ecl_well/well_segment_collection.h diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_state.h b/ThirdParty/Ert/lib/include/ert/ecl_well/well_state.h similarity index 100% rename from ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_state.h rename to ThirdParty/Ert/lib/include/ert/ecl_well/well_state.h diff --git a/ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_ts.h b/ThirdParty/Ert/lib/include/ert/ecl_well/well_ts.h similarity index 100% rename from ThirdParty/Ert/libecl_well/include/ert/ecl_well/well_ts.h rename to ThirdParty/Ert/lib/include/ert/ecl_well/well_ts.h diff --git a/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_pointset.h b/ThirdParty/Ert/lib/include/ert/geometry/geo_pointset.h similarity index 100% rename from ThirdParty/Ert/libgeometry/include/ert/geometry/geo_pointset.h rename to ThirdParty/Ert/lib/include/ert/geometry/geo_pointset.h diff --git a/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_polygon.h b/ThirdParty/Ert/lib/include/ert/geometry/geo_polygon.h similarity index 100% rename from ThirdParty/Ert/libgeometry/include/ert/geometry/geo_polygon.h rename to ThirdParty/Ert/lib/include/ert/geometry/geo_polygon.h diff --git a/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_polygon_collection.h b/ThirdParty/Ert/lib/include/ert/geometry/geo_polygon_collection.h similarity index 100% rename from ThirdParty/Ert/libgeometry/include/ert/geometry/geo_polygon_collection.h rename to ThirdParty/Ert/lib/include/ert/geometry/geo_polygon_collection.h diff --git a/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_region.h b/ThirdParty/Ert/lib/include/ert/geometry/geo_region.h similarity index 100% rename from ThirdParty/Ert/libgeometry/include/ert/geometry/geo_region.h rename to ThirdParty/Ert/lib/include/ert/geometry/geo_region.h diff --git a/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_surface.h b/ThirdParty/Ert/lib/include/ert/geometry/geo_surface.h similarity index 100% rename from ThirdParty/Ert/libgeometry/include/ert/geometry/geo_surface.h rename to ThirdParty/Ert/lib/include/ert/geometry/geo_surface.h diff --git a/ThirdParty/Ert/libgeometry/include/ert/geometry/geo_util.h b/ThirdParty/Ert/lib/include/ert/geometry/geo_util.h similarity index 100% rename from ThirdParty/Ert/libgeometry/include/ert/geometry/geo_util.h rename to ThirdParty/Ert/lib/include/ert/geometry/geo_util.h diff --git a/ThirdParty/Ert/libert_utilxx/include/ert/util/TestArea.hpp b/ThirdParty/Ert/lib/include/ert/util/TestArea.hpp similarity index 100% rename from ThirdParty/Ert/libert_utilxx/include/ert/util/TestArea.hpp rename to ThirdParty/Ert/lib/include/ert/util/TestArea.hpp diff --git a/ThirdParty/Ert/libert_util/include/ert/util/arg_pack.h b/ThirdParty/Ert/lib/include/ert/util/arg_pack.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/arg_pack.h rename to ThirdParty/Ert/lib/include/ert/util/arg_pack.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/atomic.h b/ThirdParty/Ert/lib/include/ert/util/atomic.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/atomic.h rename to ThirdParty/Ert/lib/include/ert/util/atomic.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/block_fs.h b/ThirdParty/Ert/lib/include/ert/util/block_fs.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/block_fs.h rename to ThirdParty/Ert/lib/include/ert/util/block_fs.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/buffer.h b/ThirdParty/Ert/lib/include/ert/util/buffer.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/buffer.h rename to ThirdParty/Ert/lib/include/ert/util/buffer.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/buffer_string.h b/ThirdParty/Ert/lib/include/ert/util/buffer_string.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/buffer_string.h rename to ThirdParty/Ert/lib/include/ert/util/buffer_string.h diff --git a/ThirdParty/Ert/libert_utilxx/include/ert/util/ert_unique_ptr.hpp b/ThirdParty/Ert/lib/include/ert/util/ert_unique_ptr.hpp similarity index 100% rename from ThirdParty/Ert/libert_utilxx/include/ert/util/ert_unique_ptr.hpp rename to ThirdParty/Ert/lib/include/ert/util/ert_unique_ptr.hpp diff --git a/ThirdParty/Ert/libert_util/include/ert/util/ert_version.h b/ThirdParty/Ert/lib/include/ert/util/ert_version.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/ert_version.h rename to ThirdParty/Ert/lib/include/ert/util/ert_version.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/hash.h b/ThirdParty/Ert/lib/include/ert/util/hash.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/hash.h rename to ThirdParty/Ert/lib/include/ert/util/hash.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/hash_node.h b/ThirdParty/Ert/lib/include/ert/util/hash_node.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/hash_node.h rename to ThirdParty/Ert/lib/include/ert/util/hash_node.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/hash_sll.h b/ThirdParty/Ert/lib/include/ert/util/hash_sll.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/hash_sll.h rename to ThirdParty/Ert/lib/include/ert/util/hash_sll.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/lars.h b/ThirdParty/Ert/lib/include/ert/util/lars.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/lars.h rename to ThirdParty/Ert/lib/include/ert/util/lars.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/log.h b/ThirdParty/Ert/lib/include/ert/util/log.h similarity index 75% rename from ThirdParty/Ert/libert_util/include/ert/util/log.h rename to ThirdParty/Ert/lib/include/ert/util/log.h index a8a58ff4e3..221fa2cb15 100644 --- a/ThirdParty/Ert/libert_util/include/ert/util/log.h +++ b/ThirdParty/Ert/lib/include/ert/util/log.h @@ -26,12 +26,23 @@ extern "C" { #include #include +//Same as pythons default log levels, but with different numeric values. +typedef enum { + LOG_CRITICAL=0, //OOM. + LOG_ERROR=1, //When something we really expected to work does not, e.g. IO failure. + LOG_WARNING=2, //Important, but not error. E.g. combination of settings which can be intended, but probably are not. + LOG_INFO=3, //Entering functions/parts of the code + LOG_DEBUG=4 //Inside the for-loop, when you need the nitty gritty details. Think TRACE. +} message_level_type; + + typedef struct log_struct log_type; FILE * log_get_stream(log_type * logh ); void log_reopen( log_type * logh , const char * filename ); log_type * log_open(const char *filename, int log_level); void log_add_message(log_type *logh, int message_level , FILE * dup_stream , char* message, bool free_message); + void log_add_message_str(log_type *logh, message_level_type message_level , const char* message); void log_add_fmt_message(log_type * logh , int message_level , FILE * dup_stream , const char * fmt , ...); int log_get_level( const log_type * logh); void log_set_level( log_type * logh , int new_level); diff --git a/ThirdParty/Ert/libert_util/include/ert/util/lookup_table.h b/ThirdParty/Ert/lib/include/ert/util/lookup_table.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/lookup_table.h rename to ThirdParty/Ert/lib/include/ert/util/lookup_table.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/matrix.h b/ThirdParty/Ert/lib/include/ert/util/matrix.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/matrix.h rename to ThirdParty/Ert/lib/include/ert/util/matrix.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/matrix_blas.h b/ThirdParty/Ert/lib/include/ert/util/matrix_blas.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/matrix_blas.h rename to ThirdParty/Ert/lib/include/ert/util/matrix_blas.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/matrix_lapack.h b/ThirdParty/Ert/lib/include/ert/util/matrix_lapack.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/matrix_lapack.h rename to ThirdParty/Ert/lib/include/ert/util/matrix_lapack.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/matrix_stat.h b/ThirdParty/Ert/lib/include/ert/util/matrix_stat.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/matrix_stat.h rename to ThirdParty/Ert/lib/include/ert/util/matrix_stat.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/menu.h b/ThirdParty/Ert/lib/include/ert/util/menu.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/menu.h rename to ThirdParty/Ert/lib/include/ert/util/menu.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/msg.h b/ThirdParty/Ert/lib/include/ert/util/msg.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/msg.h rename to ThirdParty/Ert/lib/include/ert/util/msg.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/msvc_stdbool.h b/ThirdParty/Ert/lib/include/ert/util/msvc_stdbool.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/msvc_stdbool.h rename to ThirdParty/Ert/lib/include/ert/util/msvc_stdbool.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/mzran.h b/ThirdParty/Ert/lib/include/ert/util/mzran.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/mzran.h rename to ThirdParty/Ert/lib/include/ert/util/mzran.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/node_ctype.h b/ThirdParty/Ert/lib/include/ert/util/node_ctype.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/node_ctype.h rename to ThirdParty/Ert/lib/include/ert/util/node_ctype.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/node_data.h b/ThirdParty/Ert/lib/include/ert/util/node_data.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/node_data.h rename to ThirdParty/Ert/lib/include/ert/util/node_data.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/parser.h b/ThirdParty/Ert/lib/include/ert/util/parser.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/parser.h rename to ThirdParty/Ert/lib/include/ert/util/parser.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/path_fmt.h b/ThirdParty/Ert/lib/include/ert/util/path_fmt.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/path_fmt.h rename to ThirdParty/Ert/lib/include/ert/util/path_fmt.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/path_stack.h b/ThirdParty/Ert/lib/include/ert/util/path_stack.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/path_stack.h rename to ThirdParty/Ert/lib/include/ert/util/path_stack.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/perm_vector.h b/ThirdParty/Ert/lib/include/ert/util/perm_vector.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/perm_vector.h rename to ThirdParty/Ert/lib/include/ert/util/perm_vector.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/regression.h b/ThirdParty/Ert/lib/include/ert/util/regression.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/regression.h rename to ThirdParty/Ert/lib/include/ert/util/regression.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/rng.h b/ThirdParty/Ert/lib/include/ert/util/rng.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/rng.h rename to ThirdParty/Ert/lib/include/ert/util/rng.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/set.h b/ThirdParty/Ert/lib/include/ert/util/set.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/set.h rename to ThirdParty/Ert/lib/include/ert/util/set.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/ssize_t.h b/ThirdParty/Ert/lib/include/ert/util/ssize_t.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/ssize_t.h rename to ThirdParty/Ert/lib/include/ert/util/ssize_t.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/statistics.h b/ThirdParty/Ert/lib/include/ert/util/statistics.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/statistics.h rename to ThirdParty/Ert/lib/include/ert/util/statistics.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/stepwise.h b/ThirdParty/Ert/lib/include/ert/util/stepwise.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/stepwise.h rename to ThirdParty/Ert/lib/include/ert/util/stepwise.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/string_util.h b/ThirdParty/Ert/lib/include/ert/util/string_util.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/string_util.h rename to ThirdParty/Ert/lib/include/ert/util/string_util.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/stringlist.h b/ThirdParty/Ert/lib/include/ert/util/stringlist.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/stringlist.h rename to ThirdParty/Ert/lib/include/ert/util/stringlist.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/struct_vector.h b/ThirdParty/Ert/lib/include/ert/util/struct_vector.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/struct_vector.h rename to ThirdParty/Ert/lib/include/ert/util/struct_vector.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/subst_func.h b/ThirdParty/Ert/lib/include/ert/util/subst_func.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/subst_func.h rename to ThirdParty/Ert/lib/include/ert/util/subst_func.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/subst_list.h b/ThirdParty/Ert/lib/include/ert/util/subst_list.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/subst_list.h rename to ThirdParty/Ert/lib/include/ert/util/subst_list.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/template.h b/ThirdParty/Ert/lib/include/ert/util/template.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/template.h rename to ThirdParty/Ert/lib/include/ert/util/template.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/test_util.h b/ThirdParty/Ert/lib/include/ert/util/test_util.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/test_util.h rename to ThirdParty/Ert/lib/include/ert/util/test_util.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/test_util.hpp b/ThirdParty/Ert/lib/include/ert/util/test_util.hpp similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/test_util.hpp rename to ThirdParty/Ert/lib/include/ert/util/test_util.hpp diff --git a/ThirdParty/Ert/libert_util/include/ert/util/test_work_area.h b/ThirdParty/Ert/lib/include/ert/util/test_work_area.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/test_work_area.h rename to ThirdParty/Ert/lib/include/ert/util/test_work_area.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/thread_pool.h b/ThirdParty/Ert/lib/include/ert/util/thread_pool.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/thread_pool.h rename to ThirdParty/Ert/lib/include/ert/util/thread_pool.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/thread_pool1.h b/ThirdParty/Ert/lib/include/ert/util/thread_pool1.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/thread_pool1.h rename to ThirdParty/Ert/lib/include/ert/util/thread_pool1.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/time_interval.h b/ThirdParty/Ert/lib/include/ert/util/time_interval.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/time_interval.h rename to ThirdParty/Ert/lib/include/ert/util/time_interval.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/timer.h b/ThirdParty/Ert/lib/include/ert/util/timer.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/timer.h rename to ThirdParty/Ert/lib/include/ert/util/timer.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/type_macros.h b/ThirdParty/Ert/lib/include/ert/util/type_macros.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/type_macros.h rename to ThirdParty/Ert/lib/include/ert/util/type_macros.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/type_vector_functions.h b/ThirdParty/Ert/lib/include/ert/util/type_vector_functions.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/type_vector_functions.h rename to ThirdParty/Ert/lib/include/ert/util/type_vector_functions.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/ui_return.h b/ThirdParty/Ert/lib/include/ert/util/ui_return.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/ui_return.h rename to ThirdParty/Ert/lib/include/ert/util/ui_return.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/util.h b/ThirdParty/Ert/lib/include/ert/util/util.h similarity index 99% rename from ThirdParty/Ert/libert_util/include/ert/util/util.h rename to ThirdParty/Ert/lib/include/ert/util/util.h index d8a134d8d1..7ec6d5a1c8 100644 --- a/ThirdParty/Ert/libert_util/include/ert/util/util.h +++ b/ThirdParty/Ert/lib/include/ert/util/util.h @@ -99,10 +99,10 @@ typedef enum {left_pad = 0, center_pad = 2} string_alignement_type; //#define UTIL_CXX_MALLOC(var , num_elm) (typeof (var)) util_malloc( (num_elm) * sizeof var) - void util_bitmask_on(int * , int ); char * util_get_timezone(void); time_t util_make_datetime_utc(int , int , int , int , int , int ); + bool util_make_datetime_utc_validated(int sec, int min, int hour , int mday , int month , int year, time_t * t); void util_fprintf_date_utc(time_t , FILE * ); time_t util_make_date_utc(int , int , int); time_t util_make_pure_date_utc(time_t t); diff --git a/ThirdParty/Ert/libert_util/include/ert/util/util_endian.h b/ThirdParty/Ert/lib/include/ert/util/util_endian.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/util_endian.h rename to ThirdParty/Ert/lib/include/ert/util/util_endian.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/util_env.h b/ThirdParty/Ert/lib/include/ert/util/util_env.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/util_env.h rename to ThirdParty/Ert/lib/include/ert/util/util_env.h diff --git a/ThirdParty/Ert/libert_util/include/ert/util/vector.h b/ThirdParty/Ert/lib/include/ert/util/vector.h similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/vector.h rename to ThirdParty/Ert/lib/include/ert/util/vector.h diff --git a/ThirdParty/Ert/libert_utilxx/src/TestArea.cpp b/ThirdParty/Ert/lib/util/TestArea.cpp similarity index 100% rename from ThirdParty/Ert/libert_utilxx/src/TestArea.cpp rename to ThirdParty/Ert/lib/util/TestArea.cpp diff --git a/ThirdParty/Ert/libert_util/src/arg_pack.c b/ThirdParty/Ert/lib/util/arg_pack.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/arg_pack.c rename to ThirdParty/Ert/lib/util/arg_pack.c diff --git a/ThirdParty/Ert/libert_util/src/block_fs.c b/ThirdParty/Ert/lib/util/block_fs.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/block_fs.c rename to ThirdParty/Ert/lib/util/block_fs.c diff --git a/ThirdParty/Ert/libert_util/src/buffer.c b/ThirdParty/Ert/lib/util/buffer.c similarity index 84% rename from ThirdParty/Ert/libert_util/src/buffer.c rename to ThirdParty/Ert/lib/util/buffer.c index a1da9cee7e..ef42a546b5 100644 --- a/ThirdParty/Ert/libert_util/src/buffer.c +++ b/ThirdParty/Ert/lib/util/buffer.c @@ -804,10 +804,131 @@ void buffer_store(const buffer_type * buffer , const char * filename) { fclose( stream ); } +/* + The functions buffer_fread_string() and buffer_fwrite_string() + should not be used; the embedded integer just creates chaos and + should the sole responsability of the calling scope. +*/ -#include "buffer_string.c" +/** + Storing strings: + ---------------- + + When storing a string (\0 terminated char pointer) what is actually + written to the buffer is + + 1. The length of the string - as returned from strlen(). + 2. The string content INCLUDING the terminating \0. + + +*/ + + +/** + This function will return a pointer to the current position in the + buffer, and advance the buffer position forward until a \0 + terminater is found. If \0 is not found the thing will abort(). + + Observe that the return value will point straight into the buffer, + this is highly volatile memory, and in general it will be safer to + use buffer_fread_alloc_string() to get a copy of the string. +*/ + +const char * buffer_fread_string(buffer_type * buffer) { + int string_length = buffer_fread_int( buffer ); + char * string_ptr = &buffer->data[buffer->pos]; + char c; + buffer_fskip( buffer , string_length ); + c = buffer_fread_char( buffer ); + if (c != '\0') + util_abort("%s: internal error - malformed string representation in buffer \n",__func__); + return string_ptr; +} + + + +char * buffer_fread_alloc_string(buffer_type * buffer) { + return util_alloc_string_copy( buffer_fread_string( buffer )); +} + +/** + Observe that this function writes a leading integer string length. +*/ +void buffer_fwrite_string(buffer_type * buffer , const char * string) { + buffer_fwrite_int( buffer , strlen( string )); /* Writing the length of the string */ + buffer_fwrite(buffer , string , 1 , strlen( string ) + 1); /* Writing the string content ** WITH ** the terminating \0 */ +} #ifdef ERT_HAVE_ZLIB -#include "buffer_zlib.c" -#endif +#include +/** + Unfortunately the old RedHat3 computers have a zlib version which + does not have the compressBound function. For that reason the + compressBound function from a 1.2xx version of zlib is pasted in + here verbatim: + */ + + +/* Snipped from zlib source code: */ +static size_t __compress_bound (size_t sourceLen) +{ + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11; +} + + +/** + Return value is the size (in bytes) of the compressed buffer. + */ +size_t buffer_fwrite_compressed(buffer_type * buffer, const void * ptr , size_t byte_size) { + size_t compressed_size = 0; + bool abort_on_error = true; + buffer->content_size = buffer->pos; /* Invalidating possible buffer content coming after the compressed content; that is uninterpretable anyway. */ + + if (byte_size > 0) { + size_t remaining_size = buffer->alloc_size - buffer->pos; + size_t compress_bound = __compress_bound( byte_size ); + if (compress_bound > remaining_size) + buffer_resize__(buffer , remaining_size + compress_bound , abort_on_error); + + compressed_size = buffer->alloc_size - buffer->pos; + util_compress_buffer( ptr , byte_size , &buffer->data[buffer->pos] , &compressed_size); + buffer->pos += compressed_size; + buffer->content_size += compressed_size; + } + + return compressed_size; +} + + +/** + Return value is the size of the uncompressed buffer. + */ +size_t buffer_fread_compressed(buffer_type * buffer , size_t compressed_size , void * target_ptr , size_t target_size) { + size_t remaining_size = buffer->content_size - buffer->pos; + size_t uncompressed_size = target_size; + if (remaining_size < compressed_size) + util_abort("%s: trying to read beyond end of buffer\n",__func__); + + + if (compressed_size > 0) { + int uncompress_result = uncompress(target_ptr , &uncompressed_size , (unsigned char *) &buffer->data[buffer->pos] , compressed_size); + if (uncompress_result != Z_OK) { + fprintf(stderr,"%s: ** Warning uncompress result:%d != Z_OK.\n" , __func__ , uncompress_result); + /** + According to the zlib documentation: + + 1. Values > 0 are not errors - just rare events? + 2. The value Z_BUF_ERROR is not fatal - we let that pass?! + */ + if (uncompress_result < 0 && uncompress_result != Z_BUF_ERROR) + util_abort("%s: fatal uncompress error: %d \n",__func__ , uncompress_result); + } + } else + uncompressed_size = 0; + + buffer->pos += compressed_size; + return uncompressed_size; +} + +#endif // ERT_HAVE_ZLIB diff --git a/ThirdParty/Ert/libert_util/src/config_test_input b/ThirdParty/Ert/lib/util/config_test_input similarity index 100% rename from ThirdParty/Ert/libert_util/src/config_test_input rename to ThirdParty/Ert/lib/util/config_test_input diff --git a/ThirdParty/Ert/libert_util/src/dependencies b/ThirdParty/Ert/lib/util/dependencies similarity index 100% rename from ThirdParty/Ert/libert_util/src/dependencies rename to ThirdParty/Ert/lib/util/dependencies diff --git a/ThirdParty/Ert/lib/util/ert/util/template_type.h b/ThirdParty/Ert/lib/util/ert/util/template_type.h new file mode 100644 index 0000000000..0c56145a5f --- /dev/null +++ b/ThirdParty/Ert/lib/util/ert/util/template_type.h @@ -0,0 +1,34 @@ +#ifndef ERT_TEMPLATE_TYPE_H +#define ERT_TEMPLATE_TYPE_H + +#include + +#include + +#ifdef ERT_HAVE_REGEXP +#include +#endif //ERT_HAVE_REGEXP + +#define TEMPLATE_TYPE_ID 7781045 + +struct template_struct { + UTIL_TYPE_ID_DECLARATION; + char * template_file; /* The template file - if internalize_template == false this filename can contain keys which will be replaced at instantiation time. */ + char * template_buffer; /* The content of the template buffer; only has valid content if internalize_template == true. */ + bool internalize_template; /* Should the template be loadad and internalized at template_alloc(). */ + subst_list_type * arg_list; /* Key-value mapping established at alloc time. */ + char * arg_string; /* A string representation of the arguments - ONLY used for a _get_ function. */ + #ifdef ERT_HAVE_REGEXP + regex_t start_regexp; + regex_t end_regexp; + #endif +}; + +#ifdef ERT_HAVE_REGEXP +typedef struct loop_struct loop_type; +void template_init_loop_regexp( struct template_struct* ); +int template_eval_loop( const struct template_struct* , buffer_type * buffer , int global_offset , struct loop_struct * ); +void template_eval_loops( const struct template_struct* template , buffer_type * buffer ); +#endif //ERT_HAVE_REGEXP + +#endif //ERT_TEMPLATE_TYPE_H diff --git a/ThirdParty/Ert/libert_util/src/ert_version.c b/ThirdParty/Ert/lib/util/ert_version.c similarity index 77% rename from ThirdParty/Ert/libert_util/src/ert_version.c rename to ThirdParty/Ert/lib/util/ert_version.c index a7452f9716..38733431be 100644 --- a/ThirdParty/Ert/libert_util/src/ert_version.c +++ b/ThirdParty/Ert/lib/util/ert_version.c @@ -1,9 +1,12 @@ #include #include +#define xstr(s) #s +#define str(s) xstr(s) + char* version_get_git_commit() { #ifdef GIT_COMMIT - return GIT_COMMIT; + return str(GIT_COMMIT); #else return "Unknown git commit hash"; #endif @@ -11,7 +14,7 @@ char* version_get_git_commit() { char* version_get_git_commit_short() { #ifdef GIT_COMMIT_SHORT - return GIT_COMMIT_SHORT; + return str(GIT_COMMIT_SHORT); #else return "Unknown git short commit hash"; #endif @@ -37,10 +40,10 @@ int version_get_minor_ert_version() { const char * version_get_micro_ert_version() { - return ERT_VERSION_MICRO; + return str(ERT_VERSION_MICRO); } bool version_is_ert_devel_version() { - return util_sscanf_int( ERT_VERSION_MICRO , NULL); + return util_sscanf_int(str(ERT_VERSION_MICRO), NULL); } diff --git a/ThirdParty/Ert/libert_util/src/hash.c b/ThirdParty/Ert/lib/util/hash.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/hash.c rename to ThirdParty/Ert/lib/util/hash.c diff --git a/ThirdParty/Ert/libert_util/src/hash_node.c b/ThirdParty/Ert/lib/util/hash_node.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/hash_node.c rename to ThirdParty/Ert/lib/util/hash_node.c diff --git a/ThirdParty/Ert/libert_util/src/hash_sll.c b/ThirdParty/Ert/lib/util/hash_sll.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/hash_sll.c rename to ThirdParty/Ert/lib/util/hash_sll.c diff --git a/ThirdParty/Ert/libert_util/src/lars.c b/ThirdParty/Ert/lib/util/lars.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/lars.c rename to ThirdParty/Ert/lib/util/lars.c diff --git a/ThirdParty/Ert/libert_util/src/log.c b/ThirdParty/Ert/lib/util/log.c similarity index 91% rename from ThirdParty/Ert/libert_util/src/log.c rename to ThirdParty/Ert/lib/util/log.c index f3ebba9816..497048f89f 100644 --- a/ThirdParty/Ert/libert_util/src/log.c +++ b/ThirdParty/Ert/lib/util/log.c @@ -128,6 +128,15 @@ bool log_include_message(const log_type *logh , int message_level) { return false; } +/** + * Adds a string to the log if message_level is below the threshold. It is the callers duty to either free the string + * or make sure that it is a string literal. + */ +void log_add_message_str(log_type *logh, message_level_type message_level , const char* message){ + //The conversion to (char*) is safe since free_message=false + log_add_message(logh,message_level, NULL, (char*) message,false); +} + /** If dup_stream != NULL the message (without the date/time header) is duplicated on this stream. @@ -171,7 +180,10 @@ void log_add_message(log_type *logh, int message_level , FILE * dup_stream , cha - +/** + * Adds a formated log message if message_level is below the threshold, fmt is expected to be the format string, + * and "..." contains any arguments to it. + */ void log_add_fmt_message(log_type * logh , int message_level , FILE * dup_stream , const char * fmt , ...) { if (log_include_message(logh,message_level)) { char * message; diff --git a/ThirdParty/Ert/libert_util/src/lookup_table.c b/ThirdParty/Ert/lib/util/lookup_table.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/lookup_table.c rename to ThirdParty/Ert/lib/util/lookup_table.c diff --git a/ThirdParty/Ert/libert_util/src/matrix.c b/ThirdParty/Ert/lib/util/matrix.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/matrix.c rename to ThirdParty/Ert/lib/util/matrix.c diff --git a/ThirdParty/Ert/libert_util/src/matrix_blas.c b/ThirdParty/Ert/lib/util/matrix_blas.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/matrix_blas.c rename to ThirdParty/Ert/lib/util/matrix_blas.c diff --git a/ThirdParty/Ert/libert_util/src/matrix_lapack.c b/ThirdParty/Ert/lib/util/matrix_lapack.c similarity index 99% rename from ThirdParty/Ert/libert_util/src/matrix_lapack.c rename to ThirdParty/Ert/lib/util/matrix_lapack.c index 7c3f3afb42..b9461d1318 100644 --- a/ThirdParty/Ert/libert_util/src/matrix_lapack.c +++ b/ThirdParty/Ert/lib/util/matrix_lapack.c @@ -203,11 +203,14 @@ void matrix_dgesvd(dgesvd_vector_enum jobu , dgesvd_vector_enum jobvt , matrix_ /* Try to allocate optimal worksize. */ worksize = (int) work[0]; - work = realloc( work , sizeof * work * worksize ); - if (work == NULL) { + double * tmp = realloc( work , sizeof * work * worksize ); + if (tmp == NULL) { /* Could not allocate optimal worksize - settle for the minimum. This can not fail. */ worksize = min_worksize; + free(work); work = util_calloc( worksize , sizeof * work ); + }else{ + work = tmp; /* The request for optimal worksize succeeded */ } dgesvd_(&_jobu , &_jobvt , &m , &n , matrix_get_data( A ) , &lda , S , U_data , &ldu , VT_data , &ldvt , work , &worksize , &info); diff --git a/ThirdParty/Ert/libert_util/src/matrix_stat.c b/ThirdParty/Ert/lib/util/matrix_stat.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/matrix_stat.c rename to ThirdParty/Ert/lib/util/matrix_stat.c diff --git a/ThirdParty/Ert/libert_util/src/menu.c b/ThirdParty/Ert/lib/util/menu.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/menu.c rename to ThirdParty/Ert/lib/util/menu.c diff --git a/ThirdParty/Ert/libert_util/src/msg.c b/ThirdParty/Ert/lib/util/msg.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/msg.c rename to ThirdParty/Ert/lib/util/msg.c diff --git a/ThirdParty/Ert/libert_util/src/mzran.c b/ThirdParty/Ert/lib/util/mzran.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/mzran.c rename to ThirdParty/Ert/lib/util/mzran.c diff --git a/ThirdParty/Ert/libert_util/src/node_ctype.c b/ThirdParty/Ert/lib/util/node_ctype.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/node_ctype.c rename to ThirdParty/Ert/lib/util/node_ctype.c diff --git a/ThirdParty/Ert/libert_util/src/node_data.c b/ThirdParty/Ert/lib/util/node_data.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/node_data.c rename to ThirdParty/Ert/lib/util/node_data.c diff --git a/ThirdParty/Ert/libert_util/src/parser.c b/ThirdParty/Ert/lib/util/parser.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/parser.c rename to ThirdParty/Ert/lib/util/parser.c diff --git a/ThirdParty/Ert/libert_util/src/path_fmt.c b/ThirdParty/Ert/lib/util/path_fmt.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/path_fmt.c rename to ThirdParty/Ert/lib/util/path_fmt.c diff --git a/ThirdParty/Ert/libert_util/src/path_stack.c b/ThirdParty/Ert/lib/util/path_stack.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/path_stack.c rename to ThirdParty/Ert/lib/util/path_stack.c diff --git a/ThirdParty/Ert/libert_util/src/perm_vector.c b/ThirdParty/Ert/lib/util/perm_vector.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/perm_vector.c rename to ThirdParty/Ert/lib/util/perm_vector.c diff --git a/ThirdParty/Ert/libert_util/src/readme.overview b/ThirdParty/Ert/lib/util/readme.overview similarity index 100% rename from ThirdParty/Ert/libert_util/src/readme.overview rename to ThirdParty/Ert/lib/util/readme.overview diff --git a/ThirdParty/Ert/libert_util/src/regression.c b/ThirdParty/Ert/lib/util/regression.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/regression.c rename to ThirdParty/Ert/lib/util/regression.c diff --git a/ThirdParty/Ert/libert_util/src/rng.c b/ThirdParty/Ert/lib/util/rng.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/rng.c rename to ThirdParty/Ert/lib/util/rng.c diff --git a/ThirdParty/Ert/libert_util/src/set.c b/ThirdParty/Ert/lib/util/set.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/set.c rename to ThirdParty/Ert/lib/util/set.c diff --git a/ThirdParty/Ert/libert_util/src/statistics.c b/ThirdParty/Ert/lib/util/statistics.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/statistics.c rename to ThirdParty/Ert/lib/util/statistics.c diff --git a/ThirdParty/Ert/libert_util/src/stepwise.c b/ThirdParty/Ert/lib/util/stepwise.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/stepwise.c rename to ThirdParty/Ert/lib/util/stepwise.c diff --git a/ThirdParty/Ert/libert_util/src/string_util.c b/ThirdParty/Ert/lib/util/string_util.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/string_util.c rename to ThirdParty/Ert/lib/util/string_util.c diff --git a/ThirdParty/Ert/libert_util/src/stringlist.c b/ThirdParty/Ert/lib/util/stringlist.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/stringlist.c rename to ThirdParty/Ert/lib/util/stringlist.c diff --git a/ThirdParty/Ert/libert_util/src/struct_vector.c b/ThirdParty/Ert/lib/util/struct_vector.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/struct_vector.c rename to ThirdParty/Ert/lib/util/struct_vector.c diff --git a/ThirdParty/Ert/libert_util/src/subst_func.c b/ThirdParty/Ert/lib/util/subst_func.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/subst_func.c rename to ThirdParty/Ert/lib/util/subst_func.c diff --git a/ThirdParty/Ert/libert_util/src/subst_list.c b/ThirdParty/Ert/lib/util/subst_list.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/subst_list.c rename to ThirdParty/Ert/lib/util/subst_list.c diff --git a/ThirdParty/Ert/libert_util/src/template.c b/ThirdParty/Ert/lib/util/template.c similarity index 84% rename from ThirdParty/Ert/libert_util/src/template.c rename to ThirdParty/Ert/lib/util/template.c index fa1959b119..e6b6880621 100644 --- a/ThirdParty/Ert/libert_util/src/template.c +++ b/ThirdParty/Ert/lib/util/template.c @@ -22,48 +22,13 @@ #include -#ifdef ERT_HAVE_REGEXP -#include -#include -#include - -#define END_REGEXP "[{]%[[:space:]]+endfor[[:space:]]+%[}]" -#define LOOP_REGEXP "[{]%[[:space:]]+for[[:space:]]+([$]?[[:alpha:]][[:alnum:]]*)[[:space:]]+in[[:space:]]+[[]([^]]*)[]][[:space:]]+%[}]" - -#define LOOP_OPTIONS REG_EXTENDED -#define END_OPTIONS REG_EXTENDED -#endif - #include #include #include #include +#include #include - - - -#define TEMPLATE_TYPE_ID 7781045 - -struct template_struct { - UTIL_TYPE_ID_DECLARATION; - char * template_file; /* The template file - if internalize_template == false this filename can contain keys which will be replaced at instantiation time. */ - char * template_buffer; /* The content of the template buffer; only has valid content if internalize_template == true. */ - bool internalize_template; /* Should the template be loadad and internalized at template_alloc(). */ - subst_list_type * arg_list; /* Key-value mapping established at alloc time. */ - char * arg_string; /* A string representation of the arguments - ONLY used for a _get_ function. */ - #ifdef ERT_HAVE_REGEXP - regex_t start_regexp; - regex_t end_regexp; - #endif -}; - -#ifdef ERT_HAVE_REGEXP -#include "template_loop.c" -#endif - - - /** Iff the template is set up with internaliz_template == false the template content is loaded at instantiation time, and in that case diff --git a/ThirdParty/Ert/libert_util/src/template_loop.c b/ThirdParty/Ert/lib/util/template_loop.c similarity index 91% rename from ThirdParty/Ert/libert_util/src/template_loop.c rename to ThirdParty/Ert/lib/util/template_loop.c index a56be8149d..df0f88f138 100644 --- a/ThirdParty/Ert/libert_util/src/template_loop.c +++ b/ThirdParty/Ert/lib/util/template_loop.c @@ -16,20 +16,31 @@ for more details. */ +#include + +#include +#include +#include + #include #include +#include +#include + +#define END_REGEXP "[{]%[[:space:]]+endfor[[:space:]]+%[}]" +#define LOOP_REGEXP "[{]%[[:space:]]+for[[:space:]]+([$]?[[:alpha:]][[:alnum:]]*)[[:space:]]+in[[:space:]]+[[]([^]]*)[]][[:space:]]+%[}]" + +#define LOOP_OPTIONS REG_EXTENDED +#define END_OPTIONS REG_EXTENDED #define DOLLAR '$' /* - This file implements a simple looping construct in the - templates. The support is strongly based on the POSIX regexp - functionality; and this file should not be included/compiled unless - that support is present. The file is included from template.c. + This file implements a simple looping construct in the templates. The support + is strongly based on the POSIX regexp functionality; and this file will not + be compiled unless that support is present. */ - - -typedef struct { +struct loop_struct { int opentag_offset; int opentag_length; @@ -43,8 +54,7 @@ typedef struct { int var_length; char * loop_var; stringlist_type * items; -} loop_type; - +}; static void regcompile(regex_t * reg , const char * reg_string , int flags) { int error = regcomp(reg , reg_string , flags); @@ -94,12 +104,6 @@ static loop_type * loop_alloc( const char * buffer , int global_offset , regmatc return loop; } -void loop_fprintf(const loop_type * loop ) { - printf("loop_var : %s \n",loop->loop_var ); - printf("loop_items: "); stringlist_fprintf( loop->items , "," , stdout ); printf("\n"); -} - - static void loop_set_endmatch( loop_type * loop , int global_offset , regmatch_t end_offset) { loop->endtag_offset = global_offset + end_offset.rm_so; loop->endtag_length = end_offset.rm_eo - end_offset.rm_so; @@ -183,7 +187,7 @@ static void loop_eval( const loop_type * loop , const char * body , buffer_type } -static int template_eval_loop( const template_type * template , buffer_type * buffer , int global_offset , loop_type * loop) { +int template_eval_loop( const template_type * template , buffer_type * buffer , int global_offset , loop_type * loop) { int flags = 0; int NMATCH = 3; regmatch_t match_list_loop[NMATCH]; @@ -260,13 +264,13 @@ static int template_eval_loop( const template_type * template , buffer_type * bu -static void template_init_loop_regexp( template_type * template ) { +void template_init_loop_regexp( template_type * template ) { regcompile( &template->start_regexp , LOOP_REGEXP , LOOP_OPTIONS ); regcompile( &template->end_regexp , END_REGEXP , END_OPTIONS ); } -static void template_eval_loops( const template_type * template , buffer_type * buffer ) { +void template_eval_loops( const template_type * template , buffer_type * buffer ) { int NMATCH = 10; regmatch_t match_list[NMATCH]; { diff --git a/ThirdParty/Ert/libert_util/src/test_util.c b/ThirdParty/Ert/lib/util/test_util.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/test_util.c rename to ThirdParty/Ert/lib/util/test_util.c diff --git a/ThirdParty/Ert/libert_util/src/test_work_area.c b/ThirdParty/Ert/lib/util/test_work_area.c similarity index 99% rename from ThirdParty/Ert/libert_util/src/test_work_area.c rename to ThirdParty/Ert/lib/util/test_work_area.c index 2ca36ac7c9..240361043d 100644 --- a/ThirdParty/Ert/libert_util/src/test_work_area.c +++ b/ThirdParty/Ert/lib/util/test_work_area.c @@ -211,7 +211,7 @@ static char * test_work_area_alloc_prefix( ) { if (!prefix_path) prefix_path = _PATH_TMP; - return util_alloc_string_copy( prefix_path ); + return util_alloc_realpath(prefix_path); #endif } diff --git a/ThirdParty/Ert/libert_util/tests/data/file1.txt b/ThirdParty/Ert/lib/util/tests/data/file1.txt similarity index 100% rename from ThirdParty/Ert/libert_util/tests/data/file1.txt rename to ThirdParty/Ert/lib/util/tests/data/file1.txt diff --git a/ThirdParty/Ert/libert_util/tests/data/file2.txt b/ThirdParty/Ert/lib/util/tests/data/file2.txt similarity index 100% rename from ThirdParty/Ert/libert_util/tests/data/file2.txt rename to ThirdParty/Ert/lib/util/tests/data/file2.txt diff --git a/ThirdParty/Ert/libert_util/tests/data2/dir2/file4 b/ThirdParty/Ert/lib/util/tests/data2/dir2/file4 similarity index 100% rename from ThirdParty/Ert/libert_util/tests/data2/dir2/file4 rename to ThirdParty/Ert/lib/util/tests/data2/dir2/file4 diff --git a/ThirdParty/Ert/libert_util/tests/data2/file1 b/ThirdParty/Ert/lib/util/tests/data2/file1 similarity index 100% rename from ThirdParty/Ert/libert_util/tests/data2/file1 rename to ThirdParty/Ert/lib/util/tests/data2/file1 diff --git a/ThirdParty/Ert/libert_util/tests/data2/file2 b/ThirdParty/Ert/lib/util/tests/data2/file2 similarity index 100% rename from ThirdParty/Ert/libert_util/tests/data2/file2 rename to ThirdParty/Ert/lib/util/tests/data2/file2 diff --git a/ThirdParty/Ert/libert_util/tests/data2/file3 b/ThirdParty/Ert/lib/util/tests/data2/file3 similarity index 100% rename from ThirdParty/Ert/libert_util/tests/data2/file3 rename to ThirdParty/Ert/lib/util/tests/data2/file3 diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_PATH_test.c b/ThirdParty/Ert/lib/util/tests/ert_util_PATH_test.c similarity index 81% rename from ThirdParty/Ert/libert_util/tests/ert_util_PATH_test.c rename to ThirdParty/Ert/lib/util/tests/ert_util_PATH_test.c index 4eada494ec..8b84bb56b8 100644 --- a/ThirdParty/Ert/libert_util/tests/ert_util_PATH_test.c +++ b/ThirdParty/Ert/lib/util/tests/ert_util_PATH_test.c @@ -1,19 +1,19 @@ /* - Copyright (C) 2012 Statoil ASA, Norway. - - The file 'ert_util_PATH_test.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ERT is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. - - See the GNU General Public License at - for more details. + Copyright (C) 2012 Statoil ASA, Norway. + + The file 'ert_util_PATH_test.c' is part of ERT - Ensemble based Reservoir Tool. + + ERT is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ERT is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU General Public License at + for more details. */ #include #include @@ -31,7 +31,7 @@ int main(int argc , char ** argv) { char ** path_list = util_alloc_PATH_list(); if (path_list[0] != NULL) test_error_exit("Failed on empty PATH\n"); - + util_free_NULL_terminated_stringlist( path_list ); } diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_abort_gnu_tests.c b/ThirdParty/Ert/lib/util/tests/ert_util_abort_gnu_tests.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_abort_gnu_tests.c rename to ThirdParty/Ert/lib/util/tests/ert_util_abort_gnu_tests.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_addr2line.c b/ThirdParty/Ert/lib/util/tests/ert_util_addr2line.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_addr2line.c rename to ThirdParty/Ert/lib/util/tests/ert_util_addr2line.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_alloc_file_components.c b/ThirdParty/Ert/lib/util/tests/ert_util_alloc_file_components.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_alloc_file_components.c rename to ThirdParty/Ert/lib/util/tests/ert_util_alloc_file_components.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_approx_equal.c b/ThirdParty/Ert/lib/util/tests/ert_util_approx_equal.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_approx_equal.c rename to ThirdParty/Ert/lib/util/tests/ert_util_approx_equal.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_arg_pack.c b/ThirdParty/Ert/lib/util/tests/ert_util_arg_pack.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_arg_pack.c rename to ThirdParty/Ert/lib/util/tests/ert_util_arg_pack.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_before_after.c b/ThirdParty/Ert/lib/util/tests/ert_util_before_after.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_before_after.c rename to ThirdParty/Ert/lib/util/tests/ert_util_before_after.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_binary_split.c b/ThirdParty/Ert/lib/util/tests/ert_util_binary_split.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_binary_split.c rename to ThirdParty/Ert/lib/util/tests/ert_util_binary_split.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_block_fs.c b/ThirdParty/Ert/lib/util/tests/ert_util_block_fs.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_block_fs.c rename to ThirdParty/Ert/lib/util/tests/ert_util_block_fs.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_buffer.c b/ThirdParty/Ert/lib/util/tests/ert_util_buffer.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_buffer.c rename to ThirdParty/Ert/lib/util/tests/ert_util_buffer.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_clamp.c b/ThirdParty/Ert/lib/util/tests/ert_util_clamp.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_clamp.c rename to ThirdParty/Ert/lib/util/tests/ert_util_clamp.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_copy_file.c b/ThirdParty/Ert/lib/util/tests/ert_util_copy_file.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_copy_file.c rename to ThirdParty/Ert/lib/util/tests/ert_util_copy_file.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_cwd_test.c b/ThirdParty/Ert/lib/util/tests/ert_util_cwd_test.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_cwd_test.c rename to ThirdParty/Ert/lib/util/tests/ert_util_cwd_test.c diff --git a/ThirdParty/Ert/lib/util/tests/ert_util_datetime.c b/ThirdParty/Ert/lib/util/tests/ert_util_datetime.c new file mode 100644 index 0000000000..1958657190 --- /dev/null +++ b/ThirdParty/Ert/lib/util/tests/ert_util_datetime.c @@ -0,0 +1,52 @@ +/* + Copyright (C) 2017 Statoil ASA, Norway. + + This file is part of ERT - Ensemble based Reservoir Tool. + + ERT is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + ERT is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. + + See the GNU General Public License at + for more details. +*/ +#include +#include +#include +#include + +#include +#include + + + +int main( int argc , char ** argv) { + + /* Invalid seconds */ + test_assert_false( util_make_datetime_utc_validated( 75, 0 , 0 , 1 , 1, 2010, NULL)); + + /* Invalid month */ + test_assert_false( util_make_datetime_utc_validated( 15, 0 , 0 , 1 , 16, 2010, NULL)); + + /* Invalid mday */ + test_assert_false( util_make_datetime_utc_validated( 15, 0 , 0 , -1 , 1, 2010, NULL)); + + { + time_t t; + int sec,min,hour,mday,month,year; + test_assert_true( util_make_datetime_utc_validated( 15, 3 , 6 , 5 , 7, 2010, &t)); + + util_set_datetime_values_utc( t , &sec, &min, &hour, &mday, &month, &year); + test_assert_int_equal( sec, 15 ); + test_assert_int_equal( min , 3 ); + test_assert_int_equal( hour , 6 ); + test_assert_int_equal( mday , 5 ); + test_assert_int_equal( month , 7 ); + test_assert_int_equal( year , 2010 ); + } +} diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_file_readable.c b/ThirdParty/Ert/lib/util/tests/ert_util_file_readable.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_file_readable.c rename to ThirdParty/Ert/lib/util/tests/ert_util_file_readable.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_filename.c b/ThirdParty/Ert/lib/util/tests/ert_util_filename.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_filename.c rename to ThirdParty/Ert/lib/util/tests/ert_util_filename.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_hash_test.c b/ThirdParty/Ert/lib/util/tests/ert_util_hash_test.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_hash_test.c rename to ThirdParty/Ert/lib/util/tests/ert_util_hash_test.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_logh.c b/ThirdParty/Ert/lib/util/tests/ert_util_logh.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_logh.c rename to ThirdParty/Ert/lib/util/tests/ert_util_logh.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_matrix.c b/ThirdParty/Ert/lib/util/tests/ert_util_matrix.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_matrix.c rename to ThirdParty/Ert/lib/util/tests/ert_util_matrix.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_matrix_lapack.c b/ThirdParty/Ert/lib/util/tests/ert_util_matrix_lapack.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_matrix_lapack.c rename to ThirdParty/Ert/lib/util/tests/ert_util_matrix_lapack.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_matrix_stat.c b/ThirdParty/Ert/lib/util/tests/ert_util_matrix_stat.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_matrix_stat.c rename to ThirdParty/Ert/lib/util/tests/ert_util_matrix_stat.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_parent_path.c b/ThirdParty/Ert/lib/util/tests/ert_util_parent_path.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_parent_path.c rename to ThirdParty/Ert/lib/util/tests/ert_util_parent_path.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_path_stack_test.c b/ThirdParty/Ert/lib/util/tests/ert_util_path_stack_test.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_path_stack_test.c rename to ThirdParty/Ert/lib/util/tests/ert_util_path_stack_test.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_ping.c b/ThirdParty/Ert/lib/util/tests/ert_util_ping.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_ping.c rename to ThirdParty/Ert/lib/util/tests/ert_util_ping.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_realpath.c b/ThirdParty/Ert/lib/util/tests/ert_util_realpath.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_realpath.c rename to ThirdParty/Ert/lib/util/tests/ert_util_realpath.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_relpath_test.c b/ThirdParty/Ert/lib/util/tests/ert_util_relpath_test.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_relpath_test.c rename to ThirdParty/Ert/lib/util/tests/ert_util_relpath_test.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_rng.c b/ThirdParty/Ert/lib/util/tests/ert_util_rng.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_rng.c rename to ThirdParty/Ert/lib/util/tests/ert_util_rng.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_spawn.c b/ThirdParty/Ert/lib/util/tests/ert_util_spawn.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_spawn.c rename to ThirdParty/Ert/lib/util/tests/ert_util_spawn.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_sprintf_escape.c b/ThirdParty/Ert/lib/util/tests/ert_util_sprintf_escape.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_sprintf_escape.c rename to ThirdParty/Ert/lib/util/tests/ert_util_sprintf_escape.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_sscan_test.c b/ThirdParty/Ert/lib/util/tests/ert_util_sscan_test.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_sscan_test.c rename to ThirdParty/Ert/lib/util/tests/ert_util_sscan_test.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_statistics.c b/ThirdParty/Ert/lib/util/tests/ert_util_statistics.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_statistics.c rename to ThirdParty/Ert/lib/util/tests/ert_util_statistics.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_strcat_test.c b/ThirdParty/Ert/lib/util/tests/ert_util_strcat_test.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_strcat_test.c rename to ThirdParty/Ert/lib/util/tests/ert_util_strcat_test.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_string_util.c b/ThirdParty/Ert/lib/util/tests/ert_util_string_util.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_string_util.c rename to ThirdParty/Ert/lib/util/tests/ert_util_string_util.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_stringlist_test.c b/ThirdParty/Ert/lib/util/tests/ert_util_stringlist_test.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_stringlist_test.c rename to ThirdParty/Ert/lib/util/tests/ert_util_stringlist_test.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_strstr_int_format.c b/ThirdParty/Ert/lib/util/tests/ert_util_strstr_int_format.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_strstr_int_format.c rename to ThirdParty/Ert/lib/util/tests/ert_util_strstr_int_format.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_struct_vector.c b/ThirdParty/Ert/lib/util/tests/ert_util_struct_vector.c similarity index 96% rename from ThirdParty/Ert/libert_util/tests/ert_util_struct_vector.c rename to ThirdParty/Ert/lib/util/tests/ert_util_struct_vector.c index 67a7347964..1ac9aa25a5 100644 --- a/ThirdParty/Ert/libert_util/tests/ert_util_struct_vector.c +++ b/ThirdParty/Ert/lib/util/tests/ert_util_struct_vector.c @@ -53,11 +53,10 @@ void test_create_invalid() { } void test_append_iget() { - struct test_struct d1,d2; + struct test_struct d1 = (struct test_struct) {.x = 100, .y = 99, .z = 234}; + struct test_struct d2 = (struct test_struct) {.x = 0, .y = 0, .z = 0}; + struct_vector_type * struct_vector = struct_vector_alloc( sizeof d1 ); - d1.x = 100; - d1.y = 99; - d1.z = 234; struct_vector_append( struct_vector , &d1 ); test_assert_int_equal( struct_vector_get_size( struct_vector ) , 1 ); diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_subst_list.c b/ThirdParty/Ert/lib/util/tests/ert_util_subst_list.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_subst_list.c rename to ThirdParty/Ert/lib/util/tests/ert_util_subst_list.c diff --git a/ThirdParty/Ert/libert_utilxx/tests/ert_util_test_area_xx.cpp b/ThirdParty/Ert/lib/util/tests/ert_util_test_area_xx.cpp similarity index 100% rename from ThirdParty/Ert/libert_utilxx/tests/ert_util_test_area_xx.cpp rename to ThirdParty/Ert/lib/util/tests/ert_util_test_area_xx.cpp diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_time_interval.c b/ThirdParty/Ert/lib/util/tests/ert_util_time_interval.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_time_interval.c rename to ThirdParty/Ert/lib/util/tests/ert_util_time_interval.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_type_vector_functions.c b/ThirdParty/Ert/lib/util/tests/ert_util_type_vector_functions.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_type_vector_functions.c rename to ThirdParty/Ert/lib/util/tests/ert_util_type_vector_functions.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_type_vector_test.c b/ThirdParty/Ert/lib/util/tests/ert_util_type_vector_test.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_type_vector_test.c rename to ThirdParty/Ert/lib/util/tests/ert_util_type_vector_test.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_ui_return.c b/ThirdParty/Ert/lib/util/tests/ert_util_ui_return.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_ui_return.c rename to ThirdParty/Ert/lib/util/tests/ert_util_ui_return.c diff --git a/ThirdParty/Ert/libert_utilxx/tests/ert_util_unique_ptr.cpp b/ThirdParty/Ert/lib/util/tests/ert_util_unique_ptr.cpp similarity index 100% rename from ThirdParty/Ert/libert_utilxx/tests/ert_util_unique_ptr.cpp rename to ThirdParty/Ert/lib/util/tests/ert_util_unique_ptr.cpp diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_vector_test.c b/ThirdParty/Ert/lib/util/tests/ert_util_vector_test.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_vector_test.c rename to ThirdParty/Ert/lib/util/tests/ert_util_vector_test.c diff --git a/ThirdParty/Ert/libert_util/tests/ert_util_work_area.c b/ThirdParty/Ert/lib/util/tests/ert_util_work_area.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/ert_util_work_area.c rename to ThirdParty/Ert/lib/util/tests/ert_util_work_area.c diff --git a/ThirdParty/Ert/libert_util/tests/test_thread_pool.c b/ThirdParty/Ert/lib/util/tests/test_thread_pool.c similarity index 100% rename from ThirdParty/Ert/libert_util/tests/test_thread_pool.c rename to ThirdParty/Ert/lib/util/tests/test_thread_pool.c diff --git a/ThirdParty/Ert/libert_util/src/thread_pool.c b/ThirdParty/Ert/lib/util/thread_pool.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/thread_pool.c rename to ThirdParty/Ert/lib/util/thread_pool.c diff --git a/ThirdParty/Ert/libert_util/src/thread_pool1.c b/ThirdParty/Ert/lib/util/thread_pool1.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/thread_pool1.c rename to ThirdParty/Ert/lib/util/thread_pool1.c diff --git a/ThirdParty/Ert/libert_util/src/thread_pool_posix.c b/ThirdParty/Ert/lib/util/thread_pool_posix.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/thread_pool_posix.c rename to ThirdParty/Ert/lib/util/thread_pool_posix.c diff --git a/ThirdParty/Ert/libert_util/src/time_interval.c b/ThirdParty/Ert/lib/util/time_interval.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/time_interval.c rename to ThirdParty/Ert/lib/util/time_interval.c diff --git a/ThirdParty/Ert/libert_util/src/timer.c b/ThirdParty/Ert/lib/util/timer.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/timer.c rename to ThirdParty/Ert/lib/util/timer.c diff --git a/ThirdParty/Ert/libert_util/src/type_vector_functions.c b/ThirdParty/Ert/lib/util/type_vector_functions.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/type_vector_functions.c rename to ThirdParty/Ert/lib/util/type_vector_functions.c diff --git a/ThirdParty/Ert/libert_util/src/ui_return.c b/ThirdParty/Ert/lib/util/ui_return.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/ui_return.c rename to ThirdParty/Ert/lib/util/ui_return.c diff --git a/ThirdParty/Ert/libert_util/src/util.c b/ThirdParty/Ert/lib/util/util.c similarity index 94% rename from ThirdParty/Ert/libert_util/src/util.c rename to ThirdParty/Ert/lib/util/util.c index d0eaa9ce84..65d85bf5bc 100644 --- a/ThirdParty/Ert/libert_util/src/util.c +++ b/ThirdParty/Ert/lib/util/util.c @@ -38,27 +38,14 @@ #include #include "ert/util/build_config.h" - -#ifdef HAVE_BACKTRACE -#define __USE_GNU // Must be defined to get access to the dladdr() function; Man page says the symbol should be: _GNU_SOURCE but that does not seem to work? -#define _GNU_SOURCE // Must be defined _before_ #include to get the symbol 'program_invocation_name'. -#include -#endif - - #include #include #include #include -#include #include #include -#ifdef ERT_HAVE_OPENDIR -#include -#endif - #ifdef HAVE_FNMATCH #include #else @@ -79,10 +66,6 @@ #include #endif -#ifdef HAVE_EXECINFO -#include -#endif - #ifdef HAVE_FTRUNCATE #include #include @@ -2281,7 +2264,7 @@ bool util_copy_stream(FILE *src_stream , FILE *target_stream , size_t buffer_siz } -static bool util_copy_file__(const char * src_file , const char * target_file, size_t buffer_size , void * buffer , bool abort_on_error) { +bool util_copy_file__(const char * src_file , const char * target_file, size_t buffer_size , void * buffer , bool abort_on_error) { if (util_same_file(src_file , target_file)) { fprintf(stderr,"%s Warning: trying to copy %s onto itself - nothing done\n",__func__ , src_file); return false; @@ -3107,6 +3090,7 @@ static void __util_set_timevalues_utc(time_t t , int * sec , int * min , int * h } +static bool util_make_datetime_utc__(int sec, int min, int hour , int mday , int month , int year, bool force_set, time_t * t); /* This function takes a time_t instance as input, and @@ -3146,7 +3130,6 @@ bool util_is_first_day_in_month_utc( time_t t) { return false; } -static bool util_make_datetime_utc__(int sec, int min, int hour , int mday , int month , int year, time_t * t); /* Expects date in the order YYYY-MM-DD. @@ -3156,7 +3139,7 @@ bool util_sscanf_isodate(const char * date_token , time_t * t) { int day, month, year; if (sscanf(date_token , "%d-%d-%d" , &year , &month , &day) == 3) - return util_make_datetime_utc__(0,0,0,day , month , year , t); + return util_make_datetime_utc__(0,0,0,day , month , year , false, t); return false; } @@ -3331,7 +3314,7 @@ char * util_get_timezone() { */ -static bool util_make_datetime_utc__(int sec, int min, int hour , int mday , int month , int year, time_t * t) { +static bool util_make_datetime_utc__(int sec, int min, int hour , int mday , int month , int year, bool force_set, time_t * t) { bool valid = false; struct tm ts; ts.tm_sec = sec; @@ -3350,24 +3333,29 @@ static bool util_make_datetime_utc__(int sec, int min, int hour , int mday , int #endif if ((ts.tm_sec == sec) && - (ts.tm_sec == min) && + (ts.tm_min == min) && (ts.tm_hour == hour) && (ts.tm_mday == mday) && (ts.tm_mon == (month - 1)) && (ts.tm_year == (year - 1900))) valid = true; - if (t) - *t = work_t; + if (t) { + if (valid || force_set) + *t = work_t; + } } return valid; } +bool util_make_datetime_utc_validated(int sec, int min, int hour , int mday , int month , int year, time_t * t) { + return util_make_datetime_utc__( sec,min,hour,mday,month,year,false, t); +} time_t util_make_datetime_utc(int sec, int min, int hour , int mday , int month , int year) { time_t t; - util_make_datetime_utc__( sec,min,hour,mday,month,year,&t); + util_make_datetime_utc__( sec,min,hour,mday,month,year,true, &t); return t; } @@ -5078,9 +5066,9 @@ const char * util_enum_iget( int index , int size , const util_enum_element_type } -static char * __abort_program_message = NULL; /* Can use util_abort_append_version_info() to fill this with - version info+++ wich will be printed when util_abort() is called. */ -static char * __current_executable = NULL; +char * __abort_program_message = NULL; /* Can use util_abort_append_version_info() to fill this with + version info+++ wich will be printed when util_abort() is called. */ +char * __current_executable = NULL; void util_abort_append_version_info(const char * msg) { @@ -5196,55 +5184,6 @@ void util_time_utc( time_t * t , struct tm * ts ) { #endif } - - - - -#ifdef ERT_HAVE_SPAWN -#include "util_spawn.c" -#endif - -#ifdef ERT_HAVE_ZLIB -#include "util_zlib.c" -#endif - -#ifdef ERT_HAVE_GETUID -#include "util_getuid.c" -#endif - -#ifdef ERT_HAVE_LOCKF -#include "util_lockf.c" -#endif - - -#include "util_env.c" - -#ifdef ERT_HAVE_SYMLINK -#include "util_symlink.c" -#else -bool util_is_link(const char * path) { - return false; -} - -char * util_alloc_link_target(const char * link) { - return util_alloc_string_copy( link ); -} -#endif - - - -#ifdef HAVE_BACKTRACE -#include "util_abort_gnu.c" -#else -#include "util_abort_simple.c" -#endif - - -#ifdef ERT_HAVE_OPENDIR -#include "util_opendir.c" -#endif - - #ifdef HAVE_ROUND int util_roundf( float x ) { return roundf(x); } int util_round( double x ) { return round(x); } @@ -5253,13 +5192,295 @@ int util_roundf( float x ) { return (int) (x + 0.5); } int util_round( double x ) { return (int) (x + 0.5); } #endif -#include "util_path.c" -#include "util_lfs.c" +bool util_is_abs_path(const char * path) { +#ifdef ERT_WINDOWS + if ((path[0] == '/') || (path[0] == '\\')) + return true; + else + if ((isalpha(path[0]) && (path[1] == ':'))) + return true; + + return false; + +#else + + if (path[0] == UTIL_PATH_SEP_CHAR) + return true; + else + return false; + +#endif +} + +static int util_mkdir( const char * path ) { +#ifdef HAVE_POSIX_MKDIR + return mkdir( path , UTIL_DEFAULT_MKDIR_MODE ); +#endif + +#ifdef HAVE_WINDOWS_MKDIR + return _mkdir( path ); +#endif +} + + +void util_make_path(const char *_path) { + char *active_path; + char *path = (char *) _path; + int current_pos = 0; + + if (!util_is_directory(path)) { + int i = 0; + active_path = util_calloc(strlen(path) + 1 , sizeof * active_path ); + do { + int n = strcspn(path , UTIL_PATH_SEP_STRING); + if (n < strlen(path)) + n += 1; + path += n; + i++; + strncpy(active_path , _path , n + current_pos); + active_path[n+current_pos] = '\0'; + current_pos += n; + + if (!util_is_directory(active_path)) { + if (util_mkdir(active_path) != 0) { + bool fail = false; + switch (errno) { + case(EEXIST): + if (util_is_directory(active_path)) + fail = false; + break; + default: + fail = true; + break; + } + if (fail) + util_abort("%s: failed to make directory:%s - aborting\n: %s(%d) \n",__func__ , active_path , strerror(errno), errno); + } + } + + } while (strlen(active_path) < strlen(_path)); + free(active_path); + } +} + + +/** + This function will allocate a unique filename with a random part in + it. If the the path corresponding to the first argument does not + exist it is created. + + If the value include_pid is true, the pid of the calling process is + included in the filename, the resulting filename will be: + + path/prefix-pid-RANDOM + + if include_pid is false the resulting file will be: + + path/prefix-RANDOM + + Observe that IFF the prefix contains any path separator character + they are translated to "_". +*/ + + + +char * util_alloc_tmp_file(const char * path, const char * prefix , bool include_pid ) { + // Should be reimplemented to use mkstemp() + const int pid_digits = 6; + const int random_digits = 6; + const int random_max = 1000000; + +#ifdef HAVE_PID_T + const int pid_max = 1000000; + pid_t pid = getpid() % pid_max; +#else + int pid = 0; +#endif + + char * file = util_calloc(strlen(path) + 1 + strlen(prefix) + 1 + pid_digits + 1 + random_digits + 1 , sizeof * file ); + char * tmp_prefix = util_alloc_string_copy( prefix ); + + if (!util_is_directory(path)) + util_make_path(path); + util_string_tr( tmp_prefix , UTIL_PATH_SEP_CHAR , '_'); /* removing path seps. */ + + do { + long int rand_int = rand() % random_max; + if (include_pid) + sprintf(file , "%s%c%s-%d-%ld" , path , UTIL_PATH_SEP_CHAR , tmp_prefix , pid , rand_int); + else + sprintf(file , "%s%c%s-%ld" , path , UTIL_PATH_SEP_CHAR , tmp_prefix , rand_int); + } while (util_file_exists(file)); + + free( tmp_prefix ); + return file; +} + +/** + This file allocates a filename consisting of a leading path, a + basename and an extension. Both the path and the extension can be + NULL, but not the basename. + + Observe that this function does pure string manipulation; there is + no input check on whether path exists, if baseneme contains "." + (or even a '/') and so on. +*/ + +char * util_alloc_filename(const char * path , const char * basename , const char * extension) { + char * file; + int length = strlen(basename) + 1; + + if (path != NULL) + length += strlen(path) + 1; + + if (extension != NULL) + length += strlen(extension) + 1; + + file = util_calloc(length , sizeof * file ); + + if (path == NULL) { + if (extension == NULL) + memcpy(file , basename , strlen(basename) + 1); + else + sprintf(file , "%s.%s" , basename , extension); + } else { + if (extension == NULL) + sprintf(file , "%s%c%s" , path , UTIL_PATH_SEP_CHAR , basename); + else + sprintf(file , "%s%c%s.%s" , path , UTIL_PATH_SEP_CHAR , basename , extension); + } + + return file; +} + + +char * util_realloc_filename(char * filename , const char * path , const char * basename , const char * extension) { + util_safe_free(filename); + return util_alloc_filename( path , basename , extension ); +} + + + + +#ifdef HAVE_PROC +bool util_proc_alive(pid_t pid) { + char proc_path[16]; + sprintf(proc_path , "/proc/%d" , pid); + return util_is_directory(proc_path); +} +#endif + +int util_proc_mem_free(void) { + FILE *stream = util_fopen("/proc/meminfo" , "r"); + int mem; + util_fskip_lines(stream , 1); + util_fskip_token(stream); + util_fscanf_int(stream , &mem); + fclose(stream); + return mem; +} + + + + +char * util_split_alloc_dirname( const char * input_path ) { + char * path; + util_alloc_file_components( input_path , &path , NULL , NULL); + return path; +} + + +char * util_split_alloc_filename( const char * input_path ) { + char * filename = NULL; + { + char * basename; + char * extension; + + util_alloc_file_components( input_path , NULL , &basename , &extension); + + if (basename) + filename = util_alloc_filename( NULL , basename , extension ); + + util_safe_free( basename ); + util_safe_free( extension ); + } + + return filename; +} + + + +void util_path_split(const char *line , int *_tokens, char ***_token_list) { + util_split_string( line , UTIL_PATH_SEP_STRING , _tokens , _token_list); +} + +char * util_alloc_parent_path( const char * path) { + int path_ncomp; + char ** path_component_list; + char * parent_path = NULL; + + if (path) { + bool is_abs = util_is_abs_path( path ); + char * work_path; + + if (strstr(path , "..")) { + if (is_abs) + work_path = util_alloc_realpath__( path ); + else { + char * abs_path = util_alloc_realpath__( path ); + char * cwd = util_alloc_cwd(); + work_path = util_alloc_rel_path( cwd , abs_path ); + free( abs_path ); + free( cwd ); + } + } else + work_path = util_alloc_string_copy( path ); + + util_path_split( work_path , &path_ncomp , &path_component_list ); + if (path_ncomp > 0) { + int current_length = 4; + int ip; + + parent_path = util_realloc( parent_path , current_length * sizeof * parent_path); + parent_path[0] = '\0'; + + for (ip=0; ip < path_ncomp - 1; ip++) { + const char * ipath = path_component_list[ip]; + int min_length = strlen(parent_path) + strlen(ipath) + 1; + + if (min_length >= current_length) { + current_length = 2 * min_length; + parent_path = util_realloc( parent_path , current_length * sizeof * parent_path); + } + + if (is_abs || (ip > 0)) + strcat( parent_path , UTIL_PATH_SEP_STRING ); + strcat( parent_path , ipath ); + } + } + util_free_stringlist( path_component_list , path_ncomp ); + free( work_path ); + } + return parent_path; +} + +#ifdef ERT_HAVE_UNISTD int util_type_get_id( const void * data ) { int type_id = ((const int*) data)[0]; return type_id; } -#include "util_chdir.c" +int util_chdir(const char * path) { + return chdir( path ); +} +#endif +#ifdef HAVE_WINDOWS_CHDIR +#include + +int util_chdir(const char * path) { + return _chdir( path ); +} + +#endif diff --git a/ThirdParty/Ert/libert_util/src/util_abort_gnu.c b/ThirdParty/Ert/lib/util/util_abort_gnu.c similarity index 94% rename from ThirdParty/Ert/libert_util/src/util_abort_gnu.c rename to ThirdParty/Ert/lib/util/util_abort_gnu.c index c595f3fe46..416b355d8d 100644 --- a/ThirdParty/Ert/libert_util/src/util_abort_gnu.c +++ b/ThirdParty/Ert/lib/util/util_abort_gnu.c @@ -26,7 +26,23 @@ This function is purely a helper function for util_abort(). */ +#define __USE_GNU // Must be defined to get access to the dladdr() function; Man page says the symbol should be: _GNU_SOURCE but that does not seem to work? +#define _GNU_SOURCE // Must be defined _before_ #include to get the symbol 'program_invocation_name'. + +#include +#include +#include + +#include + +#include + +#include +#include +#include #include +#include +#include #if !defined(__GLIBC__) /* note: not same as __GNUC__ */ # if defined (__APPLE__) @@ -227,6 +243,8 @@ void util_abort_test_set_intercept_function(const char * function) { intercept_function = util_realloc_string_copy( intercept_function , function ); } +char* __abort_program_message; +char* __current_executable; void util_abort__(const char * file , const char * function , int line , const char * fmt , ...) { util_abort_test_intercept( function ); diff --git a/ThirdParty/Ert/libert_util/src/util_abort_simple.c b/ThirdParty/Ert/lib/util/util_abort_simple.c similarity index 89% rename from ThirdParty/Ert/libert_util/src/util_abort_simple.c rename to ThirdParty/Ert/lib/util/util_abort_simple.c index 889987eb7d..9f7363f414 100644 --- a/ThirdParty/Ert/libert_util/src/util_abort_simple.c +++ b/ThirdParty/Ert/lib/util/util_abort_simple.c @@ -2,10 +2,14 @@ This file implements a simpler version of the util_abort() function which does not present a backtrace. */ +#include +#include + #include +#include - - +char * __abort_program_message; +char * __current_executable; diff --git a/ThirdParty/Ert/libert_util/src/util_endian.c b/ThirdParty/Ert/lib/util/util_endian.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/util_endian.c rename to ThirdParty/Ert/lib/util/util_endian.c diff --git a/ThirdParty/Ert/libert_util/src/util_env.c b/ThirdParty/Ert/lib/util/util_env.c similarity index 99% rename from ThirdParty/Ert/libert_util/src/util_env.c rename to ThirdParty/Ert/lib/util/util_env.c index 7c5144b242..0395cb47c1 100644 --- a/ThirdParty/Ert/libert_util/src/util_env.c +++ b/ThirdParty/Ert/lib/util/util_env.c @@ -39,6 +39,8 @@ void util_setenv( const char * variable , const char * value) { #else +#include + #define PATHVAR_SPLIT ";" void util_setenv( const char * variable , const char * value) { SetEnvironmentVariable( variable , NULL ); diff --git a/ThirdParty/Ert/libert_util/src/util_getuid.c b/ThirdParty/Ert/lib/util/util_getuid.c similarity index 96% rename from ThirdParty/Ert/libert_util/src/util_getuid.c rename to ThirdParty/Ert/lib/util/util_getuid.c index 4e867d09b1..b95864b4c2 100644 --- a/ThirdParty/Ert/libert_util/src/util_getuid.c +++ b/ThirdParty/Ert/lib/util/util_getuid.c @@ -1,3 +1,12 @@ +#include +#include + +#include + +#include +#include +#include + uid_t util_get_entry_uid( const char * file ) { stat_type buffer; util_stat( file , &buffer); diff --git a/ThirdParty/Ert/libert_util/src/util_lfs.c b/ThirdParty/Ert/lib/util/util_lfs.c similarity index 99% rename from ThirdParty/Ert/libert_util/src/util_lfs.c rename to ThirdParty/Ert/lib/util/util_lfs.c index 17fca55ee4..d6d9c1f735 100644 --- a/ThirdParty/Ert/libert_util/src/util_lfs.c +++ b/ThirdParty/Ert/lib/util/util_lfs.c @@ -53,6 +53,8 @@ 'offset_type' in util.h, and all file operations should use that type. */ +#include + offset_type util_ftell(FILE * stream) { #ifdef ERT_WINDOWS_LFS return _ftelli64(stream); diff --git a/ThirdParty/Ert/libert_util/src/util_lockf.c b/ThirdParty/Ert/lib/util/util_lockf.c similarity index 95% rename from ThirdParty/Ert/libert_util/src/util_lockf.c rename to ThirdParty/Ert/lib/util/util_lockf.c index ed67a7436d..fe3636b85c 100644 --- a/ThirdParty/Ert/libert_util/src/util_lockf.c +++ b/ThirdParty/Ert/lib/util/util_lockf.c @@ -1,3 +1,12 @@ +#include +#include +#include + +#include + +#include +#include + /** This function will TRY to aquire an exclusive lock to the file filename. If the file does not exist it will be created. The mode diff --git a/ThirdParty/Ert/libert_util/src/util_opendir.c b/ThirdParty/Ert/lib/util/util_opendir.c similarity index 97% rename from ThirdParty/Ert/libert_util/src/util_opendir.c rename to ThirdParty/Ert/lib/util/util_opendir.c index 61c71b9735..3205364699 100644 --- a/ThirdParty/Ert/libert_util/src/util_opendir.c +++ b/ThirdParty/Ert/lib/util/util_opendir.c @@ -1,3 +1,13 @@ +#include +#include +#include + +#include + +#include +#include + +bool util_copy_file__(const char * src_file , const char * target_file, size_t buffer_size , void * buffer , bool abort_on_error); static void util_copy_directory__(const char * src_path , const char * target_path , int buffer_size , void * buffer ) { if (!util_is_directory(src_path)) diff --git a/ThirdParty/Ert/libert_util/src/util_spawn.c b/ThirdParty/Ert/lib/util/util_spawn.c similarity index 91% rename from ThirdParty/Ert/libert_util/src/util_spawn.c rename to ThirdParty/Ert/lib/util/util_spawn.c index 2e9c11109c..d1865ccca4 100644 --- a/ThirdParty/Ert/libert_util/src/util_spawn.c +++ b/ThirdParty/Ert/lib/util/util_spawn.c @@ -1,5 +1,17 @@ -#include +#include +#include "ert/util/build_config.h" + +#include +#include + +#include #include +#include +#include +#include + +#include + extern char **environ; @@ -107,9 +119,11 @@ int util_spawn_blocking(const char *executable, int argc, const char **argv, con */ #ifdef ERT_HAVE_PING +#define xstr(s) #s +#define str(s) xstr(s) bool util_ping(const char *hostname) { int wait_status; - wait_status = util_spawn_blocking(PING_CMD, 4, (const char *[4]) {"-c" , "3" , "-q", hostname}, "/dev/null" , "/dev/null"); + wait_status = util_spawn_blocking(str(PING_CMD), 4, (const char *[4]) {"-c" , "3" , "-q", hostname}, "/dev/null" , "/dev/null"); if (WIFEXITED( wait_status )) { int ping_status = WEXITSTATUS( wait_status ); diff --git a/ThirdParty/Ert/libert_util/src/util_symlink.c b/ThirdParty/Ert/lib/util/util_symlink.c similarity index 89% rename from ThirdParty/Ert/libert_util/src/util_symlink.c rename to ThirdParty/Ert/lib/util/util_symlink.c index 0f35f79f04..722a65186f 100644 --- a/ThirdParty/Ert/libert_util/src/util_symlink.c +++ b/ThirdParty/Ert/lib/util/util_symlink.c @@ -1,9 +1,25 @@ -/* - This file contains utility functions all related to symbolic links; - this file is not compiled at all on platforms which do not have the - symlink() call. -*/ +#include +#include +#include +#include "ert/util/build_config.h" +#include +#include + +#ifndef ERT_HAVE_SYMLINK + +bool util_is_link(const char * path) { + return false; +} + +char * util_alloc_link_target(const char * link) { + return util_alloc_string_copy( link ); +} + +#else + +#include +#include void util_make_slink(const char *target , const char * link) { if (util_file_exists(link)) { @@ -124,3 +140,4 @@ char * util_alloc_atlink_target(const char * path , const char * link) { } #endif +#endif // ERT_HAVE_SYMLINK diff --git a/ThirdParty/Ert/libert_util/src/util_zlib.c b/ThirdParty/Ert/lib/util/util_zlib.c similarity index 98% rename from ThirdParty/Ert/libert_util/src/util_zlib.c rename to ThirdParty/Ert/lib/util/util_zlib.c index d8f098de04..bbba27b487 100644 --- a/ThirdParty/Ert/libert_util/src/util_zlib.c +++ b/ThirdParty/Ert/lib/util/util_zlib.c @@ -1,5 +1,12 @@ +#include +#include +#include +#include + #include +#include + /** This function reads data from the input pointer data, and writes a compressed copy into the target buffer zbuffer. On input data_size diff --git a/ThirdParty/Ert/libert_util/src/vector.c b/ThirdParty/Ert/lib/util/vector.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/vector.c rename to ThirdParty/Ert/lib/util/vector.c diff --git a/ThirdParty/Ert/libert_util/src/vector_template.c b/ThirdParty/Ert/lib/util/vector_template.c similarity index 100% rename from ThirdParty/Ert/libert_util/src/vector_template.c rename to ThirdParty/Ert/lib/util/vector_template.c diff --git a/ThirdParty/Ert/libert_util/include/ert/util/vector_template.h b/ThirdParty/Ert/lib/vector_template.h.in similarity index 100% rename from ThirdParty/Ert/libert_util/include/ert/util/vector_template.h rename to ThirdParty/Ert/lib/vector_template.h.in diff --git a/ThirdParty/Ert/libecl/CMakeLists.txt b/ThirdParty/Ert/libecl/CMakeLists.txt deleted file mode 100644 index faca95eb2b..0000000000 --- a/ThirdParty/Ert/libecl/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_subdirectory( src ) - -add_subdirectory( applications ) -add_subdirectory( tests ) - diff --git a/ThirdParty/Ert/libecl/applications/CMakeLists.txt b/ThirdParty/Ert/libecl/applications/CMakeLists.txt deleted file mode 100644 index 1ebcfb0918..0000000000 --- a/ThirdParty/Ert/libecl/applications/CMakeLists.txt +++ /dev/null @@ -1,81 +0,0 @@ -if (BUILD_APPLICATIONS) - add_executable( sum_write sum_write.c ) - add_executable( make_grid make_grid.c ) - add_executable( grdecl_grid grdecl_grid.c ) - if (ERT_LINUX) - add_executable( ecl_pack.x ecl_pack.c ) - add_executable( ecl_unpack.x ecl_unpack.c ) - add_executable( esummary.x esummary.c ) - add_executable( convert.x convert.c ) - add_executable( grdecl_test.x grdecl_test.c ) - add_executable( kw_list.x kw_list.c ) - add_executable( kw_extract.x kw_extract.c ) - add_executable( grid_info.x grid_info.c ) - add_executable( grid_dump.x grid_dump.c ) - add_executable( grid_dump_ascii.x grid_dump_ascii.c ) - add_executable( summary.x view_summary.c ) - add_executable( select_test.x select_test.c ) - add_executable( load_test.x load_test.c ) - set(program_list ecl_pack.x ecl_unpack.x esummary.x kw_extract.x grdecl_grid make_grid sum_write load_test.x grdecl_test.x grid_dump_ascii.x select_test.x grid_dump.x convert.x kw_list.x grid_info.x summary.x) - else() - # The stupid .x extension creates problems on windows - add_executable( ecl_pack ecl_pack.c ) - add_executable( ecl_unpack ecl_unpack.c ) - add_executable( kw_extract kw_extract.c ) - add_executable( grid_info grid_info.c ) - add_executable( grid_dump grid_dump.c ) - add_executable( grid_dump_ascii grid_dump_ascii.c ) - add_executable( summary view_summary.c ) - add_executable( select_test select_test.c ) - add_executable( load_test load_test.c ) - set(program_list ecl_pack ecl_unpack kw_extract grdecl_grid make_grid sum_write load_test grid_dump_ascii select_test grid_dump grid_info summary) - endif() - - if (BUILD_ERT) - add_executable( ecl_quantile ecl_quantile.c ) - include_directories( ../../libconfig/include ) - target_link_libraries( ecl_quantile config ) - list( APPEND program_list ecl_quantile ) - endif() - - - foreach(prog ${program_list}) - target_link_libraries( ${prog} ecl ert_util ) - if (USE_RUNPATH) - add_runpath( ${prog} ) - endif() - - #----------------------------------------------------------------- - set (destination ${CMAKE_INSTALL_PREFIX}/bin) - if (INSTALL_ERT) - install(TARGETS ${prog} DESTINATION ${destination}) - if (INSTALL_GROUP) - install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/${prog})") - install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/${prog})") - endif() - endif() - endforeach() -endif() - -if (BUILD_ECL_SUMMARY) - add_executable( ecl_summary view_summary.c ) - target_link_libraries( ecl_summary ecl) - if (USE_RUNPATH) - add_runpath( ecl_summary ) - endif() - - set (destination ${CMAKE_INSTALL_PREFIX}/bin) - if (INSTALL_ERT) - install(TARGETS ecl_summary DESTINATION ${destination}) - if (INSTALL_GROUP) - install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/ecl_summary)") - install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/ecl_summary)") - endif() - endif() - - include(GNUInstallDirs) - install(FILES ${PROJECT_SOURCE_DIR}/docs/man/man1/ecl_summary.1 - DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) - -endif() - diff --git a/ThirdParty/Ert/libecl/applications/link_static.sh b/ThirdParty/Ert/libecl/applications/link_static.sh deleted file mode 100644 index ac68ae2574..0000000000 --- a/ThirdParty/Ert/libecl/applications/link_static.sh +++ /dev/null @@ -1,2 +0,0 @@ -gcc -o summary.x_static view_summary.o -L../lib -L../../libutil/lib -lecl -lutil -lm -lpt -gcc -static -o summary.x_full_static view_summary.o -L../lib -L../../libutil/lib -lecl -lutil -lm -lpthread -lz diff --git a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_view.h b/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_view.h deleted file mode 100644 index 8e363158da..0000000000 --- a/ThirdParty/Ert/libecl/include/ert/ecl/ecl_file_view.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright (C) 2016 Statoil ASA, Norway. - - This file is part of ERT - Ensemble based Reservoir Tool. - - ERT is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ERT is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. - - See the GNU General Public License at - for more details. -*/ - - -#ifndef ERT_ECL_FILE_VIEW_H -#define ERT_ECL_FILE_VIEW_H - -#include -#include - -#include -#include -#include - - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - ECL_FILE_CLOSE_STREAM = 1 , /* - This flag will close the underlying FILE object between each access; this is - mainly to save filedescriptors in cases where many ecl_file instances are open at - the same time. */ - // - ECL_FILE_WRITABLE = 2 /* - This flag opens the file in a mode where it can be updated and modified, but it - must still exist and be readable. I.e. this should not compared with the normal: - fopen(filename , "w") where an existing file is truncated to zero upon successfull - open. - */ -} ecl_file_flag_type; - - -typedef struct ecl_file_view_struct ecl_file_view_type; - - bool ecl_file_view_flags_set( const ecl_file_view_type * file_view, int query_flags); - bool ecl_file_view_check_flags( int state_flags , int query_flags); - - ecl_file_view_type * ecl_file_view_alloc( fortio_type * fortio , int * flags , inv_map_type * inv_map , bool owner ); - int ecl_file_view_get_global_index( const ecl_file_view_type * ecl_file_view , const char * kw , int ith); - void ecl_file_view_make_index( ecl_file_view_type * ecl_file_view ); - bool ecl_file_view_has_kw( const ecl_file_view_type * ecl_file_view, const char * kw); - ecl_file_kw_type * ecl_file_view_iget_file_kw( const ecl_file_view_type * ecl_file_view , int global_index); - ecl_file_kw_type * ecl_file_view_iget_named_file_kw( const ecl_file_view_type * ecl_file_view , const char * kw, int ith); - ecl_kw_type * ecl_file_view_iget_kw( const ecl_file_view_type * ecl_file_view , int index); - void ecl_file_view_index_fload_kw(const ecl_file_view_type * ecl_file_view, const char* kw, int index, const int_vector_type * index_map, char* buffer); - int ecl_file_view_find_kw_value( const ecl_file_view_type * ecl_file_view , const char * kw , const void * value); - const char * ecl_file_view_iget_distinct_kw( const ecl_file_view_type * ecl_file_view , int index); - int ecl_file_view_get_num_distinct_kw( const ecl_file_view_type * ecl_file_view ); - int ecl_file_view_get_size( const ecl_file_view_type * ecl_file_view ); - ecl_data_type ecl_file_view_iget_data_type( const ecl_file_view_type * ecl_file_view , int index); - int ecl_file_view_iget_size( const ecl_file_view_type * ecl_file_view , int index); - const char * ecl_file_view_iget_header( const ecl_file_view_type * ecl_file_view , int index); - ecl_kw_type * ecl_file_view_iget_named_kw( const ecl_file_view_type * ecl_file_view , const char * kw, int ith); - ecl_data_type ecl_file_view_iget_named_data_type( const ecl_file_view_type * ecl_file_view , const char * kw , int ith); - int ecl_file_view_iget_named_size( const ecl_file_view_type * ecl_file_view , const char * kw , int ith); - void ecl_file_view_replace_kw( ecl_file_view_type * ecl_file_view , ecl_kw_type * old_kw , ecl_kw_type * new_kw , bool insert_copy); - bool ecl_file_view_load_all( ecl_file_view_type * ecl_file_view ); - void ecl_file_view_add_kw( ecl_file_view_type * ecl_file_view , ecl_file_kw_type * file_kw); - void ecl_file_view_free( ecl_file_view_type * ecl_file_view ); - void ecl_file_view_free__( void * arg ); - int ecl_file_view_get_num_named_kw(const ecl_file_view_type * ecl_file_view , const char * kw); - void ecl_file_view_fwrite( const ecl_file_view_type * ecl_file_view , fortio_type * target , int offset); - int ecl_file_view_iget_occurence( const ecl_file_view_type * ecl_file_view , int global_index); - void ecl_file_view_fprintf_kw_list(const ecl_file_view_type * ecl_file_view , FILE * stream); - ecl_file_view_type * ecl_file_view_add_blockview(const ecl_file_view_type * ecl_file_view , const char * header, int occurence); - ecl_file_view_type * ecl_file_view_add_blockview2(const ecl_file_view_type * ecl_file_view , const char * start_kw, const char * end_kw, int occurence); - ecl_file_view_type * ecl_file_view_add_restart_view(ecl_file_view_type * file_view , int seqnum_index, int report_step , time_t sim_time, double sim_days); - ecl_file_view_type * ecl_file_view_alloc_blockview(const ecl_file_view_type * ecl_file_view , const char * header, int occurence); - ecl_file_view_type * ecl_file_view_alloc_blockview2(const ecl_file_view_type * ecl_file_view , const char * start_kw, const char * end_kw, int occurence); - - void ecl_file_view_add_child( ecl_file_view_type * parent , ecl_file_view_type * child); - bool ecl_file_view_drop_flag( ecl_file_view_type * file_view , int flag); - void ecl_file_view_add_flag( ecl_file_view_type * file_view , int flag); - - int ecl_file_view_seqnum_index_from_sim_time( ecl_file_view_type * parent_map , time_t sim_time); - bool ecl_file_view_has_sim_time( const ecl_file_view_type * ecl_file_view , time_t sim_time); - int ecl_file_view_find_sim_time(const ecl_file_view_type * ecl_file_view , time_t sim_time); - double ecl_file_view_iget_restart_sim_days(const ecl_file_view_type * ecl_file_view , int seqnum_index); - time_t ecl_file_view_iget_restart_sim_date(const ecl_file_view_type * ecl_file_view , int seqnum_index); - bool ecl_file_view_has_report_step( const ecl_file_view_type * ecl_file_view , int report_step); - - ecl_file_view_type * ecl_file_view_add_summary_view( ecl_file_view_type * file_view , int report_step ); - const char * ecl_file_view_get_src_file( const ecl_file_view_type * file_view ); - void ecl_file_view_fclose_stream( ecl_file_view_type * file_view ); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ThirdParty/Ert/libecl/src/CMakeLists.txt b/ThirdParty/Ert/libecl/src/CMakeLists.txt deleted file mode 100644 index dcbf36677a..0000000000 --- a/ThirdParty/Ert/libecl/src/CMakeLists.txt +++ /dev/null @@ -1,116 +0,0 @@ -include_directories( ext ) -file(GLOB ext_source "ext/*.c" ) -file(GLOB ext_header "ext/*.h" ) - -set( source_files - ecl_rsthead.c - ecl_sum_tstep.c - ecl_rst_file.c - ecl_init_file.c - ecl_grid_cache.c - smspec_node.c - ecl_kw_grdecl.c - ecl_file_kw.c - ecl_file_view.c - ecl_grav.c - ecl_grav_calc.c - ecl_smspec.c - ecl_sum_data.c - ecl_util.c - ecl_kw.c - ecl_sum.c - ecl_sum_vector.c - fortio.c - ecl_rft_file.c - ecl_rft_node.c - ecl_rft_cell.c - ecl_grid.c - ecl_coarse_cell.c - ecl_box.c - ecl_io_config.c - ecl_file.c - ecl_region.c - ecl_subsidence.c - ecl_grid_dims.c - grid_dims.c - nnc_info.c - ecl_grav_common.c - nnc_vector.c - ecl_nnc_export.c - ecl_nnc_geometry.c - layer.c - fault_block_layer.c - ecl_type.c - ecl_type_python.c - ${ext_source}) - -set( header_files - ecl_units.h - ecl_rsthead.h - ecl_sum_tstep.h - ecl_rst_file.h - ecl_init_file.h - smspec_node.h - ecl_grid_cache.h - ecl_kw_grdecl.h - ecl_file_kw.h - ecl_grav.h - ecl_grav_calc.h - ecl_endian_flip.h - ecl_smspec.h - ecl_sum_data.h - ecl_util.h - ecl_kw.h - ecl_sum.h - ecl_sum_vector.h - fortio.h - ecl_rft_file.h - ecl_rft_node.h - ecl_rft_cell.h - ecl_box.h - ecl_coarse_cell.h - ecl_grid.h - ecl_io_config.h - ecl_file.h - ecl_file_view.h - ecl_region.h - ecl_kw_magic.h - ecl_subsidence.h - ecl_grid_dims.h - grid_dims.h - nnc_info.h - nnc_vector.h - ecl_grav_common.h - ecl_nnc_export.h - ecl_nnc_geometry.h - layer.h - fault_block.h - fault_block_layer.h - ecl_type.h - ${ext_header}) - -if (ERT_USE_OPENMP) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${OpenMP_SHARED_LINKER_FLAGS}") -endif() - -add_library( ecl ${source_files} ) -set_target_properties( ecl PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR}) -if (USE_RUNPATH) - add_runpath( ecl ) -endif() -target_link_libraries( ecl ert_geometry ert_util ) - -#----------------------------------------------------------------- -if (INSTALL_ERT) - install(TARGETS ecl DESTINATION ${CMAKE_INSTALL_LIBDIR}) - foreach(header ${header_files}) - install(FILES ../include/ert/ecl/${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ert/ecl) - endforeach() -endif() - - - - diff --git a/ThirdParty/Ert/libecl/src/ecl_file_deprecated.c b/ThirdParty/Ert/libecl/src/ecl_file_deprecated.c deleted file mode 100644 index 08442214d4..0000000000 --- a/ThirdParty/Ert/libecl/src/ecl_file_deprecated.c +++ /dev/null @@ -1,117 +0,0 @@ -void ecl_file_push_block( ecl_file_type * ecl_file ) { - vector_append_ref( ecl_file->map_stack , ecl_file->active_view ); -} - -void ecl_file_pop_block( ecl_file_type * ecl_file ) { - ecl_file->active_view = vector_pop_back( ecl_file->map_stack ); -} - - -static ecl_file_view_type * ecl_file_get_relative_blockview( ecl_file_type * ecl_file , const char * kw , int occurence) { - ecl_file_view_type * view = ecl_file_view_add_blockview( ecl_file->active_view , kw , occurence ); - return view; -} - - - -bool ecl_file_subselect_block( ecl_file_type * ecl_file , const char * kw , int occurence) { - ecl_file_view_type * blockmap = ecl_file_get_relative_blockview( ecl_file , kw , occurence); - if (blockmap != NULL) { - ecl_file->active_view = blockmap; - return true; - } else - return false; -} - - -bool ecl_file_select_block( ecl_file_type * ecl_file , const char * kw , int occurence ) { - ecl_file_view_type * blockmap = ecl_file_get_global_blockview( ecl_file , kw , occurence); - if (blockmap != NULL) { - ecl_file->active_view = blockmap; - return true; - } else - return false; -} - - -/* - Will select restart block nr @seqnum_index - without considering - report_steps or simulation time. -*/ -bool ecl_file_iselect_rstblock( ecl_file_type * ecl_file , int seqnum_index ) { - return ecl_file_select_block( ecl_file , SEQNUM_KW , seqnum_index ); -} - - -bool ecl_file_select_rstblock_sim_time( ecl_file_type * ecl_file , time_t sim_time) { - int seqnum_index = ecl_file_view_seqnum_index_from_sim_time( ecl_file->global_view , sim_time ); - - if (seqnum_index >= 0) - return ecl_file_iselect_rstblock( ecl_file , seqnum_index); - else - return false; -} - - -bool ecl_file_select_rstblock_report_step( ecl_file_type * ecl_file , int report_step) { - int global_index = ecl_file_view_find_kw_value( ecl_file->global_view , SEQNUM_KW , &report_step); - if ( global_index >= 0) { - int seqnum_index = ecl_file_view_iget_occurence( ecl_file->global_view , global_index ); - return ecl_file_iselect_rstblock( ecl_file , seqnum_index); - } else - return false; -} - - -/******************************************************************/ - -static ecl_file_type * ecl_file_open_rstblock_report_step__( const char * filename , int report_step , int flags) { - ecl_file_type * ecl_file = ecl_file_open( filename , flags ); - if (ecl_file) { - if (!ecl_file_select_rstblock_report_step( ecl_file , report_step )) { - ecl_file_close( ecl_file ); - ecl_file = NULL; - } - } - return ecl_file; -} - -ecl_file_type * ecl_file_open_rstblock_report_step( const char * filename , int report_step , int flags) { - return ecl_file_open_rstblock_report_step__(filename , report_step , flags ); -} - - -/******************************************************************/ - -static ecl_file_type * ecl_file_open_rstblock_sim_time__( const char * filename , time_t sim_time, int flags ) { - ecl_file_type * ecl_file = ecl_file_open( filename , flags ); - if (ecl_file) { - if (!ecl_file_select_rstblock_sim_time( ecl_file , sim_time)) { - ecl_file_close( ecl_file ); - ecl_file = NULL; - } - } - return ecl_file; -} - -ecl_file_type * ecl_file_open_rstblock_sim_time( const char * filename , time_t sim_time, int flags) { - return ecl_file_open_rstblock_sim_time__( filename , sim_time , flags ); -} - -/******************************************************************/ - -static ecl_file_type * ecl_file_iopen_rstblock__( const char * filename , int seqnum_index, int flags ) { - ecl_file_type * ecl_file = ecl_file_open( filename , flags ); - if (ecl_file) { - if (!ecl_file_iselect_rstblock( ecl_file , seqnum_index )) { - ecl_file_close( ecl_file ); - ecl_file = NULL; - } - } - return ecl_file; -} - - -ecl_file_type * ecl_file_iopen_rstblock( const char * filename , int seqnum_index , int flags) { - return ecl_file_iopen_rstblock__(filename , seqnum_index , flags ); -} diff --git a/ThirdParty/Ert/libecl/src/ecl_rstfile.c b/ThirdParty/Ert/libecl/src/ecl_rstfile.c deleted file mode 100644 index 63fe141b0d..0000000000 --- a/ThirdParty/Ert/libecl/src/ecl_rstfile.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'ecl_rstfile.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ERT is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. - - See the GNU General Public License at - for more details. -*/ - - - -/******************************************************************/ -/* Query functions. */ - - -/** - Will look through all the INTEHEAD kw instances of the current - ecl_file and look for @sim_time. If the value is found true is - returned, otherwise false. -*/ - - - -bool ecl_file_has_sim_time( const ecl_file_type * ecl_file , time_t sim_time) { - return ecl_file_view_has_sim_time( ecl_file->active_view , sim_time ); -} - - -/* - This function will determine the restart block corresponding to the - world time @sim_time; if @sim_time can not be found the function - will return 0. - - The returned index is the 'occurence number' in the restart file, - i.e. in the (quite typical case) that not all report steps are - present the return value will not agree with report step. - - The return value from this function can then be used to get a - corresponding solution field directly, or the file map can - restricted to this block. - - Direct access: - - int index = ecl_file_get_restart_index( ecl_file , sim_time ); - if (index >= 0) { - ecl_kw_type * pressure_kw = ecl_file_iget_named_kw( ecl_file , "PRESSURE" , index ); - .... - } - - - Using block restriction: - - int index = ecl_file_get_restart_index( ecl_file , sim_time ); - if (index >= 0) { - ecl_file_iselect_rstblock( ecl_file , index ); - { - ecl_kw_type * pressure_kw = ecl_file_iget_named_kw( ecl_file , "PRESSURE" , 0 ); - .... - } - } - - Specially in the case of LGRs the block restriction should be used. - */ - -int ecl_file_get_restart_index( const ecl_file_type * ecl_file , time_t sim_time) { - int active_index = ecl_file_view_find_sim_time( ecl_file->active_view , sim_time ); - return active_index; -} - - -/** - Will look through all the SEQNUM kw instances of the current - ecl_file and look for @report_step. If the value is found true is - returned, otherwise false. -*/ - -bool ecl_file_has_report_step( const ecl_file_type * ecl_file , int report_step) { - return ecl_file_view_has_report_step( ecl_file->active_view , report_step ); -} - - -/** - This function will look up the INTEHEAD keyword in a ecl_file_type - instance, and calculate simulation date from this instance. - - Will return -1 if the requested INTEHEAD keyword can not be found. -*/ - -time_t ecl_file_iget_restart_sim_date( const ecl_file_type * restart_file , int index ) { - return ecl_file_view_iget_restart_sim_date( restart_file->active_view , index ); -} - -double ecl_file_iget_restart_sim_days( const ecl_file_type * restart_file , int index ) { - return ecl_file_view_iget_restart_sim_days( restart_file->active_view , index ); -} - - -/*****************************************************************/ -/* Select and open functions, observe that these functions should - only consider the global map. -*/ - - - - - - diff --git a/ThirdParty/Ert/libecl/tests/CMakeLists.txt b/ThirdParty/Ert/libecl/tests/CMakeLists.txt deleted file mode 100644 index 62aa9a50c2..0000000000 --- a/ThirdParty/Ert/libecl/tests/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -if (BUILD_TESTS) - - # Common test binary used in both the Statoil internal tests and the open tests. - add_executable( ecl_grid_cell_contains ecl_grid_cell_contains.c ) - target_link_libraries( ecl_grid_cell_contains ecl ) - - include( tests.cmake ) - if (STATOIL_TESTDATA_ROOT) - include (statoil_tests.cmake) - endif() -endif() - -# The ecl_win64 application is not built as a proper test integrated -# into the CTEST system. Should be invoked manually on Windows. -if (ERT_WINDOWS) - add_executable( ecl_lfs ecl_lfs.c ) - target_link_libraries( ecl_lfs ecl ert_util ) -endif() - diff --git a/ThirdParty/Ert/libecl/tests/statoil_tests.cmake b/ThirdParty/Ert/libecl/tests/statoil_tests.cmake deleted file mode 100644 index 8962b49fa2..0000000000 --- a/ThirdParty/Ert/libecl/tests/statoil_tests.cmake +++ /dev/null @@ -1,295 +0,0 @@ -add_executable( ecl_coarse_test ecl_coarse_test.c ) -target_link_libraries( ecl_coarse_test ecl ) -add_test( ecl_coarse_test ${EXECUTABLE_OUTPUT_PATH}/ecl_coarse_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/LGCcase/LGC_TESTCASE2 ) - - -add_executable( ecl_grid_layer_contains ecl_grid_layer_contains.c ) -target_link_libraries( ecl_grid_layer_contains ecl ) -add_test( ecl_grid_layer_contains1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_layer_contains ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) -add_test( ecl_grid_layer_contains2 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_layer_contains ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/MARINER.EGRID ) - - -add_executable( ecl_restart_test ecl_restart_test.c ) -target_link_libraries( ecl_restart_test ecl ) -add_test( ecl_restart_test ${EXECUTABLE_OUTPUT_PATH}/ecl_restart_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST ) - - -add_executable( ecl_nnc_export ecl_nnc_export.c ) -target_link_libraries( ecl_nnc_export ecl ) -add_test (ecl_nnc_export1 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE TRUE) -add_test (ecl_nnc_export2 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC TRUE) -add_test (ecl_nnc_export3 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3 TRUE) -add_test (ecl_nnc_export4 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/DualPoro/DUAL_DIFF TRUE) -add_test (ecl_nnc_export5 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/DualPoro/DUALPORO TRUE) -add_test (ecl_nnc_export6 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/nestedLGRcase/TESTCASE_NESTEDLGR TRUE) -add_test (ecl_nnc_export7 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/TYRIHANS/BASE20150218_MULTFLT FALSE) - -add_executable( ecl_nnc_export_get_tran ecl_nnc_export_get_tran.c ) -target_link_libraries( ecl_nnc_export_get_tran ecl ) -add_test (ecl_nnc_export_get_tran ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_export_get_tran ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3) - - -add_executable( ecl_util_make_date_shift ecl_util_make_date_shift.c ) -target_link_libraries( ecl_util_make_date_shift ecl ) -add_test( ecl_util_make_date_shift ${EXECUTABLE_OUTPUT_PATH}/ecl_util_make_date_shift ) - - -add_executable( ecl_sum_case_exists ecl_sum_case_exists.c ) -target_link_libraries( ecl_sum_case_exists ecl ) -add_test( ecl_sum_case_exists ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_case_exists - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/GurbatSummary/missingHeader/ECLIPSE - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/GurbatSummary/missingData/ECLIPSE ) - - -add_executable( ecl_grid_lgr_name ecl_grid_lgr_name.c ) -target_link_libraries( ecl_grid_lgr_name ecl ) -set_target_properties( ecl_grid_lgr_name PROPERTIES COMPILE_FLAGS "-Werror") -add_test( ecl_grid_lgr_name ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_lgr_name ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3.EGRID) - - -add_executable( ecl_region ecl_region.c ) -target_link_libraries( ecl_region ecl ) -add_test( ecl_region ${EXECUTABLE_OUTPUT_PATH}/ecl_region ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) - -add_executable( ecl_grid_fwrite ecl_grid_fwrite.c ) -target_link_libraries( ecl_grid_fwrite ecl ) -add_test( ecl_grid_fwrite ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_fwrite ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) - -add_test( ecl_grid_cell_contains2 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) -add_test( ecl_grid_cell_contains3 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/FF12/FF12_2013B2.EGRID ) -add_test( ecl_grid_cell_contains4 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Brazil/R3_ICD.EGRID ) - -add_executable( ecl_grid_cell_contains_wellpath ecl_grid_cell_contains_wellpath.c ) -target_link_libraries( ecl_grid_cell_contains_wellpath ecl ) -add_test( ecl_grid_cell_contains_wellpath1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains_wellpath ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/CellContains/model/SMS-0.EGRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/CellContains/R_PB-4H.jira ) - -add_executable( ecl_grid_cell_volume ecl_grid_cell_volume.c ) -target_link_libraries( ecl_grid_cell_volume ecl ) -add_test( ecl_grid_cell_volume1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_volume) -add_test( ecl_grid_cell_volume2 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) -add_test( ecl_grid_cell_volume3 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Heidrun/Summary/FF12_2013B3_CLEAN_RS.EGRID ) - -add_executable( ecl_region2region ecl_region2region_test.c ) -target_link_libraries( ecl_region2region ecl ) -add_test( ecl_region2region ${EXECUTABLE_OUTPUT_PATH}/ecl_region2region ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/R2R/R2R.SMSPEC ) - -add_executable( ecl_grid_case ecl_grid_case.c ) -target_link_libraries( ecl_grid_case ecl ) -add_test( ecl_grid_case ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_case ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ) - - -add_executable( ecl_lgr_test ecl_lgr_test.c ) -target_link_libraries( ecl_lgr_test ecl ) -add_test( ecl_lgr_test1 ${EXECUTABLE_OUTPUT_PATH}/ecl_lgr_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC.EGRID) -add_test( ecl_lgr_test2 ${EXECUTABLE_OUTPUT_PATH}/ecl_lgr_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC.GRID) -add_test( ecl_lgr_test3 ${EXECUTABLE_OUTPUT_PATH}/ecl_lgr_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3.EGRID ) - - -add_executable( ecl_grid_simple ecl_grid_simple.c ) -target_link_libraries( ecl_grid_simple ecl ) -add_test( ecl_grid_simple ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_simple ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) - -add_test( ecl_grid_ecl2015_2 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_simple ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Eclipse2015_NNC_BUG/FF15_2015B2_LGRM_RDI15_HIST_RDIREAL1_20142.EGRID ) - -add_executable( ecl_grid_export_statoil ecl_grid_export.c ) -target_link_libraries( ecl_grid_export_statoil ecl ) -add_test( ecl_grid_export_statoil ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_export_statoil ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) - -add_executable( ecl_grid_volume ecl_grid_volume.c ) -target_link_libraries( ecl_grid_volume ecl ) -add_test( ecl_grid_volume1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ) -add_test( ecl_grid_volume2 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/VolumeTest/TEST1 ) -add_test( ecl_grid_volume3 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/OsebergSyd/Omega/OMEGA-0) -add_test( ecl_grid_volume4 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Norne/reservoir_models/Norne_ATW2013/NORNE_ATW2013) - -# The grid volume test fails miserably on the test case given as example five; looking at -# the failures one could actually suspect that the ECLIPSE algorithm for PORV calculations -# has been different in this file - i.e. that the absolute value of the individual -# tetrahedron parts have been taken during the sum, and not at the end. At least the ert -# algorithm gets volumes ~ 0 whereas ECLIPSE reports ~10^9 for the same cell. -# add_test( ecl_grid_volume5 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Heidrun/Summary/FF12_2013B3_CLEAN_RS) - -add_executable( ecl_grid_dims ecl_grid_dims.c ) -target_link_libraries( ecl_grid_dims ecl ) - -add_test( ecl_grid_dims0 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_dims ) -add_test( ecl_grid_dims1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_dims ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.INIT ) -add_test( ecl_grid_dims2 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_dims ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.GRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.INIT) -add_test( ecl_grid_dims3 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_dims ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) -add_test( ecl_grid_dims4 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_dims ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.GRID ) -add_test( ecl_grid_dims5 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_dims ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/AmalgLGRcase/TESTCASE_AMALG_LGR.EGRID ) - - - -add_executable( ecl_nnc_test ecl_nnc_test.c ) -target_link_libraries( ecl_nnc_test ecl ) -add_test (ecl_nnc_test1 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) -add_test (ecl_nnc_test2 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC.EGRID ) -add_test (ecl_nnc_test3 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3.EGRID) -add_test (ecl_nnc_test4 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/DualPoro/DUAL_DIFF.EGRID ) -add_test (ecl_nnc_test5 ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/nestedLGRcase/TESTCASE_NESTEDLGR.EGRID) - - -add_executable( ecl_layer_statoil ecl_layer_statoil.c ) -target_link_libraries( ecl_layer_statoil ecl ) -add_test(ecl_layer_statoil ${EXECUTABLE_OUTPUT_PATH}/ecl_layer_statoil ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/MARINER.EGRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/faultblock.grdecl) - - - -add_executable( ecl_dualp ecl_dualp.c ) -target_link_libraries( ecl_dualp ecl ) -add_test( ecl_dualp ${EXECUTABLE_OUTPUT_PATH}/ecl_dualp ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/LGCcase/LGC_TESTCASE2 ) - -add_executable( ecl_sum_test ecl_sum_test.c ) -target_link_libraries( ecl_sum_test ecl ) -add_test( ecl_sum_test ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_test ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ) - -add_executable( ecl_sum_report_step_equal ecl_sum_report_step_equal.c ) -target_link_libraries( ecl_sum_report_step_equal ecl ) -add_test( ecl_sum_report_step_equal1 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_equal ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Snorre/SNORRE FALSE) -add_test( ecl_sum_report_step_equal2 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_equal ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE TRUE) -add_test( ecl_sum_report_step_equal3 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_equal ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/modGurbat/extraMinistep/ECLIPSE TRUE) -add_test( ecl_sum_report_step_equal4 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_equal ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/modGurbat/short/ECLIPSE FALSE) -add_test( ecl_sum_report_step_equal5 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_equal ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/modGurbat/enkf/ECLIPSE FALSE) -add_test( ecl_sum_report_step_equal6 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_equal ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Snorre/SNORRE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Snorre2/SNORRE2 FALSE) - -add_executable( ecl_sum_report_step_compatible ecl_sum_report_step_compatible.c ) -target_link_libraries( ecl_sum_report_step_compatible ecl ) -add_test( ecl_sum_report_step_compatible1 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_compatible ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Snorre/SNORRE FALSE) -add_test( ecl_sum_report_step_compatible2 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_compatible ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE TRUE) -add_test( ecl_sum_report_step_compatible3 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_compatible ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/modGurbat/extraMinistep/ECLIPSE TRUE) -add_test( ecl_sum_report_step_compatible4 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_compatible ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/modGurbat/short/ECLIPSE TRUE) -add_test( ecl_sum_report_step_compatible5 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_compatible ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/modGurbat/enkf/ECLIPSE TRUE) -add_test( ecl_sum_report_step_compatible6 ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_report_step_equal ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Snorre/SNORRE ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Snorre2/SNORRE2 FALSE) - -if (HAVE_UTIL_ABORT_INTERCEPT) - add_executable( ecl_fortio ecl_fortio.c ) - target_link_libraries( ecl_fortio ecl ) - add_test( ecl_fortio ${EXECUTABLE_OUTPUT_PATH}/ecl_fortio ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST ) - set_property( TEST ecl_fortio PROPERTY LABELS StatoilData) -endif() - -add_executable( ecl_file ecl_file.c ) -target_link_libraries( ecl_file ecl ) -add_test( ecl_file ${EXECUTABLE_OUTPUT_PATH}/ecl_file ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST ECLIPSE.UNRST) - -add_executable( ecl_fmt ecl_fmt.c ) -target_link_libraries( ecl_fmt ecl ) -add_test( ecl_fmt ${EXECUTABLE_OUTPUT_PATH}/ecl_fmt ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.DATA) - - -add_executable( ecl_rsthead ecl_rsthead.c ) -target_link_libraries( ecl_rsthead ecl ) -add_test( ecl_rsthead ${EXECUTABLE_OUTPUT_PATH}/ecl_rsthead ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/DualPoro/DUALPORO.X0005 ) - -add_executable( ecl_smspec ecl_smspec.c ) -target_link_libraries( ecl_smspec ecl ) -add_test( ecl_smspec ${EXECUTABLE_OUTPUT_PATH}/ecl_smspec ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.SMSPEC - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Heidrun/Summary/FF12_2013B3_CLEAN_RS.SMSPEC ) - - -add_executable( ecl_rft ecl_rft.c ) -target_link_libraries( ecl_rft ecl ) -add_test( ecl_rft_rft ${EXECUTABLE_OUTPUT_PATH}/ecl_rft ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.RFT RFT) -add_test( ecl_rft_rft_rw ${EXECUTABLE_OUTPUT_PATH}/ecl_rft ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.RFT RFT_RW) -add_test( ecl_rft_plt ${EXECUTABLE_OUTPUT_PATH}/ecl_rft ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/RFT/TEST1_1A.RFT PLT) -add_test( ecl_rft_plt ${EXECUTABLE_OUTPUT_PATH}/ecl_rft ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/RFT/RFT2.RFT MSW-PLT) - -add_executable( ecl_grid_copy_statoil ecl_grid_copy_statoil.c ) -target_link_libraries( ecl_grid_copy_statoil ecl ) - -add_test( ecl_grid_copy_statoil1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_copy_statoil ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) - -add_test( ecl_grid_copy_statoil2 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_copy_statoil ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/MARINER.EGRID ) - -add_test( ecl_grid_copy_statoil3 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_copy_statoil ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/LGCcase/LGC_TESTCASE2.EGRID ) - -add_test( ecl_grid_copy_statoil4 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_copy_statoil ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC.EGRID ) - - - - -add_executable( ecl_fault_block_layer_statoil ecl_fault_block_layer_statoil.c ) -target_link_libraries( ecl_fault_block_layer_statoil ecl ) -add_test( ecl_fault_block_layer_statoil ${EXECUTABLE_OUTPUT_PATH}/ecl_fault_block_layer_statoil - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/MARINER.EGRID - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/faultblock.grdecl) - - -set_property( TEST ecl_fault_block_layer_statoil PROPERTY LABELS StatoilData ) -set_property( TEST ecl_fmt PROPERTY LABELS StatoilData ) -set_property( TEST ecl_coarse_test PROPERTY LABELS StatoilData ) -set_property( TEST ecl_restart_test PROPERTY LABELS StatoilData ) -set_property( TEST ecl_lgr_test1 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_lgr_test2 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_lgr_test3 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_lgr_name PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_simple PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_export PROPERTY LABELS StatoilData ) -set_property( TEST ecl_dualp PROPERTY LABELS StatoilData ) -set_property( TEST ecl_sum_test PROPERTY LABELS StatoilData ) - -set_property( TEST ecl_sum_report_step_equal1 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_sum_report_step_equal2 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_sum_report_step_equal3 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_sum_report_step_equal4 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_sum_report_step_equal5 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_sum_report_step_equal6 PROPERTY LABELS StatoilData ) - -set_property( TEST ecl_sum_report_step_compatible1 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_sum_report_step_compatible2 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_sum_report_step_compatible3 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_sum_report_step_compatible4 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_sum_report_step_compatible5 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_sum_report_step_compatible6 PROPERTY LABELS StatoilData ) - - - -set_property( TEST ecl_grid_dims1 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_dims2 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_dims3 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_dims4 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_dims5 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_nnc_test1 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_nnc_test2 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_nnc_test3 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_nnc_test4 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_nnc_test5 PROPERTY LABELS StatoilData ) - -set_property( TEST ecl_grid_fwrite PROPERTY LABELS StatoilData) -set_property( TEST ecl_file PROPERTY LABELS StatoilData) -set_property( TEST ecl_rsthead PROPERTY LABELS StatoilData) -set_property( TEST ecl_region PROPERTY LABELS StatoilData) -set_property( TEST ecl_region2region PROPERTY LABELS StatoilData) -set_property( TEST ecl_grid_case PROPERTY LABELS StatoilData) -set_property( TEST ecl_rft_rft PROPERTY LABELS StatoilData) -set_property( TEST ecl_rft_plt PROPERTY LABELS StatoilData) -set_property( TEST ecl_rft_rft_rw PROPERTY LABELS StatoilData) -set_property( TEST ecl_sum_case_exists PROPERTY LABELS StatoilData) -set_property( TEST ecl_grid_volume1 PROPERTY LABELS StatoilData) -set_property( TEST ecl_grid_volume2 PROPERTY LABELS StatoilData) -#set_property( TEST ecl_grid_volume3 PROPERTY LABELS StatoilData) -set_property( TEST ecl_grid_cell_contains2 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_cell_contains3 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_cell_contains4 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_cell_volume2 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_cell_volume3 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_nnc_export1 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_nnc_export2 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_nnc_export3 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_nnc_export4 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_nnc_export5 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_nnc_export6 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_nnc_export7 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_nnc_export_get_tran PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_cell_contains2 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_copy_statoil1 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_copy_statoil2 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_copy_statoil3 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_copy_statoil4 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_layer_statoil PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_layer_contains1 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_layer_contains2 PROPERTY LABELS StatoilData ) -set_property( TEST ecl_grid_ecl2015_2 PROPERTY LABELS StatoilData ) diff --git a/ThirdParty/Ert/libecl/tests/tests.cmake b/ThirdParty/Ert/libecl/tests/tests.cmake deleted file mode 100644 index 9da02ab0f8..0000000000 --- a/ThirdParty/Ert/libecl/tests/tests.cmake +++ /dev/null @@ -1,119 +0,0 @@ -add_executable( ecl_nnc_geometry ecl_nnc_geometry.c ) -target_link_libraries( ecl_nnc_geometry ecl ) -add_test( ecl_nnc_geometry ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_geometry ) - -add_executable( ecl_alloc_grid_dxv_dyv_dzv ecl_alloc_grid_dxv_dyv_dzv.c ) -target_link_libraries( ecl_alloc_grid_dxv_dyv_dzv ecl ) -add_test( ecl_alloc_grid_dxv_dyv_dzv ${EXECUTABLE_OUTPUT_PATH}/ecl_alloc_grid_dxv_dyv_dzv ) - -add_executable( ecl_alloc_cpgrid ecl_alloc_cpgrid.c ) -target_link_libraries( ecl_alloc_cpgrid ecl ) -add_test( ecl_alloc_cpgrid ${EXECUTABLE_OUTPUT_PATH}/ecl_alloc_cpgrid ) - -add_executable( ecl_kw_init ecl_kw_init.c ) -target_link_libraries( ecl_kw_init ecl ) -add_test( ecl_kw_init ${EXECUTABLE_OUTPUT_PATH}/ecl_kw_init ) - -add_executable( ecl_grid_init_fwrite ecl_grid_init_fwrite.c ) -target_link_libraries( ecl_grid_init_fwrite ecl ) -add_test( ecl_grid_init_fwrite ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_init_fwrite ) - -add_executable( ecl_init_file ecl_init_file.c ) -target_link_libraries( ecl_init_file ecl ) -add_test( ecl_init_file ${EXECUTABLE_OUTPUT_PATH}/ecl_kw_init ) - -add_executable( ecl_kw_fread ecl_kw_fread.c ) -target_link_libraries( ecl_kw_fread ecl ) -add_test( ecl_kw_fread ${EXECUTABLE_OUTPUT_PATH}/ecl_kw_fread ) - -add_executable( ecl_valid_basename ecl_valid_basename.c ) -target_link_libraries( ecl_valid_basename ecl ) -add_test( ecl_valid_basename ${EXECUTABLE_OUTPUT_PATH}/ecl_valid_basename) - -add_executable( ecl_util_make_date_no_shift ecl_util_make_date_no_shift.c ) -target_link_libraries( ecl_util_make_date_no_shift ecl ) -add_test( ecl_util_make_date_no_shift ${EXECUTABLE_OUTPUT_PATH}/ecl_util_make_date_no_shift ) - -add_executable( ecl_sum_writer ecl_sum_writer.c ) -target_link_libraries( ecl_sum_writer ecl ) -add_test( ecl_sum_writer ${EXECUTABLE_OUTPUT_PATH}/ecl_sum_writer ) - -add_executable( ecl_grid_add_nnc ecl_grid_add_nnc.c ) -target_link_libraries( ecl_grid_add_nnc ecl ) -add_test( ecl_grid_add_nnc ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_add_nnc ) - -add_executable( ecl_grid_create ecl_grid_create.c ) -target_link_libraries( ecl_grid_create ecl ) -add_test( ecl_grid_create ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_create ) - -add_executable( ecl_grid_DEPTHZ ecl_grid_DEPTHZ.c ) -target_link_libraries( ecl_grid_DEPTHZ ecl ) -add_test( ecl_grid_DEPTHZ ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_DEPTHZ ) - -add_executable( ecl_grid_reset_actnum ecl_grid_reset_actnum.c ) -target_link_libraries( ecl_grid_reset_actnum ecl ) -add_test( ecl_grid_reset_actnum ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_reset_actnum ) - -add_executable( ecl_nnc_info_test ecl_nnc_info_test.c ) -target_link_libraries( ecl_nnc_info_test ecl ) -add_test (ecl_nnc_info_test ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_info_test ) - -add_executable( ecl_nnc_vector ecl_nnc_vector.c ) -target_link_libraries( ecl_nnc_vector ecl ) -add_test(ecl_nnc_vector ${EXECUTABLE_OUTPUT_PATH}/ecl_nnc_vector ) - -add_executable( ecl_kw_grdecl ecl_kw_grdecl.c ) -target_link_libraries( ecl_kw_grdecl ecl ) -add_test( ecl_kw_grdecl ${EXECUTABLE_OUTPUT_PATH}/ecl_kw_grdecl ) - -add_executable( ecl_kw_equal ecl_kw_equal.c ) -target_link_libraries( ecl_kw_equal ecl ) -add_test( ecl_kw_equal ${EXECUTABLE_OUTPUT_PATH}/ecl_kw_equal ) - -add_executable( ecl_kw_cmp_string ecl_kw_cmp_string.c ) -target_link_libraries( ecl_kw_cmp_string ecl ) -add_test( ecl_kw_cmp_string ${EXECUTABLE_OUTPUT_PATH}/ecl_kw_cmp_string ) - -add_executable( ecl_util_month_range ecl_util_month_range.c ) -target_link_libraries( ecl_util_month_range ecl ) -add_test( ecl_util_month_range ${EXECUTABLE_OUTPUT_PATH}/ecl_util_month_range ) - -if (HAVE_UTIL_ABORT_INTERCEPT) - add_executable( ecl_grid_corner ecl_grid_corner.c ) - target_link_libraries( ecl_grid_corner ecl ) - add_test( ecl_grid_corner ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_corner ) - - add_executable( ecl_layer ecl_layer.c ) - target_link_libraries( ecl_layer ecl ) - add_test(ecl_layer ${EXECUTABLE_OUTPUT_PATH}/ecl_layer ) -endif() - -add_executable( ecl_rft_cell ecl_rft_cell.c ) -target_link_libraries( ecl_rft_cell ecl ) -add_test( ecl_rft_cell ${EXECUTABLE_OUTPUT_PATH}/ecl_rft_cell ) - -add_executable( ecl_grid_copy ecl_grid_copy.c ) -target_link_libraries( ecl_grid_copy ecl ) -add_test( ecl_grid_copy ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_copy ) - -add_executable( ecl_get_num_cpu ecl_get_num_cpu_test.c ) -target_link_libraries( ecl_get_num_cpu ecl ) -add_test( ecl_get_num_cpu ${EXECUTABLE_OUTPUT_PATH}/ecl_get_num_cpu - ${PROJECT_SOURCE_DIR}/libecl/tests/data/num_cpu1 - ${PROJECT_SOURCE_DIR}/libecl/tests/data/num_cpu2 - ${PROJECT_SOURCE_DIR}/libecl/tests/data/num_cpu3 - ${PROJECT_SOURCE_DIR}/libecl/tests/data/num_cpu4 ) - -add_executable( ecl_fault_block_layer ecl_fault_block_layer.c ) -target_link_libraries( ecl_fault_block_layer ecl ) -add_test( ecl_fault_block_layer ${EXECUTABLE_OUTPUT_PATH}/ecl_fault_block_layer ) - -add_executable( ecl_grid_export ecl_grid_export.c ) -target_link_libraries( ecl_grid_export ecl ) -add_test( ecl_grid_export ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_export ) - -add_executable( ecl_rst_file ecl_rst_file.c ) -target_link_libraries( ecl_rst_file ecl ert_util ) -add_test( ecl_rst_file ${EXECUTABLE_OUTPUT_PATH}/ecl_rst_file ) - -add_test( ecl_grid_cell_contains1 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_cell_contains ) diff --git a/ThirdParty/Ert/libecl_well/CMakeLists.txt b/ThirdParty/Ert/libecl_well/CMakeLists.txt deleted file mode 100644 index c59e944fce..0000000000 --- a/ThirdParty/Ert/libecl_well/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -add_subdirectory( src ) -if (BUILD_APPLICATIONS) - add_subdirectory( applications ) -endif() - -if (BUILD_TESTS) - add_subdirectory( tests ) -endif() diff --git a/ThirdParty/Ert/libecl_well/applications/CMakeLists.txt b/ThirdParty/Ert/libecl_well/applications/CMakeLists.txt deleted file mode 100644 index e5a5e0d173..0000000000 --- a/ThirdParty/Ert/libecl_well/applications/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -add_executable( segment_info segment_info.c ) -add_executable( CF_dump well_CF_dump.c ) -add_executable( ri_well_test ri_well_test.c ) - -set(program_list segment_info CF_dump ri_well_test) -foreach(prog ${program_list}) - target_link_libraries( ${prog} ecl_well ecl) - if (USE_RUNPATH) - add_runpath( ${prog} ) - endif() - - - #----------------------------------------------------------------- - - if (WELL_INSTALL_PREFIX) - set (destination ${CMAKE_INSTALL_PREFIX}/${WELL_INSTALL_PREFIX}/bin) - else() - set (destination ${CMAKE_INSTALL_PREFIX}/bin) - endif() - - if (INSTALL_ERT) - install(TARGETS ${prog} DESTINATION ${destination}) - if (INSTALL_GROUP) - install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/${prog})") - install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/${prog})") - endif() - endif() -endforeach() diff --git a/ThirdParty/Ert/libecl_well/src/CMakeLists.txt b/ThirdParty/Ert/libecl_well/src/CMakeLists.txt deleted file mode 100644 index 84eacde50a..0000000000 --- a/ThirdParty/Ert/libecl_well/src/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ -set( source_files - well_state.c - well_conn.c - well_info.c - well_ts.c - well_conn_collection.c - well_segment.c - well_segment_collection.c - well_branch_collection.c - well_rseg_loader.c -) - -set( header_files - well_state.h - well_const.h - well_conn.h - well_info.h - well_ts.h - well_conn_collection.h - well_segment.h - well_segment_collection.h - well_branch_collection.h - well_rseg_loader.h -) - -if (NOT ERT_WINDOWS) - set_property( SOURCE well_branch_collection.c well_segment.c well_segment_collection.c well_conn_collection.c well_conn.c PROPERTY COMPILE_FLAGS "-Werror") -endif() - - -include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) -include_directories( ${libgeometry_src_path} ) - - -add_library( ecl_well ${source_files} ) -set_target_properties( ecl_well PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR} ) -target_link_libraries( ecl_well ecl ) -if (USE_RUNPATH) - add_runpath( ecl_well ) -endif() - - -#----------------------------------------------------------------- -if (INSTALL_ERT) - install(TARGETS ecl_well DESTINATION ${CMAKE_INSTALL_LIBDIR}) - foreach(header ${header_files}) - install(FILES ../include/ert/ecl_well/${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ert/ecl_well) - endforeach() -endif() - - diff --git a/ThirdParty/Ert/libecl_well/tests/CMakeLists.txt b/ThirdParty/Ert/libecl_well/tests/CMakeLists.txt deleted file mode 100644 index 4e6569740a..0000000000 --- a/ThirdParty/Ert/libecl_well/tests/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -include( tests.cmake ) -if (STATOIL_TESTDATA_ROOT) - include( statoil_tests.cmake ) -endif() - - - - - - - - diff --git a/ThirdParty/Ert/libecl_well/tests/statoil_tests.cmake b/ThirdParty/Ert/libecl_well/tests/statoil_tests.cmake deleted file mode 100644 index 85be1f7494..0000000000 --- a/ThirdParty/Ert/libecl_well/tests/statoil_tests.cmake +++ /dev/null @@ -1,100 +0,0 @@ -add_executable( well_state_load well_state_load.c ) -target_link_libraries( well_state_load ecl_well ) -set_target_properties( well_state_load PROPERTIES COMPILE_FLAGS "-Werror") - -add_executable( well_state_load_missing_RSEG well_state_load_missing_RSEG.c ) -target_link_libraries( well_state_load_missing_RSEG ecl_well ) -set_target_properties( well_state_load_missing_RSEG PROPERTIES COMPILE_FLAGS "-Werror") - -add_test( well_state_load1 ${EXECUTABLE_OUTPUT_PATH}/well_state_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.X0030) - -add_test( well_state_load2 ${EXECUTABLE_OUTPUT_PATH}/well_state_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/MSWcase/MSW_CASE.EGRID - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/MSWcase/MSW_CASE.X0021) - -add_test( well_state_load3 ${EXECUTABLE_OUTPUT_PATH}/well_state_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW/MSW.EGRID - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW/MSW.X0123) - -add_test( well_state_load4 ${EXECUTABLE_OUTPUT_PATH}/well_state_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW_LGR/LGR.EGRID - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW_LGR/LGR.X0095) - -add_test( well_state_load5 ${EXECUTABLE_OUTPUT_PATH}/well_state_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC.EGRID - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC.X0061) - -add_test( well_state_load_missing_RSEG1 ${EXECUTABLE_OUTPUT_PATH}/well_state_load_missing_RSEG ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC.EGRID - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC.X0061) - -add_test( well_state_load_missing_RSEG2 ${EXECUTABLE_OUTPUT_PATH}/well_state_load_missing_RSEG ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW/MSW.EGRID - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW/MSW.X0123) - - -add_executable( well_segment_load well_segment_load.c ) -target_link_libraries( well_segment_load ecl_well ) -set_target_properties( well_segment_load PROPERTIES COMPILE_FLAGS "-Werror") -add_test( well_segment_load ${EXECUTABLE_OUTPUT_PATH}/well_segment_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/MSWcase/MSW_CASE.X0021) - - -add_executable( well_segment_branch_conn_load well_segment_branch_conn_load.c ) -target_link_libraries( well_segment_branch_conn_load ecl_well ) -set_target_properties( well_segment_branch_conn_load PROPERTIES COMPILE_FLAGS "-Werror") -add_test( well_segment_branch_conn_load ${EXECUTABLE_OUTPUT_PATH}/well_segment_branch_conn_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/MSWcase/MSW_CASE.X0021) - -add_executable( well_info well_info.c ) -target_link_libraries( well_info ecl_well ) -set_target_properties( well_info PROPERTIES COMPILE_FLAGS "-Werror") -add_test( well_info ${EXECUTABLE_OUTPUT_PATH}/well_info ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID ) - - -add_executable( well_conn_CF well_conn_CF.c ) -target_link_libraries( well_conn_CF ecl_well ) -add_test( well_conn_CF ${EXECUTABLE_OUTPUT_PATH}/well_conn_CF ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.X0060) - -add_executable( well_conn_load well_conn_load.c ) -target_link_libraries( well_conn_load ecl_well ) -set_target_properties( well_conn_load PROPERTIES COMPILE_FLAGS "-Werror") -add_test( well_conn_load1 ${EXECUTABLE_OUTPUT_PATH}/well_conn_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.X0030 F) -add_test( well_conn_load2 ${EXECUTABLE_OUTPUT_PATH}/well_conn_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/10kcase/TEST10K_FLT_LGR_NNC.X0021 F) -add_test( well_conn_load3 ${EXECUTABLE_OUTPUT_PATH}/well_conn_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/MSWcase/MSW_CASE.X0021 T) -add_test( well_conn_load4 ${EXECUTABLE_OUTPUT_PATH}/well_conn_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/AmalgLGRcase/TESTCASE_AMALG_LGR.X0021 F) -add_test( well_conn_load5 ${EXECUTABLE_OUTPUT_PATH}/well_conn_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/DualPoro/DUALPORO.X0009 F) -add_test( well_conn_load6 ${EXECUTABLE_OUTPUT_PATH}/well_conn_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/0.9.2_LGR/BASE_REF_XY3Z1_T30_WI.X0003 F) - -add_executable( well_ts well_ts.c ) -target_link_libraries( well_ts ecl_well ) -add_test( well_ts ${EXECUTABLE_OUTPUT_PATH}/well_ts ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/CO2case/BASE_CASE ) - - -add_executable( well_dualp well_dualp.c ) -target_link_libraries( well_dualp ecl_well ) -add_test( well_dualp ${EXECUTABLE_OUTPUT_PATH}/well_dualp ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST - ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/DualPoro/DUALPORO.X0005 ) - -add_executable( well_lgr_load well_lgr_load.c ) -target_link_libraries( well_lgr_load ecl_well ) - -add_test( well_lgr_load1 ${EXECUTABLE_OUTPUT_PATH}/well_lgr_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/0.9.2_LGR/BASE_REF_XY3Z1_T30_WI.EGRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/0.9.2_LGR/BASE_REF_XY3Z1_T30_WI.X0003) -add_test( well_lgr_load2 ${EXECUTABLE_OUTPUT_PATH}/well_lgr_load ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/AmalgLGRcase/TESTCASE_AMALG_LGR.EGRID ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/AmalgLGRcase/TESTCASE_AMALG_LGR.X0016) - -set_property( TEST well_lgr_load1 PROPERTY LABELS StatoilData ) -set_property( TEST well_lgr_load2 PROPERTY LABELS StatoilData ) -set_property( TEST well_dualp PROPERTY LABELS StatoilData ) -set_property( TEST well_state_load1 PROPERTY LABELS StatoilData ) -set_property( TEST well_state_load2 PROPERTY LABELS StatoilData ) -set_property( TEST well_state_load3 PROPERTY LABELS StatoilData ) -set_property( TEST well_state_load4 PROPERTY LABELS StatoilData ) -set_property( TEST well_state_load5 PROPERTY LABELS StatoilData ) -set_property( TEST well_state_load_missing_RSEG1 PROPERTY LABELS StatoilData ) -set_property( TEST well_state_load_missing_RSEG2 PROPERTY LABELS StatoilData ) -set_property( TEST well_dualp PROPERTY LABELS StatoilData ) -set_property( TEST well_conn_load1 PROPERTY LABELS StatoilData ) -set_property( TEST well_conn_load2 PROPERTY LABELS StatoilData ) -set_property( TEST well_conn_load3 PROPERTY LABELS StatoilData ) -set_property( TEST well_conn_load4 PROPERTY LABELS StatoilData ) -set_property( TEST well_conn_load5 PROPERTY LABELS StatoilData ) -set_property( TEST well_conn_load6 PROPERTY LABELS StatoilData ) -set_property( TEST well_conn_CF PROPERTY LABELS StatoilData ) -set_property( TEST well_info PROPERTY LABELS StatoilData ) -set_property( TEST well_segment_load PROPERTY LABELS StatoilData ) -set_property( TEST well_segment_branch_conn_load PROPERTY LABELS StatoilData ) -set_property( TEST well_ts PROPERTY LABELS StatoilData ) - diff --git a/ThirdParty/Ert/libecl_well/tests/tests.cmake b/ThirdParty/Ert/libecl_well/tests/tests.cmake deleted file mode 100644 index 20dc5381ba..0000000000 --- a/ThirdParty/Ert/libecl_well/tests/tests.cmake +++ /dev/null @@ -1,35 +0,0 @@ -add_executable( well_conn_collection well_conn_collection.c ) -target_link_libraries( well_conn_collection ecl_well ) -set_target_properties( well_conn_collection PROPERTIES COMPILE_FLAGS "-Werror") -add_test( well_conn_collection ${EXECUTABLE_OUTPUT_PATH}/well_conn_collection ) - -add_executable( well_branch_collection well_branch_collection.c ) -target_link_libraries( well_branch_collection ecl_well ) -set_target_properties( well_branch_collection PROPERTIES COMPILE_FLAGS "-Werror") -add_test( well_branch_collection ${EXECUTABLE_OUTPUT_PATH}/well_branch_collection ) - -add_executable( well_conn well_conn.c ) -target_link_libraries( well_conn ecl_well ) -set_target_properties( well_conn PROPERTIES COMPILE_FLAGS "-Werror") -add_test( well_conn ${EXECUTABLE_OUTPUT_PATH}/well_conn ) - -add_executable( well_state well_state.c ) -target_link_libraries( well_state ecl_well ) -set_target_properties( well_state PROPERTIES COMPILE_FLAGS "-Werror") -add_test( well_state ${EXECUTABLE_OUTPUT_PATH}/well_state ) - -add_executable( well_segment well_segment.c ) -target_link_libraries( well_segment ecl_well ) -set_target_properties( well_segment PROPERTIES COMPILE_FLAGS "-Werror") -add_test( well_segment ${EXECUTABLE_OUTPUT_PATH}/well_segment ) - -add_executable( well_segment_conn well_segment_conn.c ) -target_link_libraries( well_segment_conn ecl_well ) -set_target_properties( well_segment_conn PROPERTIES COMPILE_FLAGS "-Werror") -add_test( well_segment_conn ${EXECUTABLE_OUTPUT_PATH}/well_segment_conn ) - -add_executable( well_segment_collection well_segment_collection.c ) -target_link_libraries( well_segment_collection ecl_well ) -set_target_properties( well_segment_collection PROPERTIES COMPILE_FLAGS "-Werror") -add_test( well_segment_collection ${EXECUTABLE_OUTPUT_PATH}/well_segment_collection ) - diff --git a/ThirdParty/Ert/libeclxx/CMakeLists.txt b/ThirdParty/Ert/libeclxx/CMakeLists.txt deleted file mode 100644 index df9670eb2d..0000000000 --- a/ThirdParty/Ert/libeclxx/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_subdirectory( src ) - -if (BUILD_TESTS) - add_subdirectory( tests ) -endif() diff --git a/ThirdParty/Ert/libeclxx/src/CMakeLists.txt b/ThirdParty/Ert/libeclxx/src/CMakeLists.txt deleted file mode 100644 index 4a108238a8..0000000000 --- a/ThirdParty/Ert/libeclxx/src/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -set( source_files - FortIO.cpp - Smspec.cpp - EclFilename.cpp - ) - -set( header_files - EclKW.hpp - FortIO.hpp - Smspec.hpp - EclFilename.hpp - ) - - -add_library( eclxx ${source_files} ) -set_target_properties( eclxx PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR}) -if (USE_RUNPATH) - add_runpath( eclxx ) -endif() -target_link_libraries( eclxx ecl ) - - -if (INSTALL_ERT) - install(TARGETS eclxx DESTINATION ${CMAKE_INSTALL_LIBDIR}) - foreach(header ${header_files}) - install(FILES ../include/ert/ecl/${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ert/ecl) - endforeach() -endif() diff --git a/ThirdParty/Ert/libeclxx/tests/CMakeLists.txt b/ThirdParty/Ert/libeclxx/tests/CMakeLists.txt deleted file mode 100644 index be233b2ae3..0000000000 --- a/ThirdParty/Ert/libeclxx/tests/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -add_executable(eclxx_kw eclxx_kw.cpp) -target_link_libraries(eclxx_kw eclxx ert_utilxx) -add_test(eclxx_kw ${EXECUTABLE_OUTPUT_PATH}/eclxx_kw) - -add_executable(eclxx_fortio eclxx_fortio.cpp) -target_link_libraries(eclxx_fortio eclxx ert_utilxx) -add_test(eclxx_fortio ${EXECUTABLE_OUTPUT_PATH}/eclxx_fortio) - -add_executable(eclxx_smspec eclxx_smspec.cpp) -target_link_libraries(eclxx_smspec eclxx ert_utilxx) -add_test(eclxx_smspec ${EXECUTABLE_OUTPUT_PATH}/eclxx_smspec) - -add_executable(eclxx_filename eclxx_filename.cpp) -target_link_libraries(eclxx_filename eclxx ert_utilxx) -add_test(eclxx_filename ${EXECUTABLE_OUTPUT_PATH}/eclxx_filename) - -add_executable(eclxx_types eclxx_types.cpp) -target_link_libraries(eclxx_types eclxx ert_utilxx) -add_test(eclxx_types ${EXECUTABLE_OUTPUT_PATH}/eclxx_types) diff --git a/ThirdParty/Ert/libert_util/CMakeLists.txt b/ThirdParty/Ert/libert_util/CMakeLists.txt deleted file mode 100644 index d7eabe992a..0000000000 --- a/ThirdParty/Ert/libert_util/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -add_subdirectory( include/ert/util ) - -add_subdirectory( src ) -if (BUILD_TESTS) - add_subdirectory( tests ) -endif() - -if (BUILD_APPLICATIONS) - add_subdirectory( applications ) -endif() diff --git a/ThirdParty/Ert/libert_util/applications/CMakeLists.txt b/ThirdParty/Ert/libert_util/applications/CMakeLists.txt deleted file mode 100644 index 9bd1440c95..0000000000 --- a/ThirdParty/Ert/libert_util/applications/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -if (HAVE_PTHREAD) - add_subdirectory( block_fs ) -endif() diff --git a/ThirdParty/Ert/libert_util/applications/block_fs/CMakeLists.txt b/ThirdParty/Ert/libert_util/applications/block_fs/CMakeLists.txt deleted file mode 100644 index 39b891f041..0000000000 --- a/ThirdParty/Ert/libert_util/applications/block_fs/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -add_executable( bls bls.c ) - -target_link_libraries( bls ert_util ) - -if (USE_RUNPATH) - add_runpath( bls ) -endif() - - -set (destination ${CMAKE_INSTALL_PREFIX}/bin) -if (INSTALL_ERT) - install(TARGETS bls DESTINATION ${destination}) - if (INSTALL_GROUP) - install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/bls)") - install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/bls)") - endif() -endif() - diff --git a/ThirdParty/Ert/libert_util/include/ert/util/CMakeLists.txt b/ThirdParty/Ert/libert_util/include/ert/util/CMakeLists.txt deleted file mode 100644 index ddfa513b65..0000000000 --- a/ThirdParty/Ert/libert_util/include/ert/util/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -set(header_files) - -foreach (type int double bool long time_t size_t float) - set(TYPE ${type} ) - set(header_target ${type}_vector.h) - - configure_file( vector_template.h ${header_target}) - - list( APPEND header_files ${CMAKE_CURRENT_BINARY_DIR}/${header_target} ) -endforeach( type ) - -if (MSVC) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/msvc_stdbool.h ${CMAKE_CURRENT_BINARY_DIR}/stdbool.h) - list( APPEND header_files ${CMAKE_CURRENT_BINARY_DIR}/stdbool.h) -endif() - -configure_file(build_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/build_config.h) -configure_file(ert_api_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/ert_api_config.h) -list( APPEND header_files ${CMAKE_CURRENT_BINARY_DIR}/ert_api_config.h) - -if (INSTALL_ERT) - foreach(header ${header_files}) - install(FILES ${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ert/util) - endforeach() -endif() - - - - diff --git a/ThirdParty/Ert/libert_util/src/CMakeLists.txt b/ThirdParty/Ert/libert_util/src/CMakeLists.txt deleted file mode 100644 index e2a9d9c228..0000000000 --- a/ThirdParty/Ert/libert_util/src/CMakeLists.txt +++ /dev/null @@ -1,183 +0,0 @@ -include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) - -set(source_files - rng.c - lookup_table.c - statistics.c - mzran.c - set.c - hash_node.c - hash_sll.c - hash.c - node_data.c - node_ctype.c - util.c - msg.c - arg_pack.c - path_fmt.c - menu.c - subst_list.c - subst_func.c - vector.c - parser.c - stringlist.c - matrix.c - buffer.c - log.c - template.c - timer.c - time_interval.c - string_util.c - type_vector_functions.c - ui_return.c - ert_version.c - struct_vector.c - perm_vector.c - test_util.c -) - -set(header_files - ssize_t.h - type_macros.h - rng.h - lookup_table.h - statistics.h - mzran.h - set.h - hash.h - hash_node.h - hash_sll.h - node_data.h - node_ctype.h - util.h - msg.h - arg_pack.h - path_fmt.h - stringlist.h - menu.h - subst_list.h - subst_func.h - vector.h - parser.h - matrix.h - buffer.h - log.h - template.h - timer.h - time_interval.h - string_util.h - type_vector_functions.h - ui_return.h - struct_vector.h - buffer_string.h - perm_vector.h - ert_version.h - test_util.h -) - - - -# Add compile time variable values to ert_version.c -if (ERT_WINDOWS) - execute_process(COMMAND cmd.exe /c "echo %date% %time%" OUTPUT_VARIABLE BUILD_TIME ) -else() # Linux or Darwin - execute_process(COMMAND date "+%Y-%m-%d %H:%M:%S" OUTPUT_VARIABLE BUILD_TIME ) -endif() -string(STRIP ${BUILD_TIME} BUILD_TIME) - -find_package(Git) -if(GIT_FOUND) - execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE GIT_COMMIT - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - - execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE GIT_COMMIT_SHORT - OUTPUT_STRIP_TRAILING_WHITESPACE - ) -else() - set( GIT_COMMIT "unknown (git not found!)") - set( GIT_COMMIT_SHORT "unknown (git not found!)") - message( WARNING "Git not found. Build will not contain git revision info." ) -endif() - -set_source_files_properties( ert_version.c PROPERTIES COMPILE_DEFINITIONS "COMPILE_TIME_STAMP=\"${BUILD_TIME}\";GIT_COMMIT=\"${GIT_COMMIT}\";GIT_COMMIT_SHORT=\"${GIT_COMMIT_SHORT}\";ERT_VERSION_MAJOR=${ERT_VERSION_MAJOR};ERT_VERSION_MINOR=${ERT_VERSION_MINOR};ERT_VERSION_MICRO=\"${ERT_VERSION_MICRO}\"") - - -if (CMAKE_COMPILER_IS_GNUCC) - set_property(SOURCE hash.c PROPERTY COMPILE_FLAGS "-Wno-error") -endif() - -if (ERT_HAVE_LAPACK) - list( APPEND source_files matrix_lapack.c matrix_blas.c matrix_stat.c regression.c lars.c stepwise.c) - list( APPEND header_files matrix_lapack.h matrix_blas.h matrix_stat.h regression.h lars.h stepwise.h) -endif() - -if (ERT_HAVE_UNISTD) - list( APPEND source_files path_stack.c ) - list( APPEND header_files path_stack.h ) -endif() - -foreach (type int double bool long time_t size_t float) - set(TYPE ${type} ) - set(src_target ${CMAKE_CURRENT_BINARY_DIR}/${type}_vector.c) - - configure_file( vector_template.c ${src_target}) - - list( APPEND source_files ${src_target} ) -endforeach( type ) - -find_program (PING_PATH ping) -if (PING_PATH) - add_definitions( -DPING_CMD=\"${PING_PATH}\") -endif() - -if (ERT_HAVE_THREAD_POOL) - list( APPEND header_files thread_pool.h ) - list( APPEND source_files thread_pool.c ) -endif() - - -# The block_fs filesystem is so heavily dependant on pthreads that it is not -# built if de not have pthreads. - -if (HAVE_PTHREAD) - list( APPEND source_files block_fs.c ) - list( APPEND header_files block_fs.h ) -endif() - -# The test_work_area depends on that opendir() is available. -if (ERT_HAVE_GETUID AND ERT_HAVE_OPENDIR) - list( APPEND source_files test_work_area.c) - list( APPEND header_files test_work_area.h) -endif() - -if (ERT_BUILD_CXX) - list( APPEND header_files test_util.hpp ) -endif() - -add_library( ert_util ${source_files} ) - -message(STATUS "Linking with: ${ERT_EXTERNAL_UTIL_LIBS}") -set_target_properties( ert_util PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR} ) -if (USE_RUNPATH) - add_runpath( ert_util ) -endif() -target_link_libraries( ert_util ${ERT_EXTERNAL_UTIL_LIBS} ) - -#----------------------------------------------------------------- -if (INSTALL_ERT) - install(TARGETS ert_util DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - foreach(header ${header_files}) - install(FILES ../include/ert/util/${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ert/util) - endforeach() -endif() - - - diff --git a/ThirdParty/Ert/libert_util/src/buffer_string.c b/ThirdParty/Ert/libert_util/src/buffer_string.c deleted file mode 100644 index ab8ed74dc1..0000000000 --- a/ThirdParty/Ert/libert_util/src/buffer_string.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - The functions buffer_fread_string() and buffer_fwrite_string() - should not be used; the embedded integer just creates chaos and - should the sole responsability of the calling scope. -*/ - -/** - Storing strings: - ---------------- - - When storing a string (\0 terminated char pointer) what is actually - written to the buffer is - - 1. The length of the string - as returned from strlen(). - 2. The string content INCLUDING the terminating \0. - - -*/ - - -/** - This function will return a pointer to the current position in the - buffer, and advance the buffer position forward until a \0 - terminater is found. If \0 is not found the thing will abort(). - - Observe that the return value will point straight into the buffer, - this is highly volatile memory, and in general it will be safer to - use buffer_fread_alloc_string() to get a copy of the string. -*/ - -const char * buffer_fread_string(buffer_type * buffer) { - int string_length = buffer_fread_int( buffer ); - char * string_ptr = &buffer->data[buffer->pos]; - char c; - buffer_fskip( buffer , string_length ); - c = buffer_fread_char( buffer ); - if (c != '\0') - util_abort("%s: internal error - malformed string representation in buffer \n",__func__); - return string_ptr; -} - - - -char * buffer_fread_alloc_string(buffer_type * buffer) { - return util_alloc_string_copy( buffer_fread_string( buffer )); -} - - - -/** - Observe that this function writes a leading integer string length. -*/ -void buffer_fwrite_string(buffer_type * buffer , const char * string) { - buffer_fwrite_int( buffer , strlen( string )); /* Writing the length of the string */ - buffer_fwrite(buffer , string , 1 , strlen( string ) + 1); /* Writing the string content ** WITH ** the terminating \0 */ -} - diff --git a/ThirdParty/Ert/libert_util/src/buffer_zlib.c b/ThirdParty/Ert/libert_util/src/buffer_zlib.c deleted file mode 100644 index 00db36faac..0000000000 --- a/ThirdParty/Ert/libert_util/src/buffer_zlib.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - This file is compiled as part of the buffer.c file; if the symbol - ERT_HAVE_ZLIB is defined. -*/ -#include -/** - Unfortunately the old RedHat3 computers have a zlib version which - does not have the compressBound function. For that reason the - compressBound function from a 1.2xx version of zlib is pasted in - here verbatim: -*/ - - -/* Snipped from zlib source code: */ -static size_t __compress_bound (size_t sourceLen) -{ - return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11; -} - - -/** - Return value is the size (in bytes) of the compressed buffer. -*/ -size_t buffer_fwrite_compressed(buffer_type * buffer, const void * ptr , size_t byte_size) { - size_t compressed_size = 0; - bool abort_on_error = true; - buffer->content_size = buffer->pos; /* Invalidating possible buffer content coming after the compressed content; that is uninterpretable anyway. */ - - if (byte_size > 0) { - size_t remaining_size = buffer->alloc_size - buffer->pos; - size_t compress_bound = __compress_bound( byte_size ); - if (compress_bound > remaining_size) - buffer_resize__(buffer , remaining_size + compress_bound , abort_on_error); - - compressed_size = buffer->alloc_size - buffer->pos; - util_compress_buffer( ptr , byte_size , &buffer->data[buffer->pos] , &compressed_size); - buffer->pos += compressed_size; - buffer->content_size += compressed_size; - } - - return compressed_size; -} - - -/** - Return value is the size of the uncompressed buffer. -*/ -size_t buffer_fread_compressed(buffer_type * buffer , size_t compressed_size , void * target_ptr , size_t target_size) { - size_t remaining_size = buffer->content_size - buffer->pos; - size_t uncompressed_size = target_size; - if (remaining_size < compressed_size) - util_abort("%s: trying to read beyond end of buffer\n",__func__); - - - if (compressed_size > 0) { - int uncompress_result = uncompress(target_ptr , &uncompressed_size , (unsigned char *) &buffer->data[buffer->pos] , compressed_size); - if (uncompress_result != Z_OK) { - fprintf(stderr,"%s: ** Warning uncompress result:%d != Z_OK.\n" , __func__ , uncompress_result); - /** - According to the zlib documentation: - - 1. Values > 0 are not errors - just rare events? - 2. The value Z_BUF_ERROR is not fatal - we let that pass?! - */ - if (uncompress_result < 0 && uncompress_result != Z_BUF_ERROR) - util_abort("%s: fatal uncompress error: %d \n",__func__ , uncompress_result); - } - } else - uncompressed_size = 0; - - buffer->pos += compressed_size; - return uncompressed_size; -} - diff --git a/ThirdParty/Ert/libert_util/src/util_chdir.c b/ThirdParty/Ert/libert_util/src/util_chdir.c deleted file mode 100644 index 00fc5453d7..0000000000 --- a/ThirdParty/Ert/libert_util/src/util_chdir.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2013 Statoil ASA, Norway. - - The file 'util_chdir.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ERT is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. - - See the GNU General Public License at - for more details. -*/ - -#ifdef HAVE_POSIX_CHDIR -#include - -int util_chdir(const char * path) { - return chdir( path ); -} - -#endif - - -#ifdef HAVE_WINDOWS_CHDIR -#include - -int util_chdir(const char * path) { - return _chdir( path ); -} - -#endif - - diff --git a/ThirdParty/Ert/libert_util/src/util_path.c b/ThirdParty/Ert/libert_util/src/util_path.c deleted file mode 100644 index 40f76c98ab..0000000000 --- a/ThirdParty/Ert/libert_util/src/util_path.c +++ /dev/null @@ -1,307 +0,0 @@ -/* - Copyright (C) 2011 Statoil ASA, Norway. - - The file 'util_path.c' is part of ERT - Ensemble based Reservoir Tool. - - ERT is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ERT is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. - - See the GNU General Public License at - for more details. -*/ - -#ifdef HAVE_WINDOWS_MKDIR -#include -#endif - -#include - -/** - This little function checks if the supplied path is an abolute path, - or a relative path. On posix the check is extremely simple - if the - first character equals "/" it is interpreted as an abolute path, - otherwise not. -*/ - - -bool util_is_abs_path(const char * path) { -#ifdef ERT_WINDOWS - if ((path[0] == '/') || (path[0] == '\\')) - return true; - else - if ((isalpha(path[0]) && (path[1] == ':'))) - return true; - - return false; - -#else - - if (path[0] == UTIL_PATH_SEP_CHAR) - return true; - else - return false; - -#endif -} - -static int util_mkdir( const char * path ) { -#ifdef HAVE_POSIX_MKDIR - return mkdir( path , UTIL_DEFAULT_MKDIR_MODE ); -#endif - -#ifdef HAVE_WINDOWS_MKDIR - return _mkdir( path ); -#endif -} - - -void util_make_path(const char *_path) { - char *active_path; - char *path = (char *) _path; - int current_pos = 0; - - if (!util_is_directory(path)) { - int i = 0; - active_path = util_calloc(strlen(path) + 1 , sizeof * active_path ); - do { - int n = strcspn(path , UTIL_PATH_SEP_STRING); - if (n < strlen(path)) - n += 1; - path += n; - i++; - strncpy(active_path , _path , n + current_pos); - active_path[n+current_pos] = '\0'; - current_pos += n; - - if (!util_is_directory(active_path)) { - if (util_mkdir(active_path) != 0) { - bool fail = false; - switch (errno) { - case(EEXIST): - if (util_is_directory(active_path)) - fail = false; - break; - default: - fail = true; - break; - } - if (fail) - util_abort("%s: failed to make directory:%s - aborting\n: %s(%d) \n",__func__ , active_path , strerror(errno), errno); - } - } - - } while (strlen(active_path) < strlen(_path)); - free(active_path); - } -} - - -/** - This function will allocate a unique filename with a random part in - it. If the the path corresponding to the first argument does not - exist it is created. - - If the value include_pid is true, the pid of the calling process is - included in the filename, the resulting filename will be: - - path/prefix-pid-RANDOM - - if include_pid is false the resulting file will be: - - path/prefix-RANDOM - - Observe that IFF the prefix contains any path separator character - they are translated to "_". -*/ - - - -char * util_alloc_tmp_file(const char * path, const char * prefix , bool include_pid ) { - // Should be reimplemented to use mkstemp() - const int pid_digits = 6; - const int random_digits = 6; - const int random_max = 1000000; - -#ifdef HAVE_PID_T - const int pid_max = 1000000; - pid_t pid = getpid() % pid_max; -#else - int pid = 0; -#endif - - char * file = util_calloc(strlen(path) + 1 + strlen(prefix) + 1 + pid_digits + 1 + random_digits + 1 , sizeof * file ); - char * tmp_prefix = util_alloc_string_copy( prefix ); - - if (!util_is_directory(path)) - util_make_path(path); - util_string_tr( tmp_prefix , UTIL_PATH_SEP_CHAR , '_'); /* removing path seps. */ - - do { - long int rand_int = rand() % random_max; - if (include_pid) - sprintf(file , "%s%c%s-%d-%ld" , path , UTIL_PATH_SEP_CHAR , tmp_prefix , pid , rand_int); - else - sprintf(file , "%s%c%s-%ld" , path , UTIL_PATH_SEP_CHAR , tmp_prefix , rand_int); - } while (util_file_exists(file)); - - free( tmp_prefix ); - return file; -} - -/** - This file allocates a filename consisting of a leading path, a - basename and an extension. Both the path and the extension can be - NULL, but not the basename. - - Observe that this function does pure string manipulation; there is - no input check on whether path exists, if baseneme contains "." - (or even a '/') and so on. -*/ - -char * util_alloc_filename(const char * path , const char * basename , const char * extension) { - char * file; - int length = strlen(basename) + 1; - - if (path != NULL) - length += strlen(path) + 1; - - if (extension != NULL) - length += strlen(extension) + 1; - - file = util_calloc(length , sizeof * file ); - - if (path == NULL) { - if (extension == NULL) - memcpy(file , basename , strlen(basename) + 1); - else - sprintf(file , "%s.%s" , basename , extension); - } else { - if (extension == NULL) - sprintf(file , "%s%c%s" , path , UTIL_PATH_SEP_CHAR , basename); - else - sprintf(file , "%s%c%s.%s" , path , UTIL_PATH_SEP_CHAR , basename , extension); - } - - return file; -} - - -char * util_realloc_filename(char * filename , const char * path , const char * basename , const char * extension) { - util_safe_free(filename); - return util_alloc_filename( path , basename , extension ); -} - - - - -#ifdef HAVE_PROC -bool util_proc_alive(pid_t pid) { - char proc_path[16]; - sprintf(proc_path , "/proc/%d" , pid); - return util_is_directory(proc_path); -} -#endif - -int util_proc_mem_free(void) { - FILE *stream = util_fopen("/proc/meminfo" , "r"); - int mem; - util_fskip_lines(stream , 1); - util_fskip_token(stream); - util_fscanf_int(stream , &mem); - fclose(stream); - return mem; -} - - - - -char * util_split_alloc_dirname( const char * input_path ) { - char * path; - util_alloc_file_components( input_path , &path , NULL , NULL); - return path; -} - - -char * util_split_alloc_filename( const char * input_path ) { - char * filename = NULL; - { - char * basename; - char * extension; - - util_alloc_file_components( input_path , NULL , &basename , &extension); - - if (basename) - filename = util_alloc_filename( NULL , basename , extension ); - - util_safe_free( basename ); - util_safe_free( extension ); - } - - return filename; -} - - - -void util_path_split(const char *line , int *_tokens, char ***_token_list) { - util_split_string( line , UTIL_PATH_SEP_STRING , _tokens , _token_list); -} - -/** - Observe that -*/ - -char * util_alloc_parent_path( const char * path) { - int path_ncomp; - char ** path_component_list; - char * parent_path = NULL; - - if (path) { - bool is_abs = util_is_abs_path( path ); - char * work_path; - - if (strstr(path , "..")) { - if (is_abs) - work_path = util_alloc_realpath__( path ); - else { - char * abs_path = util_alloc_realpath__( path ); - char * cwd = util_alloc_cwd(); - work_path = util_alloc_rel_path( cwd , abs_path ); - free( abs_path ); - free( cwd ); - } - } else - work_path = util_alloc_string_copy( path ); - - util_path_split( work_path , &path_ncomp , &path_component_list ); - if (path_ncomp > 0) { - int current_length = 4; - int ip; - - parent_path = util_realloc( parent_path , current_length * sizeof * parent_path); - parent_path[0] = '\0'; - - for (ip=0; ip < path_ncomp - 1; ip++) { - const char * ipath = path_component_list[ip]; - int min_length = strlen(parent_path) + strlen(ipath) + 1; - - if (min_length >= current_length) { - current_length = 2 * min_length; - parent_path = util_realloc( parent_path , current_length * sizeof * parent_path); - } - - if (is_abs || (ip > 0)) - strcat( parent_path , UTIL_PATH_SEP_STRING ); - strcat( parent_path , ipath ); - } - } - util_free_stringlist( path_component_list , path_ncomp ); - free( work_path ); - } - return parent_path; -} diff --git a/ThirdParty/Ert/libert_util/tests/CMakeLists.txt b/ThirdParty/Ert/libert_util/tests/CMakeLists.txt deleted file mode 100644 index 2142cab296..0000000000 --- a/ThirdParty/Ert/libert_util/tests/CMakeLists.txt +++ /dev/null @@ -1,196 +0,0 @@ -link_directories( ${ERT_BINARY_DIR}/libert_util/src ) - -add_executable( test_thread_pool test_thread_pool.c ) -target_link_libraries( test_thread_pool ert_util ) - -find_library( VALGRIND NAMES valgr ) -if (VALGRIND) - add_test( test_thread_pool valgrind --error-exitcode=1 --tool=memcheck ${EXECUTABLE_OUTPUT_PATH}/test_thread_pool ) -else() - add_test( test_thread_pool ${EXECUTABLE_OUTPUT_PATH}/test_thread_pool ) -endif() - -add_executable( ert_util_matrix ert_util_matrix.c ) -target_link_libraries( ert_util_matrix ert_util ) -add_test( ert_util_matrix ${EXECUTABLE_OUTPUT_PATH}/ert_util_matrix ) - -if (ERT_HAVE_LAPACK) - add_executable( ert_util_matrix_lapack ert_util_matrix_lapack.c ) - target_link_libraries( ert_util_matrix_lapack ert_util ) - add_test( ert_util_matrix_lapack ${EXECUTABLE_OUTPUT_PATH}/ert_util_matrix_lapack ) - - add_executable( ert_util_matrix_stat ert_util_matrix_stat.c ) - target_link_libraries( ert_util_matrix_stat ert_util ) - add_test( ert_util_matrix_stat ${EXECUTABLE_OUTPUT_PATH}/ert_util_matrix_stat ) -endif() - -add_executable( ert_util_subst_list ert_util_subst_list.c ) -target_link_libraries( ert_util_subst_list ert_util ) -add_test( ert_util_subst_list ${EXECUTABLE_OUTPUT_PATH}/ert_util_subst_list ) - - -add_executable( ert_util_buffer ert_util_buffer.c ) -target_link_libraries( ert_util_buffer ert_util ) -add_test( ert_util_buffer ${EXECUTABLE_OUTPUT_PATH}/ert_util_buffer ) - -add_executable( ert_util_statistics ert_util_statistics.c ) -target_link_libraries( ert_util_statistics ert_util ) -add_test( ert_util_statistics ${EXECUTABLE_OUTPUT_PATH}/ert_util_statistics ) - -add_executable( ert_util_copy_file ert_util_copy_file.c ) -target_link_libraries( ert_util_copy_file ert_util ) -add_test( ert_util_copy_file ${EXECUTABLE_OUTPUT_PATH}/ert_util_copy_file ${EXECUTABLE_OUTPUT_PATH}/ert_util_copy_file ) - -add_executable( ert_util_filename ert_util_filename.c ) -target_link_libraries( ert_util_filename ert_util ) -add_test( ert_util_filename ${EXECUTABLE_OUTPUT_PATH}/ert_util_filename ) - -add_executable( ert_util_sscan_test ert_util_sscan_test.c ) -target_link_libraries( ert_util_sscan_test ert_util ) -add_test( ert_util_sscan_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_sscan_test ) - -add_executable( ert_util_string_util ert_util_string_util.c ) -target_link_libraries( ert_util_string_util ert_util ) -add_test( ert_util_string_util ${EXECUTABLE_OUTPUT_PATH}/ert_util_string_util ) - -add_executable( ert_util_vector_test ert_util_vector_test.c ) -target_link_libraries( ert_util_vector_test ert_util ) -add_test( ert_util_vector_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_vector_test ) - -add_executable( ert_util_cwd_test ert_util_cwd_test.c ) -target_link_libraries( ert_util_cwd_test ert_util ) -add_test( ert_util_cwd_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_cwd_test ${CMAKE_CURRENT_BINARY_DIR}) - -add_executable( ert_util_relpath_test ert_util_relpath_test.c ) -target_link_libraries( ert_util_relpath_test ert_util ) -add_test( ert_util_relpath_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_relpath_test ) - -add_executable( ert_util_path_stack_test ert_util_path_stack_test.c ) -target_link_libraries( ert_util_path_stack_test ert_util ) -add_test( ert_util_path_stack_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_path_stack_test ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) - -add_executable( ert_util_PATH_test ert_util_PATH_test.c ) -target_link_libraries( ert_util_PATH_test ert_util ) -add_test( ert_util_PATH_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_PATH_test ) - -add_executable( ert_util_strcat_test ert_util_strcat_test.c ) -target_link_libraries( ert_util_strcat_test ert_util ) -add_test( ert_util_strcat_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_strcat_test ) - -add_executable( ert_util_sprintf_escape ert_util_sprintf_escape.c ) -target_link_libraries( ert_util_sprintf_escape ert_util ) -add_test( ert_util_sprintf_escape ${EXECUTABLE_OUTPUT_PATH}/ert_util_sprintf_escape ) - - -add_executable( ert_util_stringlist_test ert_util_stringlist_test.c ) -target_link_libraries( ert_util_stringlist_test ert_util ) -add_test( ert_util_stringlist_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_stringlist_test ) - -add_executable( ert_util_realpath ert_util_realpath.c ) -target_link_libraries( ert_util_realpath ert_util ) -add_test( ert_util_realpath ${EXECUTABLE_OUTPUT_PATH}/ert_util_realpath ) - -add_executable( ert_util_hash_test ert_util_hash_test.c ) -target_link_libraries( ert_util_hash_test ert_util ) -add_test( ert_util_hash_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_hash_test ) - -add_executable( ert_util_binary_split ert_util_binary_split.c ) -target_link_libraries( ert_util_binary_split ert_util ) -add_test( ert_util_binary_split ${EXECUTABLE_OUTPUT_PATH}/ert_util_binary_split ) - -add_executable( ert_util_logh ert_util_logh.c ) -target_link_libraries( ert_util_logh ert_util ) -add_test( ert_util_logh ${EXECUTABLE_OUTPUT_PATH}/ert_util_logh ) - -add_executable( ert_util_rng ert_util_rng.c ) -target_link_libraries( ert_util_rng ert_util ) -add_test( ert_util_rng ${EXECUTABLE_OUTPUT_PATH}/ert_util_rng ) - -add_executable( ert_util_time_interval ert_util_time_interval.c ) -target_link_libraries( ert_util_time_interval ert_util ) -add_test( ert_util_time_interval ${EXECUTABLE_OUTPUT_PATH}/ert_util_time_interval ) - -add_executable( ert_util_before_after ert_util_before_after.c ) -target_link_libraries( ert_util_before_after ert_util ) -add_test( ert_util_before_after ${EXECUTABLE_OUTPUT_PATH}/ert_util_before_after ) - -add_executable( ert_util_approx_equal ert_util_approx_equal.c ) -target_link_libraries( ert_util_approx_equal ert_util ) -add_test( ert_util_approx_equal ${EXECUTABLE_OUTPUT_PATH}/ert_util_approx_equal ) - -if (ERT_HAVE_PING) - add_executable( ert_util_ping ert_util_ping.c ) - target_link_libraries( ert_util_ping ert_util ) - add_test( ert_util_ping ${EXECUTABLE_OUTPUT_PATH}/ert_util_ping) -endif() - -add_executable( ert_util_file_readable ert_util_file_readable.c ) -target_link_libraries( ert_util_file_readable ert_util ) -add_test( ert_util_file_readable ${EXECUTABLE_OUTPUT_PATH}/ert_util_file_readable ${FILE_READABLE_SERVERS}) - -add_executable( ert_util_type_vector_functions ert_util_type_vector_functions.c ) -target_link_libraries( ert_util_type_vector_functions ert_util ) -add_test( ert_util_type_vector_functions ${EXECUTABLE_OUTPUT_PATH}/ert_util_type_vector_functions) - - -add_executable( ert_util_ui_return ert_util_ui_return.c ) -target_link_libraries( ert_util_ui_return ert_util ) -add_test( ert_util_ui_return ${EXECUTABLE_OUTPUT_PATH}/ert_util_ui_return ) - -add_executable( ert_util_clamp ert_util_clamp.c ) -target_link_libraries( ert_util_clamp ert_util ) -add_test( ert_util_clamp ${EXECUTABLE_OUTPUT_PATH}/ert_util_clamp ) - -add_executable( ert_util_strstr_int_format ert_util_strstr_int_format.c ) -target_link_libraries( ert_util_strstr_int_format ert_util ) -add_test( ert_util_strstr_int_format ${EXECUTABLE_OUTPUT_PATH}/ert_util_strstr_int_format ) - -add_executable( ert_util_parent_path ert_util_parent_path.c ) -target_link_libraries( ert_util_parent_path ert_util ) -add_test( ert_util_parent_path ${EXECUTABLE_OUTPUT_PATH}/ert_util_parent_path) - -add_executable( ert_util_alloc_file_components ert_util_alloc_file_components.c ) -target_link_libraries( ert_util_alloc_file_components ert_util ) -add_test( ert_util_alloc_file_components ${EXECUTABLE_OUTPUT_PATH}/ert_util_alloc_file_components) - -add_executable( ert_util_work_area ert_util_work_area.c ) -target_link_libraries( ert_util_work_area ert_util ) -add_test( NAME ert_util_work_area - COMMAND ${EXECUTABLE_OUTPUT_PATH}/ert_util_work_area data2/file1 ${CMAKE_CURRENT_SOURCE_DIR}/data2/file2 data2 - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - -add_executable( ert_util_arg_pack ert_util_arg_pack.c) -set_target_properties( ert_util_arg_pack PROPERTIES COMPILE_FLAGS "-Werror") -target_link_libraries( ert_util_arg_pack ert_util ) -add_test( ert_util_arg_pack ${EXECUTABLE_OUTPUT_PATH}/ert_util_arg_pack) - -if (HAVE_BACKTRACE) - add_executable( ert_util_abort_gnu_tests ert_util_abort_gnu_tests.c) - target_link_libraries( ert_util_abort_gnu_tests ert_util ) - add_test( ert_util_abort_gnu_tests ${EXECUTABLE_OUTPUT_PATH}/ert_util_abort_gnu_tests) - - add_executable( ert_util_addr2line ert_util_addr2line.c ) - target_link_libraries( ert_util_addr2line ert_util ) - add_test( ert_util_addr2line ${EXECUTABLE_OUTPUT_PATH}/ert_util_addr2line) -endif() - -if (HAVE_UTIL_ABORT_INTERCEPT) - add_executable( ert_util_block_fs ert_util_block_fs.c) - target_link_libraries( ert_util_block_fs ert_util ) - add_test( ert_util_block_fs ${EXECUTABLE_OUTPUT_PATH}/ert_util_block_fs) - - add_executable( ert_util_struct_vector ert_util_struct_vector.c ) - target_link_libraries( ert_util_struct_vector ert_util ) - add_test( ert_util_struct_vector ${EXECUTABLE_OUTPUT_PATH}/ert_util_struct_vector ) - - add_executable( ert_util_type_vector_test ert_util_type_vector_test.c ) - target_link_libraries( ert_util_type_vector_test ert_util ) - add_test( ert_util_type_vector_test ${EXECUTABLE_OUTPUT_PATH}/ert_util_type_vector_test ) -endif() - -if (ERT_HAVE_SPAWN) - add_executable( ert_util_spawn ert_util_spawn.c ) - target_link_libraries( ert_util_spawn ert_util ) - add_test( ert_util_spawn ${EXECUTABLE_OUTPUT_PATH}/ert_util_spawn) -endif() - diff --git a/ThirdParty/Ert/libert_utilxx/CMakeLists.txt b/ThirdParty/Ert/libert_utilxx/CMakeLists.txt deleted file mode 100644 index c6dd2b2070..0000000000 --- a/ThirdParty/Ert/libert_utilxx/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -add_subdirectory( src ) - -if (BUILD_TESTS) - add_subdirectory( tests ) -endif() - diff --git a/ThirdParty/Ert/libert_utilxx/src/CMakeLists.txt b/ThirdParty/Ert/libert_utilxx/src/CMakeLists.txt deleted file mode 100644 index 9ff4095fa7..0000000000 --- a/ThirdParty/Ert/libert_utilxx/src/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -set( source_files - TestArea.cpp - ) - -set( header_files - TestArea.hpp - ert_unique_ptr.hpp -) - - -add_library( ert_utilxx ${source_files} ) -set_target_properties( ert_utilxx PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR}) -if (USE_RUNPATH) - add_runpath( ert_utilxx ) -endif() -target_link_libraries( ert_utilxx ert_util ) - - -if (INSTALL_ERT) - install(TARGETS ert_utilxx DESTINATION ${CMAKE_INSTALL_LIBDIR}) - foreach(header ${header_files}) - install(FILES ../include/ert/util/${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ert/util) - endforeach() -endif() diff --git a/ThirdParty/Ert/libert_utilxx/tests/CMakeLists.txt b/ThirdParty/Ert/libert_utilxx/tests/CMakeLists.txt deleted file mode 100644 index e9cd19572e..0000000000 --- a/ThirdParty/Ert/libert_utilxx/tests/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -add_executable(ert_util_unique_ptr ert_util_unique_ptr.cpp ) -target_link_libraries(ert_util_unique_ptr ert_util) -add_test(ert_util_unique_ptr ${EXECUTABLE_OUTPUT_PATH}/ert_util_unique_ptr) - -add_executable(ert_util_test_area_xx ert_util_test_area_xx.cpp ) -target_link_libraries(ert_util_test_area_xx ert_utilxx) -add_test(ert_util_test_area_xx ${EXECUTABLE_OUTPUT_PATH}/ert_util_test_area_xx) diff --git a/ThirdParty/Ert/libgeometry/CMakeLists.txt b/ThirdParty/Ert/libgeometry/CMakeLists.txt deleted file mode 100644 index 4a47f8a3de..0000000000 --- a/ThirdParty/Ert/libgeometry/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -add_subdirectory( src ) - -#if (BUILD_APPLICATONS) -# add_subdirectory( applications ) -#endif() - -if (BUILD_TESTS) - add_subdirectory( tests ) -endif() - diff --git a/ThirdParty/Ert/libgeometry/src/CMakeLists.txt b/ThirdParty/Ert/libgeometry/src/CMakeLists.txt deleted file mode 100644 index c33a248603..0000000000 --- a/ThirdParty/Ert/libgeometry/src/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -set( source_files geo_surface.c geo_util.c geo_pointset.c geo_region.c geo_polygon.c geo_polygon_collection.c) -set( header_files geo_surface.h geo_util.h geo_pointset.h geo_region.h geo_polygon.h geo_polygon_collection.h) - -add_library( ert_geometry ${source_files} ) -set_target_properties( ert_geometry PROPERTIES VERSION ${ERT_VERSION_MAJOR}.${ERT_VERSION_MINOR} SOVERSION ${ERT_VERSION_MAJOR}) -target_link_libraries( ert_geometry ert_util ) -if (USE_RUNPATH) - add_runpath( ert_geometry ) -endif() - - -#----------------------------------------------------------------- -if (INSTALL_ERT) - install(TARGETS ert_geometry DESTINATION ${CMAKE_INSTALL_LIBDIR}) - foreach(header ${header_files}) - install(FILES ../include/ert/geometry/${header} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ert/geometry) - endforeach() -endif() - - diff --git a/ThirdParty/Ert/libgeometry/tests/CMakeLists.txt b/ThirdParty/Ert/libgeometry/tests/CMakeLists.txt deleted file mode 100644 index 3547148055..0000000000 --- a/ThirdParty/Ert/libgeometry/tests/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ -add_executable( geo_util_xlines geo_util_xlines.c ) -target_link_libraries( geo_util_xlines ert_geometry ) -add_test( geo_util_xlines ${EXECUTABLE_OUTPUT_PATH}/geo_util_xlines ) - -add_executable( geo_polygon geo_polygon.c ) -target_link_libraries( geo_polygon ert_geometry ) -add_test( geo_polygon ${EXECUTABLE_OUTPUT_PATH}/geo_polygon ) - -add_executable( geo_polygon_collection geo_polygon_collection.c ) -target_link_libraries( geo_polygon_collection ert_geometry ) -add_test( geo_polygon_collection ${EXECUTABLE_OUTPUT_PATH}/geo_polygon_collection ) - -if (STATOIL_TESTDATA_ROOT) - add_executable( geo_surface geo_surface.c ) - target_link_libraries( geo_surface ert_geometry ) - - add_test( geo_surface ${EXECUTABLE_OUTPUT_PATH}/geo_surface - ${PROJECT_SOURCE_DIR}/test-data/Statoil/Geometry/Surface.irap - ${PROJECT_SOURCE_DIR}/test-data/Statoil/Geometry/Surface_incompatible.irap ) - set_property( TEST geo_surface PROPERTY LABELS StatoilData ) -endif() - - - - diff --git a/ThirdParty/Ert/python/cmake/Modules/add_python_package.cmake b/ThirdParty/Ert/python/cmake/Modules/add_python_package.cmake index 9d1527d309..bb0c1a6e2d 100644 --- a/ThirdParty/Ert/python/cmake/Modules/add_python_package.cmake +++ b/ThirdParty/Ert/python/cmake/Modules/add_python_package.cmake @@ -30,7 +30,9 @@ function(add_python_package target package_path source_files install_package) list(APPEND build_files ${build_file} ) if (install_package) - install(FILES ${build_file} DESTINATION ${CMAKE_INSTALL_PREFIX}/${package_path}) + # For cmake versions >= 2.8.12 the preferred keyword is DIRECTORY. + get_filename_component( src_path ${file} PATH ) + install(FILES ${build_file} DESTINATION ${CMAKE_INSTALL_PREFIX}/${package_path}/${src_path}) install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/bin/cmake_pyc_file ${install_file})") endif() diff --git a/ThirdParty/Ert/python/cmake/Modules/add_python_test.cmake b/ThirdParty/Ert/python/cmake/Modules/add_python_test.cmake index 26583c5090..cb9130e1c6 100644 --- a/ThirdParty/Ert/python/cmake/Modules/add_python_test.cmake +++ b/ThirdParty/Ert/python/cmake/Modules/add_python_test.cmake @@ -34,5 +34,5 @@ macro( addPythonTest TEST_CLASS ) set_property(TEST ${TEST_NAME} PROPERTY LABELS "Python") endif() - set_property(TEST ${TEST_NAME} PROPERTY ENVIRONMENT "CTEST_PYTHONPATH=${CTEST_PYTHONPATH}") + set_property(TEST ${TEST_NAME} PROPERTY ENVIRONMENT "CTEST_PYTHONPATH=${CTEST_PYTHONPATH};ERT_ROOT=${ERT_ROOT}") endmacro( ) diff --git a/ThirdParty/Ert/python/cmake/Modules/find_python_package.cmake b/ThirdParty/Ert/python/cmake/Modules/find_python_package.cmake index 9cfd68f6aa..3e62b604e5 100644 --- a/ThirdParty/Ert/python/cmake/Modules/find_python_package.cmake +++ b/ThirdParty/Ert/python/cmake/Modules/find_python_package.cmake @@ -27,6 +27,7 @@ function(find_python_package_version package) endfunction() + # If we find the correct module and new enough version, set PY_package, where # "package" is the given argument to the version we found else, display warning # and do not set any variables. @@ -34,17 +35,22 @@ function(find_python_package package version python_prefix) if (CMAKE_PREFIX_PATH) set( ORG_PYTHONPATH $ENV{PYTHONPATH} ) + set( CMAKE_PYTHONATH "") + set( sep "") foreach ( PREFIX_PATH ${CMAKE_PREFIX_PATH} ) - set(THIS_PYTHONPATH "${PREFIX_PATH}/${python_prefix}") - set(ENV{PYTHONPATH} "${THIS_PYTHONPATH}:${ORG_PYTHONPATH}") - find_python_package_version(${package}) - if (DEFINED PY_${package}) - if (${PY_${package}_PATH} STREQUAL ${THIS_PYTHONPATH}) - set(CTEST_PYTHONPATH "${PY_${package}_PATH}:${CTEST_PYTHONPATH}" PARENT_SCOPE) - endif() - break( ) - endif() + set( CMAKE_PYTHONPATH "${CMAKE_PYTHONPATH}${sep}${PREFIX_PATH}/${python_prefix}") + set( sep ":") endforeach() + + set(ENV{PYTHONPATH} "${CMAKE_PYTHONPATH}:${ORG_PYTHONPATH}") + + find_python_package_version(${package}) + if (DEFINED PY_${package}) + STRING(FIND ${CMAKE_PYTHONPATH} ${PY_${package}_PATH} pos) + if (${pos} GREATER -1) + set(CTEST_PYTHONPATH "${PY_${package}_PATH}:${CMAKE_PYTHONPATH}" PARENT_SCOPE) + endif() + endif() set(ENV{PYTHONPATH} ${ORG_PYTHONPATH}) else() find_python_package_version(${package}) diff --git a/ThirdParty/Ert/python/cmake/Modules/init_python.cmake b/ThirdParty/Ert/python/cmake/Modules/init_python.cmake index 414879259c..6af40838c3 100644 --- a/ThirdParty/Ert/python/cmake/Modules/init_python.cmake +++ b/ThirdParty/Ert/python/cmake/Modules/init_python.cmake @@ -105,15 +105,34 @@ def runTestCase(tests, verbosity=0): sys.exit(1) +# This will update both the internal sys.path load order and the +# environment variable PYTHONPATH with the following list: +# +# cwd:CTEST_PYTHONPATH:PYTHONPATH + def update_path(): - for path in os.environ['CTEST_PYTHONPATH'].split(':'): - sys.path.insert(0 , path) - + path_list = [os.getcwd()] + + if 'CTEST_PYTHONPATH' in os.environ: + ctest_pythonpath = os.environ['CTEST_PYTHONPATH'] + for path in ctest_pythonpath.split(':'): + path_list.append( path ) + + for path in reversed(path_list): + sys.path.insert(0 , path) + + if 'PYTHONPATH' in os.environ: + pythonpath = os.environ['PYTHONPATH'] + for path in pythonpath.split(':'): + path_list.append( path ) + + os.environ['PYTHONPATH'] = ':'.join( path_list ) + + if __name__ == '__main__': update_path( ) from ecl.test import ErtTestRunner - for test_class in sys.argv[1:]: tests = ErtTestRunner.getTestsFromTestClass(test_class) @@ -172,4 +191,4 @@ for file in sys.argv[1:]: -endfunction() \ No newline at end of file +endfunction() diff --git a/ThirdParty/Ert/python/doc/install.txt b/ThirdParty/Ert/python/doc/install.txt index 7a1e06dbde..a762c7f01a 100644 --- a/ThirdParty/Ert/python/doc/install.txt +++ b/ThirdParty/Ert/python/doc/install.txt @@ -29,12 +29,11 @@ the py_compile module. Installing the shared libraries ------------------------------- -The ctypes module is based on the dlopen() system call to open shared -libraries libecl.so, libert_util.so and so on. The final dlopen() call is -not passed any path information, i.e. the runtime linker must be able -to locate the shared libraries based solely on the normal runtime -linking conventions. This means that you have two alternatives when -installing the shared libraries: +The ctypes module is based on the dlopen() system call to open the shared +libecl.so. The final dlopen() call is not passed any path information, i.e. the +runtime linker must be able to locate the shared libraries based solely on the +normal runtime linking conventions. This means that you have two alternatives +when installing the shared libraries: 1. Install all the libraries in one of the standard library locations like /usr/local/lib. @@ -43,8 +42,7 @@ installing the shared libraries: subsequently update the LD_LIBRARY_PATH variable to point to this directory. -The shared libraries you will need are: libert_util.so, libecl.so, -librms.so, libsched.so, libenkf.so, libjob_queue.so, libconfig.so and libgeometry.so +The shared libraries you will need is 'libecl.so' The test environment -------------------- diff --git a/ThirdParty/Ert/python/python/CMakeLists.txt b/ThirdParty/Ert/python/python/CMakeLists.txt index c6d592545b..59be104ca7 100644 --- a/ThirdParty/Ert/python/python/CMakeLists.txt +++ b/ThirdParty/Ert/python/python/CMakeLists.txt @@ -2,4 +2,7 @@ configure_file(test_env.py.in ${PROJECT_BINARY_DIR}/${PYTHON_INSTALL_PREFIX}/t add_subdirectory(cwrap) add_subdirectory( ecl ) -add_subdirectory( bin ) + +if (INSTALL_ERT_LEGACY) + add_subdirectory( legacy/ert ) +endif() diff --git a/ThirdParty/Ert/python/python/bin/CMakeLists.txt b/ThirdParty/Ert/python/python/bin/CMakeLists.txt deleted file mode 100644 index 0410f2a073..0000000000 --- a/ThirdParty/Ert/python/python/bin/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -if (BUILD_ERT) - set(application_list - ert_tcp_server - ertshell - ert_upgrade_fs107 - ) - foreach(prog ${application_list} ) - file(COPY ${prog} DESTINATION ${EXECUTABLE_OUTPUT_PATH}) - endforeach() -endif() - - - -if (INSTALL_ERT) - set (destination ${CMAKE_INSTALL_PREFIX}/bin) - foreach(prog ${application_list} ) - install(PROGRAMS ${prog} DESTINATION ${destination}) - if (INSTALL_GROUP) - install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/${prog})") - install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/${prog})") - endif() - endforeach() -endif() - diff --git a/ThirdParty/Ert/python/python/bin/ert_tcp_server b/ThirdParty/Ert/python/python/bin/ert_tcp_server deleted file mode 100644 index caa75d9da7..0000000000 --- a/ThirdParty/Ert/python/python/bin/ert_tcp_server +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python -import argparse -import socket -import sys - -from ert.server.ertrpcserver import ErtRPCServer - -default_port = 0 - -parser = argparse.ArgumentParser() - -parser.add_argument("--port", type=int, default=default_port, dest="port") -parser.add_argument("--host", default=socket.gethostname(), dest="host") -parser.add_argument("--localhost", default=False, action="store_true", dest="localhost") -parser.add_argument("--log-file", default="ert-server.log", dest="log_file") -parser.add_argument("--log-level", type=int, default=1, dest="log_level") -parser.add_argument("config_file") - -args = parser.parse_args() - -config_file = args.config_file -port = args.port -log_level = args.log_level - - -# By default the server will bind with the publicly available hostname -# socket.gethostname() - meaning that clients can connect from -# anywhere, but by using the --localhost switch the server can be -# instructed to only accept connections from localhost. -# -# On some computers the socket.gethostname() will not include the -# domain name; that will not work and we exit the server and ask the -# user to supply the full hostname using --host. - -if args.localhost: - host = "localhost" -else: - host = args.host - if host.count(".") == 0: - sys.exit("Sorry - could not determine FQDN for server - use the --host option to supply.") - -server = ErtRPCServer(config_file, host, port, log_requests=log_level > 1, verbose_queue=True) - -try: - print("ERT Server running on port: %d at host: %s" % (server.port, host)) - server.start() -except KeyboardInterrupt: - try: - server.stop() - print("ERT Server 'smoothly' killed the running jobs") - except Exception as e: - print("Unable to stop server 'gracefully'!") - raise e diff --git a/ThirdParty/Ert/python/python/bin/ert_upgrade_fs107 b/ThirdParty/Ert/python/python/bin/ert_upgrade_fs107 deleted file mode 100644 index 4374b5dcfc..0000000000 --- a/ThirdParty/Ert/python/python/bin/ert_upgrade_fs107 +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env python -import sys -import os -import os.path - -from ert.config import ConfigParser, ContentTypeEnum, UnrecognizedEnum -from ert.enkf import TimeMap,EnkfFs -from ert.ecl import EclSum - -#TimeMap._upgrade107 = - - -def parse(config_file): - parser = ConfigParser( ) - item = parser.add("REFCASE", False ) - item.iset_type(0 , ContentTypeEnum.CONFIG_PATH ) - - item = parser.add("ENSPATH" , False ) - item.iset_type(0 , ContentTypeEnum.CONFIG_EXISTING_PATH ) - - content = parser.parse( config_file , unrecognized = UnrecognizedEnum.CONFIG_UNRECOGNIZED_IGNORE ) - if "REFCASE" in content: - refcase = EclSum( content.getValue( "REFCASE" )) - else: - refcase = None - - if "ENSPATH" in content: - path = content["ENSPATH"] - enspath = path[0].getPath( ) - else: - enspath = "storage" - - - return enspath , refcase - - -def upgrade(ens_path, refcase): - for case in os.listdir( ens_path ): - full_case = os.path.join( ens_path , case ) - if os.path.isdir( full_case ): - version = EnkfFs.diskVersion( full_case ) - try: - version = EnkfFs.diskVersion( full_case ) - except IOError: - print "The case:%s was ignored" % full_case - continue - - if version < 105: - print "Very old case: %s ignored - you should probably delete this" % full_case - continue - - if version < 107: - print "Upgrading %s to version 107" % full_case - - time_map_file = os.path.join( full_case , "files/time-map") - if os.path.isfile( time_map_file ): - time_map = TimeMap( time_map_file) - assert( isinstance( refcase , EclSum )) - time_map.upgrade107( refcase ) - time_map.fwrite( time_map_file ) - else: - print "No time-map file found" - - EnkfFs.updateVersion( full_case, version , 107 ) - fs = EnkfFs( full_case ) - - -if len(sys.argv) != 2: - sys.exit("Script must have exactly one argument: config_file") - -config_file = sys.argv[1] -ens_path , refcase = parse( config_file ) -if refcase: - print "Upgrading storage:%s with refcase:%s" % (ens_path , refcase.case ) -upgrade( ens_path , refcase ) - diff --git a/ThirdParty/Ert/python/python/bin/ertshell b/ThirdParty/Ert/python/python/bin/ertshell deleted file mode 100644 index e8d53e0a63..0000000000 --- a/ThirdParty/Ert/python/python/bin/ertshell +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python -import os -from PyQt4.QtGui import QApplication -import sys - -import ert_gui -from ert_gui.ertwidgets import resourceIcon -from ert_gui.shell import ErtShell -from ert_gui.tools import HelpCenter - - -if __name__ == '__main__': - if os.getenv("ERT_SHARE_PATH"): - ert_share_path = os.getenv("ERT_SHARE_PATH") - else: - ert_share_path = os.path.realpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../../share")) - - ert_gui.ertwidgets.img_prefix = ert_share_path + "/gui/img/" - - help_center = HelpCenter("ERT") - help_center.setHelpLinkPrefix(os.getenv("ERT_SHARE_PATH") + "/gui/help/") - - - app = QApplication(sys.argv) - app.setWindowIcon(resourceIcon("application/window_icon_cutout")) - - ert_shell = ErtShell() - if len(sys.argv) > 1: - ert_shell.onecmd('load_config %s' % sys.argv[1]) - - if len(sys.argv) > 2: - for workflow in sys.argv[2:]: - ert_shell.onecmd('workflows run %s' % workflow) - - ert_shell.cmdloop() \ No newline at end of file diff --git a/ThirdParty/Ert/python/python/cwrap/clib.py b/ThirdParty/Ert/python/python/cwrap/clib.py index 2c24cb43fb..8fb87a6518 100644 --- a/ThirdParty/Ert/python/python/cwrap/clib.py +++ b/ThirdParty/Ert/python/python/cwrap/clib.py @@ -14,20 +14,6 @@ # See the GNU General Public License at # for more details. """Convenience module for loading shared library. - -Observe that to ensure that all libraries are loaded through the same -code path, all required libraries should be loaded explicitly through -the use of import statements; i.e. the ecl.geo package requires the -libert_util librarary, to ensure that the correct version of the -libert_util.so library file is loaded we should manually load that -first as: - - import ecl.util - GEO_LIB = ecl.load("libert_geometry") - -Otherwise the standard operating system dependency resolve code will -be invoked when loading libert_geometry, and that could in principle -lead to loading a different version of libert_util.so """ import platform diff --git a/ThirdParty/Ert/python/python/cwrap/prototype.py b/ThirdParty/Ert/python/python/cwrap/prototype.py index 082fe7184a..3bbe636b3e 100644 --- a/ThirdParty/Ert/python/python/cwrap/prototype.py +++ b/ThirdParty/Ert/python/python/cwrap/prototype.py @@ -160,6 +160,9 @@ class Prototype(object): @classmethod def registerType(cls, type_name, type_class_or_function, is_return_type=True, storage_type=None): + if storage_type is None and (inspect.isfunction(type_class_or_function)): + storage_type = ctypes.c_void_p + _registerType(type_name, type_class_or_function, is_return_type = is_return_type, diff --git a/ThirdParty/Ert/python/python/ecl/ecl/ecl_grid.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_grid.py index 7d9bdb6a65..270c37f5bb 100644 --- a/ThirdParty/Ert/python/python/ecl/ecl/ecl_grid.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_grid.py @@ -47,7 +47,8 @@ class EclGrid(BaseCClass): _alloc_rectangular = EclPrototype("ecl_grid_obj ecl_grid_alloc_rectangular( int , int , int , double , double , double , int*)" , bind = False) _exists = EclPrototype("bool ecl_grid_exists( char* )" , bind = False) - _get_lgr = EclPrototype("ecl_grid_ref ecl_grid_get_lgr( ecl_grid , char* )") + _get_numbered_lgr = EclPrototype("ecl_grid_ref ecl_grid_get_lgr_from_lgr_nr( ecl_grid , int)") + _get_named_lgr = EclPrototype("ecl_grid_ref ecl_grid_get_lgr( ecl_grid , char* )") _get_cell_lgr = EclPrototype("ecl_grid_ref ecl_grid_get_cell_lgr1( ecl_grid , int )") _num_coarse_groups = EclPrototype("int ecl_grid_get_num_coarse_groups( ecl_grid )") _in_coarse_group1 = EclPrototype("bool ecl_grid_cell_in_coarse_group1( ecl_grid , int)") @@ -78,7 +79,8 @@ class EclGrid(BaseCClass): _cell_contains = EclPrototype("bool ecl_grid_cell_contains_xyz1( ecl_grid , int , double , double , double )") _cell_regular = EclPrototype("bool ecl_grid_cell_regular1( ecl_grid , int)") _num_lgr = EclPrototype("int ecl_grid_get_num_lgr( ecl_grid )") - _has_lgr = EclPrototype("bool ecl_grid_has_lgr( ecl_grid , char* )") + _has_numbered_lgr = EclPrototype("bool ecl_grid_has_lgr_nr( ecl_grid , int)") + _has_named_lgr = EclPrototype("bool ecl_grid_has_lgr( ecl_grid , char* )") _grid_value = EclPrototype("double ecl_grid_get_property( ecl_grid , ecl_kw , int , int , int)") _get_cell_volume = EclPrototype("double ecl_grid_get_cell_volume1( ecl_grid , int )") _get_cell_thickness = EclPrototype("double ecl_grid_get_cell_thickness1( ecl_grid , int )") @@ -103,6 +105,11 @@ class EclGrid(BaseCClass): _compressed_kw_copy = EclPrototype("void ecl_grid_compressed_kw_copy( ecl_grid , ecl_kw , ecl_kw)") _global_kw_copy = EclPrototype("void ecl_grid_global_kw_copy( ecl_grid , ecl_kw , ecl_kw)") _create_volume_keyword = EclPrototype("ecl_kw_obj ecl_grid_alloc_volume_kw( ecl_grid , bool)") + _use_mapaxes = EclPrototype("bool ecl_grid_use_mapaxes(ecl_grid)") + _export_coord = EclPrototype("ecl_kw_obj ecl_grid_alloc_coord_kw( ecl_grid )") + _export_zcorn = EclPrototype("ecl_kw_obj ecl_grid_alloc_zcorn_kw( ecl_grid )") + _export_actnum = EclPrototype("ecl_kw_obj ecl_grid_alloc_actnum_kw( ecl_grid )") + _export_mapaxes = EclPrototype("ecl_kw_obj ecl_grid_alloc_mapaxes_kw( ecl_grid )") @@ -896,31 +903,40 @@ class EclGrid(BaseCClass): """ Query if the grid has an LGR with name @lgr_name. """ - if self._has_lgr( lgr_name ): + if self._has_named_lgr( lgr_name ): return True else: return False - def get_lgr( self , lgr_name ): - """ - Get EclGrid instance with LGR content. + def get_lgr(self, lgr_key): + """Get EclGrid instance with LGR content. - Return an EclGrid instance based on the LGR named - @lgr_name. The LGR grid instance is in most questions like an - ordinary grid instance; the only difference is that it can not - be used for further queries about LGRs. + Return an EclGrid instance based on the LGR @lgr, the input + argument can either be the name of an LGR or the grid number + of the LGR. The LGR grid instance is mostly like an ordinary + grid instance; the only difference is that it can not be used + for further queries about LGRs. + + If the grid does not contain an LGR with this name/nr + exception KeyError will be raised. - If the grid does not contain an LGR with this name the method - will return None. """ - if self._has_lgr( lgr_name ): - lgr = self._get_lgr( name ) - lgr.setParent( self ) - return lgr + lgr = None + if isinstance(lgr_key, int): + if self._has_numbered_lgr(lgr_key): + lgr = self._get_numbered_lgr(lgr_key) else: - raise KeyError("No such LGR:%s" % lgr_name) + if self._has_named_lgr(lgr_key): + lgr = self._get_named_lgr(lgr_key) + if lgr is None: + raise KeyError("No such LGR: %s" % lgr_key) + + lgr.setParent(self) + return lgr + + def get_cell_lgr( self, active_index = None , global_index = None , ijk = None): """ @@ -1199,3 +1215,18 @@ class EclGrid(BaseCClass): """ return self._create_volume_keyword( active_size ) + + def export_coord(self): + return self._export_coord() + + def export_zcorn(self): + return self._export_zcorn() + + def export_actnum(self): + return self._export_actnum() + + def export_mapaxes(self): + if not self._use_mapaxes(): + return None + + return self._export_mapaxes() diff --git a/ThirdParty/Ert/python/python/ecl/ecl/ecl_grid_generator.py b/ThirdParty/Ert/python/python/ecl/ecl/ecl_grid_generator.py index b40e6ca335..16b5016e15 100644 --- a/ThirdParty/Ert/python/python/ecl/ecl/ecl_grid_generator.py +++ b/ThirdParty/Ert/python/python/ecl/ecl/ecl_grid_generator.py @@ -14,45 +14,92 @@ # See the GNU General Public License at # for more details. -import itertools -import numpy +import itertools, numpy +from math import sqrt from ecl.util import IntVector from ecl.ecl import EclGrid, EclKW, EclDataType, EclPrototype +def flatten(l): + return [elem for sublist in l for elem in sublist] + +def divide(l, size): + return [l[i:i+size:] for i in range(0, len(l), size)] + +def duplicate_inner(l): + return [elem for elem in l for i in range(2)][1:-1:] + +def construct_floatKW(name, values): + kw = EclKW(name, len(values), EclDataType.ECL_FLOAT) + for i, value in enumerate(values): + kw[i] = value + return kw + +def pre_mapaxes_translation(translation, mapaxes): + if mapaxes is None: + return translation + + x, y, z = translation + + unit_y = numpy.array((mapaxes[0]-mapaxes[2], mapaxes[1]-mapaxes[3])); + unit_y /= sqrt(numpy.sum(unit_y*unit_y)) + + unit_x = numpy.array((mapaxes[4]-mapaxes[2], mapaxes[5]-mapaxes[3])); + unit_x /= sqrt(numpy.sum(unit_x*unit_x)) + + det = 1.0 / (unit_x[0]*unit_y[1] - unit_x[1] * unit_y[0]); + + return ( + ( x*unit_y[1] - y*unit_y[0]) * det, + (-x*unit_x[1] + y*unit_x[0]) * det, + z + ) + class EclGridGenerator: - _alloc_rectangular = EclPrototype("ecl_grid_obj ecl_grid_alloc_rectangular( int , int , int , double , double , double , int*)" , bind = False) + _alloc_rectangular = EclPrototype("ecl_grid_obj ecl_grid_alloc_rectangular(int, int, int, double, double, double, int*)", bind=False) @classmethod - def createRectangular(cls, dims , dV , actnum = None): + def createRectangular(cls, dims, dV, actnum=None): """ Will create a new rectangular grid. @dims = (nx,ny,nz) @dVg = (dx,dy,dz) With the default value @actnum == None all cells will be active, """ if actnum is None: - ecl_grid = cls._alloc_rectangular( dims[0] , dims[1] , dims[2] , dV[0] , dV[1] , dV[2] , None ) + ecl_grid = cls._alloc_rectangular( + dims[0], dims[1], dims[2], + dV[0], dV[1], dV[2], + None + ) else: - if not isinstance(actnum , IntVector): - tmp = IntVector(initial_size = len(actnum)) - for (index , value) in enumerate(actnum): + if not isinstance(actnum, IntVector): + tmp = IntVector(initial_size=len(actnum)) + for (index, value) in enumerate(actnum): tmp[index] = value actnum = tmp - if not len(actnum) == dims[0] * dims[1] * dims[2]: - raise ValueError("ACTNUM size mismatch: len(ACTNUM):%d Expected:%d" % (len(actnum) , dims[0] * dims[1] * dims[2])) - ecl_grid = cls._alloc_rectangular( dims[0] , dims[1] , dims[2] , dV[0] , dV[1] , dV[2] , actnum.getDataPtr() ) + if not len(actnum) == dims[0]*dims[1]*dims[2]: + raise ValueError( + "ACTNUM size mismatch: len(ACTNUM):%d Expected:%d" + % (len(actnum), dims[0]*dims[1]*dims[2]) + ) + + ecl_grid = cls._alloc_rectangular( + dims[0], dims[1], dims[2], + dV[0], dV[1], dV[2], + actnum.getDataPtr() + ) # If we have not succeeded in creatin the grid we *assume* the # error is due to a failed malloc. if ecl_grid is None: raise MemoryError("Failed to allocated regualar grid") - + return ecl_grid @classmethod - def createSingleCellGrid(cls, corners): + def create_single_cell_grid(cls, corners): """ Provided with the corners of the grid in a similar manner as the eight corners are output for a single cell, this method will create a grid @@ -61,17 +108,21 @@ class EclGridGenerator: zcorn = [corners[i][2] for i in range(8)] - flatten = lambda l : [elem for sublist in l for elem in sublist] coord = [(corners[i], corners[i+4]) for i in range(4)] coord = flatten(flatten(coord)) - def constructFloatKW(name, values): + def construct_floatKW(name, values): kw = EclKW(name, len(values), EclDataType.ECL_FLOAT) for i in range(len(values)): kw[i] = values[i] return kw - grid = EclGrid.create((1,1,1), constructFloatKW("ZCORN", zcorn), constructFloatKW("COORD", coord), None) + grid = EclGrid.create( + (1, 1, 1), + construct_floatKW("ZCORN", zcorn), + construct_floatKW("COORD", coord), + None + ) if not corners == [grid.getCellCorner(i, 0) for i in range(8)]: raise AssertionError("Failed to generate single cell grid. " + @@ -80,7 +131,101 @@ class EclGridGenerator: return grid @classmethod - def createGrid(cls, dims, dV, offset=1, + def create_zcorn(cls, dims, dV, offset=1, escape_origo_shift=(1,1,0), + irregular_offset=False, irregular=False, concave=False, + faults=False): + + cls.__assert_zcorn_parameters(dims, dV, offset, escape_origo_shift, + irregular_offset, irregular, concave, faults) + + nx, ny, nz = dims + dx, dy, dz = dV + + # Compute zcorn + z = escape_origo_shift[2] + zcorn = [z]*(4*nx*ny) + for k in range(nz-1): + z = z+dz + local_offset = offset + (dz/2. if irregular_offset and k%2 == 0 else 0) + + layer = [] + for i in range(ny+1): + shift = ((i if concave else 0) + (k/2 if irregular else 0)) % 2 + path = [z if i%2 == shift else z+local_offset for i in range(nx+1)] + layer.append(duplicate_inner(path)) + + zcorn = zcorn + (2*flatten(duplicate_inner(layer))) + + z = z+dz + zcorn = zcorn + ([z]*(4*nx*ny)) + + if faults: + # Ensure that drop does not align with grid structure + drop = (offset+dz)/2. if abs(offset-dz/2.) > 0.2 else offset + 0.4 + zcorn = cls.__create_faults(nx, ny, nz, zcorn, drop) + + + if z != escape_origo_shift[2] + nz*dz: + raise ValueError("%f != %f" % (z, escape_origo_shift[2] + nz*dz)) + + cls.assert_zcorn(nx, ny, nz, zcorn) + return construct_floatKW("ZCORN", zcorn) + + @classmethod + def create_coord(cls, dims, dV, escape_origo_shift=(1,1,0), + scale=1, translation=(0,0,0), rotate=False, misalign=False): + + nx, ny, nz = dims + dx, dy, dz = dV + + # Compute coord + z = escape_origo_shift[2] + nz*dz + coord = [] + for j, i in itertools.product(range(ny+1), range(nx+1)): + x, y = i*dx+escape_origo_shift[0], j*dy+escape_origo_shift[1] + coord = coord + [x, y, escape_origo_shift[2], x, y, z] + + # Apply transformations + lower_center = ( + nx*dx/2. + escape_origo_shift[0], + ny*dy/2. + escape_origo_shift[1] + ) + + if misalign: + coord = cls.__misalign_coord(coord, dims, dV) + + coord = cls.__scale_coord(coord, scale, lower_center) + + if rotate: + coord = cls.__rotate_coord(coord, lower_center) + + coord = cls.__translate_lower_coord(coord, translation) + + cls.assert_coord(nx, ny, nz, coord) + return construct_floatKW("COORD", coord) + + @classmethod + def __assert_zcorn_parameters(cls, dims, dV, offset, escape_origo_shift, + irregular_offset, irregular, concave, faults): + + nx, ny, nz = dims + dx, dy, dz = dV + + # Validate arguments + if min(dims + dV) <= 0: + raise ValueError("Expected positive grid and cell dimentions") + + if offset < 0: + raise ValueError("Expected non-negative offset") + + if irregular and offset + (dz/2. if irregular_offset else 0) > dz: + raise AssertionError("Arguments can result in self-" + + "intersecting cells. Increase dz, deactivate eiter " + + "irregular or irregular_offset, or decrease offset to avoid " + + "any problems") + + @classmethod + def create_grid(cls, dims, dV, offset=1, escape_origo_shift=(1,1,0), irregular_offset=False, irregular=False, concave=False, faults=False, scale=1, translation=(0,0,0), rotate=False, @@ -132,85 +277,16 @@ class EclGridGenerator: @irregular_offset. """ - nx, ny, nz = dims - dx, dy, dz = dV + zcorn = cls.create_zcorn(dims, dV, offset, escape_origo_shift, + irregular_offset, irregular, concave, faults) - # Validate arguments - if min(dims + dV) <= 0: - raise ValueError("Expected positive grid and cell dimentions") + coord = cls.create_coord(dims, dV, escape_origo_shift, scale, + translation, rotate, misalign) - if offset < 0: - raise ValueError("Expected non-negative offset") - - if irregular and offset + (dz/2. if irregular_offset else 0) > dz: - raise AssertionError("Arguments can result in self-" + - "intersecting cells. Increase dz, deactivate eiter " + - "irregular or irregular_offset, or decrease offset to avoid " + - "any problems") - - verbose = lambda l : [elem for elem in l for i in range(2)][1:-1:] - flatten = lambda l : [elem for sublist in l for elem in sublist] - - # Compute zcorn - z = escape_origo_shift[2] - zcorn = [z]*(4*nx*ny) - for k in range(nz-1): - z = z+dz - local_offset = offset + (dz/2. if irregular_offset and k%2 == 0 else 0) - - layer = [] - for i in range(ny+1): - shift = ((i if concave else 0) + (k/2 if irregular else 0)) % 2 - path = [z if i%2 == shift else z+local_offset for i in range(nx+1)] - layer.append(verbose(path)) - - zcorn = zcorn + (2*flatten(verbose(layer))) - - z = z+dz - zcorn = zcorn + ([z]*(4*nx*ny)) - - if faults: - # Ensure that drop does not align with grid structure - drop = (offset+dz)/2. if abs(offset-dz/2.) > 0.2 else offset + 0.4 - zcorn = cls.__createFaults(nx, ny, nz, zcorn, drop) - - cls.assertZcorn(nx, ny, nz, zcorn) - - # Compute coord - coord = [] - for j, i in itertools.product(range(ny+1), range(nx+1)): - x, y = i*dx+escape_origo_shift[0], j*dy+escape_origo_shift[1] - coord = coord + [x, y, escape_origo_shift[2], x, y, z] - - # Apply transformations - lower_center = ( - nx*dx/2. + escape_origo_shift[0], - ny*dy/2. + escape_origo_shift[1] - ) - - if misalign: - coord = cls.__misalignCoord(coord, dims, dV) - - coord = cls.__scaleCoord(coord, scale, lower_center) - - if rotate: - coord = cls.__rotateCoord(coord, lower_center) - - coord = cls.__translateCoord(coord, translation) - - cls.assertCoord(nx, ny, nz, coord) - - # Construct grid - def constructFloatKW(name, values): - kw = EclKW(name, len(values), EclDataType.ECL_FLOAT) - for i in range(len(values)): - kw[i] = values[i] - return kw - - return EclGrid.create(dims, constructFloatKW("ZCORN", zcorn), constructFloatKW("COORD", coord), None) + return EclGrid.create(dims, zcorn, coord, None) @classmethod - def __createFaults(cls, nx, ny, nz, zcorn, drop): + def __create_faults(cls, nx, ny, nz, zcorn, drop): """ Will create several faults consisting of all cells such that either its i or j index is 1 modulo 3. @@ -236,7 +312,7 @@ class EclGridGenerator: return zcorn @classmethod - def assertZcorn(cls, nx, ny, nz, zcorn): + def assert_zcorn(cls, nx, ny, nz, zcorn, twisted_check=True): """ Raises an AssertionError if the zcorn is not as expected. In @@ -255,14 +331,14 @@ class EclGridGenerator: plane_size = 4*nx*ny for p in range(8*nx*ny*nz - plane_size): - if zcorn[p] > zcorn[p + plane_size]: + if zcorn[p] > zcorn[p + plane_size] and twisted_check: raise AssertionError( "Twisted cell was created. " + "Decrease offset or increase dz to avoid this!" ) @classmethod - def __scaleCoord(cls, coord, scale, lower_center): + def __scale_coord(cls, coord, scale, lower_center): coord = numpy.array([ map(float, coord[i:i+6:]) for i in range(0, len(coord), 6) @@ -274,7 +350,7 @@ class EclGridGenerator: return coord.flatten().tolist() @classmethod - def __misalignCoord(cls, coord, dims, dV): + def __misalign_coord(cls, coord, dims, dV): nx, ny, nz = dims coord = numpy.array([ @@ -282,8 +358,9 @@ class EclGridGenerator: for i in range(0, len(coord), 6) ]) + tf = lambda i, j: 1./2 if abs(i)+abs(j) <= 1 else 0.25 adjustment = numpy.array([ - (0, 0, 0, i*dV[0]/2., j*dV[1]/2., 0) for i, j in itertools.product([-1, 0, 1], repeat=2) + (0, 0, 0, i*tf(i,j)*dV[0], j*tf(i,j)*dV[1], 0) for i, j in itertools.product([-1, 0, 1], repeat=2) ]) for i, c in enumerate(coord): @@ -298,7 +375,7 @@ class EclGridGenerator: return coord.flatten().tolist() @classmethod - def __rotateCoord(cls, coord, lower_center): + def __rotate_coord(cls, coord, lower_center): coord = numpy.array([ map(float, coord[i:i+6:]) for i in range(0, len(coord), 6) @@ -314,7 +391,7 @@ class EclGridGenerator: return coord.flatten().tolist() @classmethod - def __translateCoord(cls, coord, translation): + def __translate_lower_coord(cls, coord, translation): coord = numpy.array([ map(float, coord[i:i+6:]) for i in range(0, len(coord), 6) @@ -325,14 +402,15 @@ class EclGridGenerator: return coord.flatten().tolist() @classmethod - def assertCoord(cls, nx, ny, nz, coord): + def assert_coord(cls, nx, ny, nz, coord, negative_values=False): """ Raises an AssertionError if the coord is not as expected. In - particular, it is verfied that: + particular, it is verified that: - coord has the approperiate length (6*(nx+1)*(ny+1)) and - - that all values are positive. + - that all values are positive unless negative_values are + explicitly allowed. """ @@ -342,10 +420,286 @@ class EclGridGenerator: (6*(nx+1)*(ny+1), len(coord)) ) - if min(coord) < 0: + if not negative_values and min(coord) < 0: raise AssertionError("Negative COORD values was generated. " + "This is likely due to a tranformation. " + "Increasing the escape_origio_shift will most likely " + "fix the problem") + @classmethod + def assert_actnum(cls, nx, ny, nz, actnum): + """ + Raises an AssertionError if the actnum is not as expected. In + particular, it is verified that: + + - actnum has the approperiate length nx*ny*nz and + - that all values are either 0 or 1. + + """ + + if actnum is None: + return + + if len(actnum) != nx*ny*nz: + raise AssertionError( + "Expected the length of ACTNUM to be %d, was %s." + %(nx*ny*nz, len(actnum)) + ) + + if set(actnum)-set([0,1]): + raise AssertionError( + "Expected ACTNUM to consist of 0's and 1's, was %s." + % ", ".join(map(str, set(actnum))) + ) + + @classmethod + def extract_coord(cls, dims, coord, ijk_bounds): + nx, ny, nz = dims + (lx, ux), (ly, uy), (lz, uz) = ijk_bounds + new_nx, new_ny, new_nz = ux-lx+1, uy-ly+1, uz-lz+1 + + cls.assert_coord(nx, ny, nz, coord, negative_values=True) + + # Format COORD + coord = divide(divide(coord, 6), nx+1) + + # Extract new COORD + new_coord = [coord_slice[lx:ux+2:] + for coord_slice in coord[ly:uy+2]] + + # Flatten and verify + new_coord = flatten(flatten(new_coord)) + cls.assert_coord(new_nx, new_ny, new_nz, new_coord, + negative_values=True) + + return construct_floatKW("COORD", new_coord) + + @classmethod + def extract_zcorn(cls, dims, zcorn, ijk_bounds): + nx, ny, nz = dims + (lx, ux), (ly, uy), (lz, uz) = ijk_bounds + new_nx, new_ny, new_nz = ux-lx+1, uy-ly+1, uz-lz+1 + + cls.assert_zcorn(nx, ny, nz, zcorn, twisted_check=False) + + # Format ZCORN + zcorn = divide(divide(zcorn, 2*nx), 2*ny) + + # Extract new ZCORN + new_zcorn = [ + y_slice[2*lx:2*ux+2:] + for z_slice in zcorn[2*lz:2*uz+2:] + for y_slice in z_slice[2*ly:2*uy+2:] + ] + + # Flatten and verify + new_zcorn = flatten(new_zcorn) + cls.assert_zcorn(new_nx, new_ny, new_nz, new_zcorn) + + return construct_floatKW("ZCORN", new_zcorn) + + @classmethod + def extract_actnum(cls, dims, actnum, ijk_bounds): + if actnum is None: + return None + + nx, ny, nz = dims + (lx, ux), (ly, uy), (lz, uz) = ijk_bounds + new_nx, new_ny, new_nz = ux-lx+1, uy-ly+1, uz-lz+1 + + cls.assert_actnum(nx, ny, nz, actnum) + + actnum = divide(divide(actnum, nx), ny) + + new_actnum = [ + y_slice[lx:ux+1:] + for z_slice in actnum[lz:uz+1:] + for y_slice in z_slice[ly:uy+1:] + ] + + new_actnum = flatten(new_actnum) + cls.assert_actnum(new_nx, new_ny, new_nz, new_actnum) + + actnumkw = EclKW("ACTNUM", len(new_actnum), EclDataType.ECL_INT) + for i, value in enumerate(new_actnum): + actnumkw[i] = value + + return actnumkw + + @classmethod + def __translate_coord(cls, coord, translation): + coord = numpy.array([ + map(float, coord[i:i+6:]) + for i in range(0, len(coord), 6) + ]) + translation = numpy.array(list(translation) + list(translation)) + + coord = coord + translation + return construct_floatKW("COORD", coord.flatten().tolist()) + + + @classmethod + def extract_subgrid(cls, grid, ijk_bounds, + decomposition_change=False, translation=None): + + """ + Extracts a subgrid from the given grid according to the specified + bounds. + + @ijk_bounds: The bounds describing the subgrid. Should be a tuple of + length 3, where each element gives the bound for the i, j, k + coordinates of the subgrid to be described, respectively. Each bound + should either be an interval of the form (a, b) where 0 <= a <= b < nx + or a single integer a which is equivialent to the bound (a, a). + + NOTE: The given bounds are including endpoints. + + @decomposition_change: Depending on the given ijk_bounds, libecl might + decompose the cells of the subgrid differently when extracted from + grid. This is somewhat unexpected behaviour and if this event occur we + give an exception together with an description for how to avoid this, + unless decompostion_change is set to True. + + @translation: Gives the possibility of translating the subgrid. Should + be given as a tuple (dx, dy, dz), where each coordinate of the grid + will be moved by di in direction i. + + """ + + gdims = grid.getDims()[:-1:] + nx, ny, nz = gdims + ijk_bounds = cls.assert_ijk_bounds(gdims, ijk_bounds) + + coord = grid.export_coord() + cls.assert_coord(nx, ny, nz, coord, negative_values=True) + + zcorn = grid.export_zcorn() + cls.assert_zcorn(nx, ny, nz, zcorn) + + actnum = grid.export_actnum() + cls.assert_actnum(nx, ny, nz, actnum) + + mapaxes = grid.export_mapaxes() + + sub_data = cls.extract_subgrid_data( + gdims, + coord, zcorn, + ijk_bounds=ijk_bounds, + actnum=actnum, + mapaxes=mapaxes, + decomposition_change=decomposition_change, + translation=translation + ) + + sdim = tuple([b-a+1 for a,b in ijk_bounds]) + sub_coord, sub_zcorn, sub_actnum = sub_data + + return EclGrid.create(sdim, sub_zcorn, sub_coord, sub_actnum, mapaxes=mapaxes) + + @classmethod + def extract_subgrid_data(cls, dims, coord, zcorn, ijk_bounds, actnum=None, + mapaxes=None, decomposition_change=False, translation=None): + """ + + Extracts subgrid data from COORD, ZCORN and potentially ACTNUM. It + returns similar formatted data for the subgrid described by the bounds. + + @dims: The dimentions (nx, ny, nz) of the grid + + @coord: The COORD data of the grid. + + @zcorn: The ZCORN data of the grid. + + @ijk_bounds: The bounds describing the subgrid. Should be a tuple of + length 3, where each element gives the bound for the i, j, k + coordinates of the subgrid to be described, respectively. Each bound + should either be an interval of the form (a, b) where 0 <= a <= b < nx + or a single integer a which is equivialent to the bound (a, a). + + NOTE: The given bounds are including endpoints. + + @actnum: The ACTNUM data of the grid. + + @mapaxes The MAPAXES data of the grid. + + @decomposition_change: Depending on the given ijk_bounds, libecl might + decompose the cells of the subgrid differently when extracted from + grid. This is somewhat unexpected behaviour and if this event occur we + give an exception together with an description for how to avoid this, + unless decompostion_change is set to True. + + @translation: Gives the possibility of translating the subgrid. Should + be given as a tuple (dx, dy, dz), where each coordinate of the grid + will be moved by di in direction i. + + """ + coord, zcorn = list(coord), list(zcorn) + actnum = None if actnum is None else list(actnum) + + ijk_bounds = cls.assert_ijk_bounds(dims, ijk_bounds) + cls.assert_decomposition_change(ijk_bounds, decomposition_change) + + nx, ny, nz = dims + (lx, ux), (ly, uy), (lz, uz) = ijk_bounds + new_nx, new_ny, new_nz = ux-lx+1, uy-ly+1, uz-lz+1 + + new_coord = cls.extract_coord(dims, coord, ijk_bounds) + new_zcorn = cls.extract_zcorn(dims, zcorn, ijk_bounds) + new_actnum = cls.extract_actnum(dims, actnum, ijk_bounds) + + if translation is not None: + mtranslation = pre_mapaxes_translation(translation, mapaxes) + new_coord = cls.__translate_coord(new_coord, mtranslation) + + for i in range(len(new_zcorn)): + new_zcorn[i] += translation[2] + + return new_coord, new_zcorn, new_actnum + + @classmethod + def assert_ijk_bounds(cls, dims, ijk_bounds): + ijk_bounds = list(ijk_bounds) + + for i in range(len(ijk_bounds)): + if isinstance(ijk_bounds[i], int): + ijk_bounds[i] = [ijk_bounds[i]] + if len(ijk_bounds[i]) == 1: + ijk_bounds[i] += ijk_bounds[i] + + if len(ijk_bounds) != 3: + raise ValueError( + "Expected ijk_bounds to contain three intervals, " + + "contained only %d" % len(ijk_bounds)) + + for n, bound in zip(dims, ijk_bounds): + if len(bound) != 2: + raise ValueError( + "Expected bound to consist of two elements, was %s", + str(bound)) + + if not (isinstance(bound[0], int) and isinstance(bound[1], int)): + raise TypeError( + "Expected bound to consist of two integers, ", + "was %s (%s)" + %(str(bound), str((map(type,bound)))) + ) + + if not (0 <= bound[0] <= bound[1] < n): + raise ValueError( + "Expected bounds to have the following format: " + + "0 <= lower bound <= upper_bound < ni, "+ + "was %d <=? %d <=? %d +# for more details. + +from os.path import isfile from cwrap import BaseCClass from ecl.ecl import EclGrid from ecl.ecl.ecl_file import EclFile @@ -82,9 +99,14 @@ class WellInfo(BaseCClass): """ return self._has_well( item ) + def _assert_file_exists(self, rst_file): + if not isfile(rst_file): + raise IOError('No such file %s' % rst_file) + def addWellFile(self, rst_file, load_segment_information): """ @type rstfile: str or EclFile """ if isinstance(rst_file, str): + self._assert_file_exists(rst_file) self._load_rstfile(rst_file, load_segment_information) elif isinstance(rst_file, EclFile): self._load_rst_eclfile(rst_file, load_segment_information) diff --git a/ThirdParty/Ert/python/python/legacy/ert/CMakeLists.txt b/ThirdParty/Ert/python/python/legacy/ert/CMakeLists.txt new file mode 100644 index 0000000000..dc308b5229 --- /dev/null +++ b/ThirdParty/Ert/python/python/legacy/ert/CMakeLists.txt @@ -0,0 +1,11 @@ +set(PYTHON_SOURCES + __init__.py + ecl/__init__.py + ecl/faults/__init__.py + geo/__init__.py + well/__init__.py + util/__init__.py + test/__init__.py +) +add_python_package("python.ert" ${PYTHON_INSTALL_PREFIX}/ert "${PYTHON_SOURCES}" True) + diff --git a/ThirdParty/Ert/python/python/legacy/ert/__init__.py b/ThirdParty/Ert/python/python/legacy/ert/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ThirdParty/Ert/python/python/legacy/ert/ecl/__init__.py b/ThirdParty/Ert/python/python/legacy/ert/ecl/__init__.py new file mode 100644 index 0000000000..bdc9ad8458 --- /dev/null +++ b/ThirdParty/Ert/python/python/legacy/ert/ecl/__init__.py @@ -0,0 +1,26 @@ +from ecl.ecl import EclFileEnum, EclFileFlagEnum, EclPhaseEnum, EclUnitTypeEnum , EclUtil +from ecl.ecl import EclTypeEnum, EclDataType +from ecl.ecl import EclSumVarType +from ecl.ecl import EclSumTStep +from ecl.ecl import EclSum #, EclSumVector, EclSumNode, EclSMSPECNode +from ecl.ecl import EclSumKeyWordVector +from ecl.ecl import EclPLTCell, EclRFTCell +from ecl.ecl import EclRFT, EclRFTFile +from ecl.ecl import FortIO, openFortIO +from ecl.ecl import EclKW +from ecl.ecl import Ecl3DKW +from ecl.ecl import EclFileView +from ecl.ecl import EclFile , openEclFile +from ecl.ecl import Ecl3DFile +from ecl.ecl import EclInitFile +from ecl.ecl import EclRestartFile +from ecl.ecl import EclGrid +from ecl.ecl import EclRegion +from ecl.ecl import EclSubsidence +from ecl.ecl import phase_deltag, deltag +from ecl.ecl import EclGrav +from ecl.ecl import EclSumNode +from ecl.ecl import EclSumVector +from ecl.ecl import EclNPV , NPVPriceVector +from ecl.ecl import EclCmp +from ecl.ecl import EclGridGenerator diff --git a/ThirdParty/Ert/python/python/legacy/ert/ecl/faults/__init__.py b/ThirdParty/Ert/python/python/legacy/ert/ecl/faults/__init__.py new file mode 100644 index 0000000000..2d336c1fd6 --- /dev/null +++ b/ThirdParty/Ert/python/python/legacy/ert/ecl/faults/__init__.py @@ -0,0 +1,7 @@ +from ecl.ecl.faults import Layer +from ecl.ecl.faults import FaultCollection +from ecl.ecl.faults import Fault +from ecl.ecl.faults import FaultLine +from ecl.ecl.faults import FaultSegment , SegmentMap +from ecl.ecl.faults import FaultBlock , FaultBlockCell +from ecl.ecl.faults import FaultBlockLayer diff --git a/ThirdParty/Ert/python/python/legacy/ert/geo/__init__.py b/ThirdParty/Ert/python/python/legacy/ert/geo/__init__.py new file mode 100644 index 0000000000..67f4193aa3 --- /dev/null +++ b/ThirdParty/Ert/python/python/legacy/ert/geo/__init__.py @@ -0,0 +1,8 @@ +from ecl.geo import GeoPointset +from ecl.geo import GeoRegion +from ecl.geo import CPolyline +from ecl.geo import CPolylineCollection +from ecl.geo import Polyline +from ecl.geo import XYZIo +from ecl.geo import GeometryTools +from ecl.geo import Surface diff --git a/ThirdParty/Ert/python/python/legacy/ert/test/__init__.py b/ThirdParty/Ert/python/python/legacy/ert/test/__init__.py new file mode 100644 index 0000000000..912a43a595 --- /dev/null +++ b/ThirdParty/Ert/python/python/legacy/ert/test/__init__.py @@ -0,0 +1,10 @@ +from ecl.test import TestRun +from ecl.test import path_exists +from ecl.test import ExtendedTestCase +from ecl.test import SourceEnumerator +from ecl.test import TestArea , TestAreaContext +from ecl.test import TempArea , TempAreaContext +from ecl.test import ErtTestRunner +from ecl.test import PathContext +from ecl.test import LintTestCase +from ecl.test import ImportTestCase diff --git a/ThirdParty/Ert/python/python/legacy/ert/util/__init__.py b/ThirdParty/Ert/python/python/legacy/ert/util/__init__.py new file mode 100644 index 0000000000..eeb36b19f3 --- /dev/null +++ b/ThirdParty/Ert/python/python/legacy/ert/util/__init__.py @@ -0,0 +1,25 @@ +from ecl.util import Version +from ecl.util import RngAlgTypeEnum, RngInitModeEnum, LLSQResultEnum +from ecl.util import CTime +from ecl.util import PermutationVector +from ecl.util import VectorTemplate +from ecl.util import DoubleVector +from ecl.util import IntVector +from ecl.util import BoolVector +from ecl.util import TimeVector +from ecl.util import StringList +from ecl.util import RandomNumberGenerator +from ecl.util import Matrix +from ecl.util import quantile, quantile_sorted, polyfit +from ecl.util import Log +from ecl.util import LookupTable +from ecl.util import Buffer +from ecl.util import Hash, StringHash, DoubleHash, IntegerHash +from ecl.util import SubstitutionList +from ecl.util import UIReturn +from ecl.util import ThreadPool +from ecl.util import CThreadPool, startCThreadPool +from ecl.util import installAbortSignals, updateAbortSignals +from ecl.util import Profiler +from ecl.util import ArgPack +from ecl.util import PathFormat diff --git a/ThirdParty/Ert/python/python/legacy/ert/well/__init__.py b/ThirdParty/Ert/python/python/legacy/ert/well/__init__.py new file mode 100644 index 0000000000..5a699e5689 --- /dev/null +++ b/ThirdParty/Ert/python/python/legacy/ert/well/__init__.py @@ -0,0 +1,7 @@ +from ecl.well import WellTypeEnum +from ecl.well import WellConnectionDirectionEnum +from ecl.well import WellConnection +from ecl.well import WellSegment +from ecl.well import WellState +from ecl.well import WellTimeLine +from ecl.well import WellInfo diff --git a/ThirdParty/Ert/python/tests/CMakeLists.txt b/ThirdParty/Ert/python/tests/CMakeLists.txt index 985fe07610..a343151dff 100644 --- a/ThirdParty/Ert/python/tests/CMakeLists.txt +++ b/ThirdParty/Ert/python/tests/CMakeLists.txt @@ -12,5 +12,9 @@ add_subdirectory(well) add_subdirectory(cwrap) add_subdirectory(global) +if (INSTALL_ERT_LEGACY) + add_subdirectory(legacy) +endif() +configure_file( test_install.in ${EXECUTABLE_OUTPUT_PATH}/test_install @ONLY ) diff --git a/ThirdParty/Ert/python/tests/cwrap/test_basecvalue.py b/ThirdParty/Ert/python/tests/cwrap/test_basecvalue.py index 6f2bb647d6..4066333221 100644 --- a/ThirdParty/Ert/python/tests/cwrap/test_basecvalue.py +++ b/ThirdParty/Ert/python/tests/cwrap/test_basecvalue.py @@ -4,7 +4,7 @@ from cwrap import BaseCValue, Prototype from ecl.test import ExtendedTestCase class TestPrototype(Prototype): - lib = ecl.load("libert_util") + lib = ecl.load("libecl") def __init__(self, prototype): super(TestPrototype, self).__init__(self.lib, prototype) diff --git a/ThirdParty/Ert/python/tests/cwrap/test_cfile.py b/ThirdParty/Ert/python/tests/cwrap/test_cfile.py index 3fb5093a55..1df29bfe8c 100644 --- a/ThirdParty/Ert/python/tests/cwrap/test_cfile.py +++ b/ThirdParty/Ert/python/tests/cwrap/test_cfile.py @@ -6,7 +6,7 @@ from ecl.test.test_area import TestAreaContext # Local copies so that the real ones don't get changed class TestUtilPrototype(Prototype): - lib = ecl.load("libert_util") + lib = ecl.load("libecl") def __init__(self, prototype, bind=False): super(TestUtilPrototype, self).__init__(TestUtilPrototype.lib, prototype, bind=bind) diff --git a/ThirdParty/Ert/python/tests/cwrap/test_metawrap.py b/ThirdParty/Ert/python/tests/cwrap/test_metawrap.py index 2f9c5c2b90..e82db53d6d 100644 --- a/ThirdParty/Ert/python/tests/cwrap/test_metawrap.py +++ b/ThirdParty/Ert/python/tests/cwrap/test_metawrap.py @@ -9,7 +9,7 @@ from ecl.test import ExtendedTestCase # Local copies so that the real ones don't get changed class TestUtilPrototype(Prototype): - lib = ecl.load("libert_util") + lib = ecl.load("libecl") def __init__(self, prototype, bind=False): super(TestUtilPrototype, self).__init__(TestUtilPrototype.lib, prototype, bind=bind) @@ -113,7 +113,6 @@ class MetaWrapTest(ExtendedTestCase): def stringObj(c_ptr): char_ptr = ctypes.c_char_p(c_ptr) python_string = char_ptr.value - TestUtilPrototype.lib.free(c_ptr) return python_string.decode('ascii') Prototype.registerType("string_obj", stringObj) diff --git a/ThirdParty/Ert/python/tests/ecl/CMakeLists.txt b/ThirdParty/Ert/python/tests/ecl/CMakeLists.txt index 85a308d90e..07099c738f 100644 --- a/ThirdParty/Ert/python/tests/ecl/CMakeLists.txt +++ b/ThirdParty/Ert/python/tests/ecl/CMakeLists.txt @@ -19,6 +19,7 @@ set(TEST_SOURCES test_grdecl.py test_grid.py test_grid_statoil.py + test_grid_generator.py test_indexed_read.py test_ecl_kw_statoil.py test_ecl_kw.py @@ -40,11 +41,14 @@ set(TEST_SOURCES test_geertsma.py test_ecl_type.py test_restart_head.py + test_fk_user_data.py ) add_python_package("python.tests.ecl" ${PYTHON_INSTALL_PREFIX}/tests/ecl "${TEST_SOURCES}" False) +addPythonTest(tests.ecl.test_fk_user_data.FKTest) addPythonTest(tests.ecl.test_grid.GridTest ) +addPythonTest(tests.ecl.test_grid_generator.GridGeneratorTest ) addPythonTest(tests.ecl.test_ecl_kw.KWTest) addPythonTest(tests.ecl.test_kw_function.KWFunctionTest) addPythonTest(tests.ecl.test_ecl_3dkw.Ecl3DKWTest ) diff --git a/ThirdParty/Ert/python/tests/ecl/test_ecl_file.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_file.py index 66a70196eb..5a56e14520 100644 --- a/ThirdParty/Ert/python/tests/ecl/test_ecl_file.py +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_file.py @@ -79,7 +79,37 @@ class EclFileTest(ExtendedTestCase): self.assertTrue( ecl_file.has_kw("KW2")) self.assertEqual(ecl_file[1], ecl_file[-1]) + def test_save_kw(self): + with TestAreaContext("python/ecl_file/save_kw"): + data = range(1000) + kw = EclKW("MY_KEY", len(data), EclDataType.ECL_INT) + for index, val in enumerate(data): + kw[index] = val + clean_dump = "my_clean_file" + fortio = FortIO(clean_dump, FortIO.WRITE_MODE) + kw.fwrite(fortio) + fortio.close() + + test_file = "my_dump_file" + fortio = FortIO(test_file, FortIO.WRITE_MODE) + kw.fwrite(fortio) + fortio.close() + + self.assertFilesAreEqual(clean_dump, test_file) + + ecl_file = EclFile(test_file, flags=EclFileFlagEnum.ECL_FILE_WRITABLE) + loaded_kw = ecl_file["MY_KEY"][0] + self.assertTrue(kw.equal(loaded_kw)) + + ecl_file.save_kw(loaded_kw) + ecl_file.close() + + self.assertFilesAreEqual(clean_dump, test_file) + + ecl_file = EclFile(test_file) + loaded_kw = ecl_file["MY_KEY"][0] + self.assertTrue(kw.equal(loaded_kw)) def test_gc(self): kw1 = EclKW("KW1" , 100 , EclDataType.ECL_INT) diff --git a/ThirdParty/Ert/python/tests/ecl/test_ecl_util.py b/ThirdParty/Ert/python/tests/ecl/test_ecl_util.py index 0704b17cf1..497f52769c 100644 --- a/ThirdParty/Ert/python/tests/ecl/test_ecl_util.py +++ b/ThirdParty/Ert/python/tests/ecl/test_ecl_util.py @@ -21,12 +21,12 @@ from ecl.test import ExtendedTestCase class EclUtilTest(ExtendedTestCase): def test_enums(self): - source_file_path = "libecl/include/ert/ecl/ecl_util.h" + source_file_path = "lib/include/ert/ecl/ecl_util.h" self.assertEnumIsFullyDefined(EclFileEnum, "ecl_file_enum", source_file_path) self.assertEnumIsFullyDefined(EclPhaseEnum, "ecl_phase_enum", source_file_path) self.assertEnumIsFullyDefined(EclUnitTypeEnum, "ert_ecl_unit_enum", source_file_path) - source_file_path = "libecl/include/ert/ecl/ecl_type.h" + source_file_path = "lib/include/ert/ecl/ecl_type.h" self.assertEnumIsFullyDefined(EclTypeEnum, "ecl_type_enum", source_file_path) def test_file_type(self): diff --git a/ThirdParty/Ert/python/tests/ecl/test_fk_user_data.py b/ThirdParty/Ert/python/tests/ecl/test_fk_user_data.py new file mode 100644 index 0000000000..b3d48befea --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_fk_user_data.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python +# Copyright (C) 2017 Statoil ASA, Norway. +# +# The file 'test_ecl_cell_containment.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# ERT is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. +# +# See the GNU General Public License at +# for more details. + +from ecl.ecl import EclGrid +from ecl.test import ExtendedTestCase, TestAreaContext + +class FKTest(ExtendedTestCase): + + def test_cell_containment(self): + + grid_location = "local/ECLIPSE/faarikaal/faarikaal%d.EGRID" + well_location = "local/ECLIPSE/faarikaal/faarikaal%d.txt" + + for i in range(1, 8): + grid_file = self.createTestPath(grid_location % i) + well_file = self.createTestPath(well_location % i) + + grid = EclGrid(grid_file) + + # Load well data + with open(well_file, "r") as f: + lines = [line.split() for line in f.readlines()] + + points = [map(float, line[:3:]) for line in lines] + exp_cells = [tuple(map(int, line[3::])) for line in lines] + + msg = "Expected point %s to be in cell %s, was in %s." + for point, exp_cell in zip(points, exp_cells): + reported_cell = grid.find_cell(*point) + self.assertEqual( + exp_cell, + reported_cell, + msg % (str(point), str(exp_cell), str(reported_cell)) + ) diff --git a/ThirdParty/Ert/python/tests/ecl/test_grid.py b/ThirdParty/Ert/python/tests/ecl/test_grid.py index 08dded9868..624f0ac890 100644 --- a/ThirdParty/Ert/python/tests/ecl/test_grid.py +++ b/ThirdParty/Ert/python/tests/ecl/test_grid.py @@ -49,21 +49,21 @@ CORNER_HOME = { def createVolumeTestGridBase(dim, dV, offset=1): return [ - GridGen.createGrid(dim, dV, offset=0), - GridGen.createGrid(dim, dV, offset=offset), - GridGen.createGrid(dim, dV, offset=offset, irregular_offset=True), - GridGen.createGrid(dim, dV, offset=offset, concave=True), - GridGen.createGrid(dim, dV, offset=offset, irregular=True), - GridGen.createGrid(dim, dV, offset=offset, concave=True, irregular=True), - GridGen.createGrid(dim, dV, offset=offset, irregular_offset=True, concave=True), - GridGen.createGrid(dim, dV, offset=0, faults=True), - GridGen.createGrid(dim, dV, offset=offset, faults=True), - GridGen.createGrid(dim, dV, escape_origo_shift=(100, 100, 0), scale=2), - GridGen.createGrid(dim, dV, escape_origo_shift=(100, 100, 0), scale=0.5), - GridGen.createGrid(dim, dV, escape_origo_shift=(100, 100, 0), translation=(50,50,0)), - GridGen.createGrid(dim, dV, escape_origo_shift=(100, 100, 0), rotate=True), - GridGen.createGrid(dim, dV, escape_origo_shift=(100, 100, 0), misalign=True), - GridGen.createGrid(dim, dV, offset=offset, escape_origo_shift=(100, 100, 0), + GridGen.create_grid(dim, dV, offset=0), + GridGen.create_grid(dim, dV, offset=offset), + GridGen.create_grid(dim, dV, offset=offset, irregular_offset=True), + GridGen.create_grid(dim, dV, offset=offset, concave=True), + GridGen.create_grid(dim, dV, offset=offset, irregular=True), + GridGen.create_grid(dim, dV, offset=offset, concave=True, irregular=True), + GridGen.create_grid(dim, dV, offset=offset, irregular_offset=True, concave=True), + GridGen.create_grid(dim, dV, offset=0, faults=True), + GridGen.create_grid(dim, dV, offset=offset, faults=True), + GridGen.create_grid(dim, dV, escape_origo_shift=(100, 100, 0), scale=2), + GridGen.create_grid(dim, dV, escape_origo_shift=(100, 100, 0), scale=0.5), + GridGen.create_grid(dim, dV, escape_origo_shift=(100, 100, 0), translation=(50,50,0)), + GridGen.create_grid(dim, dV, escape_origo_shift=(100, 100, 0), rotate=True), + GridGen.create_grid(dim, dV, escape_origo_shift=(100, 100, 0), misalign=True), + GridGen.create_grid(dim, dV, offset=offset, escape_origo_shift=(100, 100, 0), irregular_offset=True, concave=True, irregular=True, scale=1.5, translation=(5,5,0), rotate=True, misalign=True) @@ -71,11 +71,11 @@ def createVolumeTestGridBase(dim, dV, offset=1): def createContainmentTestBase(): return [ - (3, GridGen.createGrid((6,6,6), (1,1,1), offset=1)), - (10, GridGen.createGrid((3,3,3), (1,1,1), offset=1, concave=True)), - (4, GridGen.createGrid((10,10,1), (1,1,1), offset=0., misalign=True)), + (3, GridGen.create_grid((6,6,6), (1,1,1), offset=1)), + (10, GridGen.create_grid((3,3,3), (1,1,1), offset=1, concave=True)), + (4, GridGen.create_grid((10,10,1), (1,1,1), offset=0., misalign=True)), (3, - GridGen.createGrid((6,6,6), (1,1,1), offset=0., + GridGen.create_grid((6,6,6), (1,1,1), offset=0., escape_origo_shift=(100, 100, 0), irregular_offset=True, concave=True, irregular=True, scale=1.5, translation=(5,5,0), @@ -110,7 +110,7 @@ def createWrapperGrid(grid): for i, pos in enumerate(corner_pos) ] - return GridGen.createSingleCellGrid(corners) + return GridGen.create_single_cell_grid(corners) def average(points): p = reduce(lambda a,b: (a[0]+b[0], a[1]+b[1], a[2]+b[2]), points) @@ -334,6 +334,15 @@ class GridTest(ExtendedTestCase): self.assertEqual( len(grid) , nx*ny*nz ) self.assertEqual( grid.getNumActive( ) , 4 ) + def test_export(self): + dims = (3, 3, 3) + coord = GridGen.create_coord(dims, (1,1,1)) + zcorn = GridGen.create_zcorn(dims, (1,1,1), offset=0) + + grid = EclGrid.create(dims, zcorn, coord, None) + + self.assertEqual(zcorn, grid.export_zcorn()) + self.assertEqual(coord, grid.export_coord()) def test_output_units(self): n = 10 @@ -389,11 +398,13 @@ class GridTest(ExtendedTestCase): for i in range(grid.getGlobalSize()) ].count(True) - self.assertTrue(hits in [0, 1]) + self.assertIn(hits, [0, 1]) + expected = 1 if wgrid.cell_contains(x, y, z, 0) else 0 self.assertEqual( - 1 if wgrid.cell_contains(x, y, z, 0) else 0, - hits + expected, + hits, + 'Expected %d for (%g,%g,%g), got %d' % (expected, x, y, z, hits) ) def test_cell_corner_containment(self): @@ -445,7 +456,7 @@ class GridTest(ExtendedTestCase): (20, 20, 20) ] - grid = GridGen.createSingleCellGrid(points) + grid = GridGen.create_single_cell_grid(points) assertPoint = lambda p : self.assertTrue( grid.cell_contains(p[0], p[1], p[2], 0) @@ -505,7 +516,7 @@ class GridTest(ExtendedTestCase): (25, 25, 25) ] - grid = GridGen.createSingleCellGrid(points) + grid = GridGen.create_single_cell_grid(points) assertPoint = lambda p : self.assertTrue( grid.cell_contains(p[0], p[1], p[2], 0) diff --git a/ThirdParty/Ert/python/tests/ecl/test_grid_generator.py b/ThirdParty/Ert/python/tests/ecl/test_grid_generator.py new file mode 100644 index 0000000000..ff2d8f087d --- /dev/null +++ b/ThirdParty/Ert/python/tests/ecl/test_grid_generator.py @@ -0,0 +1,272 @@ +#!/usr/bin/env python +# Copyright (C) 2017 Statoil ASA, Norway. +# +# The file 'test_grid_generator.py' is part of ERT - Ensemble based Reservoir Tool. +# +# ERT is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# ERT is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. +# +# See the GNU General Public License at +# for more details. + +from itertools import product as prod +import operator, random, numpy + +from ecl.ecl import EclGrid, EclKW, EclDataType +from ecl.ecl import EclGridGenerator as GridGen +from ecl.test import ExtendedTestCase, TestAreaContext + + +def generate_ijk_bounds(dims): + ibounds = [(l, u) for l in range(dims[0]) for u in range(l, dims[0])] + jbounds = [(l, u) for l in range(dims[1]) for u in range(l, dims[1])] + kbounds = [(l, u) for l in range(dims[2]) for u in range(l, dims[2])] + return prod(ibounds, jbounds, kbounds) + +def decomposition_preserving(ijk_bound): + return sum(zip(*ijk_bound)[0])%2 is 0 + +class GridGeneratorTest(ExtendedTestCase): + + def setUp(self): + self.test_base = [ + ( + list(GridGen.create_coord((4,4,4), (1,1,1))), + list(GridGen.create_zcorn((4,4,4), (1,1,1), offset=0)), + GridGen.create_grid((4,4,4), (1,1,1), offset=0) + ), + ( + list( + GridGen.create_coord((5,5,5), (1,1,1), + translation=(10,10,0)) + ), + list( + GridGen.create_zcorn((5,5,5), (1,1,1), offset=0.5, + irregular_offset=True, concave=True, irregular=True) + ), + GridGen.create_grid( + (5,5,5), (1,1,1), offset=0.5, + irregular=True, irregular_offset=True, concave=True, + translation=(10,10,0) + ) + ) + ] + + def test_extract_grid_decomposition_change(self): + dims = (4,4,4) + zcorn = list(GridGen.create_zcorn(dims, (1,1,1), offset=0)) + coord = list(GridGen.create_coord(dims, (1,1,1))) + + ijk_bounds = generate_ijk_bounds(dims) + for ijk_bounds in ijk_bounds: + if decomposition_preserving(ijk_bounds): + GridGen.extract_subgrid_data(dims, coord, zcorn, ijk_bounds) + else: + with self.assertRaises(ValueError): + GridGen.extract_subgrid_data(dims, coord, zcorn, ijk_bounds) + + GridGen.extract_subgrid_data(dims, + coord, zcorn, + ijk_bounds, + decomposition_change=True) + + def test_extract_grid_invalid_bounds(self): + dims = (3,3,3) + zcorn = list(GridGen.create_zcorn(dims, (1,1,1), offset=0)) + coord = list(GridGen.create_coord(dims, (1,1,1))) + + with self.assertRaises(ValueError): + GridGen.extract_subgrid_data(dims, coord, zcorn, ((-1,0), (2,2), (2,2))) + + with self.assertRaises(ValueError): + GridGen.extract_subgrid_data(dims, coord, zcorn, ((1,6), (2,2), (2,2))) + + with self.assertRaises(ValueError): + GridGen.extract_subgrid_data(dims, coord, zcorn, ((1,2), (2,0), (2,2))) + + def test_extract_grid_slice_spec(self): + dims = (4,4,4) + zcorn = list(GridGen.create_zcorn(dims, (1,1,1), offset=0)) + coord = list(GridGen.create_coord(dims, (1,1,1))) + + ijk_bounds = generate_ijk_bounds(dims) + for ijk in ijk_bounds: + ijk = list(ijk) + for i in range(3): + if len(set(ijk[i])) == 1: + ijk[i] = ijk[i][0] + + GridGen.extract_subgrid_data(dims, + coord, zcorn, + ijk, + decomposition_change=True) + + def assertSubgrid(self, grid, subgrid, ijk_bound): + sijk_space = prod(*[range(d) for d in subgrid.getDims()[:-1:]]) + for sijk in sijk_space: + gijk = tuple([a+b for a, b in zip(sijk, zip(*ijk_bound)[0])]) + + self.assertEqual( + [subgrid.getCellCorner(i, ijk=sijk) for i in range(8)], + [grid.getCellCorner(i, ijk=gijk) for i in range(8)] + ) + + self.assertEqual(grid.active(ijk=gijk), subgrid.active(ijk=sijk)) + + def test_validate_cells(self): + for coord, zcorn, grid in self.test_base: + grid_dims = grid.getDims()[:-1:] + ijk_bounds = generate_ijk_bounds(grid_dims) + for ijk_bound in ijk_bounds: + if not decomposition_preserving(ijk_bound): + continue + + sub_dims = tuple([u-l+1 for l, u in ijk_bound]) + sub_coord, sub_zcorn, _ = GridGen.extract_subgrid_data( + grid_dims, + coord, + zcorn, + ijk_bound + ) + + subgrid = EclGrid.create(sub_dims, sub_zcorn, sub_coord, None) + self.assertEqual(sub_dims, subgrid.getDims()[:-1:]) + self.assertSubgrid(grid, subgrid, ijk_bound) + + def test_actnum_extraction(self): + dims = (4,4,4) + + coord = GridGen.create_coord(dims, (1,1,1)) + zcorn = GridGen.create_zcorn(dims, (1,1,1), offset=0) + + actnum = EclKW("ACTNUM", reduce(operator.mul, dims), EclDataType.ECL_INT) + random.seed(1337) + for i in range(len(actnum)): + actnum[i] = random.randint(0, 1) + + grid = EclGrid.create(dims, zcorn, coord, actnum) + + ijk_bounds = generate_ijk_bounds(dims) + for ijk_bound in ijk_bounds: + if not decomposition_preserving(ijk_bound): + continue + + sub = GridGen.extract_subgrid_data( + dims, + coord, + zcorn, + ijk_bound, + actnum=actnum + ) + + sub_coord, sub_zcorn, sub_actnum = sub + sub_dims = tuple([u-l+1 for l, u in ijk_bound]) + subgrid = EclGrid.create(sub_dims, sub_zcorn, sub_coord, sub_actnum) + self.assertEqual(sub_dims, subgrid.getDims()[:-1:]) + self.assertSubgrid(grid, subgrid, ijk_bound) + + def test_translation(self): + dims = (3,3,3) + + coord = GridGen.create_coord(dims, (1,1,1)) + zcorn = GridGen.create_zcorn(dims, (1,1,1), offset=0) + grid = EclGrid.create(dims, zcorn, coord, None) + + ijk_bound = [(0, d-1) for d in dims] + translation = (1, 2, 3) + sub_coord, sub_zcorn, _ = GridGen.extract_subgrid_data( + dims, + coord, + zcorn, + ijk_bound, + translation=translation + ) + + tgrid = EclGrid.create(dims, sub_zcorn, sub_coord, None) + self.assertEqual(grid.getGlobalSize(), tgrid.getGlobalSize()) + + for gi in range(grid.getGlobalSize()): + translation = numpy.array(translation) + corners = [grid.getCellCorner(i, gi) for i in range(8)] + corners = [tuple(numpy.array(c)+translation) for c in corners] + + tcorners = [tgrid.getCellCorner(i, gi) for i in range(8)] + + self.assertEqual(corners, tcorners) + + def test_subgrid_extration(self): + for _, _, grid in self.test_base[:-1:]: + grid_dims = grid.getDims()[:-1:] + ijk_bounds = generate_ijk_bounds(grid_dims) + for ijk_bound in ijk_bounds: + if not decomposition_preserving(ijk_bound): + continue + + sub_dims = tuple([u-l+1 for l, u in ijk_bound]) + subgrid = GridGen.extract_subgrid(grid, ijk_bound) + + self.assertEqual(sub_dims, subgrid.getDims()[:-1:]) + self.assertSubgrid(grid, subgrid, ijk_bound) + + def test_subgrid_translation(self): + grid = GridGen.create_grid((4,4,4), (1,1,1), offset=0.5, + irregular=True, irregular_offset=True, concave=True, + translation=(10,10,0)) + + # Create grid with MAPAXES + mapaxes = EclKW("MAPAXES", 6, EclDataType.ECL_FLOAT) + for i, val in enumerate([1200, 1400, 2500, 2500, 3700, 4000]): + mapaxes[i] = val + + grid = EclGrid.create( + grid.getDims(), + grid.export_zcorn(), + grid.export_coord(), + None, + mapaxes=mapaxes + ) + + for translation in [ + (0,0,0), + (10, 10, 100), + (-1, -1, -1) + ]: + subgrid = GridGen.extract_subgrid( + grid, + ((0,3), (0,3), (0,3)), + translation=translation + ) + + self.assertEqual(grid.getDims(), subgrid.getDims()) + + translation = numpy.array(translation) + for gindex in range(grid.getGlobalSize()): + grid_corners = [ + grid.getCellCorner(i, global_index=gindex) + for i in range(8) + ] + + subgrid_corners = [ + subgrid.getCellCorner(i, global_index=gindex) + for i in range(8) + ] + + subgrid_corners = [ + list(numpy.array(corner) - translation) + for corner in subgrid_corners + ] + + for gc, sc in zip(grid_corners, subgrid_corners): + self.assertAlmostEqualList( + gc, + sc, + msg="Failed to translate corners correctly." + + "Expected %s, was %s." % (gc, sc), + tolerance=10e-10 + ) diff --git a/ThirdParty/Ert/python/tests/ecl/test_grid_statoil.py b/ThirdParty/Ert/python/tests/ecl/test_grid_statoil.py index db64e14680..89129deadc 100644 --- a/ThirdParty/Ert/python/tests/ecl/test_grid_statoil.py +++ b/ThirdParty/Ert/python/tests/ecl/test_grid_statoil.py @@ -387,3 +387,22 @@ class GridTest(ExtendedTestCase): grdecl_file = self.createTestPath("Statoil/ECLIPSE/1.6.0_issueGrdecl/test_aug2016_gridOnly.grdecl") grid = EclGrid.loadFromGrdecl( grdecl_file ) + + def test_lgr_get(self): + grid = EclGrid(self.createTestPath("Statoil/ECLIPSE/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3.EGRID")) + for (nr,name) in [ ( 104 , "LG003017"), + (2 , "LG006024"), + ( 4 , "LG005025"), + ( 82 , "LG011029"), + (100 , "LG007021"), + (110 , "LG003014")]: + lgr_name = grid.get_lgr( name ) + lgr_nr = grid.get_lgr( nr ) + + self.assertEqual( lgr_name , lgr_nr ) + + with self.assertRaises(KeyError): + grid.get_lgr("NO/SUCHLGR") + + with self.assertRaises(KeyError): + grid.get_lgr(1024) diff --git a/ThirdParty/Ert/python/tests/ecl/test_sum.py b/ThirdParty/Ert/python/tests/ecl/test_sum.py index c41d1da0a9..2d23c2425c 100644 --- a/ThirdParty/Ert/python/tests/ecl/test_sum.py +++ b/ThirdParty/Ert/python/tests/ecl/test_sum.py @@ -59,7 +59,7 @@ class SumTest(ExtendedTestCase): def test_identify_var_type(self): - self.assertEnumIsFullyDefined( EclSumVarType , "ecl_smspec_var_type" , "libecl/include/ert/ecl/smspec_node.h") + self.assertEnumIsFullyDefined( EclSumVarType , "ecl_smspec_var_type" , "lib/include/ert/ecl/smspec_node.h") self.assertEqual( EclSum.varType( "WWCT:OP_X") , EclSumVarType.ECL_SMSPEC_WELL_VAR ) self.assertEqual( EclSum.varType( "RPR") , EclSumVarType.ECL_SMSPEC_REGION_VAR ) self.assertEqual( EclSum.varType( "WNEWTON") , EclSumVarType.ECL_SMSPEC_MISC_VAR ) diff --git a/ThirdParty/Ert/python/tests/install/test_install.py b/ThirdParty/Ert/python/tests/install/test_install.py new file mode 100644 index 0000000000..b43ab9b903 --- /dev/null +++ b/ThirdParty/Ert/python/tests/install/test_install.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python +import sys + +# This is a small executable which is used to verify the install, +# Prior to calling this the environment must have been prepared to +# ensure that the newly installed versions are picked up - this can +# typically be achieved with the bash script bin/test_install which is +# generated during the configure process. + +from ecl.ecl import EclSum, EclGrid + + + diff --git a/ThirdParty/Ert/python/tests/legacy/CMakeLists.txt b/ThirdParty/Ert/python/tests/legacy/CMakeLists.txt new file mode 100644 index 0000000000..1ccd83497b --- /dev/null +++ b/ThirdParty/Ert/python/tests/legacy/CMakeLists.txt @@ -0,0 +1,16 @@ +set(TEST_SOURCES + __init__.py + test_ecl.py + test_geo.py + test_well.py + test_util.py + test_test.py +) + +add_python_package("python.tests.legacy.ert" ${PYTHON_INSTALL_PREFIX}/tests/legacy "${TEST_SOURCES}" False) + +addPythonTest(tests.legacy.test_ecl.ErtLegacyEclTest) +addPythonTest(tests.legacy.test_geo.ErtLegacyGeoTest) +addPythonTest(tests.legacy.test_well.ErtLegacyWellTest) +addPythonTest(tests.legacy.test_util.ErtLegacyUtilTest) +addPythonTest(tests.legacy.test_test.ErtLegacyTestTest) diff --git a/ThirdParty/Ert/python/tests/legacy/__init__.py b/ThirdParty/Ert/python/tests/legacy/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ThirdParty/Ert/python/tests/legacy/test_ecl.py b/ThirdParty/Ert/python/tests/legacy/test_ecl.py new file mode 100644 index 0000000000..f90d3fd628 --- /dev/null +++ b/ThirdParty/Ert/python/tests/legacy/test_ecl.py @@ -0,0 +1,41 @@ +from ert.ecl import EclFileEnum, EclFileFlagEnum, EclPhaseEnum, EclUnitTypeEnum , EclUtil +from ert.ecl import EclTypeEnum, EclDataType +from ert.ecl import EclSumVarType +from ert.ecl import EclSumTStep +from ert.ecl import EclSum #, EclSumVector, EclSumNode, EclSMSPECNode +from ert.ecl import EclSumKeyWordVector +from ert.ecl import EclPLTCell, EclRFTCell +from ert.ecl import EclRFT, EclRFTFile +from ert.ecl import FortIO, openFortIO +from ert.ecl import EclKW +from ert.ecl import Ecl3DKW +from ert.ecl import EclFileView +from ert.ecl import EclFile , openEclFile +from ert.ecl import Ecl3DFile +from ert.ecl import EclInitFile +from ert.ecl import EclRestartFile +from ert.ecl import EclGrid +from ert.ecl import EclRegion +from ert.ecl import EclSubsidence +from ert.ecl import phase_deltag, deltag +from ert.ecl import EclGrav +from ert.ecl import EclSumNode +from ert.ecl import EclSumVector +from ert.ecl import EclNPV , NPVPriceVector +from ert.ecl import EclCmp +from ert.ecl import EclGridGenerator + +from ert.ecl.faults import Layer +from ert.ecl.faults import FaultCollection +from ert.ecl.faults import Fault +from ert.ecl.faults import FaultLine +from ert.ecl.faults import FaultSegment , SegmentMap +from ert.ecl.faults import FaultBlock , FaultBlockCell +from ert.ecl.faults import FaultBlockLayer + + +from ecl.test import ExtendedTestCase + + +class ErtLegacyEclTest(ExtendedTestCase): + pass diff --git a/ThirdParty/Ert/python/tests/legacy/test_geo.py b/ThirdParty/Ert/python/tests/legacy/test_geo.py new file mode 100644 index 0000000000..669b5ab9d6 --- /dev/null +++ b/ThirdParty/Ert/python/tests/legacy/test_geo.py @@ -0,0 +1,14 @@ +from ert.geo import GeoPointset +from ert.geo import GeoRegion +from ert.geo import CPolyline +from ert.geo import CPolylineCollection +from ert.geo import Polyline +from ert.geo import XYZIo +from ert.geo import GeometryTools +from ert.geo import Surface + +from ecl.test import ExtendedTestCase + + +class ErtLegacyGeoTest(ExtendedTestCase): + pass diff --git a/ThirdParty/Ert/python/tests/legacy/test_test.py b/ThirdParty/Ert/python/tests/legacy/test_test.py new file mode 100644 index 0000000000..40d0ef2b73 --- /dev/null +++ b/ThirdParty/Ert/python/tests/legacy/test_test.py @@ -0,0 +1,16 @@ +from ert.test import TestRun +from ert.test import path_exists +from ert.test import ExtendedTestCase +from ert.test import SourceEnumerator +from ert.test import TestArea , TestAreaContext +from ert.test import TempArea , TempAreaContext +from ert.test import ErtTestRunner +from ert.test import PathContext +from ert.test import LintTestCase +from ert.test import ImportTestCase + +from ecl.test import ExtendedTestCase + + +class ErtLegacyTestTest(ExtendedTestCase): + pass diff --git a/ThirdParty/Ert/python/tests/legacy/test_util.py b/ThirdParty/Ert/python/tests/legacy/test_util.py new file mode 100644 index 0000000000..4fa75a85b5 --- /dev/null +++ b/ThirdParty/Ert/python/tests/legacy/test_util.py @@ -0,0 +1,31 @@ +from ert.util import Version +from ert.util import RngAlgTypeEnum, RngInitModeEnum, LLSQResultEnum +from ert.util import CTime +from ert.util import PermutationVector +from ert.util import VectorTemplate +from ert.util import DoubleVector +from ert.util import IntVector +from ert.util import BoolVector +from ert.util import TimeVector +from ert.util import StringList +from ert.util import RandomNumberGenerator +from ert.util import Matrix +from ert.util import quantile, quantile_sorted, polyfit +from ert.util import Log +from ert.util import LookupTable +from ert.util import Buffer +from ert.util import Hash, StringHash, DoubleHash, IntegerHash +from ert.util import SubstitutionList +from ert.util import UIReturn +from ert.util import ThreadPool +from ert.util import CThreadPool, startCThreadPool +from ert.util import installAbortSignals, updateAbortSignals +from ert.util import Profiler +from ert.util import ArgPack +from ert.util import PathFormat + +from ecl.test import ExtendedTestCase + + +class ErtLegacyUtilTest(ExtendedTestCase): + pass diff --git a/ThirdParty/Ert/python/tests/legacy/test_well.py b/ThirdParty/Ert/python/tests/legacy/test_well.py new file mode 100644 index 0000000000..102b049739 --- /dev/null +++ b/ThirdParty/Ert/python/tests/legacy/test_well.py @@ -0,0 +1,13 @@ +from ert.well import WellTypeEnum +from ert.well import WellConnectionDirectionEnum +from ert.well import WellConnection +from ert.well import WellSegment +from ert.well import WellState +from ert.well import WellTimeLine +from ert.well import WellInfo + +from ecl.test import ExtendedTestCase + + +class ErtLegacyWellTest(ExtendedTestCase): + pass diff --git a/ThirdParty/Ert/python/tests/test_install.in b/ThirdParty/Ert/python/tests/test_install.in new file mode 100644 index 0000000000..0831127069 --- /dev/null +++ b/ThirdParty/Ert/python/tests/test_install.in @@ -0,0 +1,6 @@ +#!/bin/bash + +export PYTHONPATH=@CMAKE_INSTALL_PREFIX@/@PYTHON_INSTALL_PREFIX@:@CTEST_PYTHONPATH@:$PYTHONPATH + +@PROJECT_SOURCE_DIR@/python/tests/install/test_install.py $@ + diff --git a/ThirdParty/Ert/python/tests/util/test_arg_pack.py b/ThirdParty/Ert/python/tests/util/test_arg_pack.py index 0ecbe23c05..2a73c39112 100644 --- a/ThirdParty/Ert/python/tests/util/test_arg_pack.py +++ b/ThirdParty/Ert/python/tests/util/test_arg_pack.py @@ -2,7 +2,7 @@ import ecl from ecl.test import ExtendedTestCase from ecl.util import ArgPack, StringList -TEST_LIB = ecl.load("libert_util") +TEST_LIB = ecl.load("libecl") class ArgPackTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/util/test_cstring.py b/ThirdParty/Ert/python/tests/util/test_cstring.py index fe82c5a6fe..12f8a58c50 100644 --- a/ThirdParty/Ert/python/tests/util/test_cstring.py +++ b/ThirdParty/Ert/python/tests/util/test_cstring.py @@ -4,7 +4,7 @@ from ecl.test.extended_testcase import ExtendedTestCase # Local copies so that the real ones don't get changed class TestUtilPrototype(Prototype): - lib = ecl.load("libert_util") + lib = ecl.load("libecl") def __init__(self, prototype, bind=False): super(TestUtilPrototype, self).__init__(TestUtilPrototype.lib, prototype, bind=bind) diff --git a/ThirdParty/Ert/python/tests/util/test_cthread_pool.py b/ThirdParty/Ert/python/tests/util/test_cthread_pool.py index ee55aa9ce6..dd6b32b952 100644 --- a/ThirdParty/Ert/python/tests/util/test_cthread_pool.py +++ b/ThirdParty/Ert/python/tests/util/test_cthread_pool.py @@ -3,7 +3,7 @@ import ecl from ecl.test import ExtendedTestCase from ecl.util import CThreadPool, startCThreadPool -TEST_LIB = ecl.load("libert_util") +TEST_LIB = ecl.load("libecl") class CThreadPoolTest(ExtendedTestCase): diff --git a/ThirdParty/Ert/python/tests/util/test_path_context.py b/ThirdParty/Ert/python/tests/util/test_path_context.py index 51587a5827..a47fad6724 100644 --- a/ThirdParty/Ert/python/tests/util/test_path_context.py +++ b/ThirdParty/Ert/python/tests/util/test_path_context.py @@ -18,8 +18,10 @@ class PathContextTest(ExtendedTestCase): def test_chdir(self): with PathContext("/tmp/pc"): - self.assertEqual( os.getcwd() , "/tmp/pc") - + self.assertEqual( + os.path.realpath(os.getcwd()), + os.path.realpath("/tmp/pc") + ) def test_cleanup(self): with TestAreaContext("pathcontext"): diff --git a/ThirdParty/Ert/python/tests/util/test_rng.py b/ThirdParty/Ert/python/tests/util/test_rng.py index dc4b03f7ca..fdf0c2d60c 100644 --- a/ThirdParty/Ert/python/tests/util/test_rng.py +++ b/ThirdParty/Ert/python/tests/util/test_rng.py @@ -6,8 +6,8 @@ from ecl.test import ExtendedTestCase,TestAreaContext class RngTest(ExtendedTestCase): def test_enums(self): - self.assertEnumIsFullyDefined(RngAlgTypeEnum, "rng_alg_type", "libert_util/include/ert/util/rng.h") - self.assertEnumIsFullyDefined(RngInitModeEnum, "rng_init_mode", "libert_util/include/ert/util/rng.h") + self.assertEnumIsFullyDefined(RngAlgTypeEnum, "rng_alg_type", "lib/include/ert/util/rng.h") + self.assertEnumIsFullyDefined(RngInitModeEnum, "rng_init_mode", "lib/include/ert/util/rng.h") def test_rng_default(self): rng = RandomNumberGenerator() diff --git a/ThirdParty/Ert/python/tests/util/test_spawn.py b/ThirdParty/Ert/python/tests/util/test_spawn.py index a867da3336..c624ea3d6a 100644 --- a/ThirdParty/Ert/python/tests/util/test_spawn.py +++ b/ThirdParty/Ert/python/tests/util/test_spawn.py @@ -9,7 +9,7 @@ from ecl.test.test_area import TestAreaContext from cwrap import Prototype class _TestSpawnPrototype(Prototype): - lib = ecl.load('libert_util') + lib = ecl.load('libecl') def __init__(self, prototype, bind=True): super(_TestSpawnPrototype, self).__init__(_TestSpawnPrototype.lib, prototype, bind=bind) diff --git a/ThirdParty/Ert/python/tests/util/test_ui_return.py b/ThirdParty/Ert/python/tests/util/test_ui_return.py index 2e7dfe9e75..8b8da46025 100644 --- a/ThirdParty/Ert/python/tests/util/test_ui_return.py +++ b/ThirdParty/Ert/python/tests/util/test_ui_return.py @@ -65,5 +65,5 @@ class UIReturnTest(ExtendedTestCase): self.assertEqual(errorList, []) def test_status_enum(self): - source_file_path = "libert_util/include/ert/util/ui_return.h" + source_file_path = "lib/include/ert/util/ui_return.h" self.assertEnumIsFullyDefined(UIReturnStatusEnum, "ui_return_status_enum", source_file_path) diff --git a/ThirdParty/Ert/python/tests/well/CMakeLists.txt b/ThirdParty/Ert/python/tests/well/CMakeLists.txt index e5853b33f6..b9efe79dca 100644 --- a/ThirdParty/Ert/python/tests/well/CMakeLists.txt +++ b/ThirdParty/Ert/python/tests/well/CMakeLists.txt @@ -8,7 +8,7 @@ set(TEST_SOURCES add_python_package("python.tests.well" ${PYTHON_INSTALL_PREFIX}/tests/well "${TEST_SOURCES}" False) if (STATOIL_TESTDATA_ROOT) - addPythonTest(well.test_ecl_well.EclWellTest LABELS StatoilData) - addPythonTest(well.test_ecl_well2.EclWellTest2 LABELS StatoilData) - addPythonTest(well.test_ecl_well3.EclWellTest3 LABELS StatoilData) + addPythonTest(tests.well.test_ecl_well.EclWellTest LABELS StatoilData) + addPythonTest(tests.well.test_ecl_well2.EclWellTest2 LABELS StatoilData) + addPythonTest(tests.well.test_ecl_well3.EclWellTest3 LABELS StatoilData) endif() diff --git a/ThirdParty/Ert/python/tests/well/test_ecl_well.py b/ThirdParty/Ert/python/tests/well/test_ecl_well.py index bcbf872d17..ed3aad2c47 100644 --- a/ThirdParty/Ert/python/tests/well/test_ecl_well.py +++ b/ThirdParty/Ert/python/tests/well/test_ecl_well.py @@ -65,6 +65,16 @@ class EclWellTest(ExtendedTestCase): return EclWellTest.__well_info + def test_no_such_well(self): + grid_path = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID") + rst_path1 = self.createTestPath("nosuch/path/ECLIPSE.X001") + rst_path2 = self.createTestPath("nosuch/path/ECLIPSE.X002") + grid = EclGrid(grid_path) + with self.assertRaises(IOError): + _ = WellInfo(grid, rst_path1) + with self.assertRaises(IOError): + _ = WellInfo(grid, [rst_path1, rst_path2]) + def test_construction(self): grid_path = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID") rst_path_1 = self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.X0011") @@ -110,13 +120,13 @@ class EclWellTest(ExtendedTestCase): def test_well_type_enum(self): - source_file_path = "libecl_well/include/ert/ecl_well/well_const.h" + source_file_path = "lib/include/ert/ecl_well/well_conn.h" # The header file has duplicated symbols, so the simple test fails. # self.assertEnumIsFullyDefined(WellTypeEnum, "well_type_enum", source_file_path) def test_well_connection_direction_enum(self): - source_file_path = "libecl_well/include/ert/ecl_well/well_conn.h" + source_file_path = "lib/include/ert/ecl_well/well_conn.h" self.assertEnumIsFullyDefined(WellConnectionDirectionEnum, "well_conn_dir_enum", source_file_path) diff --git a/ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal1.EGRID b/ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal1.EGRID new file mode 100644 index 0000000000000000000000000000000000000000..4496b36d5ef0921e2c6e35b1743e69be1f0325ea GIT binary patch literal 258624 zcmeF43A|NP|Nn2LK_#Uq$yLTCib$bb(b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{1IFzgtJ*OjXpvCVVobsIa5;f_XOvPB9po+MiL{)pF{s_w9N>u}J|d2|G93g15z{n2;4ufGI7r@+M^xF1D56f@yU@ek^I5A6?N zcL!HdbH(kP5sGK2eUN`7`WcPBen6bA%%d1c?G@ux0|EXBXG9U>JJGKrIVgIf35AO$ zehl~B$g@3vXXZ&G&oJu>5l7LTd&STUea7hj#5uXek&(lj-cPJ;eIJ>)5ud(K(vMz! zeBbWX})L{BiR z#4zH#L~?}UF)H@?c+MK)loAM-&x?_=i#4z~JP_Kv6vt5)w?GHbGR?a&}%E|9#Pr)wKFsn+vs zGS4>Y+QA{rGfCcP)3y9o)p`N_Otr36tXHj`9FpJsy0+~n);5rNsRH^N_@5_vwHwcU z2>&Z&whQQS#Eg-wOx3l`dGKr{vlB5#KVn`_@-SjHJca*V#0PZk#8&vgy&-I zD>8qDp{tmukgUNxbPE0>WR7BwRao15j%3w@jdhwO%S@ zejn1cnv=+LDakrKtEdNSms4K}a;TmU|LY`cQJ&of~l`-u=O%Skyirk8kpP5*x`_*+Rx@ze9o`1IUpf zGFEkv{M_%*)kKnc^P#mQNk_ zT!%hoBHa!OdgnCmgXk|Nv&~@%`rS>Bpbs;!KPCnJ$E2~Ri=KsNjQ6MEO(&ZiteI)~ zG^0nF^Bj($mzaI1$2HWd9OuszV4qArG&j8xYu3Sw@uQ|pE^6hb7obm<;dh2vjWc4D zb|Dh&-zOy)kM4=s{~yaH-xmeHFY^EWOoDUrQZ&S`G(OD5lzhF>Xpmo9SWlgzujIJD Uyf~J9*6=G4ubJY*dhT@n4<^THEC2ui literal 0 HcmV?d00001 diff --git a/ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal4.txt b/ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal4.txt new file mode 100644 index 0000000000..3a2bf9dfa5 --- /dev/null +++ b/ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal4.txt @@ -0,0 +1,2 @@ +122616.59 5406847.62 6621.33 1 1 1 +122620.94 5406856.7 6628.22 1 1 2 diff --git a/ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal5.EGRID b/ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal5.EGRID new file mode 100644 index 0000000000000000000000000000000000000000..0cd21891fb69f5e75256f47a0d6945cbc7f1fa67 GIT binary patch literal 78968 zcmeI53%piS{{K%(l3R%3e>if#jB8VMVKZGnu&}PAtjn5 z>2fqWQsh!{p1t>za~jv=R=E`Z@6Udo)p=&uepWi=l-cL?dY^syuD$lmCpZDs2gC!{~$ zJ2PGUZQIJJEHD06Hl=CPp`^8T!2Cuz`8TrpH_84ftxX?OepF8C!6u;nCx5ki1v2HQ z)yXG!XpIj!lrO8xMcpaorK8)I6n@gqcz)aR(w7QL3O|}_D&J!MncGVW7w&1iPezrO zj(?}5@YCl^<=|Q6rBB~iQusv!<9%0LUOH}UN#W;zHI>&?mX|*HYDwW&pBVp`hUKMW z$@9y8rm|DB^3oB%_Gl_#yeqrdFkXyC54|2HB|*Y%1g)mkv#V@-W@~AOJ8nXQn+ZKsT{tLJbRGm zmd1OIG!s0I;aXGKhkTwnqoi=jGUNR)h~vM3W4O>%_G(;S`eFfjzF|^ll27?vockzK z^&0apOeD|2CN+@bdG!v?eW0njifzX|PM)1iYSF&srPH?M+;23M%b6ehA$cBZynVPP zQy(iS{Q3%0IgzsR6 zQ?)zSb9{%A!tYv{)IzTFt9O?aE^WniV}9DENUu9Ay=8-OPf+$p6hQ{W$m0rfM|0C~sR*xa=8I@gdiC9%b+Q zBTdz#q?vaG*K?}zuHd|Ubn(SFv!E%un3LjqPBdO~j^BTQW0+#9e&o8na};?_HeLbe z8~7YUM^oid=4W3{p0AixKdxbVbIyG-<$>$)hAAmrKGvjKu`hon=e`%mvygB-1x+_P ztJTRJ+K2i+?#60;Z#B&LO*%-!#=m}uG;93Nx=5oY*p+qVOO4;XukkyzHNMaK@#9VK zUdr7Te!3#Q5z8No&S`oOM4iKNzl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G&a_YqxZmo;70cKPhNwq$r@LH9N|+w^i=BDc9U{`lZXc z+vd*a9&L1e?y_s%bv$9&5n(8lid3EPATW0>}ZnLKO<>s-f`DB09eu`dW zdu{A>v&%N!s;0SV*7dxOEBDVHr(K`Bytd|l>-)3UPUo3>&7#Y>wwlh{Ynq$Sy4auH z&$^oG_*du8rnBd(ZJ1X(eWUEWCTo2C!;OE%f4S#TljFAetnSpFVs85A{&Q_>I&b&$ zD^0^P(8#oJ-KIlH>n7T1^>~YdM(x|TYHM1C>l@~*-{%(`oYE?vLz?iX?Q-(b`liwK F{~x)(yt4oR literal 0 HcmV?d00001 diff --git a/ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal5.txt b/ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal5.txt new file mode 100644 index 0000000000..55575a7e45 --- /dev/null +++ b/ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal5.txt @@ -0,0 +1,7 @@ +125914.01 6699854.27 7024.64 1 5 2 +125935.07 6699860.05 7038.64 1 4 6 +125947.26 6699863.36 7046.67 1 4 9 +125979.08 6699871.83 7067.58 1 3 31 +125999.91 6699877.26 7081.25 1 2 46 +126015.43 6699881.3 7091.44 1 2 55 +126042.07 6699888.35 7108.87 2 1 74 diff --git a/ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal6.EGRID b/ThirdParty/Ert/test-data/local/ECLIPSE/faarikaal/faarikaal6.EGRID new file mode 100644 index 0000000000000000000000000000000000000000..7a28fd3aad7049d1c29f7286475c711c0d9c1902 GIT binary patch literal 8192 zcmeI1e{7ZI6~`|X1X~y#!@!KADCI{1e?T|PV6Vi2n=lH8vp4R zKXK*$zfpl0C&{_N`Gt9*f`vrvmz5LD=L%neLAg?pFAGPH*0Ij9E?C3_J(On;1>#graKdO`dT}a}3 zjdM&Vm4N|PRiAx$oM5vKP1t0=3HRBM$B_NTxaO+P-McpQXgdf z^wLlyZK~LmCf7;0ITV?=RO$8|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