svMultiPhysics
Loading...
Searching...
No Matches
solver
FE
Math
Matrix.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Stanford University, The Regents of the University of California, and others.
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#ifndef SVMP_FE_MATH_MATRIX_H
5
#define SVMP_FE_MATH_MATRIX_H
6
7
/**
8
* @file Matrix.h
9
* @brief Fixed-size matrix types for FE computations, backed by Eigen.
10
*
11
* The FE library standardizes on Eigen for linear algebra. These aliases give
12
* element-level code a stable vocabulary type without re-exporting all of
13
* Eigen. Storage is Eigen's default (column-major); element access through
14
* operator()(row, col) is unchanged. Note that, unlike the previous in-house
15
* implementation, Eigen types are NOT zero-initialized by default
16
* construction; use Matrix::Zero() where a zeroed value is required.
17
*/
18
19
#include "Vector.h"
20
21
#include <Eigen/Core>
22
23
#include <cstddef>
24
25
/**
26
* @defgroup FE_MatrixMath Matrix
27
* @ingroup FE_Math
28
* @brief Fixed-size matrix type aliases.
29
*/
30
31
namespace
svmp::FE::math {
32
33
/**
34
* @brief Fixed-size matrix for element-level computations
35
* @ingroup FE_MatrixMath
36
* @tparam T Scalar type (float, double)
37
* @tparam M Number of rows
38
* @tparam N Number of columns
39
*/
40
template
<
typename
T, std::
size_t
M, std::
size_t
N>
41
using
Matrix
= Eigen::Matrix<T, static_cast<int>(M),
static_cast<
int
>
(N)>;
42
43
}
// namespace svmp::FE::math
44
45
#endif
// SVMP_FE_MATH_MATRIX_H
svmp::FE::math::Matrix
Eigen::Matrix< T, static_cast< int >(M), static_cast< int >(N)> Matrix
Fixed-size matrix for element-level computations.
Definition
Matrix.h:41
Generated by
1.9.8