Static assertion: VectorQ1Scalar satisfies VectorLike concept. More...
#include <vector_fv.hpp>
Public Types | |
| using | ScalarType = ScalarT |
| Scalar type of the vector. | |
Public Member Functions | |
| VectorFVVec ()=default | |
| Default constructor. | |
| VectorFVVec (const std::string &label, const grid::shell::DistributedDomain &distributed_domain) | |
| Construct a scalar finite volume vector with label and domain. | |
| void | lincomb_impl (const std::vector< ScalarType > &c, const std::vector< VectorFVVec > &x, const ScalarType c0) |
| Linear combination implementation for VectorLike concept. Computes: \( y = c_0 + \sum_i c_i x_i \). | |
| ScalarType | dot_impl (const VectorFVVec &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 VectorFVVec &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 or inf. | |
| void | swap_impl (VectorFVVec &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. | |
| MPI_Comm | comm () const |
| MPI communicator this vector's reductions run on. | |
Static assertion: VectorQ1Scalar satisfies VectorLike concept.
Finite volume vector on distributed shell grid with one DoF per hex (merging 2 wedges) and ghost-layer in all directions.
Only non-ghost-layer cells can be expected to be up-to-date. Unlike nodal grids, communication has to be executed first in general, before running kernels (if ghost-layer data is required).
Satisfies the VectorLike concept (see vector.hpp). Provides operations for vector fields.
| using terra::linalg::VectorFVVec< ScalarT, VecDim >::ScalarType = ScalarT |
Scalar type of the vector.
|
default |
Default constructor.
|
inline |
Construct a scalar finite volume vector with label and domain.
| label | Name for the vector. |
| distributed_domain | Distributed shell domain. |
|
inline |
MPI communicator this vector's reductions run on.
|
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 or 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 |
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. |