Skip to content

Commit 2244835

Browse files
authored
Merge pull request #1378 from LLNL/pr-from-fork/1376
Add Sina as Axom component
2 parents f650825 + c1daa71 commit 2244835

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+9506
-2
lines changed

RELEASE-NOTES.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ The Axom project release numbers follow [Semantic Versioning](http://semver.org/
2121

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

azure-pipelines.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ jobs:
7676
HOST_CONFIG: '[email protected]'
7777
osx_gcc:
7878
VM_ImageName: 'macos-13'
79-
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE:BOOL=OFF -DAXOM_ENABLE_INLET:BOOL=OFF -DAXOM_ENABLE_KLEE:BOOL=OFF'
79+
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE:BOOL=OFF -DAXOM_ENABLE_INLET:BOOL=OFF -DAXOM_ENABLE_KLEE:BOOL=OFF -DAXOM_ENABLE_SINA:BOOL=OFF'
8080
TEST_TARGET: 'osx_gcc'
8181
windows:
8282
VM_ImageName: 'windows-2019'
83-
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE:BOOL=OFF -DAXOM_ENABLE_INLET:BOOL=OFF -DAXOM_ENABLE_KLEE:BOOL=OFF'
83+
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE:BOOL=OFF -DAXOM_ENABLE_INLET:BOOL=OFF -DAXOM_ENABLE_KLEE:BOOL=OFF -DAXOM_ENABLE_SINA:BOOL=OFF'
8484
TEST_TARGET: 'win_vs'
8585

8686
pool:

src/axom/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ endif()
2828
# Add components so that later ones depend on earlier ones
2929
# (i.e. quest depends on mint, so quest follows mint)
3030
axom_add_component(COMPONENT_NAME slic DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONENTS})
31+
axom_add_component(COMPONENT_NAME sina DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONENTS})
3132
axom_add_component(COMPONENT_NAME slam DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONENTS})
3233
axom_add_component(COMPONENT_NAME primal DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONENTS})
3334
axom_add_component(COMPONENT_NAME sidre DEFAULT_STATE ${AXOM_ENABLE_ALL_COMPONENTS})

src/axom/config.hpp.in

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
#cmakedefine AXOM_USE_PRIMAL
104104
#cmakedefine AXOM_USE_QUEST
105105
#cmakedefine AXOM_USE_SIDRE
106+
#cmakedefine AXOM_USE_SINA
106107
#cmakedefine AXOM_USE_SLAM
107108
#cmakedefine AXOM_USE_SLIC
108109
#cmakedefine AXOM_USE_SPIN

src/axom/core/utilities/About.cpp.in

+4
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ void about(std::ostream &oss)
102102
comps.push_back("sidre");
103103
#endif
104104

105+
#ifdef AXOM_USE_SINA
106+
comps.push_back("sina");
107+
#endif
108+
105109
#ifdef AXOM_USE_SLAM
106110
comps.push_back("slam");
107111
#endif

src/axom/doxygen_mainpage.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Axom provides libraries that address common computer science needs. It grew fro
1414
* @subpage primaltop provides an API for geometric primitives and computational geometry tests.
1515
* @subpage questtop provides an API to query point distance and position relative to meshes.
1616
* @subpage sidretop provides a data store with hierarchical structure.
17+
* @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.
1718
* @subpage slamtop provides an API to construct and process meshes.
1819
* @subpage slictop provides infrastructure for logging application messages.
1920
* @subpage spintop provides spatial acceleration data structures, also known as spatial indexes.
@@ -29,6 +30,7 @@ Dependencies between components are as follows:
2930
- Quest depends on Slam, Primal, Spin, and Mint
3031
- Klee depends on Sidre, Inlet and Primal
3132
- Multimat depends on Slic, and Slam
33+
- Sina only depends on Core
3234

3335
The figure below summarizes the dependencies between the modules. Solid links
3436
indicate hard dependencies; dashed links indicate optional dependencies.

src/axom/sina/CMakeLists.txt

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and
2+
# other Axom Project Developers. See the top-level LICENSE file for details.
3+
#
4+
# SPDX-License-Identifier: (BSD-3-Clause)
5+
#------------------------------------------------------------------------------
6+
# Sina -- API to write data to Sina's common file format
7+
#------------------------------------------------------------------------------
8+
9+
#------------------------------------------------------------------------------
10+
# Specify necessary dependencies
11+
#
12+
# Note: Sina also optionally depends on Adiak when AXOM_USE_ADIAK=ON
13+
#------------------------------------------------------------------------------
14+
axom_component_requires(NAME Sina
15+
TPLS Conduit )
16+
17+
#------------------------------------------------------------------------------
18+
# Specify the sina headers/sources
19+
#------------------------------------------------------------------------------
20+
set(sina_headers
21+
core/ConduitUtil.hpp
22+
core/Curve.hpp
23+
core/CurveSet.hpp
24+
core/DataHolder.hpp
25+
core/Datum.hpp
26+
core/Document.hpp
27+
core/File.hpp
28+
core/ID.hpp
29+
core/Record.hpp
30+
core/Relationship.hpp
31+
core/Run.hpp
32+
)
33+
34+
set(sina_sources
35+
core/ConduitUtil.cpp
36+
core/Curve.cpp
37+
core/CurveSet.cpp
38+
core/DataHolder.cpp
39+
core/Datum.cpp
40+
core/Document.cpp
41+
core/File.cpp
42+
core/ID.cpp
43+
core/Record.cpp
44+
core/Relationship.cpp
45+
core/Run.cpp
46+
)
47+
48+
# Add Adiak header and source
49+
blt_list_append( TO sina_headers ELEMENTS core/AdiakWriter.hpp IF AXOM_USE_ADIAK )
50+
blt_list_append( TO sina_sources ELEMENTS core/AdiakWriter.cpp IF AXOM_USE_ADIAK )
51+
52+
# Add fortran interface for Sina
53+
if (ENABLE_FORTRAN)
54+
blt_list_append( TO sina_headers ELEMENTS interface/sina_fortran_interface.h)
55+
blt_list_append( TO sina_sources
56+
ELEMENTS interface/sina_fortran_interface.cpp interface/sina_fortran_interface.f)
57+
endif()
58+
59+
#------------------------------------------------------------------------------
60+
# Build and install the library
61+
#------------------------------------------------------------------------------
62+
set(sina_depends
63+
core
64+
conduit::conduit
65+
)
66+
67+
blt_list_append( TO sina_depends ELEMENTS adiak::adiak IF AXOM_USE_ADIAK )
68+
69+
axom_add_library(NAME sina
70+
SOURCES ${sina_sources}
71+
HEADERS ${sina_headers}
72+
DEPENDS_ON ${sina_depends}
73+
FOLDER axom/sina)
74+
75+
axom_write_unified_header(NAME sina
76+
HEADERS ${sina_headers})
77+
78+
axom_install_component(NAME sina
79+
HEADERS ${sina_headers})
80+
81+
#------------------------------------------------------------------------------
82+
# Add tests and examples
83+
#------------------------------------------------------------------------------
84+
if(AXOM_ENABLE_TESTS)
85+
add_subdirectory(tests)
86+
endif()
87+
88+
if(AXOM_ENABLE_EXAMPLES)
89+
add_subdirectory(examples)
90+
endif()

0 commit comments

Comments
 (0)