Skip to content

Commit

Permalink
Merge pull request #1378 from LLNL/pr-from-fork/1376
Browse files Browse the repository at this point in the history
Add Sina as Axom component
  • Loading branch information
bgunnar5 authored Nov 12, 2024
2 parents f650825 + c1daa71 commit 2244835
Show file tree
Hide file tree
Showing 83 changed files with 9,506 additions and 2 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The Axom project release numbers follow [Semantic Versioning](http://semver.org/

### Added
- `sidre::View` holding array data may now be re-shaped. See `sidre::View::reshapeArray`.
- Sina C++ library is now a component of Axom
- Adds optional dependency on [Open CASCADE](https://dev.opencascade.org). The initial intention is
to use Open CASCADE's file I/O capabilities in support of Quest applications.

Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ jobs:
HOST_CONFIG: '[email protected]'
osx_gcc:
VM_ImageName: 'macos-13'
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE:BOOL=OFF -DAXOM_ENABLE_INLET:BOOL=OFF -DAXOM_ENABLE_KLEE:BOOL=OFF'
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE:BOOL=OFF -DAXOM_ENABLE_INLET:BOOL=OFF -DAXOM_ENABLE_KLEE:BOOL=OFF -DAXOM_ENABLE_SINA:BOOL=OFF'
TEST_TARGET: 'osx_gcc'
windows:
VM_ImageName: 'windows-2019'
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE:BOOL=OFF -DAXOM_ENABLE_INLET:BOOL=OFF -DAXOM_ENABLE_KLEE:BOOL=OFF'
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE:BOOL=OFF -DAXOM_ENABLE_INLET:BOOL=OFF -DAXOM_ENABLE_KLEE:BOOL=OFF -DAXOM_ENABLE_SINA:BOOL=OFF'
TEST_TARGET: 'win_vs'

pool:
Expand Down
1 change: 1 addition & 0 deletions src/axom/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ endif()
# Add components so that later ones depend on earlier ones
# (i.e. quest depends on mint, so quest follows mint)
axom_add_component(COMPONENT_NAME slic DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONENTS})
axom_add_component(COMPONENT_NAME sina DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONENTS})
axom_add_component(COMPONENT_NAME slam DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONENTS})
axom_add_component(COMPONENT_NAME primal DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONENTS})
axom_add_component(COMPONENT_NAME sidre DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONENTS})
Expand Down
1 change: 1 addition & 0 deletions src/axom/config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
#cmakedefine AXOM_USE_PRIMAL
#cmakedefine AXOM_USE_QUEST
#cmakedefine AXOM_USE_SIDRE
#cmakedefine AXOM_USE_SINA
#cmakedefine AXOM_USE_SLAM
#cmakedefine AXOM_USE_SLIC
#cmakedefine AXOM_USE_SPIN
Expand Down
4 changes: 4 additions & 0 deletions src/axom/core/utilities/About.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ void about(std::ostream &oss)
comps.push_back("sidre");
#endif

#ifdef AXOM_USE_SINA
comps.push_back("sina");
#endif

#ifdef AXOM_USE_SLAM
comps.push_back("slam");
#endif
Expand Down
2 changes: 2 additions & 0 deletions src/axom/doxygen_mainpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Axom provides libraries that address common computer science needs. It grew fro
* @subpage primaltop provides an API for geometric primitives and computational geometry tests.
* @subpage questtop provides an API to query point distance and position relative to meshes.
* @subpage sidretop provides a data store with hierarchical structure.
* @subpage sinatop ([S]imulation [In]sight and [A]nalysis) unified output library collects data directly within codes, outputting them to a common file output format co-designed with application developers and users.
* @subpage slamtop provides an API to construct and process meshes.
* @subpage slictop provides infrastructure for logging application messages.
* @subpage spintop provides spatial acceleration data structures, also known as spatial indexes.
Expand All @@ -29,6 +30,7 @@ Dependencies between components are as follows:
- Quest depends on Slam, Primal, Spin, and Mint
- Klee depends on Sidre, Inlet and Primal
- Multimat depends on Slic, and Slam
- Sina only depends on Core

The figure below summarizes the dependencies between the modules. Solid links
indicate hard dependencies; dashed links indicate optional dependencies.
Expand Down
90 changes: 90 additions & 0 deletions src/axom/sina/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and
# other Axom Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: (BSD-3-Clause)
#------------------------------------------------------------------------------
# Sina -- API to write data to Sina's common file format
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Specify necessary dependencies
#
# Note: Sina also optionally depends on Adiak when AXOM_USE_ADIAK=ON
#------------------------------------------------------------------------------
axom_component_requires(NAME Sina
TPLS Conduit )

#------------------------------------------------------------------------------
# Specify the sina headers/sources
#------------------------------------------------------------------------------
set(sina_headers
core/ConduitUtil.hpp
core/Curve.hpp
core/CurveSet.hpp
core/DataHolder.hpp
core/Datum.hpp
core/Document.hpp
core/File.hpp
core/ID.hpp
core/Record.hpp
core/Relationship.hpp
core/Run.hpp
)

set(sina_sources
core/ConduitUtil.cpp
core/Curve.cpp
core/CurveSet.cpp
core/DataHolder.cpp
core/Datum.cpp
core/Document.cpp
core/File.cpp
core/ID.cpp
core/Record.cpp
core/Relationship.cpp
core/Run.cpp
)

# Add Adiak header and source
blt_list_append( TO sina_headers ELEMENTS core/AdiakWriter.hpp IF AXOM_USE_ADIAK )
blt_list_append( TO sina_sources ELEMENTS core/AdiakWriter.cpp IF AXOM_USE_ADIAK )

# Add fortran interface for Sina
if (ENABLE_FORTRAN)
blt_list_append( TO sina_headers ELEMENTS interface/sina_fortran_interface.h)
blt_list_append( TO sina_sources
ELEMENTS interface/sina_fortran_interface.cpp interface/sina_fortran_interface.f)
endif()

#------------------------------------------------------------------------------
# Build and install the library
#------------------------------------------------------------------------------
set(sina_depends
core
conduit::conduit
)

blt_list_append( TO sina_depends ELEMENTS adiak::adiak IF AXOM_USE_ADIAK )

axom_add_library(NAME sina
SOURCES ${sina_sources}
HEADERS ${sina_headers}
DEPENDS_ON ${sina_depends}
FOLDER axom/sina)

axom_write_unified_header(NAME sina
HEADERS ${sina_headers})

axom_install_component(NAME sina
HEADERS ${sina_headers})

#------------------------------------------------------------------------------
# Add tests and examples
#------------------------------------------------------------------------------
if(AXOM_ENABLE_TESTS)
add_subdirectory(tests)
endif()

if(AXOM_ENABLE_EXAMPLES)
add_subdirectory(examples)
endif()
Loading

0 comments on commit 2244835

Please sign in to comment.