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
1 change: 1 addition & 0 deletions config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ if(@PCMS_ENABLE_OMEGA_H@)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/pcms_utility-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/pcms_localization-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/pcms_core-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/pcms_interpolator-targets.cmake")

Expand Down
10 changes: 5 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
set(
PCMS_HEADERS
pcms.h
pcms/bounding_box.h
pcms/coordinate.h
pcms/coordinate_systems.h
pcms/coordinate_transform.h
Expand Down Expand Up @@ -39,21 +38,20 @@ list(APPEND PCMS_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/pcms/version.h ${CMAKE_CURR

add_subdirectory(pcms/utility)

add_subdirectory(pcms/localization)


if(PCMS_ENABLE_XGC)
list(APPEND PCMS_SOURCES pcms/adapter/xgc/xgc_reverse_classification.cpp)
list(APPEND PCMS_HEADERS pcms/adapter/xgc/xgc_reverse_classification.h)
endif()
if(PCMS_ENABLE_OMEGA_H)
list(APPEND PCMS_SOURCES pcms/point_search.cpp)
list(
APPEND
PCMS_HEADERS
pcms/adapter/omega_h/omega_h_field.h
pcms/transfer_field.h
pcms/transfer_field2.h
pcms/uniform_grid.h
pcms/point_search.h
)
endif()

Expand All @@ -69,7 +67,7 @@ add_library(pcms::core ALIAS pcms_core)
target_compile_features(pcms_core PUBLIC cxx_std_17)
target_link_libraries(
pcms_core PUBLIC meshfields::meshfields redev::redev
MPI::MPI_CXX Kokkos::kokkos perfstubs pcms::utility
MPI::MPI_CXX Kokkos::kokkos perfstubs pcms::utility pcms::localization
)
if(PCMS_ENABLE_OMEGA_H)
target_link_libraries(pcms_core PUBLIC Omega_h::omega_h)
Expand Down Expand Up @@ -134,9 +132,11 @@ if(PCMS_ENABLE_Fortran)
target_link_libraries(pcms_pcms INTERFACE pcms::fortranapi)
endif()


add_subdirectory(pcms/interpolator)
target_link_libraries(pcms_pcms INTERFACE pcms::interpolator)


install(
TARGETS pcms_pcms
EXPORT pcms-targets
Expand Down
2 changes: 1 addition & 1 deletion src/pcms/adapter/omega_h/omega_h_field.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <Omega_h_for.hpp>
#include "pcms/utility/arrays.h"
#include "pcms/utility/array_mask.h"
#include "pcms/point_search.h"
#include "pcms/localization/point_search.h"
#include <redev_variant_tools.h>
#include <type_traits>
#include "pcms/transfer_field.h"
Expand Down
2 changes: 1 addition & 1 deletion src/pcms/adapter/omega_h/omega_h_field2.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "pcms/utility/types.h"
#include "pcms/field.h"
#include "pcms/coordinate_system.h"
#include "pcms/point_search.h"
#include "pcms/localization/point_search.h"

namespace pcms
{
Expand Down
2 changes: 1 addition & 1 deletion src/pcms/interpolator/adj_search.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef ADJ_SEARCH_HPP
#define ADJ_SEARCH_HPP

#include <pcms/point_search.h>
#include <pcms/localization/point_search.h>
#include <pcms/utility/print.h>
#include "interpolation_helpers.h" // for helper functions

Expand Down
50 changes: 50 additions & 0 deletions src/pcms/localization/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
set(
PCMS_LOCALIZATION_HEADERS
point_search.h
)

set(
PCMS_LOCALIZATION_SOURCES
point_search.cpp
)
add_library(pcms_localization ${PCMS_LOCALIZATION_SOURCES})
add_library(pcms::localization ALIAS pcms_localization)
target_include_directories(
pcms_localization
PUBLIC
# include path should be pcms/localization/
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>"
# include path to search for pcms/config.h
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../..>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
target_link_libraries(pcms_localization PUBLIC Kokkos::kokkos pcms::utility Omega_h::omega_h)
target_compile_features(pcms_localization PUBLIC cxx_std_17)

set_target_properties(
pcms_localization PROPERTIES OUTPUT_NAME pcmslocalization EXPORT_NAME
localization
)

if (PCMS_ENABLE_SPDLOG)
target_link_libraries(pcms_localization PUBLIC spdlog::spdlog)
endif ()

## export the library
set_target_properties(pcms_localization PROPERTIES PUBLIC_HEADER "${PCMS_LOCALIZATION_HEADERS}")

install(
TARGETS pcms_localization
EXPORT pcms_localization-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms/localization
)

install(
EXPORT pcms_localization-targets
NAMESPACE pcms::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pcms
)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include "pcms/utility/types.h"
#include <Omega_h_bbox.hpp>
#include <Omega_h_shape.hpp>
#include "pcms/uniform_grid.h"
#include "pcms/bounding_box.h"
#include "pcms/utility/uniform_grid.h"
#include "pcms/utility/bounding_box.h"

namespace pcms
{
Expand Down
2 changes: 2 additions & 0 deletions src/pcms/utility/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ set(
PCMS_UTILITY_HEADERS
arrays.h
assert.h
bounding_box.h
common.h
memory_spaces.h
types.h
array_mask.h
inclusive_scan.h
profile.h
print.h
uniform_grid.h
)

set(
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef PCMS_COUPLING_UNIFORM_GRID_H
#define PCMS_COUPLING_UNIFORM_GRID_H
#include "pcms/bounding_box.h"
#include "pcms/utility/bounding_box.h"
#include "Omega_h_vector.hpp"
#include <numeric>
namespace pcms
Expand Down
2 changes: 1 addition & 1 deletion test/test_bounding_box.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <catch2/catch_test_macros.hpp>
#include <pcms/bounding_box.h>
#include <pcms/utility/bounding_box.h>

using pcms::AABBox;
using pcms::intersects;
Expand Down
2 changes: 1 addition & 1 deletion test/test_point_search.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_approx.hpp>
#include <pcms/point_search.h>
#include <pcms/localization/point_search.h>
#include <Omega_h_mesh.hpp>
#include <Omega_h_build.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/test_uniform_grid.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_approx.hpp>
#include <pcms/uniform_grid.h>
#include <pcms/utility/uniform_grid.h>

using pcms::Uniform2DGrid;

Expand Down
Loading