Static assertion: VectorQ1Scalar satisfies VectorLike concept. More...
#include <vector_q1.hpp>
Public Types | |
| using | ScalarType = ScalarT |
| Scalar type of the vector. | |
Public Member Functions | |
| VectorQ1Vec ()=default | |
| Default constructor. | |
| VectorQ1Vec (const std::string &label, const grid::shell::DistributedDomain &distributed_domain, const grid::Grid4DDataScalar< grid::NodeOwnershipFlag > &mask_data) | |
| Construct a Q1 vector with label, domain, and mask data. | |
| void | lincomb_impl (const std::vector< ScalarType > &c, const std::vector< VectorQ1Vec > &x, const ScalarType c0) |
| Linear combination implementation for VectorLike concept. Computes: \( y = c_0 + \sum_i c_i x_i \). | |
| ScalarType | dot_impl (const VectorQ1Vec &x) const |
| Dot product implementation for VectorLike concept. Computes: \( \sum_{i} y_i \cdot x_i \) over owned nodes. | |
| void | invert_entries_impl () |
| Invert entries implementation for VectorLike concept. Computes: \( y_i = 1 / y_i \). | |
| void | scale_with_vector_impl (const VectorQ1Vec &x) |
| Elementwise scaling implementation for VectorLike concept. Computes: \( y_i = y_i \cdot x_i \). | |
| void | randomize_impl () |
| Randomize entries implementation for VectorLike concept. Sets each entry of grid_data to a random value. | |
| ScalarType | max_abs_entry_impl () const |
| Max absolute entry implementation for VectorLike concept. Computes: \( \max_i |y_i| \). | |
| bool | has_nan_or_inf_impl () const |
| NaN/inf check implementation for VectorLike concept. Returns true if any entry of grid_data is NaN/inf. | |
| void | swap_impl (VectorQ1Vec &other) |
| Swap implementation for VectorLike concept. Exchanges grid_data and mask_data with another vector. | |
| const grid::Grid4DDataVec< ScalarType, VecDim > & | grid_data () const |
| Get const reference to grid data. | |
| grid::Grid4DDataVec< ScalarType, VecDim > & | grid_data () |
| Get mutable reference to grid data. | |
| const grid::Grid4DDataScalar< grid::NodeOwnershipFlag > & | mask_data () const |
| Get const reference to mask data. | |
| grid::Grid4DDataScalar< grid::NodeOwnershipFlag > & | mask_data () |
| Get mutable reference to mask data. | |
Static Public Attributes | |
| static const int | Dim = VecDim |
| Dimension of the vector field. | |
Static assertion: VectorQ1Scalar satisfies VectorLike concept.
Q1 vector finite element vector on a distributed shell grid.
Same layout as required for tensor-product wedge elements.
Satisfies the VectorLike concept (see vector.hpp). Provides masked grid data and operations for vector fields.
| using terra::linalg::VectorQ1Vec< ScalarT, VecDim >::ScalarType = ScalarT |
Scalar type of the vector.
|
default |
Default constructor.
|
inline |
Construct a Q1 vector with label, domain, and mask data.
| label | Name for the vector. |
| distributed_domain | Distributed shell domain. |
| mask_data | Mask data grid. |
|
inline |
Dot product implementation for VectorLike concept. Computes: \( \sum_{i} y_i \cdot x_i \) over owned nodes.
| x | Other vector. |
|
inline |
Get mutable reference to grid data.
|
inline |
Get const reference to grid data.
|
inline |
NaN/inf check implementation for VectorLike concept. Returns true if any entry of grid_data is NaN/inf.
|
inline |
Invert entries implementation for VectorLike concept. Computes: \( y_i = 1 / y_i \).
|
inline |
Linear combination implementation for VectorLike concept. Computes: \( y = c_0 + \sum_i c_i x_i \).
| c | Coefficients. |
| x | Input vectors. |
| c0 | Scalar to add. |
|
inline |
Get mutable reference to mask data.
|
inline |
Get const reference to mask data.
|
inline |
Max absolute entry implementation for VectorLike concept. Computes: \( \max_i |y_i| \).
|
inline |
Randomize entries implementation for VectorLike concept. Sets each entry of grid_data to a random value.
|
inline |
Elementwise scaling implementation for VectorLike concept. Computes: \( y_i = y_i \cdot x_i \).
| x | Scaling vector. |
|
inline |
Swap implementation for VectorLike concept. Exchanges grid_data and mask_data with another vector.
| other | Other vector. |
|
static |
Dimension of the vector field.