Flow123d  release_2.2.0-914-gf1a3a4f
Public Types | Public Member Functions | Private Attributes | List of all members
VectorMPI Class Reference

#include <vec_seq_double.hh>

Public Types

typedef std::vector< double > VectorData
 
typedef std::shared_ptr< VectorDataVectorDataPtr
 

Public Member Functions

 VectorMPI ()
 
 VectorMPI (unsigned int local_size)
 Create shared pointer and PETSC vector with given size. COLLECTIVE. More...
 
void resize (unsigned int local_size)
 
void duplicate (VectorMPI other)
 Return new vector with same parallel structure. More...
 
VectorDataPtr data_ptr ()
 Getter for shared pointer of output data. More...
 
Vec & petsc_vec ()
 Getter for PETSC vector of output data (e.g. can be used by scatters). More...
 
void zero_entries ()
 
VectorDatadata ()
 
void swap (VectorMPI &other)
 
void copy (VectorMPI &other)
 
 ~VectorMPI ()
 Destructor. More...
 
double & operator[] (unsigned int idx)
 

Private Attributes

VectorDataPtr data_ptr_
 shared pointer to vector of data More...
 
Vec data_petsc_
 stored vector of data in PETSC format More...
 

Detailed Description

Like VectorSeqDouble but for MPI PETSC vectors. Have acces to local part.

Definition at line 119 of file vec_seq_double.hh.

Member Typedef Documentation

Definition at line 121 of file vec_seq_double.hh.

typedef std::shared_ptr< VectorData > VectorMPI::VectorDataPtr

Definition at line 122 of file vec_seq_double.hh.

Constructor & Destructor Documentation

VectorMPI::VectorMPI ( )
inline

Definition at line 124 of file vec_seq_double.hh.

VectorMPI::VectorMPI ( unsigned int  local_size)
inline

Create shared pointer and PETSC vector with given size. COLLECTIVE.

Definition at line 128 of file vec_seq_double.hh.

VectorMPI::~VectorMPI ( )
inline

Destructor.

Definition at line 202 of file vec_seq_double.hh.

Member Function Documentation

void VectorMPI::copy ( VectorMPI other)
inline

Definition at line 196 of file vec_seq_double.hh.

VectorData& VectorMPI::data ( )
inline

Definition at line 169 of file vec_seq_double.hh.

Here is the caller graph for this function:

VectorDataPtr VectorMPI::data_ptr ( )
inline

Getter for shared pointer of output data.

Definition at line 154 of file vec_seq_double.hh.

void VectorMPI::duplicate ( VectorMPI  other)
inline

Return new vector with same parallel structure.

Definition at line 149 of file vec_seq_double.hh.

double& VectorMPI::operator[] ( unsigned int  idx)
inline

Access to the vector element on index idx.

Definition at line 210 of file vec_seq_double.hh.

Vec& VectorMPI::petsc_vec ( )
inline

Getter for PETSC vector of output data (e.g. can be used by scatters).

Definition at line 160 of file vec_seq_double.hh.

void VectorMPI::resize ( unsigned int  local_size)
inline

Resize the vector to given local size. Operation is allowed only if this object is a unique vector object pointing to the actual data.

Definition at line 136 of file vec_seq_double.hh.

void VectorMPI::swap ( VectorMPI other)
inline

Definition at line 185 of file vec_seq_double.hh.

void VectorMPI::zero_entries ( )
inline

Definition at line 165 of file vec_seq_double.hh.

Member Data Documentation

Vec VectorMPI::data_petsc_
private

stored vector of data in PETSC format

Definition at line 222 of file vec_seq_double.hh.

VectorDataPtr VectorMPI::data_ptr_
private

shared pointer to vector of data

Definition at line 220 of file vec_seq_double.hh.


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