AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Provides Matrix/Vector operations. More...
#include "axom/config.hpp"
#include "axom/core/numerics/Determinants.hpp"
#include "axom/core/numerics/Matrix.hpp"
#include "axom/core/utilities/Utilities.hpp"
#include "axom/core/numerics/internal/matrix_norms.hpp"
#include <cassert>
#include <cmath>
#include "axom/core/Macros.hpp"
Namespaces | |
axom | |
axom::numerics | |
Enumerations | |
Enumerators & Types | |
enum | axom::numerics::MatrixNorm { axom::numerics::P1_NORM , axom::numerics::INF_NORM , axom::numerics::FROBENIUS_NORM } |
Enumerates the supported matrix norms. More... | |
Functions | |
Vector Operators | |
template<typename T > | |
bool | axom::numerics::linspace (const T &x0, const T &x1, T *v, int N) |
Generates a vector consisting of a sequence of N uniformly spaced values over the interval [x0,x1]. More... | |
template<typename T > | |
AXOM_HOST_DEVICE void | axom::numerics::cross_product (const T *u, const T *v, T *w) |
Computes the vector cross-product of two vectors, u and v. More... | |
template<typename T > | |
AXOM_HOST_DEVICE T | axom::numerics::dot_product (const T *u, const T *v, int dim) |
Computes the dot product of the arrays u and v. More... | |
template<typename T > | |
void | axom::numerics::make_orthogonal (T *u, T *v, int dim, double tol=1E-16) |
Makes u orthogonal to v. More... | |
template<typename T > | |
bool | axom::numerics::orthonormalize (T *basis, int size, int dim, double eps=1E-16) |
Performs Gram-Schmidt orthonormalization in-place on a 2D array of shape size,dim where it treats the rows as the individual vectors. More... | |
template<typename T > | |
AXOM_HOST_DEVICE bool | axom::numerics::normalize (T *v, int dim, double eps=1e-16) |
Normalizes the passed in array. More... | |
Matrix Operators | |
template<typename T > | |
bool | axom::numerics::matrix_add (const Matrix< T > &A, const Matrix< T > &B, Matrix< T > &C) |
Computes \( \mathcal{C} = \mathcal{A} + \mathcal{B} \). More... | |
template<typename T > | |
bool | axom::numerics::matrix_subtract (const Matrix< T > &A, const Matrix< T > &B, Matrix< T > &C) |
Computes \( \mathcal{C} = \mathcal{A} - \mathcal{B} \). More... | |
template<typename T > | |
bool | axom::numerics::matrix_multiply (const Matrix< T > &A, const Matrix< T > &B, Matrix< T > &C) |
Computes the matrix-matrix product of \( \mathcal{A} \) and \( \mathcal{B} \) and stores the result in \( \mathcal{C} \). More... | |
template<typename T > | |
void | axom::numerics::matrix_scalar_multiply (Matrix< T > &A, const T &c) |
Computes a scalar-matrix produect of a matrix \( \mathcal{A} \) and a scalar \( c \) and stores the result in \( \mathcal{A} \). More... | |
template<typename T > | |
void | axom::numerics::matrix_vector_multiply (const Matrix< T > &A, const T *vec, T *output) |
Computes the matrix-vector product of a matrix \(\mathcal{A}\) and a vector \(\mathbf{x}\) and store the result in the user-supplied output vector. More... | |
template<typename T > | |
bool | axom::numerics::matrix_transpose (const Matrix< T > &A, Matrix< T > &M) |
Computes the matrix transpose of a given matrix \( \mathcal{A} \). More... | |
template<typename T > | |
T | axom::numerics::matrix_norm (const Matrix< T > &A, MatrixNorm normType) |
Computes the specified norm of a given \( M \times N \) matrix. More... | |
Provides Matrix/Vector operations.