Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ if (NOT TARGET csumo_precice)
add_subdirectory(${checkout_src_root}/${csumo_precice_module} csumo_precice)
endif()

# precicef (preCICE fortran bindings)
if (NOT TARGET precicef)
add_subdirectory(${checkout_src_root}/${precicef_module} precicef)
endif()

# Third party
# FLAP
if(NOT TARGET FLAP)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,10 @@ if(NOT TARGET csumo_precice)
add_subdirectory(${checkout_src_root}/${csumo_precice_module} csumo_precice)
endif()

# precicef (preCICE fortran bindings)
if(NOT TARGET precicef)
add_subdirectory(${checkout_src_root}/${precicef_module} precicef)
endif()

# D-Waq tools
include(${CMAKE_CURRENT_SOURCE_DIR}/configurations/components/dwaq/dwaq_tools.cmake)
3 changes: 3 additions & 0 deletions src/cmake/modules/tools_gpl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ set(csumo_nfio_module "${tools_gpl_path}/csumo_nfio")

# csumo_precice
set(csumo_precice_module "${tools_gpl_path}/csumo_precice")

# precicef (preCICE fortran bindings)
set(precicef_module "${tools_gpl_path}/precicef")
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ target_link_libraries(${executable_name} PRIVATE
gridgeom
deltares_common
netcdff
precicef
)

if(UNIX)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ program unstruc
use m_iset_jaopengl, only: iset_jaopengl
use m_resetb, only: resetb
use m_init_openmp, only: init_openmp

implicit none

integer :: KEY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ function read_commandline() result(istat)
use m_circumcenter_method, only: circumcenter_method, extract_circumcenter_method
use m_missing, only: jadelnetlinktyp
use m_start_parameters, only: MD_AUTOSTART, MD_AUTOSTARTSTOP, MD_NOAUTOSTART
implicit none
use precice, only: precicef_get_version_information
implicit none(type, external)

integer :: istat !< Returned result status
integer :: ncount
Expand Down Expand Up @@ -233,6 +234,12 @@ function read_commandline() result(istat)
end if
end do

case ('precice')
call precicef_get_version_information(msgbuf, LEN(msgbuf))
write (*, '(a)') 'Using preCICE: '//trim(msgbuf)
istat = DFM_EXIT ! For now: return and just exit without any error.
return

case ('h', 'help')
call print_help_commandline()
istat = DFM_EXIT ! Exit without any error.
Expand Down
17 changes: 17 additions & 0 deletions src/tools_gpl/precicef/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Gather source files
set(source_files src/precice.F90)

add_library(precicef STATIC ${source_files})

if(WIN32)
find_package(precice REQUIRED CONFIG PATHS "${CMAKE_SOURCE_DIR}/../third_party_open/precice/precice-3_3_0_modified/lib/cmake/precice")
else()
# Find preCICE library
find_package(precice REQUIRED CONFIG)
endif()

target_link_libraries(precicef PUBLIC precice::precice)

# Define how the files should be structured within Visual Studio
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${source_files})
set_target_properties (precicef PROPERTIES FOLDER tools_gpl/precicef)
Loading