DUNE PDELab (git)

Dune::Concept::Number Concept Reference

The Number concept is satisfied if the type N can act as a scalar in the context of (hierarchically blocked) containers. More...

#include <dune/common/concepts/number.hh>

Concept definition

template<class N>
The Number concept is satisfied if the type N can act as a scalar in the context of (hierarchically b...
Definition: number.hh:34
Whether this type acts as a scalar in the context of (hierarchically blocked) containers.
Definition: typetraits.hh:194

Detailed Description

The Number concept is satisfied if the type N can act as a scalar in the context of (hierarchically blocked) containers.

Number types are possible element types of (hierarchically blocked) matrices and vectors, such as FieldMatrix, FieldVector, BCRSMatrix, BlockVector, MultiTypeBlockVector, etc. It allows, for example, to define break conditions in recursive algorithms and are used as value initializers and scalar factors in scaling operations.

Types that can act as number types include the arithmetic types like double, int, or float, and the std::complex<U> types if U itself is a scalar type. It is possible to register used-defined types, e.g., extended precision types or automatic differentiation types, or anything else that might sensibly be an element of a matrix or vector. Therefore, the traits class Dune::IsNumber can be specialized.

Note
The precise semantics of number types are only vaguely specified. It should behave similar to arithmetic types, e.g., provide arithmetic operations, and should be considered a field type in the mathematical sense.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jan 7, 23:29, 2025)