Loading...
Searching...
No Matches
Opm::SharedData< T > Class Template Reference

FullMatrix StoragePolicy which provides object sharing semantics. More...

`#include <Matrix.hpp>`

## Public Member Functions

T & | operator[] (int i)
| Storage element access.
const T & | operator[] (int i) const
int | size () const
| Data size query.
T * | data ()
| Direct access to all data.
const T * | data () const

## Protected Member Functions

| SharedData (int sz, T *data)
| Constructor.

## Detailed Description

template<typename T>
class Opm::SharedData< T >

FullMatrix StoragePolicy which provides object sharing semantics.

Template Parameters

  T | Element type of the FullMatrix. Often T is an alias for double .

## Constructor & Destructor Documentation

## SharedData()

template<typename T>

Opm::SharedData< T >::SharedData | ( | int | sz,
|  | T * | data )

inline protected

Constructor.

Parameters

  [in] | sz | Number of elements in FullMatrix storage std::array.
  [in] | data | Initial data vector. If non-NULL, must point to a sz -element data vector. If NULL, sz must be zero as well.

## Member Function Documentation

## data()

template<typename T>

T * Opm::SharedData< T >::data | ( |  | ) |

inline

Direct access to all data.

Returns
  Pointer to first element of storage std::array.

## operator[]()

template<typename T>

T & Opm::SharedData< T >::operator[] | ( | int | i | ) |

inline

Storage element access.

Parameters

  [in] | i | Linear element index.

Returns
  Storage element at index
  i
  .

## size()

template<typename T>

int Opm::SharedData< T >::size | ( |  | ) | const

inline

Data size query.

Returns
  Number of elements in storage std::array.

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

- opm/porsol/common/Matrix.hpp