DOLFINx 0.9.0
DOLFINx C++ interface
|
Constant value which can be attached to a Form. More...
#include <Constant.h>
Public Types | |
using | value_type = T |
Field type. | |
Public Member Functions | |
Constant (value_type c) | |
Create a rank-0 (scalar-valued) constant. | |
Constant (std::span< const value_type > c) | |
Create a rank-1 (vector-valued) constant. | |
Constant (std::span< const value_type > c, std::span< const std::size_t > shape) | |
Create a rank-d constant. | |
Public Attributes | |
std::vector< value_type > | value |
Values, stored as a row-major flattened array. | |
std::vector< std::size_t > | shape |
Shape. | |
Constant value which can be attached to a Form.
Constants may be scalar (rank 0), vector (rank 1), or tensor-valued.
T | Scalar type of the Constant. |
|
inlineexplicit |
Create a rank-0 (scalar-valued) constant.
[in] | c | Value of the constant |
|
inlineexplicit |
Create a rank-1 (vector-valued) constant.
[in] | c | Value of the constant |
|
inline |