18 #ifndef VECTOR_SEQ_DOUBLE_HH_ 19 #define VECTOR_SEQ_DOUBLE_HH_ 45 typedef typename std::shared_ptr< std::vector<double> >
VectorSeq;
50 data_ptr_ = std::make_shared< std::vector<double> >(size);
70 template <
int spacedim,
class Value>
71 std::shared_ptr<FieldElementwise<spacedim, Value> >
create_field(
unsigned int n_comp)
73 std::shared_ptr<FieldElementwise<spacedim, Value> > field_ptr(
122 data_ptr_ = std::make_shared< std::vector<double> >(local_size);
161 template <int spacedim, class Value>
162 std::shared_ptr<FieldElementwise<spacedim, Value> > create_field(unsigned int n_comp)
164 std::shared_ptr<FieldElementwise<spacedim, Value> > field_ptr(
165 new FieldElementwise<spacedim, Value>( data_ptr_, n_comp ));
Vec data_petsc_
stored vector of data in PETSC format
void copy(VectorMPI &other)
~VectorSeqDouble()
Destructor.
std::shared_ptr< std::vector< double > > VectorSeq
void duplicate(VectorMPI other)
Return new vector with same parallel structure.
std::vector< double > VectorData
void chkerr(unsigned int ierr)
Replacement of new/delete operator in the spirit of xmalloc.
VectorDataPtr data_ptr()
Getter for shared pointer of output data.
double & operator[](unsigned int idx)
double & operator[](unsigned int idx)
VectorSeq data_ptr_
shared pointer to vector of data
Global macros to enhance readability and debugging, general constants.
VectorDataPtr data_ptr_
shared pointer to vector of data
Vec data_petsc_
stored vector of data in PETSC format
void resize(unsigned int local_size)
void resize(unsigned int size)
Create shared pointer and PETSC vector with given size.
Vec & petsc_vec()
Getter for PETSC vector of output data (e.g. can be used by scatters).
void swap(VectorMPI &other)
std::shared_ptr< FieldElementwise< spacedim, Value > > create_field(unsigned int n_comp)
Create and return shared pointer to FieldElementwise object.
VectorMPI(unsigned int local_size)
Create shared pointer and PETSC vector with given size. COLLECTIVE.
#define OLD_ASSERT_EQUAL(a, b)
VectorSeq get_data_ptr()
Getter for shared pointer of output data.
std::shared_ptr< VectorData > VectorDataPtr
Vec & get_data_petsc()
Getter for PETSC vector of output data (e.g. can be used by scatters).