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
2 changes: 2 additions & 0 deletions config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ if(@PCMS_ENABLE_OMEGA_H@)
find_dependency(Omega_h CONFIG HINTS @Omega_h_DIR@)
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
2 changes: 1 addition & 1 deletion examples/external-usage-example/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <iostream>
#include <pcms/print.h>
#include <pcms/utility/print.h>

int main()
{
Expand Down
27 changes: 7 additions & 20 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
set(
PCMS_HEADERS
pcms.h
pcms/arrays.h
pcms/assert.h
pcms/bounding_box.h
pcms/common.h
pcms/coordinate.h
pcms/coordinate_systems.h
pcms/coordinate_transform.h
Expand All @@ -14,12 +10,6 @@ set(
pcms/field_communicator.h
pcms/field_communicator2.h
pcms/field_evaluation_methods.h
pcms/memory_spaces.h
pcms/types.h
pcms/array_mask.h
pcms/inclusive_scan.h
pcms/profile.h
pcms/print.h
pcms/partition.h
pcms/coupler.h
pcms/coordinate_system.h
Expand All @@ -33,8 +23,6 @@ set(
set(
PCMS_SOURCES
pcms.cpp
pcms/assert.cpp
pcms/print.cpp
pcms/create_field.cpp
pcms/adapter/xgc/xgc_field_adapter.h
pcms/adapter/point_cloud/point_cloud_layout.cpp
Expand All @@ -48,21 +36,22 @@ configure_file(pcms/version.h.in pcms/version.h)
configure_file(pcms/configuration.h.in pcms/configuration.h)
list(APPEND PCMS_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/pcms/version.h ${CMAKE_CURRENT_BINARY_DIR}/pcms/configuration.h)

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 @@ -78,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
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 All @@ -91,10 +80,6 @@ if(PCMS_HAS_ASAN)
)
endif()

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

# export the library
set_target_properties(pcms_core PROPERTIES PUBLIC_HEADER "${PCMS_HEADERS}")
target_include_directories(
Expand Down Expand Up @@ -147,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.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "pcms.h"
#include "pcms/types.h"
#include "pcms/utility/types.h"

namespace pcms
{
Expand Down
4 changes: 2 additions & 2 deletions src/pcms.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#define PCMS_H_

#include "pcms/configuration.h"
#include "pcms/common.h"
#include "pcms/utility/common.h"
#include "pcms/utility/profile.h"
#include "pcms/field_communicator.h"
#include "pcms/adapter/omega_h/omega_h_field.h"
#include "pcms/profile.h"
#include "pcms/coupler.h"

#endif
14 changes: 7 additions & 7 deletions src/pcms/adapter/omega_h/omega_h_field.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#ifndef PCMS_COUPLING_OMEGA_H_FIELD_H
#define PCMS_COUPLING_OMEGA_H_FIELD_H
#include "pcms/types.h"
#include "pcms/utility/types.h"
#include <Omega_h_mesh.hpp>
#include "pcms/field.h"
#include "pcms/coordinate_systems.h"
#include <Kokkos_Core.hpp>
#include <array>
#include <pcms/assert.h>
#include <pcms/utility/assert.h>
#include <Omega_h_for.hpp>
#include "pcms/arrays.h"
#include "pcms/array_mask.h"
#include "pcms/point_search.h"
#include "pcms/utility/arrays.h"
#include "pcms/utility/array_mask.h"
#include "pcms/localization/point_search.h"
#include <redev_variant_tools.h>
#include <type_traits>
#include "pcms/transfer_field.h"
#include "pcms/memory_spaces.h"
#include "pcms/profile.h"
#include "pcms/utility/memory_spaces.h"
#include "pcms/utility/profile.h"
#include "pcms/partition.h"
#include <optional>

Expand Down
4 changes: 2 additions & 2 deletions src/pcms/adapter/omega_h/omega_h_field2.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#include <memory>

#include "pcms/adapter/omega_h/omega_h_field_layout.h"
#include "pcms/types.h"
#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
4 changes: 2 additions & 2 deletions src/pcms/adapter/omega_h/omega_h_field_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include "omega_h_field2.h"
#include "pcms/adapter/omega_h/omega_h_field_layout.h"
#include "omega_h_field_layout.h"
#include "pcms/inclusive_scan.h"
#include "pcms/profile.h"
#include "pcms/utility/inclusive_scan.h"
#include "pcms/utility/profile.h"
#include <memory>

namespace pcms
Expand Down
2 changes: 1 addition & 1 deletion src/pcms/adapter/omega_h/omega_h_field_layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <Omega_h_mesh.hpp>

#include "pcms/arrays.h"
#include "pcms/utility/arrays.h"
#include "pcms/field_layout.h"
#include "pcms/coordinate_system.h"
#include "pcms/field.h"
Expand Down
4 changes: 2 additions & 2 deletions src/pcms/adapter/point_cloud/point_cloud.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "point_cloud.h"
#include "pcms/profile.h"
#include "pcms/assert.h"
#include "pcms/utility/profile.h"
#include "pcms/utility/assert.h"

namespace pcms
{
Expand Down
2 changes: 1 addition & 1 deletion src/pcms/adapter/point_cloud/point_cloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define POINT_CLOUD_H_

#include "pcms/field.h"
#include "pcms/arrays.h"
#include "pcms/utility/arrays.h"
#include "point_cloud_layout.h"

namespace pcms
Expand Down
10 changes: 5 additions & 5 deletions src/pcms/adapter/xgc/xgc_field_adapter.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#ifndef PCMS_COUPLING_XGC_FIELD_ADAPTER_H
#define PCMS_COUPLING_XGC_FIELD_ADAPTER_H
#include "pcms/adapter/omega_h/omega_h_field.h"
#include "pcms/types.h"
#include "pcms/memory_spaces.h"
#include "pcms/utility/types.h"
#include "pcms/utility/memory_spaces.h"
#include "pcms/field.h"
#include <vector>
#include <redev_variant_tools.h>
#include "xgc_reverse_classification.h"
#include "pcms/assert.h"
#include "pcms/array_mask.h"
#include "pcms/profile.h"
#include "pcms/utility/assert.h"
#include "pcms/utility/array_mask.h"
#include "pcms/utility/profile.h"

namespace pcms
{
Expand Down
2 changes: 1 addition & 1 deletion src/pcms/adapter/xgc/xgc_reverse_classification.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "xgc_reverse_classification.h"
#include "mpi.h"
#include <fstream>
#include "pcms/assert.h"
#include "pcms/utility/assert.h"
#include <string>
namespace pcms
{
Expand Down
8 changes: 4 additions & 4 deletions src/pcms/adapter/xgc/xgc_reverse_classification.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#define PCMS_COUPLING_XGC_REVERSE_CLASSIFICATION_H
#include <Kokkos_Core.hpp>
#include <mpi.h>
#include "pcms/types.h"
#include "pcms/utility/types.h"
#include <unordered_map>
#include <set>
#include "mdspan/mdspan.hpp"
#include "pcms/arrays.h"
#include "pcms/memory_spaces.h"
#include "pcms/utility/arrays.h"
#include "pcms/utility/memory_spaces.h"
#include "pcms/configuration.h"
// #include <filesystem>
#ifdef PCMS_ENABLE_OMEGA_H
#include <Omega_h_mesh.hpp>
#include "pcms/assert.h"
#include "pcms/utility/assert.h"
#endif

namespace pcms
Expand Down
2 changes: 1 addition & 1 deletion src/pcms/capi/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <fstream>
#include "pcms/adapter/xgc/xgc_reverse_classification.h"
#include "pcms/adapter/dummy_field_adapter.h"
#include "pcms/assert.h"
#include "pcms/utility/assert.h"
namespace pcms
{
// Note that we have a closed set of types that can be used in the C interface
Expand Down
2 changes: 1 addition & 1 deletion src/pcms/capi/interpolator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <Omega_h_file.hpp>
#include <Omega_h_library.hpp>
#include <Omega_h_mesh.hpp>
#include <pcms/print.h>
#include <pcms/utility/print.h>

//[[nodiscard]]
PcmsInterpolatorHandle pcms_create_interpolator(PcmsOmegaHMeshHandle oh_mesh,
Expand Down
2 changes: 1 addition & 1 deletion src/pcms/coordinate.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef PCMS_COUPLING_COORDINATE_H
#define PCMS_COUPLING_COORDINATE_H
#include <array>
#include "pcms/types.h"
#include "pcms/utility/types.h"
#include <Kokkos_Macros.hpp>
namespace pcms
{
Expand Down
2 changes: 1 addition & 1 deletion src/pcms/coordinate_system.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef PCMS_COORDINATE_SYSTEM_H
#define PCMS_COORDINATE_SYSTEM_H
#include "arrays.h"
#include "pcms/utility/arrays.h"

namespace pcms
{
Expand Down
1 change: 1 addition & 0 deletions src/pcms/coordinate_transform.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define PCMS_COUPLING_COORDINATE_TRANSFORM_H
#include "coordinate.h"
#include "coordinate_systems.h"
#include <cmath>
namespace pcms
{
template <typename CoordinateSystemTo, typename CoordinateSystemFrom>
Expand Down
7 changes: 5 additions & 2 deletions src/pcms/coupler.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#ifndef PCMS_COUPLER_H
#define PCMS_COUPLER_H
#include "pcms/common.h"
#include "pcms/utility/common.h"
#include "pcms/field_communicator.h"
#include "pcms/adapter/omega_h/omega_h_field.h"
#include "pcms/profile.h"
#include "pcms/utility/profile.h"

namespace pcms
{

// to avoid having any redev:: types in the user interface
using ProcessType = redev::ProcessType;

class CoupledField
{
public:
Expand Down
6 changes: 3 additions & 3 deletions src/pcms/field.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef PCMS_COUPLING_FIELD_H
#define PCMS_COUPLING_FIELD_H
#include "field_layout.h"
#include "pcms/types.h"
#include "pcms/arrays.h"
#include "pcms/memory_spaces.h"
#include "pcms/utility/types.h"
#include "pcms/utility/arrays.h"
#include "pcms/utility/memory_spaces.h"
#include <map>
#include <memory>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions src/pcms/field_communicator.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include <redev.h>
#include "pcms/field.h"
#include <numeric>
#include "pcms/inclusive_scan.h"
#include "pcms/profile.h"
#include "pcms/utility/inclusive_scan.h"
#include "pcms/utility/profile.h"
#include "pcms/partition.h"

namespace pcms
Expand Down
8 changes: 4 additions & 4 deletions src/pcms/field_communicator2.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "field_layout_communicator.h"
#include "pcms/field_layout.h"
#include "pcms/field.h"
#include "pcms/profile.h"
#include "pcms/assert.h"
#include "pcms/inclusive_scan.h"
#include "pcms/arrays.h"
#include "pcms/utility/profile.h"
#include "pcms/utility/assert.h"
#include "pcms/utility/inclusive_scan.h"
#include "pcms/utility/arrays.h"
#include <redev.h>

namespace pcms
Expand Down
2 changes: 1 addition & 1 deletion src/pcms/field_layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <memory>
#include <redev.h>
#include "pcms/field.h"
#include "pcms/arrays.h"
#include "pcms/utility/arrays.h"
#include "pcms/coordinate_system.h"

namespace pcms
Expand Down
8 changes: 4 additions & 4 deletions src/pcms/field_layout_communicator.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include "field_layout.h"
#include "pcms/field_layout.h"
#include "pcms/field.h"
#include "pcms/profile.h"
#include "pcms/assert.h"
#include "pcms/inclusive_scan.h"
#include "pcms/arrays.h"
#include "pcms/utility/profile.h"
#include "pcms/utility/assert.h"
#include "pcms/utility/inclusive_scan.h"
#include "pcms/utility/arrays.h"
#include <redev.h>

namespace pcms
Expand Down
4 changes: 2 additions & 2 deletions src/pcms/interpolator/adj_search.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef ADJ_SEARCH_HPP
#define ADJ_SEARCH_HPP

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

#include "queue_visited.hpp"
Expand Down
Loading
Loading