Flow123d  DF_patch_fe_mechanics-b866f5c
Public Member Functions | List of all members
ArenaOVec< T > Class Template Reference

#include <arena_vec.hh>

Inheritance diagram for ArenaOVec< T >:
Inheritance graph
[legend]
Collaboration diagram for ArenaOVec< T >:
Collaboration graph
[legend]

Public Member Functions

 ArenaOVec ()
 Default constructor. More...
 
 ArenaOVec (const ArenaOVec< T > &other)
 Copy constructor. More...
 
 ArenaOVec (T scalar_val)
 Constructor. Set scalar_val. More...
 
 ArenaOVec (const ArenaVec< T > &vec)
 
ArenaVec< T > get_vec () const
 Convert ArenaOVec to ArenaVec and its. More...
 
ArenaOVec< T > & operator= (const ArenaOVec< T > &other)
 Assignment operator. More...
 
ArenaOVec< T > operator+ (const ArenaOVec< T > &other) const
 Addition operator. More...
 
ArenaOVec< T > operator* (const ArenaOVec< T > &other) const
 Multiplication operator. More...
 
- Public Member Functions inherited from ArenaVec< T >
 ArenaVec ()
 Default constructor, set invalid data pointer. More...
 
 ArenaVec (T scalar_val)
 
 ArenaVec (size_t data_size, PatchArena &arena)
 
 ArenaVec (const ArenaVec< T > &other)
 Copy constructor. More...
 
Eigen::Map< VecDataeigen_map ()
 
const Eigen::Map< VecDataeigen_map () const
 Smae as previous but with const modifier. More...
 
Eigen::Map< ArrayDataarray_map ()
 
const Eigen::Map< ArrayDataarray_map () const
 Smae as previous but with const modifier. More...
 
T * data_ptr ()
 Return data pointer (development method) More...
 
const T * data_ptr () const
 Smae as previous but return const pointer. More...
 
size_t data_size () const
 Getter for data_size_. More...
 
PatchArenaarena ()
 Getter for arena_. More...
 
scalar_val () const
 Getter for scalar_val_. More...
 
void set_patch_arena (PatchArena &arena)
 Set pointer to PatchArena. More...
 
ArenaVec< T > sqrt () const
 Returns copied vector of square root values. More...
 
ArenaVec< T > inverse () const
 Returns copied vector of inverse values. More...
 
ArenaVec< T > abs () const
 Returns copied vector of absolute values. More...
 
T & operator() (std::size_t item)
 For development only. TODO remove. More...
 
const T & operator() (std::size_t item) const
 For development only. TODO remove. More...
 
ArenaVec< T > & operator= (const ArenaVec< T > &other)
 Assignment operator. More...
 
ArenaVec< T > operator+ (const ArenaVec< T > &other) const
 
ArenaVec< T > operator- (const ArenaVec< T > &other) const
 
ArenaVec< T > operator* (T multi) const
 
ArenaVec< T > operator* (const ArenaVec< T > &other) const
 
ArenaVec< T > operator/ (T div_by) const
 
ArenaVec< T > operator/ (const ArenaVec< T > &other) const
 

Additional Inherited Members

- Public Types inherited from ArenaVec< T >
typedef Eigen::Matrix< T, Eigen::Dynamic, 1 > VecData
 Type definition. More...
 
typedef Eigen::Array< T, Eigen::Dynamic, 1 > ArrayData
 
- Protected Member Functions inherited from ArenaVec< T >
 ArenaVec (T *data_ptr, size_t data_size, PatchArena &arena)
 Constructor. Allows create ArenaVec from ArenaOVec. More...
 
- Protected Attributes inherited from ArenaVec< T >
T * data_ptr_
 Pointer to data array. More...
 
size_t data_size_
 Length of data array. More...
 
PatchArenaarena_
 Pointer to Arena where intermediate calculations and results are stored, should be changed by set_patch_arena. More...
 
scalar_val_
 Scalar value of T type. More...
 

Detailed Description

template<class T>
class ArenaOVec< T >

Define vector allocated in ArenaResource based on ArenaVec with overwrite multiplication operator that executes outer product.

Example of usage with conversions between ArenaVec and ArenaOVec:

// Convert ArenaVec inputs to ArenaOVec variables
ArenaOVec<double> a_ovec(a);
ArenaOVec<double> b_ovec(b);
// performs outer product
ArenaOVec<double> result_ovec = a * b;
// reverse conversion to ArenaVec
return result_ovec.get_vec();
}
ArenaVec< T > get_vec() const
Convert ArenaOVec to ArenaVec and its.
Definition: arena_vec.hh:328

If we consider that size of input vector 'a' is 'M' and size of input vector 'b' is 'N' then size of returned vector is 'M*N'.

Definition at line 302 of file arena_vec.hh.

Constructor & Destructor Documentation

◆ ArenaOVec() [1/4]

template<class T >
ArenaOVec< T >::ArenaOVec ( )
inline

Default constructor.

Definition at line 305 of file arena_vec.hh.

◆ ArenaOVec() [2/4]

template<class T >
ArenaOVec< T >::ArenaOVec ( const ArenaOVec< T > &  other)
inline

Copy constructor.

Definition at line 309 of file arena_vec.hh.

◆ ArenaOVec() [3/4]

template<class T >
ArenaOVec< T >::ArenaOVec ( scalar_val)
inline

Constructor. Set scalar_val.

Definition at line 313 of file arena_vec.hh.

◆ ArenaOVec() [4/4]

template<class T >
ArenaOVec< T >::ArenaOVec ( const ArenaVec< T > &  vec)
inline

Constructor creates ArenaOVec on data of ArenaVec

Definition at line 319 of file arena_vec.hh.

Member Function Documentation

◆ get_vec()

template<class T >
ArenaVec<T> ArenaOVec< T >::get_vec ( ) const
inline

Convert ArenaOVec to ArenaVec and its.

Definition at line 328 of file arena_vec.hh.

Here is the caller graph for this function:

◆ operator*()

template<class T >
ArenaOVec<T> ArenaOVec< T >::operator* ( const ArenaOVec< T > &  other) const
inline

Multiplication operator.

Definition at line 350 of file arena_vec.hh.

◆ operator+()

template<class T >
ArenaOVec<T> ArenaOVec< T >::operator+ ( const ArenaOVec< T > &  other) const
inline

Addition operator.

Definition at line 339 of file arena_vec.hh.

◆ operator=()

template<class T >
ArenaOVec<T>& ArenaOVec< T >::operator= ( const ArenaOVec< T > &  other)
inline

Assignment operator.

Definition at line 333 of file arena_vec.hh.


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