9 #ifndef VECTOR_SEQ_DOUBLE_HH_
10 #define VECTOR_SEQ_DOUBLE_HH_
35 typedef typename std::shared_ptr< std::vector<double> >
VectorSeq;
40 data_ptr_ = std::make_shared< std::vector<double> >(size);
58 template <
int spacedim,
class Value>
59 std::shared_ptr<FieldElementwise<spacedim, Value> >
create_field(
unsigned int n_comp)
61 std::shared_ptr<FieldElementwise<spacedim, Value> > field_ptr(
77 ASSERT(idx < data_ptr_->size(),
"Index is out of range.\n");
Vec data_petsc_
stored vector of data in PETSC format
~VectorSeqDouble()
Destructor.
std::shared_ptr< std::vector< double > > VectorSeq
double & operator[](unsigned int idx)
VectorSeq data_ptr_
shared pointer to vector of data
void resize(unsigned int size)
Create shared pointer and PETSC vector with given size.
std::shared_ptr< FieldElementwise< spacedim, Value > > create_field(unsigned int n_comp)
Create and return shared pointer to FieldElementwise object.
VectorSeq get_data_ptr()
Getter for shared pointer of output data.
Vec & get_data_petsc()
Getter for PETSC vector of output data (e.g. can be used by scatters).