11cmake_minimum_required (VERSION 3.13.0)
22
3- project (meshFields VERSION 0.1.0 LANGUAGES CXX)
3+ project (meshfields VERSION 0.1.0 LANGUAGES CXX)
44
55include (GNUInstallDirs)
66include (CMakePackageConfigHelpers)
77
88option (MeshFields_USE_Cabana "Build with the Cabana storage backend" OFF )
99
10+ find_package (Kokkos REQUIRED)
1011find_package (Omega_h REQUIRED)
1112#Clear the omegah compilation flags that it passes to cuda. Using the
1213# kokkos target, and nvcc_wrapper, provide sufficient flags.
@@ -17,11 +18,14 @@ if(MeshFields_USE_Cabana)
1718endif ()
1819
1920set (MESHFIELD_HEADERS
21+ src/MeshField_Defines.hpp
2022 src/MeshField_Utility.hpp
2123 src/MeshField_Macros.hpp
2224 src/KokkosController.hpp
2325 src/MeshField_Element.hpp
26+ src/MeshField_Integrate.hpp
2427 src/MeshField_Shape.hpp
28+ src/MeshField_ShapeField.hpp
2529 src/MeshField_Fail.hpp
2630 src/MeshField_For.hpp
2731 src/MeshField_Reduce.hpp
@@ -40,17 +44,18 @@ set(MESHFIELD_SOURCES
4044 src/MeshField_Fail.cpp
4145)
4246
43- add_library (meshFields ${MESHFIELD_SOURCES} )
47+ add_library (meshfields ${MESHFIELD_SOURCES} )
4448
45- target_compile_features (meshFields INTERFACE cxx_std_17 )
46- target_include_directories (meshFields
49+ target_compile_features (meshfields INTERFACE cxx_std_20 )
50+ target_include_directories (meshfields
4751 PUBLIC
4852 "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} >" # for MeshField_Config.hpp
4953 "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /src>"
5054 "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >" )
51- target_link_libraries (meshFields INTERFACE Omega_h::omega_h)
55+ target_link_libraries (meshfields INTERFACE Kokkos::kokkos)
56+ target_link_libraries (meshfields INTERFACE Omega_h::omega_h)
5257if (Kokkos_ENABLE_CUDA)
53- target_compile_options (meshFields INTERFACE "--expt-relaxed-constexpr" )
58+ target_compile_options (meshfields INTERFACE "--expt-relaxed-constexpr" )
5459endif ()
5560
5661#enable/disable exceptions
@@ -63,8 +68,8 @@ configure_file(
6368 "${CMAKE_CURRENT_BINARY_DIR} /MeshField_Config.hpp" )
6469
6570if (MeshFields_USE_Cabana)
66- target_link_libraries (meshFields INTERFACE Cabana::Core)
67- target_compile_definitions (meshFields INTERFACE MESHFIELDS_ENABLE_CABANA)
71+ target_link_libraries (meshfields INTERFACE Cabana::Core)
72+ target_compile_definitions (meshfields INTERFACE MESHFIELDS_ENABLE_CABANA)
6873endif ()
6974
7075#support ctags
@@ -77,7 +82,7 @@ if(MeshFields_USE_CTAGS)
7782 --exclude =docs --exclude =cmake --exclude =.git
7883 --exclude =.github .
7984 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} )
80- add_dependencies (meshFields tags)
85+ add_dependencies (meshfields tags)
8186endif ()
8287
8388# Set options for doxygen documentation
@@ -152,15 +157,17 @@ endfunction()
152157
153158function (meshfields_add_exe EXE_NAME EXE_SRC)
154159 add_executable (${EXE_NAME} ${EXE_SRC} )
155- target_link_libraries (${EXE_NAME} PRIVATE meshFields )
160+ target_link_libraries (${EXE_NAME} PRIVATE meshfields )
156161endfunction ()
157162
158163# Creating minimal reproduction of error
159164meshfields_add_exe(KokkosTests test /testKokkos.cpp)
160165meshfields_add_exe(SerializationTests test /testSerialize.cpp)
161166meshfields_add_exe(ElementTests test /testElement.cpp)
167+ meshfields_add_exe(ElementJacobian1d test /testElementJacobian1d.cpp)
168+ meshfields_add_exe(ElementJacobian2d test /testElementJacobian2d.cpp)
169+ meshfields_add_exe(CountIntegrator test /testCountIntegrator.cpp)
162170meshfields_add_exe(OmegahElementTests test /testOmegahElement.cpp)
163- meshfields_add_exe(OmegahCoordFieldTest test /testOmegahCoordField.cpp)
164171meshfields_add_exe(ExceptionTest test /testExceptions.cpp)
165172
166173if (MeshFields_USE_Cabana)
@@ -173,8 +180,10 @@ endif()
173180test_func(KokkosTests ./KokkosTests)
174181test_func(SerializationTests ./SerializationTests)
175182test_func(ElementTests ./ElementTests)
183+ test_func(ElementJacobian1d ./ElementJacobian1d)
184+ test_func(ElementJacobian2d ./ElementJacobian2d)
185+ test_func(CountIntegrator ./CountIntegrator)
176186test_func(OmegahElementTests ./OmegahElementTests)
177- test_func(OmegahCoordFieldTest ./OmegahCoordFieldTest)
178187if (MeshFields_USE_EXCEPTIONS)
179188 # exception caught - no error
180189 test_func(ExceptionTest ./ExceptionTest)
@@ -184,8 +193,8 @@ endif()
184193
185194#Code Coverage set up -------------------------------------------------------
186195
187- option (meshFields_ENABLE_COVERAGE_BUILD "Do a coverage build" OFF )
188- if (meshFields_ENABLE_COVERAGE_BUILD )
196+ option (meshfields_ENABLE_COVERAGE_BUILD "Do a coverage build" OFF )
197+ if (meshfields_ENABLE_COVERAGE_BUILD )
189198
190199 list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} /cmake)
191200 include (CodeCoverage)
@@ -228,10 +237,10 @@ endif()
228237
229238
230239## export the library
231- set_target_properties (meshFields PROPERTIES PUBLIC_HEADER "${MESHFIELD_HEADERS} " )
240+ set_target_properties (meshfields PROPERTIES PUBLIC_HEADER "${MESHFIELD_HEADERS} " )
232241install (
233- TARGETS meshFields
234- EXPORT meshFields -targets
242+ TARGETS meshfields
243+ EXPORT meshfields -targets
235244 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
236245 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
237246 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
@@ -241,7 +250,7 @@ install(
241250configure_package_config_file(
242251 "${CMAKE_CURRENT_SOURCE_DIR} /config.cmake.in"
243252 "${CMAKE_CURRENT_BINARY_DIR} /meshfields-config.cmake"
244- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/meshFields
253+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/meshfields
245254)
246255write_basic_package_version_file(
247256 "${PROJECT_BINARY_DIR} /meshfields-config-version.cmake"
@@ -250,9 +259,9 @@ write_basic_package_version_file(
250259install (FILES
251260 "${PROJECT_BINARY_DIR} /meshfields-config.cmake"
252261 "${PROJECT_BINARY_DIR} /meshfields-config-version.cmake"
253- DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/meshFields )
262+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/meshfields )
254263
255264install (
256- EXPORT meshFields -targets
257- NAMESPACE meshFields ::
258- DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/meshFields )
265+ EXPORT meshfields -targets
266+ NAMESPACE meshfields ::
267+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/meshfields )
0 commit comments