Skip to content

Commit

Permalink
Make SVPH package optional (#291)
Browse files Browse the repository at this point in the history
* Make SVPH package optional
* Filter out SVPH tests if disabled
  • Loading branch information
adayton1 authored Aug 5, 2024
1 parent 5a2bb03 commit 6f0bf93
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Notable changes include:
* Distributed source directory must always be built now.
* Git strategies in the Gitlab CI are fixed so a clone only occurs on the first stage for each job, instead of for all stages for each job.
* New Gitlab CI pipeline cleanup strategy deletes job directories immediately upon successful completion.
* The SVPH package is now optional (SPHERAL\_ENABLE\_SVPH).
* Bug Fixes / improvements:
* Wrappers for MPI calls are simplified and improved.
Expand Down
1 change: 1 addition & 0 deletions cmake/SetupSpheral.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ set(ENABLE_HELMHOLTZ ON CACHE BOOL "enable the Helmholtz equation of state packa
option(SPHERAL_ENABLE_ARTIFICIAL_CONDUCTION "Enable the artificial conduction package" ON)
option(SPHERAL_ENABLE_EXTERNAL_FORCE "Enable the external force package" ON)
option(SPHERAL_ENABLE_GRAVITY "Enable the gravity package" ON)
option(SPHERAL_ENABLE_SVPH "Enable the SVPH package" ON)

option(ENABLE_DEV_BUILD "Build separate internal C++ libraries for faster code development" OFF)
option(ENABLE_STATIC_CXXONLY "build only static libs" OFF)
Expand Down
3 changes: 3 additions & 0 deletions scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ if (NOT ENABLE_CXXONLY)
if (NOT ENABLE_MPI)
list(APPEND SPHERAL_ATS_BUILD_CONFIG_ARGS "--filter='\"np<2\"'")
endif()
if (NOT SPHERAL_ENABLE_SVPH)
list(APPEND SPHERAL_ATS_BUILD_CONFIG_ARGS "--filter='\"not svph\"'")
endif()
if ($ENV{SYS_TYPE} MATCHES ".*blueos.*")
list(APPEND SPHERAL_ATS_BUILD_CONFIG_ARGS "--addOp --smpi_off")
endif()
Expand Down
7 changes: 5 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ list(APPEND _packages
Porosity
RK
SPH
SVPH
SolidMaterial
Strength
Utilities
Expand All @@ -55,7 +54,11 @@ if (SPHERAL_ENABLE_EXTERNAL_FORCE)
endif()

if (SPHERAL_ENABLE_GRAVITY)
list(APPEND _packages Gravity)
list(APPEND _packages Gravity)
endif()

if (SPHERAL_ENABLE_SVPH)
list(APPEND _packages SVPH)
endif()

if(NOT ENABLE_CXXONLY)
Expand Down
5 changes: 4 additions & 1 deletion src/PYB11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ set (_python_packages
FieldOperations
SPH
CRKSPH
SVPH
DEM
GSPH
FSISPH
Expand Down Expand Up @@ -62,6 +61,10 @@ if (SPHERAL_ENABLE_GRAVITY)
list(APPEND _python_packages Gravity)
endif()

if (SPHERAL_ENABLE_SVPH)
list(APPEND _python_packages SVPH)
endif()

foreach(_python_package ${_python_packages})
add_subdirectory(${_python_package})
endforeach()
Expand Down
4 changes: 3 additions & 1 deletion tests/integration.ats
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#-------------------------------------------------------------------------------
# This file contains the acceptance tests for committing changes to the
# SolidSpheral code to the main repository. Please verify these all pass
# (using the ATS) before pushing changes to that public repot!
# (using the ATS) before pushing changes to that public repo!
#-------------------------------------------------------------------------------

glue(svph = False)

# Geometry unit tests
source("unit/Geometry/testVector.py")
source("unit/Geometry/testTensor.py")
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/SVPH/testInterpolation-1d.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ATS:test(SELF, "--linearConsistent True --graphics False", label="SVPH interpolation test -- 1-D (serial)")
#ATS:test(SELF, "--linearConsistent True --graphics False", label="SVPH interpolation test -- 1-D (serial)", svph=True)
#-------------------------------------------------------------------------------
# A set of tests to compare how different meshless methods interpolate fields.
#-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/SVPH/testSVPHInterpolation-1d.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ATS:test(SELF, "--linearConsistent True --graphics False", label="SVPH interpolation test -- 1-D (serial)")
#ATS:test(SELF, "--linearConsistent True --graphics False", label="SVPH interpolation test -- 1-D (serial)", svph=True)
#-------------------------------------------------------------------------------
# A set of tests to compare how different meshless methods interpolate fields.
#-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/SVPH/testSVPHInterpolation-2d.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ATS:test(SELF, "--linearConsistent True --graphics False", label="SVPH interpolation test -- 2-D (serial)")
#ATS:test(SELF, "--linearConsistent True --graphics False", label="SVPH interpolation test -- 2-D (serial), svph=True")
#-------------------------------------------------------------------------------
# A set of tests to compare how different meshless methods interpolate fields.
#-------------------------------------------------------------------------------
Expand Down

0 comments on commit 6f0bf93

Please sign in to comment.