|
opm-simulators
|
#include <MiniVector.hpp>
Public Types | |
| using | value_type = T |
| Element type. | |
| using | size_type = std::size_t |
| Index/size type. | |
| using | reference = value_type& |
| Mutable element reference. | |
| using | const_reference = const value_type& |
| Immutable element reference. | |
| using | iterator = typename std::array<T, Dimension>::iterator |
| Mutable iterator. | |
| using | const_iterator = typename std::array<T, Dimension>::const_iterator |
| Immutable iterator. | |
Public Member Functions | |
| OPM_HOST_DEVICE constexpr | MiniVector () noexcept(std::is_nothrow_default_constructible< value_type >::value)=default |
| Default‑constructs the MiniVector; elements are value‑initialized. | |
| OPM_HOST_DEVICE constexpr | MiniVector (const value_type &value) |
| Uniform‑value constructor. | |
| MiniVector (const Dune::FieldVector< T, Dimension > &fv) | |
| Conversion constructor from Dune::FieldVector. | |
| OPM_HOST_DEVICE | MiniVector (std::initializer_list< value_type > init) |
| Initializer‑list constructor. | |
| OPM_HOST_DEVICE constexpr reference | operator[] (size_type idx) noexcept |
| OPM_HOST_DEVICE constexpr const_reference | operator[] (size_type idx) const noexcept |
| OPM_HOST_DEVICE reference | at (size_type idx) |
| Safe element access with bounds checking (throws on host). | |
| OPM_HOST_DEVICE const_reference | at (size_type idx) const |
| Safe element access with bounds checking (throws on host). | |
| OPM_HOST_DEVICE constexpr iterator | begin () noexcept |
| OPM_HOST_DEVICE constexpr const_iterator | begin () const noexcept |
| OPM_HOST_DEVICE constexpr const_iterator | cbegin () const noexcept |
| OPM_HOST_DEVICE constexpr iterator | end () noexcept |
| OPM_HOST_DEVICE constexpr const_iterator | end () const noexcept |
| OPM_HOST_DEVICE constexpr const_iterator | cend () const noexcept |
| OPM_HOST_DEVICE constexpr void | fill (const value_type &value) |
| Fill every component with the supplied value. | |
| OPM_HOST_DEVICE bool | operator== (const MiniVector &other) const noexcept |
| OPM_HOST_DEVICE bool | operator!= (const MiniVector &other) const noexcept |
| OPM_HOST_DEVICE MiniVector & | operator= (const value_type &value) |
| OPM_HOST_DEVICE MiniVector | operator+ (const value_type &value) const |
| OPM_HOST_DEVICE MiniVector & | operator+= (const MiniVector &other) |
| OPM_HOST_DEVICE MiniVector | operator+ (const MiniVector &other) const |
| OPM_HOST_DEVICE MiniVector | operator- (const MiniVector &other) const |
| OPM_HOST_DEVICE MiniVector & | operator-= (const MiniVector &other) |
| OPM_HOST_DEVICE MiniVector & | operator*= (const value_type &value) |
Static Public Member Functions | |
| static OPM_HOST_DEVICE constexpr size_type | size () noexcept |
| T | Element type (must be trivially copyable for use on the GPU). |
| Dimension | Compile‑time dimension (must be strictly positive). |
|
inlineexplicitconstexpr |
Uniform‑value constructor.
| value | Value used to initialize all components. |
|
inlineexplicit |
Conversion constructor from Dune::FieldVector.
| fv | Source FieldVector (must have dimension Dimension). |
|
inline |
Initializer‑list constructor.
Enables natural brace initialization:
| init | List containing exactly Dimension elements. |
| std::runtime_error | if init.size() != Dimension (host only). |
|
inline |
Safe element access with bounds checking (throws on host).
| std::out_of_range | if idx >= Dimension (host only). |
|
inline |
Safe element access with bounds checking (throws on host).
| std::out_of_range | if idx >= Dimension (host only). |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
Fill every component with the supplied value.
| value | The value to assign to each element. |
|
inlinenoexcept |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinestaticconstexprnoexcept |