Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/v0.1.0/v0.9.0/cpp
DOLFINx  0.1.0
DOLFINx C++ interface
Public Member Functions | Public Attributes | List of all members
dolfinx::fem::Constant< T > Class Template Reference

A constant value which can be attached to a Form. Constants may be scalar (rank 0), vector (rank 1), or tensor valued. More...

#include <Constant.h>

Public Member Functions

 Constant (T c)
 Create a rank-0 (scalar-valued) constant.
 
 Constant (const std::vector< T > &c)
 Create a rank-1 (vector-valued) constant.
 
 Constant (const array2d< T > &c)
 Create a rank-2 constant.
 
 Constant (std::vector< int > shape, std::vector< T > value)
 Create an arbitrary rank constant. Data layout is row-major (C style).
 

Public Attributes

std::vector< int > shape
 Shape.
 
std::vector< T > value
 Values, stored as a flattened array.
 

Detailed Description

template<typename T>
class dolfinx::fem::Constant< T >

A constant value which can be attached to a Form. Constants may be scalar (rank 0), vector (rank 1), or tensor valued.


The documentation for this class was generated from the following file: