Skip to content

Commit 0711fbf

Browse files
authored
Merge pull request #180 from joyal-mathew/simplified-fields
Simplified fields
2 parents 92bd0c7 + bf6a502 commit 0711fbf

40 files changed

+2350
-135
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
c726b259409b93e0a6df12d199f87eab8caa10db
44
# reformat w clang format
55
88dc8509543b34140a6015e361888644c5f5e0fe
6+
# reformat simplified-fields
7+
d521b8ce2e0d510d7472d2ac011cfc84b670f918

.github/workflows/cmake-test.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
test-build:
14-
runs-on: ubuntu-24.04
14+
runs-on: ubuntu-latest
1515
timeout-minutes: 30
1616

1717
defaults:
@@ -39,6 +39,9 @@ jobs:
3939
- name: Install mpi
4040
run: sudo apt-get install -yq mpich
4141

42+
- name: Install cmake
43+
run: sudo apt-get install -yq cmake
44+
4245
- uses: actions/checkout@v4
4346

4447
- name: build Catch2
@@ -169,14 +172,14 @@ jobs:
169172
repo-path: 'SCOREC/pcms'
170173
repo-ref: ''
171174
cache: false
172-
options: '-DCMAKE_BUILD_TYPE=Release
175+
options: '-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
173176
-DCMAKE_C_COMPILER=`which mpicc`
174177
-DCMAKE_CXX_COMPILER=`which mpicxx`
175178
-DCMAKE_Fortran_COMPILER=`which mpifort`
176179
-DPCMS_TIMEOUT=5
177180
-DCatch2_DIR=${{ runner.temp }}/build-Catch2/install/lib/cmake/Catch2
178181
-DOmega_h_DIR=${{ runner.temp }}/build-omega_h/install/lib/cmake/Omega_h
179-
-DmeshFields_DIR=${{ runner.temp }}/build-meshFields/install/lib/cmake/meshFields
182+
-Dmeshfields_DIR=${{ runner.temp }}/build-meshFields/install/lib/cmake/meshfields
180183
-Dredev_DIR=${{ runner.temp }}/build-redev/install/lib/cmake/redev
181184
-Dflcl_DIR=${{ runner.temp }}/build-kokkos-fortran-interop/install/lib/cmake/flcl
182185
-DMPIEXEC_EXECUTABLE=`which mpirun`
@@ -206,13 +209,14 @@ jobs:
206209
if: matrix.clang_tidy == 'ON'
207210
run : |
208211
mkdir ${{ runner.temp }}/build-pcms
209-
cmake -S . -B ${{ runner.temp }}/build-pcms -DCMAKE_BUILD_TYPE=Release \
212+
cmake -S . -B ${{ runner.temp }}/build-pcms -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
210213
-DCMAKE_C_COMPILER=mpicc \
211214
-DCMAKE_CXX_COMPILER=mpicxx \
212215
-DCMAKE_Fortran_COMPILER=mpifort \
213216
-DPCMS_TIMEOUT=5 \
214217
-DCatch2_DIR=${{ runner.temp }}/build-Catch2/install/lib/cmake/Catch2 \
215218
-DOmega_h_DIR=${{ runner.temp }}/build-omega_h/install/lib/cmake/Omega_h \
219+
-Dmeshfields_DIR=${{ runner.temp }}/build-meshFields/install/lib/cmake/meshfields \
216220
-Dredev_DIR=${{ runner.temp }}/build-redev/install/lib/cmake/redev \
217221
-Dflcl_DIR=${{ runner.temp }}/build-kokkos-fortran-interop/install/lib/cmake/flcl \
218222
-DMPIEXEC_EXECUTABLE=mpirun \

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ endif()
6161
find_package(ADIOS2 CONFIG 2.5 REQUIRED)
6262
find_package(Kokkos CONFIG 4.5 REQUIRED)
6363

64+
find_package(meshfields REQUIRED)
65+
6466
add_subdirectory(src)
6567

6668
include(CTest)

src/CMakeLists.txt

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ set(PCMS_HEADERS
99
pcms/coordinate_systems.h
1010
pcms/coordinate_transform.h
1111
pcms/field.h
12+
pcms/create_field.h
1213
pcms/field_communicator.h
14+
pcms/field_communicator2.h
1315
pcms/field_evaluation_methods.h
1416
pcms/memory_spaces.h
1517
pcms/types.h
@@ -18,10 +20,25 @@ set(PCMS_HEADERS
1820
pcms/profile.h
1921
pcms/print.h
2022
pcms/partition.h
21-
pcms/coupler.h)
23+
pcms/coupler.h
24+
pcms/coordinate_system.h
25+
pcms/field_layout.h
26+
pcms/adapter/point_cloud/point_cloud_layout.h
27+
pcms/adapter/point_cloud/point_cloud.h
28+
pcms/adapter/omega_h/omega_h_field_layout.h
29+
pcms/adapter/omega_h/omega_h_field2.h)
2230

23-
set(PCMS_SOURCES pcms.cpp pcms/assert.cpp pcms/print.cpp
24-
pcms/adapter/xgc/xgc_field_adapter.h)
31+
set(PCMS_SOURCES
32+
pcms.cpp
33+
pcms/assert.cpp
34+
pcms/print.cpp
35+
pcms/create_field.cpp
36+
pcms/adapter/xgc/xgc_field_adapter.h
37+
pcms/adapter/point_cloud/point_cloud_layout.cpp
38+
pcms/adapter/point_cloud/point_cloud.cpp
39+
pcms/adapter/omega_h/omega_h_field_layout.cpp
40+
pcms/adapter/omega_h/omega_h_field2.cpp
41+
pcms/adapter/xgc/xgc_field_adapter.h)
2542

2643
configure_file(pcms/version.h.in pcms/version.h)
2744

@@ -31,8 +48,14 @@ if(PCMS_ENABLE_XGC)
3148
endif()
3249
if(PCMS_ENABLE_OMEGA_H)
3350
list(APPEND PCMS_SOURCES pcms/point_search.cpp)
34-
list(APPEND PCMS_HEADERS pcms/adapter/omega_h/omega_h_field.h
35-
pcms/transfer_field.h pcms/uniform_grid.h pcms/point_search.h)
51+
list(
52+
APPEND
53+
PCMS_HEADERS
54+
pcms/adapter/omega_h/omega_h_field.h
55+
pcms/transfer_field.h
56+
pcms/transfer_field2.h
57+
pcms/uniform_grid.h
58+
pcms/point_search.h)
3659
endif()
3760

3861
find_package(Kokkos REQUIRED)
@@ -43,8 +66,8 @@ set_target_properties(pcms_core PROPERTIES OUTPUT_NAME pcmscore EXPORT_NAME
4366
core)
4467
add_library(pcms::core ALIAS pcms_core)
4568
target_compile_features(pcms_core PUBLIC cxx_std_17)
46-
target_link_libraries(pcms_core PUBLIC redev::redev MPI::MPI_CXX Kokkos::kokkos
47-
perfstubs)
69+
target_link_libraries(pcms_core PUBLIC meshfields::meshfields redev::redev
70+
MPI::MPI_CXX Kokkos::kokkos perfstubs)
4871
if(PCMS_ENABLE_OMEGA_H)
4972
target_link_libraries(pcms_core PUBLIC Omega_h::omega_h)
5073
target_compile_definitions(pcms_core PUBLIC -DPCMS_HAS_OMEGA_H)

src/pcms/adapter/omega_h/omega_h_field.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ class OmegaHField
9797
using value_type = T;
9898

9999
OmegaHField(std::string name, Omega_h::Mesh& mesh,
100-
std::string global_id_name = "",
100+
std::string global_id_name = "", int search_nx = 10,
101+
int search_ny = 10,
101102
mesh_entity_type entity_type = mesh_entity_type::VERTEX)
102103
: name_(std::move(name)),
103104
mesh_(mesh),

0 commit comments

Comments
 (0)