Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sina as Axom component #1378

Open
wants to merge 56 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
89413c6
establish directory structure and copy/paste headers/sources
bgunnar5 Apr 24, 2024
c8bdb57
add doxygen mainpage for sina
bgunnar5 Apr 24, 2024
4455cc7
first pass at the cmake file for sina component
bgunnar5 Apr 24, 2024
857a449
Merge branch 'LLNL:develop' into feature/bgunnar5/sina-integration
bgunnar5 Apr 29, 2024
d8d7a49
move sina to axom and add cmake files so it can be built
bgunnar5 May 8, 2024
39e5a2e
add doxygen mainpage for sina
bgunnar5 May 8, 2024
a370f6f
merge prior changes to this branch made on diff computer
bgunnar5 May 8, 2024
3c40f1a
Merge branch 'develop' of https://github.com/bgunnar5/axom into featu…
bgunnar5 May 8, 2024
a5fba8b
remove extra adiak list append and uncomment test addition
bgunnar5 May 29, 2024
44e6f74
add tests for sina
bgunnar5 May 29, 2024
f212627
initial add of examples
bgunnar5 May 30, 2024
45628bf
get doxygen docs up and running
bgunnar5 Jun 21, 2024
234e1eb
start work on sphinx docs
bgunnar5 Jun 21, 2024
c9b9cca
finish creating sina docs
bgunnar5 Jun 27, 2024
76c7c86
fix references to sina namespace in doxygen
bgunnar5 Jun 27, 2024
7d78852
add sina fortran interface
bgunnar5 Jul 3, 2024
2fbb425
Merge branch 'develop' of https://github.com/LLNL/axom into feature/b…
bgunnar5 Jul 3, 2024
b23292f
fix small issues with docs
bgunnar5 Jul 9, 2024
d9de3ef
make ordering alphabetical for cmakedefines
bgunnar5 Jul 9, 2024
7bf7fc8
fix indentation on doxygen page
bgunnar5 Jul 9, 2024
f15a501
protect against GMOCK not available
bgunnar5 Jul 9, 2024
46d0fcd
move document examples to actual examples
bgunnar5 Jul 10, 2024
5c181c7
add copyright header to sina files
bgunnar5 Jul 10, 2024
4a635bf
move cpp/hpp files to same directory for core and tests
bgunnar5 Jul 11, 2024
820ce9f
remove CppBridge for C++<14
bgunnar5 Jul 11, 2024
10dccf7
replace AXOM_SINA_USE_ADIAK with AXOM_USE_ADIAK
bgunnar5 Jul 11, 2024
d998fac
change doxygen syntax to match axom's standard
bgunnar5 Jul 12, 2024
4d7c8c2
remove unused config file and reference to msub job in docs
bgunnar5 Jul 16, 2024
2860e09
fix issue with Maestro link
bgunnar5 Jul 16, 2024
c8e1f39
convert Datum to pass by reference
bgunnar5 Jul 16, 2024
6f271a3
Merge branch 'develop' of https://github.com/LLNL/axom into feature/b…
bgunnar5 Jul 16, 2024
a57111a
run make style
bgunnar5 Jul 17, 2024
66c3163
Merge branch 'develop' into pr-from-fork/1376
bgunnar5 Jul 17, 2024
917aa27
disable sina for osx_gcc and windows azure tests
bgunnar5 Aug 1, 2024
b9b415b
add custom sina matchers so that blueos will build
bgunnar5 Aug 1, 2024
a516da9
Merge branch 'pr-from-fork/1376' of https://github.com/LLNL/axom into…
bgunnar5 Aug 1, 2024
48b311f
Merge branch 'develop' of https://github.com/LLNL/axom into feature/b…
bgunnar5 Aug 1, 2024
3ef59eb
remove code check call from Sina CMake and run make style
bgunnar5 Aug 5, 2024
5856843
add compiler flag for xl fortran builds
bgunnar5 Aug 7, 2024
5d39439
Merge branch 'develop' of https://github.com/LLNL/axom into feature/b…
bgunnar5 Aug 7, 2024
70b4716
Merge branch 'develop' of https://github.com/LLNL/axom into feature/b…
bgunnar5 Aug 7, 2024
f9285ca
Merge branch 'develop' of https://github.com/LLNL/axom into feature/b…
bgunnar5 Aug 8, 2024
64ce0ec
update sina description in doxygen mainpage
bgunnar5 Aug 8, 2024
0ee8cf9
Merge branch 'develop' of https://github.com/LLNL/axom into feature/b…
bgunnar5 Aug 12, 2024
4552083
add version for sina
bgunnar5 Aug 12, 2024
0c279e3
Merge branch 'develop' into pr-from-fork/1376
rhornung67 Aug 15, 2024
caab17d
Update src/axom/sina/core/ID.hpp
bgunnar5 Aug 30, 2024
bce3aaa
implementation -> header in hpp file brief statements
bgunnar5 Aug 30, 2024
274851f
make docs suggestions from PR
bgunnar5 Aug 30, 2024
528d0d9
modify code block comments for docs
bgunnar5 Aug 30, 2024
6246b2d
some final fixes for sina docs
bgunnar5 Aug 30, 2024
dbf9d5a
fix python interpreter package find to not use deprecated call
bgunnar5 Aug 30, 2024
ae026bf
move custom XL flag to just be used for sina fortran example executable
bgunnar5 Aug 30, 2024
cbcbce0
Merge branch 'develop' of https://github.com/LLNL/axom into feature/b…
bgunnar5 Aug 30, 2024
03aca6d
Merge branch 'pr-from-fork/1376' of https://github.com/LLNL/axom into…
bgunnar5 Aug 30, 2024
7289033
fix python executable variable name
bgunnar5 Sep 4, 2024
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
Prev Previous commit
Next Next commit
get doxygen docs up and running
  • Loading branch information
bgunnar5 committed Jun 21, 2024
commit 45628bff15123fe7d510f3a2eda5101e62b1f2d0
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 provides an API to convert data to a common file format.
bgunnar5 marked this conversation as resolved.
Show resolved Hide resolved
* @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
2 changes: 1 addition & 1 deletion src/axom/sina/doxygen_mainpage.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Sina {#sinatop}
=========

[Sina](@ref axom::sina) provides an easy way to collect data directly within codes and output them to a common file format designed. This is accomplished in an object oriented manner through the following classes:
[Sina](@ref axom::sina) provides an easy way to collect data directly within codes and output them to a common file format. This is accomplished in an object oriented manner through the following classes:

- [Curve](@ref axom::sina::Curve): represents a 1D curve
- [CurveSet](@ref axom::sina::CurveSet): represents an entry in a record's "curve_set"
Expand Down
2 changes: 1 addition & 1 deletion src/axom/sina/include/Curve.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace sina
{

/**
* A Curve represents a 1-dimensional curve inside a \see CurveSet.
* A Curve represents a 1-dimensional curve inside a CurveSet.
*/
class Curve {
public:
Expand Down
3 changes: 3 additions & 0 deletions src/axom/sina/include/CurveSet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ namespace sina
*/
class CurveSet {
public:
/**
* An unordered map of Curve objects.
*/
using CurveMap = std::unordered_map<std::string, Curve>;

/**
Expand Down
36 changes: 34 additions & 2 deletions src/axom/sina/include/DataHolder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,48 @@ namespace sina
/**
* A DataHolder is a basic container for certain types of information.
*
* DataHolders contain curves, libraries, and data (\see Datum), and represent
* DataHolders contain curves, libraries, and data (Datum), and represent
* all the information a library can have associated with it. Records expand
* on DataHolders to contain additional info.
*
* \see Record
* \see LibraryData
* \see LibraryDataMap
*/
class DataHolder {
public:
/**
* An unordered map of Datum objects.
*/
using DatumMap = std::unordered_map<std::string, Datum>;

/**
* An unordered map of CurveSet objects.
*/
using CurveSetMap = std::unordered_map<std::string, CurveSet>;

/**
* An unordered map of shared pointers to DataHolder objects.
*/
using LibraryDataMap = std::unordered_map<std::string, std::shared_ptr<DataHolder>>;

/**
* Construct an empty DataHolder.
*/
DataHolder() = default;

/**
* Virtual destructor to automatically clean up resources held by an instance of the DataHolder class.
*/
virtual ~DataHolder() = default;

/**
* Copy constructor that disallows this constructor type.
*/
DataHolder(DataHolder const &) = delete;

/**
* Disable copy assignment.
*/
DataHolder &operator=(DataHolder const &) = delete;

/**
Expand Down Expand Up @@ -99,6 +119,11 @@ class DataHolder {
*/
std::shared_ptr<DataHolder> addLibraryData(std::string const &name);

/**
* Add a new library to this DataHolder with existing library data.
*
* @return a pointer to a new DataHolder for a library of the given name.
*/
std::shared_ptr<DataHolder> addLibraryData(std::string const &name, conduit::Node existingLibraryData);

/**
Expand All @@ -118,6 +143,13 @@ class DataHolder {
std::shared_ptr<DataHolder> getLibraryData(std::string const &libraryName) {
return libraryData.at(libraryName);
}

/**
* Get a specific library associated with this DataHolder.
* Used when the object on which this function is called is a const.
*
* @return the dataholder's library data
*/
std::shared_ptr<DataHolder> const getLibraryData(std::string const &libraryName) const {
return libraryData.at(libraryName);
}
Expand Down
4 changes: 4 additions & 0 deletions src/axom/sina/include/Datum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ enum class ValueType {
* sina::Datum myOtherDatum{value};
* std::vector<double> scalars = {1, 2, 20.0};
* sina::Datum myArrayDatum{scalars};
*
* //prints 1, corresponding to Scalar
* std::cout << static_cast<std::underlying_type<sina::ValueType>::type>(myDatum.getType()) << std::endl;
*
* //prints 0, corresponding to String
* std::cout << static_cast<std::underlying_type<sina::ValueType>::type>(myOtherDatum.getType()) << std::endl;
*
* //prints 3, corresponding to ScalarArray
* std::cout << static_cast<std::underlying_type<sina::ValueType>::type>(myArrayDatum.getType()) << std::endl;
*
* myRecord->add(myDatum);
* myOtherDatum.setUnits("km/s");
* myRecord->add(myOtherDatum);
Expand Down
25 changes: 23 additions & 2 deletions src/axom/sina/include/Document.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,40 @@ namespace sina
*/
class Document {
public:
/**
* A vector of pointers to Record objects.
*/
using RecordList = std::vector<std::unique_ptr<Record>>;

/**
* A vector of Relationship objects.
*/
using RelationshipList = std::vector<Relationship>;

/**
* Construct an empty Document.
*/
Document() = default;

// Since we hold pointers to polymorphic objects, we can't support
// copying or assignment
/**
* Disable copying Document objects. We must do this since we hold
* pointers to polymorphic objects.
*/
Document(Document const &) = delete;

/**
* Disabling copy assignment.
*/
Document &operator=(Document const &) = delete;

/**
* Move constructor which should be handled by the compiler.
*/
Document(Document &&) = default;

/**
* Move assignment which should be handled by the compiler.
*/
Document &operator=(Document &&) = default;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/axom/sina/include/ID.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ enum class IDType {
};

/**
* An ID is used to represent the ID of an record. This class holds both the
* An ID is used to represent the ID of a Record. This class holds both the
* actual ID and whether it is a local or global ID.
*/
class ID {
Expand Down
9 changes: 9 additions & 0 deletions src/axom/sina/include/Record.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ struct FileHashByURI {
*/
class Record : public DataHolder {
public:
/**
* An unordered set of File objects.
*/
using FileSet = std::unordered_set<File, FileHashByURI, FileEqualByURI>;

/**
Expand All @@ -84,8 +87,14 @@ class Record : public DataHolder {
*/
explicit Record(conduit::Node const &asNode);

/**
* Disable the copy constructor.
*/
Record(Record const &) = delete;

/**
* Disable copy assignment.
*/
Record &operator=(Record const &) = delete;

/**
Expand Down
1 change: 1 addition & 0 deletions src/docs/dependencies.dot
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ digraph dependencies {
multimat -> {slic slam};
spin -> {slam primal};
sidre -> {slic core};
sina -> {core};
slic -> core;
slic -> lumberjack [style="dashed"];
lumberjack -> core;
Expand Down
4 changes: 4 additions & 0 deletions src/docs/doxygen/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,10 @@ INPUT = @PROJECT_SOURCE_DIR@/axom/doxygen_mainpage.md \
@PROJECT_SOURCE_DIR@/axom/sidre/doxygen_mainpage.md \
@PROJECT_SOURCE_DIR@/axom/sidre/core \
@PROJECT_SOURCE_DIR@/axom/sidre/spio \
@PROJECT_SOURCE_DIR@/axom/sina \
@PROJECT_SOURCE_DIR@/axom/sina/doxygen_mainpage.md \
@PROJECT_SOURCE_DIR@/axom/sina/src \
@PROJECT_SOURCE_DIR@/axom/sina/include \
@PROJECT_SOURCE_DIR@/axom/slam \
@PROJECT_SOURCE_DIR@/axom/slam/doxygen_mainpage.md \
@PROJECT_SOURCE_DIR@/axom/slam/policies \
Expand Down