### Build a Hello Example with Make Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/fbc/packages/FBCTools/thirdParty/xsd/xsd-3.3.0-i686-windows/README-CYGWIN.txt Navigate to the example directory and run 'make' to build the hello example. This assumes you are in a UNIX-like environment with GNU make installed. ```bash cd examples/cxx/tree/hello make ``` -------------------------------- ### Build and install project Source: https://github.com/deltares/delft3d/blob/main/doc/compiling_Windows.md Executes the configuration, compilation, and installation steps in a single command. ```bash python build.py --build ``` -------------------------------- ### Installation Rules Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/part/delpar/CMakeLists.txt Defines installation paths for the executable, scripts, and data files. ```cmake install(TARGETS ${executable_name} RUNTIME DESTINATION bin) install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/../resources/scripts/run_delpar.${platform_extension} DESTINATION bin) install(FILES ${CMAKE_SOURCE_DIR}/../engines_gpl/part/resources/data/leewayfactors.csv DESTINATION share/delft3d) if(WIN32) install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/../resources/scripts/dshell_run_delpar.${platform_extension} DESTINATION bin) endif(WIN32) ``` -------------------------------- ### Install GKlib Library Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/metis/metis-5.1.0/GKlib/BUILD.txt Execute this command to install the GKlib library after building. ```bash $ make install ``` -------------------------------- ### Define installation rules Source: https://github.com/deltares/delft3d/blob/main/src/tools_gpl/waq_tools/agrhyd/CMakeLists.txt Specifies the installation paths for the executable, configuration files, and scripts. ```cmake install(TARGETS ${executable_name} RUNTIME DESTINATION bin) install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/resources/default/agrhyd.ini DESTINATION share/delft3d) install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/resources/scripts/run_agrhyd.${platform_extension} DESTINATION bin) ``` -------------------------------- ### Define installation rules Source: https://github.com/deltares/delft3d/blob/main/src/tools_gpl/waq_tools/waqmerge/CMakeLists.txt Specifies the installation destination for the executable and associated scripts. ```cmake # Set post-build step set(install_dir ${CMAKE_BINARY_DIR}) set(build_dir ${CMAKE_BINARY_DIR}) install(TARGETS ${executable_name} RUNTIME DESTINATION bin) install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/resources/scripts/run_waqmerge.${platform_extension} DESTINATION bin) ``` -------------------------------- ### Project Structure and Installation Source: https://github.com/deltares/delft3d/blob/main/src/test/engines_gpl/dflowfm/packages/dflowfm_kernel/CMakeLists.txt Sets up IDE folder structure and defines installation rules for the executable and test data. ```cmake include_directories(${mpi_module_path}) # Create the folder structure in vfproj source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${source}) set_target_properties (${executable_name} PROPERTIES FOLDER tests/engines_gpl/dflowfm) configure_visual_studio_user_file(${executable_name}) install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../test_dflowfm/test_data DESTINATION test) if (WIN32) install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ DESTINATION test) endif() install(TARGETS ${executable_name} RUNTIME DESTINATION test) ``` -------------------------------- ### Installation and Project Structure Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/dimr/packages/dimr_lib/CMakeLists.txt Organizes source files into groups and defines installation rules for the library. ```cmake # Create the vfproj structure source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${source} ${headers} ${rc_version_file}) set_target_properties (${library_name} PROPERTIES FOLDER engines_gpl/dimr) install(TARGETS ${library_name} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ) ``` -------------------------------- ### Define Installation Rules Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/dsle/packages/CMakeLists.txt Specifies the destination directories for runtime and public header files during installation. ```cmake install( TARGETS dsle RUNTIME DESTINATION bin PUBLIC_HEADER DESTINATION include ) ``` -------------------------------- ### Install Docker Engine Source: https://github.com/deltares/delft3d/blob/main/doc/compiling_Linux.md Commands to install Docker CE, configure the repository, and start the service on RHEL-based distributions. ```bash # 1. Install repo management tools sudo dnf install -y yum-utils # 2. Add the Docker CE repository (CentOS repo used for AlmaLinux/CentOS) sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo # 3. Install Docker Engine + CLI + containerd + Compose plugin sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin # 4. Enable & start service sudo systemctl enable --now docker ``` -------------------------------- ### Build and Install GoogleTest on Unix-like Systems Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/googletest/googletest-main/googletest/README.md After generating Makefiles with CMake, build GoogleTest using 'make' and install it system-wide using 'sudo make install'. ```bash make sudo make install # Install in /usr/local/ by default ``` -------------------------------- ### Install Resource Files Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/waq/waq_process/CMakeLists.txt Installs necessary data files and directories to the share/delft3d installation path. ```cmake install(FILES ${CMAKE_SOURCE_DIR}/../engines_gpl/waq/resources/process_lib/bloom.spe DESTINATION share/delft3d) install(FILES ${CMAKE_SOURCE_DIR}/../engines_gpl/waq/resources/process_lib/proc_def.dat DESTINATION share/delft3d) install(FILES ${CMAKE_SOURCE_DIR}/../engines_gpl/waq/resources/process_lib/proc_def.def DESTINATION share/delft3d) install(DIRECTORY ${CMAKE_SOURCE_DIR}/../engines_gpl/waq/resources/process_lib/csvFiles DESTINATION share/delft3d) install(DIRECTORY ${CMAKE_SOURCE_DIR}/../engines_gpl/waq/resources/process_lib/subFiles DESTINATION share/delft3d) install(DIRECTORY ${CMAKE_SOURCE_DIR}/../engines_gpl/waq/resources/open_process_lib_example DESTINATION share/delft3d) ``` -------------------------------- ### Set Target Properties and Installation Source: https://github.com/deltares/delft3d/blob/main/src/tools_gpl/cosumo_bmi/CMakeLists.txt Organizes files in Visual Studio and defines installation paths for the library. ```cmake source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${library_files}) set_target_properties (${library_name} PROPERTIES FOLDER tools_gpl/cosumo_bmi) install(TARGETS ${library_name} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ) ``` -------------------------------- ### DelftIO Configuration File Example Source: https://github.com/deltares/delft3d/blob/main/src/utils_lgpl/delftio/doc/userDoc/pages/config_f90.html An example of a 'dioconfig.ini' file demonstrating the structure for [Settings], [Defaults], and specific [Dataset] configurations. ```ini [Settings] Delay=200 TimeOut=00;00:02:00.00 [Defaults] StreamType=ASCII OnLine=True NumberOfDatasets=2 [Dataset1] Name=Dataset_A StreamType=Binary OnLine=False [Dataset2] Name=Dataset_B Active=False ``` -------------------------------- ### Install Executable Source: https://github.com/deltares/delft3d/blob/main/src/tools_gpl/nesthd1/packages/nesthd1/CMakeLists.txt Installs the built executable to the 'bin' directory relative to the runtime destination. This makes the executable available after installation. ```cmake install(TARGETS ${executable_name} RUNTIME DESTINATION bin) ``` -------------------------------- ### Define Installation Rules Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/flow2d3d/packages/flow2d3d/CMakeLists.txt Specifies installation paths for target binaries, runtime DLLs, scripts, and configuration files. ```cmake install(TARGETS ${library_name} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ) install(FILES $ DESTINATION bin) if (UNIX) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/flow2d3d/scripts/submit_dflow2d3d.sh DESTINATION bin) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/flow2d3d/scripts/rd2d3d.sh DESTINATION bin) endif(UNIX) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/flow2d3d/scripts/run_dflow2d3d.${platform_extension} DESTINATION bin) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/flow2d3d/scripts/run_dflow2d3d_dwaves.${platform_extension} DESTINATION bin) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/flow2d3d/scripts/run_dflow2d3d_fluidmud.${platform_extension} DESTINATION bin) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/flow2d3d/scripts/run_dflow2d3d_parallel.${platform_extension} DESTINATION bin) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/flow2d3d/scripts/run_dflow2d3d_parallel_dwaves.${platform_extension} DESTINATION bin) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/flow2d3d/scripts/run_dflow2d3d_rtc.${platform_extension} DESTINATION bin) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/flow2d3d/default/dioconfig.ini DESTINATION share/delft3d) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/flow2d3d/default/files.def DESTINATION share/delft3d) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/flow2d3d/default/tabmom DESTINATION share/delft3d) ``` -------------------------------- ### Configure Installation Paths Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/fbc/packages/FBCTools/CMakeLists.txt Defines support files and installation rules for binaries and dependencies on Linux and Windows. ```cmake set(FBC_SUPPORT_FILES ${PROJECT_SOURCE_DIR}/xsd/pi_diag.xsd ${PROJECT_SOURCE_DIR}/xsd/pi_modelparameters.xsd ${PROJECT_SOURCE_DIR}/xsd/pi_run.xsd ${PROJECT_SOURCE_DIR}/xsd/pi_sharedtypes.xsd ${PROJECT_SOURCE_DIR}/xsd/pi_state.xsd ${PROJECT_SOURCE_DIR}/xsd/pi_timeseries.xsd ${PROJECT_SOURCE_DIR}/xsd/rtcDataConfig.xsd ${PROJECT_SOURCE_DIR}/xsd/rtcObjectiveConfig.xsd ${PROJECT_SOURCE_DIR}/xsd/rtcRuntimeConfig.xsd ${PROJECT_SOURCE_DIR}/xsd/rtcSharedTypes.xsd ${PROJECT_SOURCE_DIR}/xsd/rtcStateConfig.xsd ${PROJECT_SOURCE_DIR}/xsd/rtcToolsConfig.xsd ${PROJECT_SOURCE_DIR}/xsd/treeVector.xsd ) install(FILES ${FBC_SUPPORT_FILES} DESTINATION share/drtc) install(TARGETS FBCTools RUNTIME DESTINATION bin) install(TARGETS FBCTools_BMI RUNTIME DESTINATION bin LIBRARY DESTINATION lib ) if(WIN32) install(FILES ${PROJECT_SOURCE_DIR}/thirdParty/xerces/xerces-c-3.1.1-x86_64-windows-vc-10.0/bin/xerces-c_3_1.dll DESTINATION bin) if(NOT Boost_USE_STATIC_LIBS) get_target_property(BOOST_FILESYSTEM_DLL Boost::filesystem LOCATION) get_target_property(BOOST_DATETIME_DLL Boost::date_time LOCATION) install(FILES ${BOOST_FILESYSTEM_DLL} ${BOOST_DATETIME_DLL} DESTINATION bin) endif() endif() ``` -------------------------------- ### Configure, Build, and Install libsigwatch Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/libsigwatch/sigwatch.html Standard commands to configure, build, and install the libsigwatch library on a system. Assumes the distribution has been downloaded. ```bash % ./configure % make % make install ``` -------------------------------- ### Filter Testbench Execution Source: https://github.com/deltares/delft3d/blob/main/test/deltares_testbench/doc/readme-testbench.tex Example of using the --filter parameter to restrict test execution based on program name, test case, runtime, or starting point. ```text --filter "program=waq,dflowfm:testcase=aaa,bbb:maxruntime=<10:startat=ccc" program (program name = at least one substring) testcase (test case name = at least one substring) maxruntime (test run time = float, larger, smaller, equals) startat (test case name = substring is the first testcase) ``` -------------------------------- ### Install License Files Source: https://github.com/deltares/delft3d/blob/main/src/cmake/CMakeLists.txt Installs various license text files to the share directory. ```cmake install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../bsd-2.txt ${CMAKE_CURRENT_SOURCE_DIR}/../../bsd-3.txt ${CMAKE_CURRENT_SOURCE_DIR}/../../agpl-3.0.txt ${CMAKE_CURRENT_SOURCE_DIR}/../../gpl-3.0.txt ${CMAKE_CURRENT_SOURCE_DIR}/../../lgpl-2.1.txt DESTINATION share) ``` -------------------------------- ### Install dependencies with uv Source: https://github.com/deltares/delft3d/blob/main/ci/python/README.md Installs all project dependencies including development tools using uv. ```bash # From this directory uv sync --extra all ``` -------------------------------- ### Install Executable and Scripts Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/swan/swan_omp/CMakeLists.txt Defines the installation rules for the compiled executable and associated scripts. ```cmake set(install_dir ${CMAKE_BINARY_DIR}) set(build_dir ${CMAKE_BINARY_DIR}) install(TARGETS ${executable_name} RUNTIME DESTINATION bin) install(PROGRAMS ../scripts/swan.${platform_extension} DESTINATION bin) ``` -------------------------------- ### Install SQLite3 Targets Source: https://github.com/deltares/delft3d/blob/main/conan/recipes/sqlite3/all/CMakeLists.txt Defines installation rules for the library and header files. ```cmake include(GNUInstallDirs) install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(DIRECTORY ${SQLITE3_SRC_DIR}/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h") ``` -------------------------------- ### Visual Studio and Installation Configuration Source: https://github.com/deltares/delft3d/blob/main/src/tools_gpl/pre_c_sumo/src/CMakeLists.txt Handles Visual Studio project user files, source grouping, and installation rules. ```cmake if(CMAKE_GENERATOR MATCHES "Visual Studio" AND NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/preC-SUMO.vcxproj.$ENV{USERNAME}.user") configure_file( "${CMAKE_BINARY_DIR}/template.vcxproj.user" "${CMAKE_CURRENT_BINARY_DIR}/preC-SUMO.vcxproj.user" @ONLY ) endif() # Define how the files should be structured within Visual Studio source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${source_files} main.cpp) set_target_properties(preC-SUMO pre_c_sumo_lib PROPERTIES FOLDER tools_gpl/pre_c_sumo) install(TARGETS preC-SUMO RUNTIME DESTINATION bin ) ``` -------------------------------- ### Install dependencies and build with CMake Source: https://github.com/deltares/delft3d/blob/main/doc/compiling_Windows.md Install dependencies for Debug, Release, and RelWithDebInfo configurations, then configure and build the project using CMake. ```bat :: 1. Install dependencies for all three configurations. :: The first call may build packages (or download them from Nexus). The other two reuse the cache. :: Replace the value below with the applicable name from `conan profile list`. set "DELFT3D_CONAN_PROFILE=" conan install . --profile:all=%DELFT3D_CONAN_PROFILE% ^ --settings:all build_type=Release ^ --output-folder=build_fm-suite\conan ^ --lockfile=conan.lock conan install . --profile:all=%DELFT3D_CONAN_PROFILE% ^ --settings:all build_type=Release ^ --settings:all &:build_type=Debug ^ --output-folder=build_fm-suite\conan ^ --lockfile=conan.lock conan install . --profile:all=%DELFT3D_CONAN_PROFILE% ^ --settings:all build_type=Release ^ --settings:all &:build_type=RelWithDebInfo ^ --output-folder=build_fm-suite\conan ^ --lockfile=conan.lock :: 2. CMake configure cmake -S .\src\cmake -B build_fm-suite -T fortran=ifx -A x64 ^ -D CONFIGURATION_TYPE:STRING="fm-suite" ^ -D CMAKE_INSTALL_PREFIX=.\install_fm-suite :: 3. Build & install cmake --build build_fm-suite --config Debug --parallel cmake --install build_fm-suite --config Debug ``` -------------------------------- ### Install Git on Linux Source: https://github.com/deltares/delft3d/blob/main/doc/compiling_Linux.md Install the git version control system using the system package manager. ```bash sudo dnf install -y git ``` -------------------------------- ### Set Installation Directory Source: https://github.com/deltares/delft3d/blob/main/src/cmake/CMakeLists.txt Normalizes configuration names and sets a default installation prefix if not already initialized. ```cmake string(TOUPPER ${CONFIGURATION_TYPE} configuration_type) string(TOLOWER ${CONFIGURATION_TYPE} configuration_type_lower) IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(installdir "install_${configuration_type_lower}") SET(CMAKE_INSTALL_PREFIX ${checkout_src_root}/../${installdir} CACHE PATH "default" FORCE) ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) ``` -------------------------------- ### Install Conan configuration Source: https://github.com/deltares/delft3d/blob/main/doc/compiling_Linux.md Install the repository's Conan profiles, settings, and remotes into the local Conan home directory. ```bash conan config install conan/config ``` -------------------------------- ### Install Conan configuration Source: https://github.com/deltares/delft3d/blob/main/doc/compiling_Windows.md Install the repository's Conan profiles, settings, and remotes into the local Conan home. ```bat conan config install conan\config ``` -------------------------------- ### Install GKlib Library and Headers Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/metis/metis-5.1.0/GKlib/CMakeLists.txt Defines installation rules for the GKlib static library and its header files to standard locations. ```cmake install(TARGETS GKlib ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) install(FILES ${GKlib_includes} DESTINATION include) ``` -------------------------------- ### Define defaultTestCases in XML Source: https://github.com/deltares/delft3d/blob/main/test/deltares_testbench/doc/readme-testbench.tex Example configuration showing how to define defaultTestCases with specific programs, arguments, locations, and execution time limits. ```XML -m dimr.xml win64 . 60.0 -m dimr_config.xml win64 . 60.0 ``` -------------------------------- ### Install Dependencies (Windows) Source: https://github.com/deltares/delft3d/blob/main/test/deltares_testbench/README.md Install testbench dependencies on Windows using pip, choosing between development or standard requirements. ```cmd pip install -r pip/win-requirements.txt pip install -r pip/win-dev-requirements.txt ``` -------------------------------- ### Project Properties and Installation Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/dimr/packages/dimr/CMakeLists.txt Sets target properties for IDE organization and defines installation rules for binaries and scripts. ```cmake # Create the folder structure in vfproj source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${source} ${dimr_lib_sources} ${header_version_file} ${rc_version_file}) set_target_properties (${executable_name} PROPERTIES FOLDER engines_gpl/dimr) if (WIN32) if (CMAKE_GENERATOR MATCHES "Visual Studio" AND NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/${executable_name}.vcxproj.$ENV{USERNAME}.user") configure_file( "${CMAKE_BINARY_DIR}/template.vcxproj.user" "${CMAKE_CURRENT_BINARY_DIR}/${executable_name}.vcxproj.user" @ONLY ) endif() endif(WIN32) message(STATUS "build_config ${build_config}") install(TARGETS ${executable_name} RUNTIME DESTINATION bin) install(FILES $ DESTINATION bin) if (UNIX) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/dimr/scripts/generic/lnx64/run_dimr.sh DESTINATION bin) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/dimr/scripts/generic/lnx64/submit_dimr.sh DESTINATION bin) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/dimr/scripts/generic/lnx64/submit_dimr_h7.sh DESTINATION bin) endif(UNIX) if (WIN32) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/dimr/scripts/generic/win64/run_dimr.bat DESTINATION bin) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/dimr/scripts/generic/win64/run_dimr_parallel.bat DESTINATION bin) endif(WIN32) ``` -------------------------------- ### Install Dependencies (Linux) Source: https://github.com/deltares/delft3d/blob/main/test/deltares_testbench/README.md Install testbench dependencies on Linux using pip, choosing between development or standard requirements. ```bash pip install -r pip/lnx-requirements.txt pip install -r pip/lnx-dev-requirements.txt ``` -------------------------------- ### Set IDE Structure and Installation Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/rr/packages/rr/CMakeLists.txt Organizes source files in Visual Studio and defines the installation path for the executable. ```cmake source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${source_files}) set_target_properties (${executable_name} PROPERTIES FOLDER engines_gpl/rr) install(TARGETS ${executable_name} RUNTIME DESTINATION bin) ``` -------------------------------- ### Configure IDE and installation rules Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/dflowfm/packages/dflowfm-cli_exe/CMakeLists.txt Organizes source files for IDEs and defines installation paths for the executable and associated scripts. ```cmake # Create the folder structure in Visual Studio source_group("Resources" FILES ${rc_version_file} ${icon_file} ) # Create the folder structure in vfproj source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${source}) set_target_properties (${executable_name} PROPERTIES FOLDER engines_gpl/dflowfm) if (WIN32) configure_visual_studio_user_file(${executable_name}) endif(WIN32) install(TARGETS ${executable_name} RUNTIME DESTINATION bin) install(FILES $ DESTINATION bin) if(WIN32) if(WITH_INTERACTER) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../interacter install_interacter) endif() endif() if (UNIX) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/dflowfm/scripts/parallel/generate_parallel_mdu.sh DESTINATION bin) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/dimr/scripts/generic/lnx64/submit_dflowfm_h7.sh DESTINATION bin) endif(UNIX) install(PROGRAMS ${CMAKE_SOURCE_DIR}/../engines_gpl/dflowfm/scripts/runscripts/run_dflowfm.${platform_extension} DESTINATION bin) ``` -------------------------------- ### Install Project and Dependencies for Testing Source: https://github.com/deltares/delft3d/blob/main/tools/deltares_fortran_styler/README.md Set up a virtual environment, activate it, and install the package with development dependencies using pip. This is required before running pytest. ```bash # Create and activate a virtual environment python -m venv .venv # (first time only) .venv\Scripts\activate # Windows source .venv/bin/activate # Linux/Mac # Install the package with development dependencies pip install -e ".[dev]" ``` -------------------------------- ### Verify MinIO tool installation Source: https://github.com/deltares/delft3d/blob/main/test/deltares_testbench/tools/minio/doc/minio-tool.tex Check if the MinIO tool is correctly installed and accessible by displaying the help menu. ```bash python -m tools.minio ---help ``` -------------------------------- ### init (double Q0, double hS0, double dG0, double dV0, double hQ0) Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/rr/doc/walrus/html/class_w_c-members.html Initializes the system with multiple parameters. ```APIDOC ## init ### Description Initializes the system with multiple parameters. ### Parameters #### Path Parameters - **Q0** (double) - Description of Q0 parameter - **hS0** (double) - Description of hS0 parameter - **dG0** (double) - Description of dG0 parameter - **dV0** (double) - Description of dV0 parameter - **hQ0** (double) - Description of hQ0 parameter ``` -------------------------------- ### ESMF Environment Variables Setup Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/esmf/lnx64/doc/readme.txt Set essential environment variables for ESMF compilation, including installation directory, communication method, compiler, and NetCDF paths. Note the specific order for NetCDF libraries. ```bash export ESMF_DIR=/cygdrive/c/code/esmf/esmf export ESMF_COMM="mpiuni" export ESMF_COMPILER=gfortran export ESMF_NETCDF="split" export ESMF_NETCDF_INCLUDE=/cygdrive/c/code/netcdf/include export ESMF_NETCDF_LIBPATH=/cygdrive/c/code/netcdf/lib export ESMF_NETCDF_LIBS="-lnetcdff -lnetcdf_c++ -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -lgfortran -lstdc++" ``` -------------------------------- ### Build libxml2 using CMake Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/libxml2/readme_deltares.txt Configure, build, and install libxml2 using CMake. Ensure CMAKE_INSTALL_PREFIX is set to the desired location for installation. ```bash cmake -S . -B build -G "Ninja" -D CMAKE_BUILD_TYPE=Release -D CMAKE_C_COMPILER=cl -D CMAKE_CXX_COMPILER=cl -D CMAKE_INSTALL_PREFIX=\src\third_party_open\libxml2\libxml2-v2.15.1 -D LIBXML2_WITH_ICONV=OFF -D LIBXML2_WITH_LZMA=OFF -D LIBXML2_WITH_PYTHON=OFF cmake --build build --config Release --parallel cmake --install build --config Release ``` -------------------------------- ### init (double attime, double Q0) Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/rr/doc/walrus/html/class_w_c-members.html Initializes the system with a given time and Q0 value. ```APIDOC ## init ### Description Initializes the system with a given time and Q0 value. ### Parameters #### Path Parameters - **attime** (double) - Description of attime parameter - **Q0** (double) - Description of Q0 parameter ``` -------------------------------- ### Configure METIS with Custom Installation Prefix Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/metis/metis-5.1.0/BUILD.txt Configures METIS to be installed in a custom directory. This path will be used when 'make install' is executed. ```bash $ make config prefix=~/myroot/ ``` -------------------------------- ### Configure GKlib Installation Prefix Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/metis/metis-5.1.0/GKlib/BUILD.txt Specify a custom installation directory using 'make config'. This command sets the installation prefix to '~/local'. ```bash $ make config prefix=~/local ``` -------------------------------- ### init (double Q0) Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/rr/doc/walrus/html/class_w_c-members.html Initializes the system with a given Q0 value. ```APIDOC ## init ### Description Initializes the system with a given Q0 value. ### Parameters #### Path Parameters - **Q0** (double) - Description of Q0 parameter ``` -------------------------------- ### get Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/rr/doc/walrus/html/class_w_a_l_r_u_s.html Gets a state variable from the WALRUS model. ```APIDOC ## get ### Description Gets a state variable from the WALRUS model. ### Method Signature `double get(enum WALRUS_STATE s)` ### Parameters * `s` (enum WALRUS_STATE): The state variable to retrieve. ### Returns * (double): The value of the requested state variable. ``` ```APIDOC ## get ### Description Gets a state variable from the WALRUS model. ### Method Signature `double get(enum WALRUS_DEPS d)` ### Parameters * `d` (enum WALRUS_DEPS): The dependency to retrieve. ### Returns * (double): The value of the requested dependency. ``` ```APIDOC ## get ### Description Gets internal fluxes cumulative over the last time step. ### Method Signature `double get(enum WALRUS_USEDFLUX f)` ### Parameters * `f` (enum WALRUS_USEDFLUX): The type of flux to retrieve. ### Returns * (double): The cumulative flux value. ``` -------------------------------- ### Configure Local Paths and Locations Source: https://github.com/deltares/delft3d/blob/main/test/deltares_testbench/doc/readme-testbench.tex Example of the config section defining local directory paths and remote data locations. The {server_base_url} placeholder is automatically injected by the TestBench.py script. ```XML .\data\cases .\data\reference_engines .\data\references_results {server_base_url}/references {server_base_url}/references ./data/engines ``` -------------------------------- ### Set Installation and Build Directories Source: https://github.com/deltares/delft3d/blob/main/src/tools_gpl/nesthd1/packages/nesthd1/CMakeLists.txt Defines variables for installation and build directories. These are typically used to specify where artifacts should be placed during the build and installation phases. ```cmake set(install_dir ${CMAKE_BINARY_DIR}) set(build_dir ${CMAKE_BINARY_DIR}) ``` -------------------------------- ### Test Case Configuration XML Source: https://github.com/deltares/delft3d/blob/main/test/deltares_testbench/tools/minio/doc/minio-tool.tex Example of a test case configuration entry in the testbench, specifying the path, version timestamp, and validation checks for output files. ```XML e02_dflowfm/f003_advection/c041_thacker1d_squares 15000.0000000 ``` -------------------------------- ### Define a Test Case in XML Source: https://github.com/deltares/delft3d/blob/main/test/deltares_testbench/doc/readme-testbench.tex Example structure of a testCase section within the deltaresTestbench_v3 configuration, including dependencies, program arguments, and output validation checks. ```XML e05_part/f03_zlayers/hydro e02_dflowfm/f001_general/c220_drypoints_pol norway.mdu --autostartstop --nodisplay 15.0 1 ``` -------------------------------- ### Test case CSV file format Source: https://github.com/deltares/delft3d/blob/main/test/deltares_testbench/tools/minio/doc/minio-tool.tex Example of a CSV file used to specify test cases and optional XML configuration filters for batch operations. ```text # List the testcases and Optional xml configuration filter. # Seperate the testcase with the xml config file filter with a # `,` Comments can be place in the list file with the prefix `#` # Use the linux configurations associated with the testcase to # run the [push, pull, update_references] command on. e112_f01_c11_waardenburg, *_lnx64* e112_f01_c11_waardenburg, *_win64* # Strict xml filter allowing only 1 xml to match e112_f01_c11_waardenburg, configs/apptainer/dimr/dimr_smoke_test_lnx64.xml # Update all configurations the data waardenburg is used in. # Note: Fails if reference- or input path is different for the # testcase between configurations! e112_f01_c11_waardenburg ``` -------------------------------- ### Configure and Install Eigen with CMake Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/eigen/readme_deltares.txt Use this command to configure the Eigen build with specific options and then install it. Ensure to replace `` with your desired installation path. ```bash cmake -S . -B build -G "Ninja" -D CMAKE_C_COMPILER=cl -D CMAKE_CXX_COMPILER=cl -D CMAKE_INSTALL_PREFIX=\src\third_party_open\eigen\eigen-5.0.1\ -D EIGEN_BUILD_TESTING=OFF -D EIGEN_BUILD_BLAS=OFF -D EIGEN_BUILD_LAPACK=OFF -D EIGEN_BUILD_DOC=OFF -D EIGEN_BUILD_DEMOS=OFF cmake --install build ``` -------------------------------- ### Update Test Case Version Attribute Source: https://github.com/deltares/delft3d/blob/main/test/deltares_testbench/doc/readme-testbench.tex Example of updating the version attribute within a testCase tag using a timestamp formatted as YYYY.MM.DDTHH:MM. ```XML ``` -------------------------------- ### GPL v3 Interactive Program Startup Notice Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/FLAP/LICENSE.gpl3.md If your program has terminal interaction, display this notice upon startup to inform users about its licensing, warranty, and redistribution conditions. ```text Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details. ``` -------------------------------- ### Install Test Executable Source: https://github.com/deltares/delft3d/blob/main/src/utils_gpl/morphology/packages/morphology_kernel/test/CMakeLists.txt Specifies the installation destination for the compiled test executable. ```cmake install(TARGETS test_morphology RUNTIME DESTINATION test) ``` -------------------------------- ### Install GoogleTest Project Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/googletest/googletest-main/googletest/CMakeLists.txt Installs the gtest and gtest_main targets as part of the project. ```cmake install_project(gtest gtest_main) ``` -------------------------------- ### init (attime, Q0, hS0, dG0, dV0, hQ0, Gfrac) Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/rr/doc/walrus/html/class_w_a_l_r_u_s-members.html Initializes the simulation at a specific time with multiple initial values including Gfrac. ```APIDOC ## init (attime, Q0, hS0, dG0, dV0, hQ0, Gfrac) ### Description Initializes the simulation at a specific time with multiple initial values including Gfrac. ### Parameters #### Path Parameters - **attime** (double) - The time of initialization. - **Q0** (double) - Initial Q0 value. - **hS0** (double) - Initial hS0 value. - **dG0** (double) - Initial dG0 value. - **dV0** (double) - Initial dV0 value. - **hQ0** (double) - Initial hQ0 value. - **Gfrac** (double) - Initial Gfrac value. ``` -------------------------------- ### init (Q0, hS0, dG0, dV0, hQ0) Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/rr/doc/walrus/html/class_w_a_l_r_u_s-members.html Initializes the simulation with multiple initial values. ```APIDOC ## init (Q0, hS0, dG0, dV0, hQ0) ### Description Initializes the simulation with multiple initial values. ### Parameters #### Path Parameters - **Q0** (double) - Initial Q0 value. - **hS0** (double) - Initial hS0 value. - **dG0** (double) - Initial dG0 value. - **dV0** (double) - Initial dV0 value. - **hQ0** (double) - Initial hQ0 value. ``` -------------------------------- ### Define Installation Rules Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/waq/delwaq_lib/CMakeLists.txt Specifies the destination directories for the built library and runtime DLLs. ```cmake install(TARGETS ${library_name} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ) install(FILES $ DESTINATION bin) ``` -------------------------------- ### Install ddcouple artifacts Source: https://github.com/deltares/delft3d/blob/main/src/tools_gpl/waq_tools/ddcouple/CMakeLists.txt Defines installation rules for the executable and associated helper scripts. ```cmake install(TARGETS ${executable_name} RUNTIME DESTINATION bin) install(PROGRAMS ${CMAKE_CURRENT_LIST_DIR}/resources/scripts/run_ddcouple.${platform_extension} DESTINATION bin) ``` -------------------------------- ### Install dependencies with missing packages Source: https://github.com/deltares/delft3d/blob/main/doc/compiling_Windows.md Install dependencies while building missing packages from source. ```bat conan install . --profile:all=%DELFT3D_CONAN_PROFILE% ^ --settings:all build_type=Release ^ --output-folder=build_fm-suite\conan ^ --lockfile=conan.lock ^ --build=missing ``` -------------------------------- ### init (attime, Q0) Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/rr/doc/walrus/html/class_w_a_l_r_u_s-members.html Initializes the simulation at a specific time with a given Q0 value. ```APIDOC ## init (attime, Q0) ### Description Initializes the simulation at a specific time with a given Q0 value. ### Parameters #### Path Parameters - **attime** (double) - The time of initialization. - **Q0** (double) - The initial Q0 value. ``` -------------------------------- ### init (attime, Q0, hS0, dG0, dV0, hQ0) Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/rr/doc/walrus/html/class_w_a_l_r_u_s-members.html Initializes the simulation at a specific time with multiple initial values. ```APIDOC ## init (attime, Q0, hS0, dG0, dV0, hQ0) ### Description Initializes the simulation at a specific time with multiple initial values. ### Parameters #### Path Parameters - **attime** (double) - The time of initialization. - **Q0** (double) - Initial Q0 value. - **hS0** (double) - Initial hS0 value. - **dG0** (double) - Initial dG0 value. - **dV0** (double) - Initial dV0 value. - **hQ0** (double) - Initial hQ0 value. ``` -------------------------------- ### Verify Conan installation Source: https://github.com/deltares/delft3d/blob/main/doc/compiling_Windows.md Check the installed version of Conan to ensure it is correctly configured. ```bash conan --version ``` -------------------------------- ### Configure Library and Dependencies Source: https://github.com/deltares/delft3d/blob/main/src/tools_gpl/pre_c_sumo/src/CMakeLists.txt Creates the pre_c_sumo_lib library and links required dependencies. ```cmake add_library(pre_c_sumo_lib ${source_files} ${header_files}) target_link_libraries(pre_c_sumo_lib PRIVATE compiler_warnings_settings precice::precice Boost::headers ) target_link_libraries(pre_c_sumo_lib PUBLIC pugixml::pugixml ) target_include_directories(pre_c_sumo_lib PUBLIC ${include_dir}) ``` -------------------------------- ### Install package with pip Source: https://github.com/deltares/delft3d/blob/main/ci/python/README.md Installs the package in editable mode with all optional dependencies using pip. ```bash # From the Delft3D git repository root: pip install --editable ./ci/python[all] ``` -------------------------------- ### init(self, args) Source: https://github.com/deltares/delft3d/blob/main/src/engines_gpl/rr/doc/walrus/html/class_w_a_l_r_u_s_1_1_w_a_l_r_u_s-members.html Initializes the WALRUS.WALRUS object with provided arguments. ```APIDOC ## init init(self, args) ### Description Initializes the WALRUS.WALRUS object with provided arguments. ### Method init ### Parameters #### Self - **self** - The instance of the class. #### Path Parameters - **args** (type) - Description of args parameter. ``` -------------------------------- ### Install Conan via pip Source: https://github.com/deltares/delft3d/blob/main/doc/compiling_Windows.md Install Conan into the active Python environment using pip. ```bash python -m pip install conan ``` -------------------------------- ### Fortran Example of libsigwatch Usage Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/libsigwatch/sigwatch.html Demonstrates how to use watchsignal and getlastsignal functions in a Fortran program to monitor signals like USR1 and HUP. Shows how to compile and run the example. ```fortran program sigs implicit none integer i integer status integer watchsignal integer watchsignalname integer getlastsignal * watch for signal 10 (which is USR1 on this platform) status = watchsignal(10) write(*,'("watchsignal 10:",i2)') status * watch for HUP, too status = watchsignalname("HUP", 99) write(*,'("watchsignal HUP:",i2)') status do i=1,10 call sleep(1) write (\*,'("lastsig=", i2)') getlastsignal() enddo end ``` ```bash % g77 -o libsigwatch-demo -lsigwatch libsigwatch-demo.f % ./libsigwatch-demo & # start in the background ($! now has the PID) \[1\] 15131 watchsignal 10: 0 watchsignal HUP: 0 % lastsig= 0 lastsig= 0 lastsig= 0 kill -HUP $! lastsig=99 # saw it! % lastsig= 0 ... ``` -------------------------------- ### Install Conan via uv Source: https://github.com/deltares/delft3d/blob/main/doc/compiling_Windows.md Use the uv tool manager to install Conan 2. ```bash uv tool install conan ``` -------------------------------- ### Spherepack Usage Example Source: https://github.com/deltares/delft3d/blob/main/src/third_party_open/spherepack/spherepack-e80da29462c5987162a0884baaab7434d0215467/README.md Demonstrates initializing a GaussianSphere object, performing complex spectral analysis, computing and inverting the Laplacian, and cleaning up memory. Ensure 'spherepack' is imported with specific components like 'wp' and 'GaussianSphere'. ```fortran use spherepack, only: & wp, & ! working precision GaussianSphere ! Explicit typing only implicit none type(GaussianSphere) :: foo real(wp), allocatable :: scalar_function(:,:) real(wp), allocatable :: laplacian(:,:) real(wp), allocatable :: solution(:,:) ! Initialize object foo = GaussianSphere(nlat=19, nlon=36) !.... generate some data ! Compute complex spectral coefficients call foo%perform_complex_analysis(scalar_function) ! Compute laplacian on sphere call foo%get_laplacian(scalar_function, laplacian) ! Invert laplacian on sphere call foo%invert_laplacian(laplacian, solution) ! Release memory call foo%destroy() ```