Rename to resdata

* Rename to resdata
* Remove development feature for storing grid import type in project file
* Clean up comments
This commit is contained in:
Magne Sjaastad 2024-04-22 19:56:10 +02:00 committed by GitHub
parent c17e5237ca
commit 98144078c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
31 changed files with 93 additions and 104 deletions

View File

@ -65,10 +65,10 @@ void caf::AppEnum<RiaDefines::DepthUnitType>::setUp()
template <>
void caf::AppEnum<RiaDefines::GridModelReader>::setUp()
{
addItem( RiaDefines::GridModelReader::LIBECL, "LIBECL", "libecl" );
addItem( RiaDefines::GridModelReader::RESDATA, "RESDATA", "resdata", { "LIBECL" } );
addItem( RiaDefines::GridModelReader::OPM_COMMON, "OPM_COMMON", "opm-common (beta)" );
setDefault( RiaDefines::GridModelReader::LIBECL );
setDefault( RiaDefines::GridModelReader::RESDATA );
}
template <>

View File

@ -172,7 +172,7 @@ enum class GridCaseAxis
enum class GridModelReader
{
LIBECL,
RESDATA,
OPM_COMMON
};

View File

@ -57,7 +57,7 @@ void RiaPreferencesSummary::SummaryHistoryCurveStyleModeType::setUp()
template <>
void RiaPreferencesSummary::SummaryReaderModeType::setUp()
{
addItem( RiaPreferencesSummary::SummaryReaderMode::LIBECL, "LIBECL", "UNSMRY (libecl)" );
addItem( RiaPreferencesSummary::SummaryReaderMode::RESDATA, "RESDATA", "UNSMRY (resdata)", { "LIBECL" } );
addItem( RiaPreferencesSummary::SummaryReaderMode::HDF5_OPM_COMMON, "HDF5_OPM_COMMON", "h5 (HDF5)" );
addItem( RiaPreferencesSummary::SummaryReaderMode::OPM_COMMON, "OPM_COMMON", "ESMRY (opm-common)" );
setDefault( RiaPreferencesSummary::SummaryReaderMode::HDF5_OPM_COMMON );
@ -471,7 +471,7 @@ QList<caf::PdmOptionItemInfo> RiaPreferencesSummary::calculateValueOptions( cons
#ifdef USE_HDF5
availableModes.push_back( SummaryReaderMode::HDF5_OPM_COMMON );
#endif // USE_HDF5
availableModes.push_back( SummaryReaderMode::LIBECL );
availableModes.push_back( SummaryReaderMode::RESDATA );
availableModes.push_back( SummaryReaderMode::OPM_COMMON );
for ( auto enumValue : availableModes )

View File

@ -42,7 +42,7 @@ class RiaPreferencesSummary : public caf::PdmObject
public:
enum class SummaryReaderMode
{
LIBECL,
RESDATA,
OPM_COMMON,
HDF5_OPM_COMMON
};

View File

@ -342,7 +342,7 @@ bool RifEclipseInputFileTools::exportGrid( const QString& fileName,
// Do not perform the transformation (applyMapaxes == false):
// The coordinates have been transformed to the map axes coordinate system already.
// However, send the map axes data in to libecl so that the coordinate system description is saved.
// However, send the map axes data in to resdata so that the coordinate system description is saved.
bool applyMapaxes = false;
ecl_grid_type* mainEclGrid =
ecl_grid_alloc_GRID_data( (int)ecl_coords.size(), ecl_nx, ecl_ny, ecl_nz, 5, &ecl_coords[0], &ecl_corners[0], applyMapaxes, mapAxes.data() );

View File

@ -379,7 +379,7 @@ QStringList RifEclipseOutputFileTools::filterFileNamesOfType( const QStringList&
}
//-------------------------------------------------------------------------------------------------------
/// Check if libecl accepts the file name. libecl refuses to open files with mixed case in the file name.
/// Check if resdata accepts the file name. resdata refuses to open files with mixed case in the file name.
//-------------------------------------------------------------------------------------------------------
bool RifEclipseOutputFileTools::isValidEclipseFileName( const QString& fileName )
{

View File

@ -160,7 +160,7 @@ std::vector<RifRestartFileInfo> RifEclipseSummaryTools::getRestartFiles( const Q
currFile.fileName = headerFileName;
while ( !currFile.fileName.isEmpty() )
{
// Due to a weakness in libecl regarding restart summary header file selection,
// Due to a weakness in resdata regarding restart summary header file selection,
// do some extra checking
{
QString formattedHeaderExtension = ".FSMSPEC";

View File

@ -358,7 +358,7 @@ void RifOpmGridTools::transferCoordinatesCartesian( Opm::EclIO::EGrid& opmMainG
riActiveCells->setReservoirCellCount( riMainGrid->cellCount() );
// same mapping as libecl
// same mapping as resdata
const size_t cellMappingECLRi[8] = { 0, 1, 3, 2, 4, 5, 7, 6 };
#pragma omp parallel for

View File

@ -68,7 +68,7 @@ void RifReaderEclipseRft::open()
if ( m_ecl_rft_file == nullptr )
{
RiaLogging::warning( QString( "Libecl could not find/open file '%1" ).arg( m_fileName ) );
RiaLogging::warning( QString( "resdata library could not find/open file '%1" ).arg( m_fileName ) );
return;
}

View File

@ -68,7 +68,7 @@ bool RifReaderEclipseSummary::open( const QString& headerFileName, RiaThreadSafe
// - else
// - create ESMRY file if defined in preference
// - use ESMRY reader
// - if no reader has been created, fallback to libecl
// - if no reader has been created, fallback to resdata
//
// H5
// - if h5 file is present on disk
@ -76,9 +76,9 @@ bool RifReaderEclipseSummary::open( const QString& headerFileName, RiaThreadSafe
// - else
// - create h5 file if defined in preference
// - use h5 reader
// - if no reader has been created, fallback to libecl
// - if no reader has been created, fallback to resdata
//
// For all import modes, use libecl to read data if no data is imported with ESMRY or h5
// For all import modes, use resdata to read data if no data is imported with ESMRY or h5
RiaPreferencesSummary* prefSummary = RiaPreferencesSummary::current();
@ -136,7 +136,7 @@ bool RifReaderEclipseSummary::open( const QString& headerFileName, RiaThreadSafe
}
}
// If no summary reader has been created, always try to read data using libecl
// If no summary reader has been created, always try to read data using resdata
if ( !isValid )
{
auto libeclReader = std::make_unique<RifEclEclipseSummary>();

View File

@ -55,7 +55,7 @@ std::pair<bool, std::vector<double>> RifSummaryReaderMultipleFiles::values( cons
// When a well is introduced, no data is present before the time step the well is introduced
// Add values of zero for this interval
//
// This issue was reported for libecl, but it is not relevant now as the low level file readers only handle
// This issue was reported for resdata, but it is not relevant now as the low level file readers only handle
// a single file.
// https://github.com/OPM/ResInsight/issues/7065

View File

@ -81,14 +81,6 @@ RimEclipseResultCase::RimEclipseResultCase()
{
CAF_PDM_InitScriptableObject( "Eclipse Case", ":/Case48x48.png", "", "The Regular Eclipse Results Case" );
auto defaultReader = RiaPreferences::current()->gridModelReader();
CAF_PDM_InitField( &m_gridModelReader, "gridModelReader", caf::AppEnum<RiaDefines::GridModelReader>( defaultReader ), "Grid Model Reader" );
if ( !RiaApplication::enableDevelopmentFeatures() )
{
m_gridModelReader.xmlCapability()->disableIO();
m_gridModelReader.uiCapability()->setUiHidden( true );
}
CAF_PDM_InitFieldNoDefault( &m_unitSystem, "UnitSystem", "Unit System" );
m_unitSystem.registerGetMethod( RimProject::current(), &RimProject::commonUnitSystemForAllCases );
m_unitSystem.uiCapability()->setUiReadOnly( true );
@ -145,7 +137,9 @@ bool RimEclipseResultCase::importGridAndResultMetaData( bool showTimeStepFilter
return false;
}
if ( m_gridModelReader == RiaDefines::GridModelReader::LIBECL )
auto defaultReader = RiaPreferences::current()->gridModelReader();
if ( defaultReader == RiaDefines::GridModelReader::RESDATA )
{
auto readerEclipseOutput = new RifReaderEclipseOutput();
@ -620,7 +614,6 @@ bool RimEclipseResultCase::hasSourSimFile()
//--------------------------------------------------------------------------------------------------
void RimEclipseResultCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
uiOrdering.add( &m_gridModelReader );
uiOrdering.add( &m_caseUserDescription );
uiOrdering.add( &m_displayNameOption );
uiOrdering.add( &m_caseId );

View File

@ -94,7 +94,6 @@ private:
cvf::ref<RifReaderEclipseRft> m_readerEclipseRft;
cvf::ref<RifReaderOpmRft> m_readerOpmRft;
caf::PdmField<caf::AppEnum<RiaDefines::GridModelReader>> m_gridModelReader;
caf::PdmProxyValueField<caf::AppEnum<RiaDefines::EclipseUnitSystem>> m_unitSystem;
caf::PdmChildArrayField<RimFlowDiagSolution*> m_flowDiagSolutions;
caf::PdmField<caf::FilePath> m_sourSimFileName;

View File

@ -100,7 +100,7 @@ QString RimFileSummaryCase::caseName() const
void RimFileSummaryCase::createSummaryReaderInterfaceThreadSafe( RiaThreadSafeLogger* threadSafeLogger )
{
// RimFileSummaryCase::findRelatedFilesAndCreateReader is a performance bottleneck. The function
// RifEclipseSummaryTools::getRestartFile() should be refactored to use opm-common instead of libecl.
// RifEclipseSummaryTools::getRestartFile() should be refactored to use opm-common instead of resdata.
// It is not possible to use restart files in ESMRY file format, see see ESmry::make_esmry_file()
//
// https://github.com/OPM/ResInsight/issues/11342

View File

@ -75,7 +75,7 @@ TEST( DISABLED_RifSummaryDataTest, LibEclAllData )
auto end = std::chrono::high_resolution_clock::now();
std::chrono::duration<double> diff = end - start;
std::cout << "LibEcl : Open " << std::setw( 9 ) << diff.count() << " s\n";
std::cout << "resdata : Open " << std::setw( 9 ) << diff.count() << " s\n";
}
// for ( auto adr : reader.allResultAddresses() )
@ -101,7 +101,7 @@ TEST( DISABLED_RifSummaryDataTest, LibEclAllData )
auto end = std::chrono::high_resolution_clock::now();
std::chrono::duration<double> diff = end - start;
std::cout << "LibEcl read data" << std::setw( 9 ) << totalValuesRead << "totalValueCount" << diff.count() << " s\n";
std::cout << "resdata read data" << std::setw( 9 ) << totalValuesRead << "totalValueCount" << diff.count() << " s\n";
}
}
}

View File

@ -199,10 +199,10 @@ if(RESINSIGHT_ENABLE_UNITY_BUILD)
endif()
# ##############################################################################
# ERT
# resdata
# ##############################################################################
# Use of CMAKE_CXX_COMPILER_LAUNCHER is not working with libecl. Disable by
# Use of CMAKE_CXX_COMPILER_LAUNCHER is not working with resdata. Disable by
# temporarily setting compiler launcher to nothing
set(TEMP_CMAKE_CXX_COMPILER_LAUNCHER ${CMAKE_CXX_COMPILER_LAUNCHER})
set(CMAKE_CXX_COMPILER_LAUNCHER)
@ -237,7 +237,7 @@ if(RESINSIGHT_ERT_EXTERNAL_LIB_ROOT OR RESINSIGHT_ERT_EXTERNAL_INCLUDE_ROOT)
list(APPEND ERT_INCLUDE_DIRS ${RESINSIGHT_ERT_EXTERNAL_INCLUDE_ROOT})
list(APPEND ERT_LIBRARIES ${RESINSIGHT_ERT_EXTERNAL_LIB_ROOT}/libecl.so)
list(APPEND ERT_LIBRARIES ${RESINSIGHT_ERT_EXTERNAL_LIB_ROOT}/resdata.so)
else()
@ -279,35 +279,35 @@ else()
endif()
if(MSVC)
# libecl : Disable some warnings
# resdata : Disable some warnings
set_target_properties(
ecl
resdata
PROPERTIES
COMPILE_FLAGS
"/wd4244 /wd4267 /wd4013 /wd4190 /wd4018 /wd4477 /wd4098 /wd4293 /wd4305 /wd4020 /wd4028 /wd4715 /wd4245 /wd4804 /wd4100 /wd4456 /wd4458 /wd4090 /wd4297 /wd4701 /wd4101 /wd4702 /wd4457"
)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set_target_properties(
ecl
resdata
PROPERTIES
COMPILE_FLAGS
"-Wno-deprecated -Wno-deprecated-declarations -Wno-sign-compare"
)
else()
set_target_properties(
ecl
resdata
PROPERTIES
COMPILE_FLAGS
"-Wno-deprecated -Wno-deprecated-declarations -Wno-clobbered -Wno-int-in-bool-context"
)
target_compile_options(
ecl PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wno-class-memaccess>
resdata PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wno-class-memaccess>
)
endif()
list(APPEND THIRD_PARTY_LIBRARIES ecl)
list(APPEND THIRD_PARTY_LIBRARIES resdata)
set_property(TARGET catch2 PROPERTY FOLDER "Thirdparty")
@ -316,7 +316,7 @@ else()
endif(RESINSIGHT_ERT_EXTERNAL_LIB_ROOT OR RESINSIGHT_ERT_EXTERNAL_INCLUDE_ROOT)
# restore buildcache when libecl has been configured
# restore buildcache when resdata has been configured
set(CMAKE_CXX_COMPILER_LAUNCHER ${TEMP_CMAKE_CXX_COMPILER_LAUNCHER})
# ##############################################################################
@ -884,7 +884,7 @@ set(RESINSIGHT_INSTALL_FOLDER ".")
# override system install prefix if private installation chosen
option(RESINSIGHT_PRIVATE_INSTALL
"Linux only: Install the libecl shared libraries along the executable"
"Linux only: Install the resdata shared libraries along the executable"
ON
)
mark_as_advanced(FORCE RESINSIGHT_PRIVATE_INSTALL)
@ -898,9 +898,9 @@ if(RESINSIGHT_PRIVATE_INSTALL)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(ERT_SHARED_LIB_FILES
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so.2
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so.2.4
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libresdata.so
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libresdata.so.2
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libresdata.so.2.4
)
install(FILES ${ERT_SHARED_LIB_FILES}
DESTINATION ${RESINSIGHT_INSTALL_FOLDER}
@ -909,9 +909,9 @@ if(RESINSIGHT_PRIVATE_INSTALL)
if(APPLE)
set(ERT_SHARED_LIB_FILES
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.dylib
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.2.dylib
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.2.4.dylib
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libresdata.dylib
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libresdata.2.dylib
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libresdata.2.4.dylib
)
install(
FILES ${ERT_SHARED_LIB_FILES}

View File

@ -37,7 +37,7 @@ def test_summary_data(rips_instance, initialize_test):
assert summary_case.id == 1
addresses = summary_case.available_addresses()
# Summary reader type is controlled from Preferences. libecl reports 343 vectors, opm_common (ESMRY) reports 339.
# Summary reader type is controlled from Preferences. resdata reports 343 vectors, opm_common (ESMRY) reports 339.
# As this configuration can be different, allow both variants
assert len(addresses.values) == 335 or len(addresses.values) == 339

View File

@ -353,5 +353,5 @@ if (INSTALL_ERT)
install(EXPORT ecl-config DESTINATION share/cmake/ecl)
endif()
export(TARGETS ecl FILE eclConfig.cmake)
export(PACKAGE ecl)
export(TARGETS resdata FILE eclConfig.cmake)
export(PACKAGE resdata)

View File

@ -815,7 +815,7 @@ static int gravity_check_input( const ecl_grid_type * ecl_grid ,
/**
Check that the rporv values are in the right ballpark. For
ECLIPSE version 2008.2 they are way fucking off. Check PORV
ECLIPSE version 2008.2 they are way off. Check PORV
versus RPORV for ten 'random' locations in the grid.
*/
{

View File

@ -20,6 +20,7 @@ if (ERT_HAVE_SPAWN)
list(APPEND opt_srcs util/util_spawn.cpp)
endif()
if (ERT_HAVE_LOCKF)
list(APPEND opt_srcs util/util_lockf.cpp)
endif ()
@ -60,7 +61,7 @@ configure_file(ert_api_config.h.in include/ert/util/ert_api_config.h)
configure_file(build_config.hpp.in include/ert/util/build_config.hpp)
configure_file(ert_api_config.hpp.in include/ert/util/ert_api_config.hpp)
add_library(ecl util/rng.cpp
add_library(resdata util/rng.cpp
util/lookup_table.cpp
util/statistics.cpp
util/mzran.cpp
@ -153,13 +154,12 @@ add_library(ecl util/rng.cpp
)
if (ERT_WINDOWS)
set_target_properties(ecl PROPERTIES PREFIX "lib")
if (MSVC)
set_target_properties(ecl PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
set_target_properties(resdata PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
endif ()
target_link_libraries(ecl PUBLIC ${m}
target_link_libraries(resdata PUBLIC ${m}
${dl}
${pthread}
${blas}
@ -167,7 +167,7 @@ target_link_libraries(ecl PUBLIC ${m}
${shlwapi}
)
target_include_directories(ecl
target_include_directories(resdata
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
@ -186,7 +186,7 @@ if (NOT INSTALL_ERT)
set(GIT_COMMIT_SHORT 0)
endif()
target_compile_definitions(ecl PRIVATE
target_compile_definitions(resdata PRIVATE
-DGIT_COMMIT=${GIT_COMMIT}
-DGIT_COMMIT_SHORT=${GIT_COMMIT_SHORT}
-DECL_VERSION_MAJOR=${ECL_VERSION_MAJOR}
@ -195,20 +195,20 @@ target_compile_definitions(ecl PRIVATE
$<$<BOOL:${BIG_ENDIAN}>:HOST_BIG_ENDIAN>
)
target_compile_options(ecl PUBLIC ${pthreadarg})
target_compile_options(resdata PUBLIC ${pthreadarg})
if (ERT_USE_OPENMP)
target_compile_options(ecl PUBLIC ${OpenMP_CXX_FLAGS})
set_property(TARGET ecl APPEND PROPERTY LINK_FLAGS ${OpenMP_CXX_FLAGS})
target_link_libraries( ecl PUBLIC ${OpenMP_EXE_LINKER_FLAGS})
target_compile_options(resdata PUBLIC ${OpenMP_CXX_FLAGS})
set_property(TARGET resdata APPEND PROPERTY LINK_FLAGS ${OpenMP_CXX_FLAGS})
target_link_libraries( resdata PUBLIC ${OpenMP_EXE_LINKER_FLAGS})
endif ()
set_target_properties(ecl PROPERTIES
set_target_properties(resdata PROPERTIES
VERSION ${ECL_VERSION_MAJOR}.${ECL_VERSION_MINOR}
SOVERSION ${ECL_VERSION_MAJOR})
if (INSTALL_ERT)
install(TARGETS ecl
install(TARGETS resdata
EXPORT ecl-config
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
@ -231,7 +231,7 @@ add_executable(ecl3-testsuite test/testsuite.cpp
target_include_directories(ecl3-testsuite
PRIVATE e3
)
target_link_libraries(ecl3-testsuite catch2 ecl)
target_link_libraries(ecl3-testsuite catch2 resdata)
add_test(NAME ecl3 COMMAND ecl3-testsuite)
@ -265,17 +265,17 @@ foreach (name ert_util_alloc_file_components
add_executable(${name} util/tests/${name}.cpp)
target_include_directories(${name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/private-include)
target_link_libraries(${name} ecl)
target_link_libraries(${name} resdata)
add_test(NAME ${name} COMMAND ${name})
endforeach ()
add_executable(ecl_smspec_node ecl/tests/ecl_smspec_node.cpp)
target_link_libraries( ecl_smspec_node ecl)
target_link_libraries( ecl_smspec_node resdata)
add_test(NAME ecl_smspec_node COMMAND ecl_smspec_node)
add_executable(ert_util_work_area util/tests/ert_util_work_area.cpp)
target_link_libraries(ert_util_work_area ecl)
target_link_libraries(ert_util_work_area resdata)
add_test(NAME ert_util_work_area
COMMAND ert_util_work_area data2/file1
${CMAKE_CURRENT_SOURCE_DIR}/util/tests/data2/file2
@ -284,49 +284,49 @@ add_test(NAME ert_util_work_area
)
add_executable(ert_util_cwd_test util/tests/ert_util_cwd_test.cpp)
target_link_libraries(ert_util_cwd_test ecl)
target_link_libraries(ert_util_cwd_test resdata)
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.cpp)
target_link_libraries(ert_util_copy_file ecl)
target_link_libraries(ert_util_copy_file resdata)
add_test(NAME ert_util_copy_file
COMMAND ert_util_copy_file
$<TARGET_FILE:ert_util_copy_file>)
add_executable(ert_util_file_readable util/tests/ert_util_file_readable.cpp)
target_link_libraries(ert_util_file_readable ecl)
target_link_libraries(ert_util_file_readable resdata)
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.cpp)
target_link_libraries(ert_util_path_stack_test ecl)
target_link_libraries(ert_util_path_stack_test resdata)
add_test(NAME ert_util_path_stack_test COMMAND ert_util_path_stack_test
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
if (HAVE_BACKTRACE)
add_executable(ert_util_abort_gnu_tests util/tests/ert_util_abort_gnu_tests.cpp)
target_link_libraries(ert_util_abort_gnu_tests ecl)
target_link_libraries(ert_util_abort_gnu_tests resdata)
add_test(NAME ert_util_abort_gnu_tests COMMAND ert_util_abort_gnu_tests)
add_executable(ert_util_addr2line util/tests/ert_util_addr2line.cpp)
target_link_libraries(ert_util_addr2line ecl)
target_link_libraries(ert_util_addr2line resdata)
add_test(NAME ert_util_addr2line COMMAND ert_util_addr2line)
endif()
if (HAVE_UTIL_ABORT_INTERCEPT)
add_executable(ert_util_type_vector_test util/tests/ert_util_type_vector_test.cpp)
target_link_libraries(ert_util_type_vector_test ecl)
target_link_libraries(ert_util_type_vector_test resdata)
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.cpp)
target_link_libraries(ert_util_spawn ecl)
target_link_libraries(ert_util_spawn resdata)
add_test(NAME ert_util_spawn COMMAND ert_util_spawn)
endif()
#
# ecl
# resdata
#
foreach (name ecl_alloc_cpgrid
@ -381,24 +381,24 @@ foreach (name ecl_alloc_cpgrid
ecl_file
)
add_executable(${name} ecl/tests/${name}.cpp)
target_link_libraries(${name} ecl)
target_link_libraries(${name} resdata)
target_include_directories(${name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/private-include)
add_test(NAME ${name} COMMAND ${name})
endforeach ()
if (HAVE_UTIL_ABORT_INTERCEPT)
add_executable(ecl_grid_corner ecl/tests/ecl_grid_corner.cpp)
target_link_libraries(ecl_grid_corner ecl)
target_link_libraries(ecl_grid_corner resdata)
add_test(NAME ecl_grid_corner COMMAND ecl_grid_corner)
add_executable(ecl_layer ecl/tests/ecl_layer.cpp)
target_link_libraries(ecl_layer ecl)
target_link_libraries(ecl_layer resdata)
target_include_directories(ecl_layer PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/private-include)
add_test(NAME ecl_layer COMMAND ecl_layer)
endif()
add_executable(ecl_get_num_cpu ecl/tests/ecl_get_num_cpu_test.cpp)
target_link_libraries(ecl_get_num_cpu ecl)
target_link_libraries(ecl_get_num_cpu resdata)
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
@ -409,7 +409,7 @@ add_test(NAME ecl_get_num_cpu COMMAND ecl_get_num_cpu
# into the CTEST system. Should be invoked manually on Windows.
if (ERT_WINDOWS)
add_executable(ecl_lfs ecl/tests/ecl_lfs.cpp)
target_link_libraries(ecl_lfs ecl)
target_link_libraries(ecl_lfs resdata)
endif()
#
@ -419,19 +419,19 @@ endif()
foreach (name geo_util_xlines geo_polygon geo_polygon_collection)
add_executable(${name} geometry/tests/${name}.cpp)
target_link_libraries(${name} ecl)
target_link_libraries(${name} resdata)
add_test(NAME ${name} COMMAND ${name})
endforeach ()
foreach (test ert_util_unique_ptr)
add_executable(${test} util/tests/${test}.cpp)
target_link_libraries(${test} ecl)
target_link_libraries(${test} resdata)
add_test(NAME ${test} COMMAND ${test})
endforeach()
foreach (test eclxx_kw eclxx_fortio eclxx_filename eclxx_types)
add_executable(${test} ecl/tests/${test}.cpp)
target_link_libraries(${test} ecl)
target_link_libraries(${test} resdata)
add_test(NAME ${test} COMMAND ${test})
endforeach ()
@ -477,7 +477,7 @@ foreach(name ecl_coarse_test
well_lgr_load)
add_executable(${name} ecl/tests/${name}.cpp)
target_link_libraries(${name} ecl)
target_link_libraries(${name} resdata)
target_include_directories(${name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/private-include)
endforeach()
@ -641,7 +641,7 @@ add_test(NAME ecl_fault_block_layer_equinor COMMAND ecl_fault_block_layer_equino
if (HAVE_UTIL_ABORT_INTERCEPT)
add_executable(ecl_fortio ecl/tests/ecl_fortio.cpp)
target_link_libraries( ecl_fortio ecl)
target_link_libraries( ecl_fortio resdata)
add_test(NAME ecl_fortio COMMAND ecl_fortio ${_eclpath}/Gurbat/ECLIPSE.UNRST)
endif()
@ -698,7 +698,7 @@ add_test(NAME well_lgr_load2 COMMAND well_lgr_load ${_eclpath}/AmalgLGRcase/TEST
# geometry
#
add_executable(geo_surface geometry/tests/geo_surface.cpp)
target_link_libraries(geo_surface ecl)
target_link_libraries(geo_surface resdata)
add_test(NAME geo_surface COMMAND geo_surface
${_geopath}/Surface.irap
${_geopath}/Surface_incompatible.irap)

View File

@ -361,7 +361,7 @@ static ecl_grav_survey_type * ecl_grav_survey_alloc_empty(const ecl_grav_type *
/**
Check that the rporv values are in the right ballpark. For ECLIPSE
version 2008.2 they are way fucking off. Check PORV versus RPORV
version 2008.2 they are way off. Check PORV versus RPORV
for some random locations in the grid.
*/

View File

@ -39,7 +39,7 @@
/**
Check that the rporv values are in the right ballpark. For
ECLIPSE version 2008.2 they are way fucking off. Check PORV
ECLIPSE version 2008.2 they are way off. Check PORV
versus RPORV for ten 'random' locations in the grid.
*/

View File

@ -674,9 +674,7 @@ static void point_copy_values(point_type * p , const point_type * src) {
#define CELL_FLAG_VALID 1 /* In the case of GRID files not necessarily all cells geometry values set - in that case this will be left as false. */
#define CELL_FLAG_CENTER 2 /* Has the center value been calculated - this is by default not done to speed up loading a tiny bit. */
#define CELL_FLAG_TAINTED 4 /* lazy fucking stupid reservoir engineers make invalid grid
cells - for kicks?? must try to keep those cells out of
real-world calculations with some hysteric heuristics.*/
#define CELL_FLAG_TAINTED 4 /* */
#define CELL_FLAG_VOLUME 8
typedef struct ecl_cell_struct ecl_cell_type;
@ -996,8 +994,7 @@ static double ecl_cell_max_y( const ecl_cell_type * cell ) {
/**
The problem is that some extremely fucking stupid reservoir
engineers purpousely have made grids with invalid cells. Typically
Grids with invalid cells. Typically
the cells accomodating numerical aquifers are located at an utm
position (0,0).
@ -2065,7 +2062,7 @@ static void ecl_grid_pillar_cross_planes(const point_type * p0,
static void ecl_grid_init_mapaxes( ecl_grid_type * ecl_grid , bool apply_mapaxes, const float * mapaxes) {
if (ecl_grid->global_grid != NULL)
util_abort("%s: hmmmm - this is a major fuck up; trying to grid transformation data from mapaxes for a subgrid(lgr)\n",__func__);
util_abort("%s: Invalid operation: trying to grid transformation data from mapaxes for a subgrid(lgr)\n",__func__);
{
const double unit_y[2] = {mapaxes[0] - mapaxes[2] , mapaxes[1] - mapaxes[3]};
const double unit_x[2] = {mapaxes[4] - mapaxes[2] , mapaxes[5] - mapaxes[3]};

View File

@ -554,7 +554,7 @@ ecl_kw_type * ecl_kw_fscanf_alloc_grdecl( FILE * stream , const char * kw , int
This function will read and allocate the next keyword in the
file. This function does not take either kw or the size of the kw
as input, and has virtually zero possibilities to check what it is
doing. The possibilities of failure are fucking endless, and the
doing. The possibilities of failure are endless, and the
function should only be used when you are goddamn certain that the
input file is well formatted.
*/

View File

@ -428,7 +428,7 @@ void ecl_region_deselect_in_interval( ecl_region_type * region , const ecl_kw_ty
/*****************************************************************/
/**
This is waaaay to fucking large:
This is waaaay to large:
Float / Int / double * Active / Global * More / Less ==> In total 12 code blocks written out ...
*/

View File

@ -226,7 +226,7 @@ static bool ecl_sum_fread(ecl_sum_type * ecl_sum , const char *header_file , con
else if (file_type == ECL_UNIFIED_SUMMARY_FILE)
ecl_sum_set_unified( ecl_sum , true);
else
util_abort("%s: what the fuck? \n",__func__);
util_abort("%s: error \n",__func__);
} else
return false;

View File

@ -490,7 +490,7 @@ bool layer_trace_block_edge( const layer_type * layer , int start_i , int start_
point_shift( &start_corner , 0 , 1 );
layer_trace_block_edge__(layer , start_corner , i , j , value , LEFT_EDGE , corner_list , cell_list);
} else
util_abort("%s: what the fuck - internal error \n",__func__);
util_abort("%s: internal error \n",__func__);
int_vector_select_unique( cell_list );
return true;

View File

@ -51,7 +51,7 @@
For instance the keyword 'NEWTON' starts with 'N' and is
classified as a NETWORK type variable. However it should rather
be classified as a MISC type variable. (What a fucking mess).
be classified as a MISC type variable.
The special_vars list is used in the functions
ecl_smspec_identify_special_var() and ecl_smspec_identify_var_type().

View File

@ -623,7 +623,7 @@ values (2e20) are denoted with '*'.
#define FILEHEAD_ORGFORMAT_INDEX 6
#define GRIDHEAD_GRIDTYPE_CORNERPOINT 1 /* <----\ */
/* | Fucking hysterical! */
/* | */
#define FILEHEAD_GRIDTYPE_CORNERPOINT 0 /* <----/ */
#define FILEHEAD_ORGTYPE_CORNERPOINT 1

View File

@ -871,7 +871,7 @@ char * util_alloc_realpath(const char * input_path) {
the entry exists; and if not we abort. If the entry indeed exists
we call the util_alloc_cwd_abs_path() function: */
#ifdef ERT_HAVE_SYMLINK
ERROR - What the fuck; have symlinks and not realpath()?!
ERROR - internal error - have symlinks and not realpath()?!
#endif
if (!util_entry_exists( input_path ))
util_abort("%s: input_path:%s does not exist - failed.\n",__func__ , input_path);
@ -912,7 +912,7 @@ char * util_alloc_abs_path( const char * path ) {
/**
Both path arguments must be absolute paths; if not a copy of the
input path will be returned. Neither of the input arguments can
have "/../" elements - that will just fuck things up.
have "/../" elements
root_path can be NULL - in which case cwd is used.
*/

View File

@ -33,7 +33,7 @@ add_library(custom-opm-flowdiag-app
find_package(Boost REQUIRED filesystem system)
target_link_libraries(custom-opm-flowdiag-app
ecl
resdata
Boost::filesystem
)