|
dune-common 2.12-git
|
Loading...
Searching...
No Matches
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.
Type traits to determine the type of reals (when working with complex numbers)
This file provides some concepts introduced in the C++20 standard library <compare> and <concepts> no...
Implements the dense vector interface, with an exchangeable storage class.
Utilities for type computations, constraining overloads, ...
Compute type of the result of an arithmetic operation involving two different number types.
Traits for type conversions and type information.
Some useful basic math stuff.
Utility to generate an array with a certain value.
constexpr std::array< T, n > filledArray(const T &t)
Return an array filled with the provided value.
Definition filledarray.hh:33
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
STL namespace.
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
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
Binary subtraction, when using FieldVector<K,1> like K.
Definition fvector.hh:389
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
Interface for a class of dense vectors over a given field.
Definition densevector.hh:244
Traits::value_type value_type
export the type representing the field
Definition densevector.hh:265
Traits::size_type size_type
The type used for the index access and size operation.
Definition densevector.hh:274
Definition ftraits.hh:26
T field_type
export the type representing the field
Definition ftraits.hh:28
T real_type
export the type representing the real type of the field
Definition ftraits.hh:30
std::array< K, SIZE > container_type
Definition fvector.hh:46
container_type::size_type size_type
Definition fvector.hh:48
FieldVector< K, SIZE > derived_type
Definition fvector.hh:45
FieldTraits< K >::real_type real_type
Definition fvector.hh:55
FieldTraits< K >::field_type field_type
Definition fvector.hh:54
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:212
Definition matvectraits.hh:31
decltype(std::declval< T1 >()+std::declval< T2 >()) PromotedType
Definition promotiontraits.hh:28
The concept std::three_way_comparable_with specifies that the three way comparison operator <=> on (p...
Definition compare.hh:100
T data(T... args)
T fill(T... args)
T size(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8