Stokhos Development
Loading...
Searching...
No Matches
Stokhos::Dense3Tensor< ordinal_type, value_type > Class Template Reference

Data structure storing a dense 3-tensor C(i,j,k). More...

#include <Stokhos_Dense3Tensor.hpp>

Collaboration diagram for Stokhos::Dense3Tensor< ordinal_type, value_type >:

Public Member Functions

 Dense3Tensor (ordinal_type sz)
 Constructor.
 ~Dense3Tensor ()
 Destructor.
ordinal_type size () const
 Return size.
const value_typeoperator() (ordinal_type i, ordinal_type j, ordinal_type k) const
 Get value (i,j,k).
value_typeoperator() (ordinal_type i, ordinal_type j, ordinal_type k)
 Get value (i,j,k).
ordinal_type num_values (ordinal_type k) const
 Return number of non-zero's in Cijk for a given k.
void value (ordinal_type k, ordinal_type l, ordinal_type &i, ordinal_type &j, value_type &c) const
 Get value (i,j,k) using sparse access.
void print (std::ostream &os) const
 Print tensor.

Protected Attributes

ordinal_type l
 Size of each dimension.
Teuchos::Array< value_typeCijk_values
 Dense tensor array.

Detailed Description

template<typename ordinal_type, typename value_type>
class Stokhos::Dense3Tensor< ordinal_type, value_type >

Data structure storing a dense 3-tensor C(i,j,k).

Constructor & Destructor Documentation

◆ Dense3Tensor()

template<typename ordinal_type, typename value_type>
Stokhos::Dense3Tensor< ordinal_type, value_type >::Dense3Tensor ( ordinal_type sz)

Constructor.

References Cijk_values, and l.

Member Function Documentation

◆ num_values()

template<typename ordinal_type, typename value_type>
ordinal_type Stokhos::Dense3Tensor< ordinal_type, value_type >::num_values ( ordinal_type k) const

Return number of non-zero's in Cijk for a given k.

References l.

◆ operator()() [1/2]

Get value (i,j,k).

References Cijk_values, and l.

◆ operator()() [2/2]

template<typename ordinal_type, typename value_type>
const value_type & Stokhos::Dense3Tensor< ordinal_type, value_type >::operator() ( ordinal_type i,
ordinal_type j,
ordinal_type k ) const

Get value (i,j,k).

References Cijk_values, and l.

◆ print()

template<typename ordinal_type, typename value_type>
void Stokhos::Dense3Tensor< ordinal_type, value_type >::print ( std::ostream & os) const

Print tensor.

References l.

◆ size()

template<typename ordinal_type, typename value_type>
ordinal_type Stokhos::Dense3Tensor< ordinal_type, value_type >::size ( ) const

Return size.

References l.

◆ value()

template<typename ordinal_type, typename value_type>
void Stokhos::Dense3Tensor< ordinal_type, value_type >::value ( ordinal_type k,
ordinal_type l,
ordinal_type & i,
ordinal_type & j,
value_type & c ) const

Get value (i,j,k) using sparse access.

References l.

Member Data Documentation

◆ Cijk_values

template<typename ordinal_type, typename value_type>
Teuchos::Array<value_type> Stokhos::Dense3Tensor< ordinal_type, value_type >::Cijk_values
protected

Dense tensor array.

Referenced by Dense3Tensor(), operator()(), and operator()().

◆ l

template<typename ordinal_type, typename value_type>
ordinal_type Stokhos::Dense3Tensor< ordinal_type, value_type >::l
protected

Size of each dimension.

Referenced by Dense3Tensor(), num_values(), operator()(), operator()(), print(), size(), and value().


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