libMesh
Public Member Functions | Private Attributes | List of all members
libMesh::TypeTensorColumn< T > Class Template Reference

#include <type_tensor.h>

Public Member Functions

 TypeTensorColumn (TypeTensor< T > &tensor, unsigned int j)
 
T & operator() (const unsigned int i)
 
T & slice (const unsigned int i)
 
TypeTensorColumn< T > & operator= (const TypeVector< T > &rhs)
 Assign values to this column of the tensor. More...
 

Private Attributes

TypeTensor< T > * _tensor
 
const unsigned int _j
 

Detailed Description

template<typename T>
class libMesh::TypeTensorColumn< T >

Definition at line 36 of file type_tensor.h.

Constructor & Destructor Documentation

◆ TypeTensorColumn()

template<typename T>
libMesh::TypeTensorColumn< T >::TypeTensorColumn ( TypeTensor< T > &  tensor,
unsigned int  j 
)

Definition at line 447 of file type_tensor.h.

448  :
449  _tensor(&tensor), _j(j) {}
const unsigned int _j
Definition: type_tensor.h:473
TypeTensor< T > * _tensor
Definition: type_tensor.h:472

Member Function Documentation

◆ operator()()

template<typename T>
T& libMesh::TypeTensorColumn< T >::operator() ( const unsigned int  i)
Returns
A writable reference to the $ i,this $ element of the tensor.

Definition at line 455 of file type_tensor.h.

References libMesh::TypeTensorColumn< T >::_j, and libMesh::TypeTensorColumn< T >::_tensor.

456  { return (*_tensor)(i,_j); }
const unsigned int _j
Definition: type_tensor.h:473
TypeTensor< T > * _tensor
Definition: type_tensor.h:472

◆ operator=()

template<typename T>
TypeTensorColumn<T>& libMesh::TypeTensorColumn< T >::operator= ( const TypeVector< T > &  rhs)

Assign values to this column of the tensor.

Definition at line 464 of file type_tensor.h.

465  {
466  for (unsigned int i=0; i != LIBMESH_DIM; ++i)
467  (*this)(i) = rhs(i);
468  return *this;
469  }

◆ slice()

template<typename T>
T& libMesh::TypeTensorColumn< T >::slice ( const unsigned int  i)

Definition at line 458 of file type_tensor.h.

References libMesh::TypeTensorColumn< T >::_j, and libMesh::TypeTensorColumn< T >::_tensor.

459  { return (*_tensor)(i,_j); }
const unsigned int _j
Definition: type_tensor.h:473
TypeTensor< T > * _tensor
Definition: type_tensor.h:472

Member Data Documentation

◆ _j

template<typename T>
const unsigned int libMesh::TypeTensorColumn< T >::_j
private

◆ _tensor

template<typename T>
TypeTensor<T>* libMesh::TypeTensorColumn< T >::_tensor
private

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