Dune Core Modules (unstable)
fvector.hh
Go to the documentation of this file.
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
Macro for wrapping boundary checks.
Interface for a class of dense vectors over a given field.
Definition: densevector.hh:230
Traits::value_type value_type
export the type representing the field
Definition: densevector.hh:251
constexpr derived_type operator-() const
Vector negation.
Definition: densevector.hh:455
Traits::size_type size_type
The type used for the index access and size operation.
Definition: densevector.hh:260
constexpr FieldVector(const FieldVector &)=default
Copy constructor with default behavior.
typename Base::size_type size_type
The type used for the index access and size operation.
Definition: fvector.hh:109
constexpr FieldVector(const std::initializer_list< K > &l)
Construct from a std::initializer_list of values.
Definition: fvector.hh:144
static constexpr size_type size() noexcept
Obtain the number of elements stored in the vector.
Definition: fvector.hh:218
friend constexpr auto operator+(const FieldVector &a, const S &b) noexcept
Binary addition, when using FieldVector<K,1> like K.
Definition: fvector.hh:371
friend constexpr auto operator/(const FieldVector &a, const S &b) noexcept
Vector space division by scalar.
Definition: fvector.hh:352
typename Base::value_type value_type
The type of the elements stored in the vector.
Definition: fvector.hh:112
friend constexpr auto operator*(const FieldVector &a, const S &b) noexcept
Vector space multiplication with scalar.
Definition: fvector.hh:330
static constexpr int dimension
The size of this vector.
Definition: fvector.hh:106
constexpr FieldVector() noexcept(std::is_nothrow_default_constructible_v< K >)
Default constructor, making value-initialized vector with all components set to zero.
Definition: fvector.hh:123
friend constexpr auto operator<=>(const FieldVector &a, const FieldVector< T, SIZE > &b) noexcept
three-way comparison of FieldVectors
Definition: fvector.hh:297
friend constexpr bool operator==(const FieldVector &a, const S &b) noexcept
comparing FieldVectors<1> with scalar for equality
Definition: fvector.hh:280
constexpr FieldVector(const DenseVector< V > &x)
Constructor from another dense vector if the elements are assignable to K.
Definition: fvector.hh:156
constexpr FieldVector & operator=(const DenseVector< V > &x)
Assignment from another dense vector.
Definition: fvector.hh:181
constexpr const K * data() const noexcept
Return pointer to underlying array.
Definition: fvector.hh:253
value_type & reference
The type used for references to the vector entries.
Definition: fvector.hh:115
const value_type & const_reference
The type used for const references to the vector entries.
Definition: fvector.hh:118
constexpr reference operator[](size_type i)
Return a reference to the ith element.
Definition: fvector.hh:230
constexpr K * data() noexcept
Return pointer to underlying array.
Definition: fvector.hh:247
The concept std::three_way_comparable_with specifies that the three way comparison operator <=> on (p...
Definition: compare.hh:98
Implements the dense vector interface, with an exchangeable storage class.
Utility to generate an array with a certain value.
Type traits to determine the type of reals (when working with complex numbers)
std::istream & operator>>(std::istream &stream, std::tuple< Ts... > &t)
Read a std::tuple.
Definition: streamoperators.hh:43
#define DUNE_ASSERT_BOUNDS(cond)
If DUNE_CHECK_BOUNDS is defined: check if condition cond holds; otherwise, do nothing.
Definition: boundschecking.hh:30
Some useful basic math stuff.
bool isNaN(const FieldVector< K, SIZE > &b, PriorityTag< 2 >, ADLTag)
Returns whether any entry is NaN.
Definition: fvector.hh:458
bool isInf(const FieldVector< K, SIZE > &b, PriorityTag< 2 >, ADLTag)
Returns whether any entry is infinite.
Definition: fvector.hh:446
auto isFinite(const FieldVector< K, SIZE > &b, PriorityTag< 2 >, ADLTag)
Returns whether all entries are finite.
Definition: fvector.hh:435
bool isUnordered(const FieldVector< K, 1 > &b, const FieldVector< K, 1 > &c, PriorityTag< 2 >, ADLTag)
Returns true if either b or c is NaN.
Definition: fvector.hh:470
constexpr auto lexicographical_compare_three_way(I1 f1, I1 l1, I2 f2, I2 l2, Cmp comp={}) -> decltype(comp(*f1, *f2))
Lexicographically compares two ranges [first1, last1) and [first2, last2) using three-way comparison ...
Definition: algorithm.hh:37
STL namespace.
Compute type of the result of an arithmetic operation involving two different number types.
TMP to check the size of a DenseVectors statically, if possible.
Definition: fvector.hh:68
static constexpr bool value
True if C is not of type FieldVector or its dimension is not equal SIZE.
Definition: fvector.hh:73
Tag to make sure the functions in this namespace can be found by ADL.
Definition: math.hh:230
Traits for type conversions and type information.
Utilities for type computations, constraining overloads, ...
