diff --git a/include/cantera/base/Array.h b/include/cantera/base/Array.h index f25e0015c63..e70b01deabc 100644 --- a/include/cantera/base/Array.h +++ b/include/cantera/base/Array.h @@ -25,6 +25,8 @@ namespace Cantera * J(i,j) = data_start + index * i = row * j = column + * + * @ingroup matrices */ class Array2D { diff --git a/include/cantera/base/global.h b/include/cantera/base/global.h index a4cf06d8022..442008dc8b8 100644 --- a/include/cantera/base/global.h +++ b/include/cantera/base/global.h @@ -4,8 +4,6 @@ * inputfiles, logs, textlogs, (see \ref inputfiles, \ref logs, and * \ref textlogs). * - * @ingroup utils - * * These functions store some parameters in global storage that are accessible * at all times from the calling application. Contains module definitions for * - inputfiles (see \ref inputfiles) diff --git a/include/cantera/base/utilities.h b/include/cantera/base/utilities.h index cbaa486a36a..b4048a5773c 100644 --- a/include/cantera/base/utilities.h +++ b/include/cantera/base/utilities.h @@ -1,17 +1,19 @@ /** * @file utilities.h - * Various templated functions that carry out common vector - * operations (see \ref utils). + * Various templated functions that carry out common vector and polynomial operations + * (see \ref mathTemplates). */ // This file is part of Cantera. See License.txt in the top-level directory or // at https://cantera.org/license.txt for license and copyright information. /** - * @defgroup utils Templated Utility Functions + * @defgroup mathTemplates Templated Array and Polynomial Operations * * These are templates to perform various simple operations on arrays. Note that * the compiler will inline these, so using them carries no performance penalty. + * + * @ingroup numerics */ #ifndef CT_UTILITIES_H @@ -30,6 +32,7 @@ namespace Cantera * @param x first reference to the templated class V * @param y second reference to the templated class V * @return This class returns a hard-coded type, doublereal. + * @ingroup mathTemplates */ template inline doublereal dot4(const V& x, const V& y) @@ -45,6 +48,7 @@ inline doublereal dot4(const V& x, const V& y) * @param x first reference to the templated class V * @param y second reference to the templated class V * @return This class returns a hard-coded type, doublereal. + * @ingroup mathTemplates */ template inline doublereal dot5(const V& x, const V& y) @@ -72,6 +76,7 @@ inline doublereal dot5(const V& x, const V& y) * @param y_begin Iterator pointing to the beginning of y, belonging to the * iterator class InputIter2. * @return The return is hard-coded to return a double. + * @ingroup mathTemplates */ template inline doublereal dot(InputIter x_begin, InputIter x_end, @@ -95,6 +100,7 @@ inline doublereal dot(InputIter x_begin, InputIter x_end, * iterator class OutputIter. This is the output variable * for this routine. * @param scale_factor input scale factor belonging to the class S. + * @ingroup mathTemplates */ template inline void scale(InputIter begin, InputIter end, @@ -108,6 +114,7 @@ inline void scale(InputIter begin, InputIter end, /*! * @param x Value of the independent variable - First template parameter * @param c Pointer to the polynomial - Second template parameter + * @ingroup mathTemplates */ template R poly6(D x, R* c) @@ -120,6 +127,7 @@ R poly6(D x, R* c) /*! * @param x Value of the independent variable - First template parameter * @param c Pointer to the polynomial - Second template parameter + * @ingroup mathTemplates */ template R poly8(D x, R* c) @@ -132,6 +140,7 @@ R poly8(D x, R* c) /*! * @param x Value of the independent variable - First template parameter * @param c Pointer to the polynomial - Second template parameter + * @ingroup mathTemplates */ template R poly5(D x, R* c) @@ -144,6 +153,7 @@ R poly5(D x, R* c) /*! * @param x Value of the independent variable. * @param c Pointer to the polynomial coefficient array. + * @ingroup mathTemplates */ template R poly4(D x, R* c) @@ -156,6 +166,7 @@ R poly4(D x, R* c) /*! * @param x Value of the independent variable - First template parameter * @param c Pointer to the polynomial - Second template parameter + * @ingroup mathTemplates */ template R poly3(D x, R* c) @@ -187,6 +198,7 @@ const U& getValue(const std::map& m, const T& key, const U& default_val) { } //! Get the size of a container, cast to a signed integer type +//! @ingroup mathTemplates template U len(const T& container) { return static_cast(container.size()); diff --git a/include/cantera/numerics/BandMatrix.h b/include/cantera/numerics/BandMatrix.h index 0754522fd0e..1441be90a21 100644 --- a/include/cantera/numerics/BandMatrix.h +++ b/include/cantera/numerics/BandMatrix.h @@ -30,6 +30,8 @@ namespace Cantera * This class is a derived class of the base class GeneralMatrix. However, * within the oneD directory, the class is used as is, without reference to the * GeneralMatrix base type. + * + * @ingroup matrices */ class BandMatrix : public GeneralMatrix { diff --git a/include/cantera/numerics/DenseMatrix.h b/include/cantera/numerics/DenseMatrix.h index 8172a244271..8655acc1244 100644 --- a/include/cantera/numerics/DenseMatrix.h +++ b/include/cantera/numerics/DenseMatrix.h @@ -18,12 +18,16 @@ namespace Cantera { /** - * @defgroup numerics Numerical Utilities within Cantera - * - * Cantera contains some capabilities for solving nonlinear equations and - * integrating both ODE and DAE equation systems in time. This section describes - * these capabilities. + * @defgroup numerics Numerical Utilities * + * @details Cantera contains some capabilities for solving nonlinear equations and + * integrating both ODE and DAE equation systems in time. + */ + +/** + * @defgroup matrices Matrix Handling + * Classes and methods implementing matrix operations. + * @ingroup numerics */ //! A class for full (non-sparse) matrices with Fortran-compatible data storage, @@ -45,7 +49,7 @@ namespace Cantera * m_printLevel. The default is for no reporting. If m_printLevel is nonzero, * the error condition is reported to Cantera's log file. * - * @ingroup numerics + * @ingroup matrices */ class DenseMatrix : public Array2D { diff --git a/include/cantera/numerics/Func1.h b/include/cantera/numerics/Func1.h index 63fbbd3b2e2..7df5aa66ca7 100644 --- a/include/cantera/numerics/Func1.h +++ b/include/cantera/numerics/Func1.h @@ -43,6 +43,7 @@ class TimesConstant1; //! Functors implement functions of a single variable \f$ f(x) \f$. //! Functor objects can be combined to form compound expressions, which allows for //! the implementation of generic mathematical expressions. +//! @ingroup numerics //! @defgroup func1simple Simple Functors //! Simple functors implement standard mathematical expressions with a single diff --git a/include/cantera/numerics/FuncEval.h b/include/cantera/numerics/FuncEval.h index 63f4b08c507..f29ddc99d12 100644 --- a/include/cantera/numerics/FuncEval.h +++ b/include/cantera/numerics/FuncEval.h @@ -15,6 +15,10 @@ namespace Cantera { +/** + * @defgroup odeGroup ODE and DAE Function Utilities +*/ + /** * Virtual base class for ODE/DAE right-hand-side function evaluators. * Classes derived from FuncEval evaluate the right-hand-side function diff --git a/include/cantera/numerics/GeneralMatrix.h b/include/cantera/numerics/GeneralMatrix.h index 1df8f32c126..d69dd0b7fa8 100644 --- a/include/cantera/numerics/GeneralMatrix.h +++ b/include/cantera/numerics/GeneralMatrix.h @@ -1,7 +1,7 @@ /** * @file GeneralMatrix.h * Declarations for the class GeneralMatrix which is a virtual base class for matrices handled by solvers - * (see class \ref numerics and \link Cantera::GeneralMatrix GeneralMatrix\endlink). + * (see class \ref matrices and \link Cantera::GeneralMatrix GeneralMatrix\endlink). */ // This file is part of Cantera. See License.txt in the top-level directory or @@ -18,6 +18,7 @@ namespace Cantera { //! Generic matrix +//! @ingroup matrices class GeneralMatrix { public: diff --git a/include/cantera/numerics/eigen_dense.h b/include/cantera/numerics/eigen_dense.h index da3a6772cc8..a47936219e3 100644 --- a/include/cantera/numerics/eigen_dense.h +++ b/include/cantera/numerics/eigen_dense.h @@ -18,11 +18,22 @@ namespace Cantera { +//! @ingroup matrices typedef Eigen::Map MappedMatrix; + +//! @ingroup matrices typedef Eigen::Map ConstMappedMatrix; + +//! @ingroup matrices typedef Eigen::Map MappedVector; + +//! @ingroup matrices typedef Eigen::Map ConstMappedVector; + +//! @ingroup matrices typedef Eigen::Map MappedRowVector; + +//! @ingroup matrices typedef Eigen::Map ConstMappedRowVector; } diff --git a/include/cantera/numerics/eigen_sparse.h b/include/cantera/numerics/eigen_sparse.h index c9660e91ff9..ecb83722c73 100644 --- a/include/cantera/numerics/eigen_sparse.h +++ b/include/cantera/numerics/eigen_sparse.h @@ -17,6 +17,7 @@ namespace Cantera { +//! @ingroup matrices typedef std::vector> SparseTriplets; } diff --git a/include/cantera/numerics/funcs.h b/include/cantera/numerics/funcs.h index d8b0e4d04f1..16ccd2f351b 100644 --- a/include/cantera/numerics/funcs.h +++ b/include/cantera/numerics/funcs.h @@ -15,6 +15,13 @@ namespace Cantera { +/** + * @defgroup mathUtils Numerical Integration and Interpolation + * Collection of numerical utility functions for integration, interpolation and data + * fitting. + * @ingroup numerics +*/ + //! Linearly interpolate a function defined on a discrete grid. /*! * Vector xpts contains a monotonic sequence of grid points, and vector fpts @@ -26,6 +33,7 @@ namespace Cantera * @param xpts value of the grid points * @param fpts value of the interpolant at the grid points * @returns the value of of the interpolated function at x. + * @ingroup mathUtils */ doublereal linearInterp(doublereal x, const vector_fp& xpts, const vector_fp& fpts); @@ -38,6 +46,7 @@ doublereal linearInterp(doublereal x, const vector_fp& xpts, * * @param f vector of function value * @param x vector of function coordinate + * @ingroup mathUtils */ double trapezoidal(const Eigen::ArrayXd& f, const Eigen::ArrayXd& x); @@ -52,6 +61,7 @@ double trapezoidal(const Eigen::ArrayXd& f, const Eigen::ArrayXd& x); * * @param f vector of function value * @param x vector of function coordinate + * @ingroup mathUtils */ double simpson(const Eigen::ArrayXd& f, const Eigen::ArrayXd& x); @@ -64,6 +74,7 @@ double simpson(const Eigen::ArrayXd& f, const Eigen::ArrayXd& x); * @param method method name * @param f vector of function value * @param x vector of function coordinate + * @ingroup mathUtils */ double numericalQuadrature(const std::string& method, const Eigen::ArrayXd& f, diff --git a/include/cantera/numerics/polyfit.h b/include/cantera/numerics/polyfit.h index 03a27ae4a44..5c40bc29922 100644 --- a/include/cantera/numerics/polyfit.h +++ b/include/cantera/numerics/polyfit.h @@ -28,6 +28,7 @@ namespace Cantera * @param[out] p Array of polynomial coefficients, starting with the constant * term. Length *deg+1*. * @returns the root mean squared error of the fit at the input points. + * @ingroup mathUtils */ double polyfit(size_t n, size_t deg, const double* x, const double* y, const double* w, double* p);