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
change doxygen syntax to match axom's standard
  • Loading branch information
bgunnar5 committed Jul 12, 2024
commit d998facd15308f0c0e39a5486c0f3e7b367f5620
11 changes: 9 additions & 2 deletions src/axom/sina/core/AdiakWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
//
// SPDX-License-Identifier: (BSD-3-Clause)


/// @file
/*!
******************************************************************************
*
* \file AdiakWriter.cpp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that we have some potentially similar logic in core/Annotations

See: https://github.com/LLNL/axom/blob/develop/src/axom/core/utilities/Annotations.cpp

*
* \brief Implementation file for the Adiak Sina callback function.
*
******************************************************************************
*/

#include "axom/sina/core/AdiakWriter.hpp"

Expand Down
20 changes: 14 additions & 6 deletions src/axom/sina/core/AdiakWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@
#ifndef SINA_ADIAK_HPP
#define SINA_ADIAK_HPP

/// @file
/*!
******************************************************************************
*
* \file AdiakWriter.hpp
*
* \brief Implementation file for the Adiak Sina callback function.
*
******************************************************************************
*/

#include "axom/config.hpp"
#ifdef AXOM_USE_ADIAK
Expand All @@ -29,7 +37,7 @@ namespace sina
{

/**
* The callback function to pass to Adiak in order to write collected data to a Sina Record.
* \brief The callback function to pass to Adiak in order to write collected data to a Sina Record.
*
* To register this with Adiak, you should call adiak_register_cb, passing in
* a pointer to the record as the last value. Your code should look something
Expand All @@ -40,10 +48,10 @@ namespace sina
* axom::sina::adiak_register_cb(1, adiak_category_all, axom::sina::adiakSinaCallback, 0, &record);
* \endcode
*
* Note that not everything that Sina can capture an be captured through the
* Adiak API. For example, there is currently no support in Adiak to capture
* anything like a CurveSet. As a result, to do that, you must hold on to
* the Record object passed here as the opaque value and manipulate it directly.
* \attention Not everything that Sina can capture an be captured through the
* Adiak API. For example, there is currently no support in Adiak to capture
* anything like a CurveSet. As a result, to do that, you must hold on to
* the Record object passed here as the opaque value and manipulate it directly.
**/
void adiakSinaCallback(const char *name, adiak_category_t category, const char *subcategory, adiak_value_t *value, adiak_datatype_t *t, void *opaque_value);

Expand Down
10 changes: 10 additions & 0 deletions src/axom/sina/core/ConduitUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
// SPDX-License-Identifier: (BSD-3-Clause)


/*!
******************************************************************************
*
* \file ConduitUtil.cpp
*
* \brief Implementation file for Sina Conduit utility functions
*
******************************************************************************
*/

#include "axom/sina/core/ConduitUtil.hpp"

#include <iostream>
Expand Down
104 changes: 57 additions & 47 deletions src/axom/sina/core/ConduitUtil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
#ifndef SINA_JSONUTIL_HPP
#define SINA_JSONUTIL_HPP

/*!
******************************************************************************
*
* \file ConduitUtil.hpp
*
* \brief Implementation file for Sina Conduit utility functions
*
******************************************************************************
*/

#include <string>
#include <vector>

Expand All @@ -18,90 +28,90 @@ namespace sina
{

/**
* Get a required field from a conduit Node.
* \brief Get a required field from a conduit Node.
*
* @param fieldName the name of the field to get
* @param parent the parent object from which to get the field
* @param parentType a user-friendly name of the type of the parent to use
* in an error message if the field doesn't exist.
* @return the requested field as a Node
* @throws std::invalid_argument if the field does not exist
* \param fieldName the name of the field to get
* \param parent the parent object from which to get the field
* \param parentType a user-friendly name of the type of the parent to use
* in an error message if the field doesn't exist.
* \return the requested field as a Node
* \throws std::invalid_argument if the field does not exist
*/
conduit::Node const &getRequiredField(std::string const &fieldName,
conduit::Node const &parent, std::string const &parentType);

/**
* Get the value of a required field from a conduit Node. The field value
* must be a string.
* \brief Get the value of a required field from a conduit Node. The field value
* must be a string.
*
* @param fieldName the name of the field to get
* @param parent the parent object from which to get the field
* @param parentType a user-friendly name of the type of the parent to use
* in an error message if the field doesn't exist.
* @return the value of the requested field
* @throws std::invalid_argument if the field does not exist or is not a string
* \param fieldName the name of the field to get
* \param parent the parent object from which to get the field
* \param parentType a user-friendly name of the type of the parent to use
* in an error message if the field doesn't exist.
* \return the value of the requested field
* \throws std::invalid_argument if the field does not exist or is not a string
*/
std::string getRequiredString(std::string const &fieldName,
conduit::Node const &parent, std::string const &parentType);

/**
* Get the value of a required field from a conduit Node. The field value
* must be a double.
* \brief Get the value of a required field from a conduit Node. The field value
* must be a double.
*
* @param fieldName the name of the field to get
* @param parent the parent object from which to get the field
* @param parentType a user-friendly name of the type of the parent to use
* in an error message if the field doesn't exist.
* @return the value of the requested field
* @throws std::invalid_argument if the field does not exist or is not a double
* \param fieldName the name of the field to get
* \param parent the parent object from which to get the field
* \param parentType a user-friendly name of the type of the parent to use
* in an error message if the field doesn't exist.
* \return the value of the requested field
* \throws std::invalid_argument if the field does not exist or is not a double
*/
double getRequiredDouble(std::string const &fieldName,
conduit::Node const &parent, std::string const &parentType);

/**
* Get the value of an optional field from a conduit Node. The field value
* must be a string if it is present.
* \brief Get the value of an optional field from a conduit Node. The field value
* must be a string if it is present.
*
* @param fieldName the name of the field to get
* @param parent the parent object from which to get the field
* @param parentType a user-friendly name of the type of the parent to use
* in an error message if the field doesn't exist.
* @return the value of the requested field, or an empty string if it
* does not exist
* @throws std::invalid_argument if the field exists but is not a string
* \param fieldName the name of the field to get
* \param parent the parent object from which to get the field
* \param parentType a user-friendly name of the type of the parent to use
* in an error message if the field doesn't exist.
* \return the value of the requested field, or an empty string if it
* does not exist
* \throws std::invalid_argument if the field exists but is not a string
*/
std::string getOptionalString(std::string const &fieldName,
conduit::Node const &parent, std::string const &parentType);

/**
* Convert the given node to a vector of doubles.
* \brief Convert the given node to a vector of doubles.
*
* @param node the node to convert
* @param name the name of the node, used in error reporting
* @return the node as a list of doubles
* @throws std::invalid_argument if the node is not a list of doubles
* \param node the node to convert
* \param name the name of the node, used in error reporting
* \return the node as a list of doubles
* \throws std::invalid_argument if the node is not a list of doubles
*/
std::vector<double> toDoubleVector(conduit::Node const &node,
std::string const &name);

/**
* Convert the given node to a vector of strings.
* \brief Convert the given node to a vector of strings.
*
* @param node the node to convert
* @param name the name of the node, used in error reporting
* @return the node as a list of strings
* @throws std::invalid_argument if the node is not a list of strings
* \param node the node to convert
* \param name the name of the node, used in error reporting
* \return the node as a list of strings
* \throws std::invalid_argument if the node is not a list of strings
*/
std::vector<std::string> toStringVector(conduit::Node const &node,
std::string const &name);

/**
* Add a vector of strings to a Node. This operation's not natively
* part of Conduit.
* \brief Add a vector of strings to a Node. This operation's not natively
* part of Conduit.
*
* @param parent the node to add the strings to
* @param child_name the name of the child (aka the name of the field)
* @param string_values the data values for the field
* \param parent the node to add the strings to
* \param child_name the name of the child (aka the name of the field)
* \param string_values the data values for the field
*/
void addStringsToNode(conduit::Node &parent, const std::string &child_name,
std::vector<std::string> const &string_values);
Expand Down
9 changes: 9 additions & 0 deletions src/axom/sina/core/Curve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
//
// SPDX-License-Identifier: (BSD-3-Clause)

/*!
******************************************************************************
*
* \file Curve.cpp
*
* \brief Implementation file for Sina Curve class
*
******************************************************************************
*/

#include "axom/sina/core/Curve.hpp"
#include "axom/sina/core/ConduitUtil.hpp"
Expand Down
58 changes: 31 additions & 27 deletions src/axom/sina/core/Curve.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
#ifndef SINA_CURVE_HPP
#define SINA_CURVE_HPP

/**
* @file
/*!
******************************************************************************
*
* \file Curve.hpp
*
* \brief Implementation file for Sina Curve class
*
* Contains the definition of the Curve class.
******************************************************************************
*/

#include <string>
Expand All @@ -29,84 +33,84 @@ namespace sina
class Curve {
public:
/**
* Create a Curve with the given name and values
* \brief Create a Curve with the given name and values
*
* @param name the name of the curve
* @param values the curve's values
* \param name the name of the curve
* \param values the curve's values
*/
Curve(std::string name, std::vector<double> values);

/**
* Create a Curve with the given name and values
* \brief Create a Curve with the given name and values
*
* @param name the name of the curve
* @param values the curve's values
* @param numValues the number of values.
* \param name the name of the curve
* \param values the curve's values
* \param numValues the number of values.
*/
Curve(std::string name, double const *values, std::size_t numValues);

/**
* Create a Curve by deserializing a conduit node.
* \brief Create a Curve by deserializing a conduit node.
*
* @param name the name of the curve
* @param curveAsNode the serialized version of a curve
* \param name the name of the curve
* \param curveAsNode the serialized version of a curve
*/
Curve(std::string name, conduit::Node const &curveAsNode);

/**
* Get the curve's name.
* \brief Get the curve's name.
*
* @return the curve's name
* \return the curve's name
*/
std::string const &getName() const {
return name;
}

/**
* Get the values of the curve.
* \brief Get the values of the curve.
*
* @return the curve's values
* \return the curve's values
*/
std::vector<double> const &getValues() const {
return values;
}

/**
* Set the units of the values.
* \brief Set the units of the values.
*
* @param units the value's units
* \param units the value's units
*/
void setUnits(std::string units);

/**
* Get the units of the values.
* \brief Get the units of the values.
*
* @return the value's units
* \return the value's units
*/
std::string const &getUnits() const {
return units;
}

/**
* Set the tags for this curve.
* \brief Set the tags for this curve.
*
* @param tags the curve's tags
* \param tags the curve's tags
*/
void setTags(std::vector<std::string> tags);

/**
* Get the tags for this curve.
* \brief Get the tags for this curve.
*
* @return the curve's tags
* \return the curve's tags
*/
std::vector<std::string> const &getTags() const {
return tags;
}

/**
* Convert this curve to a Conduit node.
* \brief Convert this curve to a Conduit node.
*
* @return a Conduit representation of this curve
* \return a Conduit representation of this curve
*/
conduit::Node toNode() const;

Expand Down
11 changes: 11 additions & 0 deletions src/axom/sina/core/CurveSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
//
// SPDX-License-Identifier: (BSD-3-Clause)

/*!
******************************************************************************
*
* \file CurveSet.cpp
*
* \brief Implementation file for Sina CurveSet class
*
* \sa Curve.hpp
*
******************************************************************************
*/

#include "axom/sina/core/CurveSet.hpp"

Expand Down
Loading