18 #ifndef VECTOR_SEQ_DOUBLE_HH_ 19 #define VECTOR_SEQ_DOUBLE_HH_ 30 template <
int spacedim,
class Value>
class FieldFE;
48 typedef typename std::shared_ptr< std::vector<double> >
VectorSeq;
93 template <
int spacedim,
class Value>
94 std::shared_ptr<FieldFE<spacedim, Value> >
create_field(
Mesh & mesh,
unsigned int n_comp);
101 template <
int spacedim,
class Value>
130 std::shared_ptr<DOFHandlerMultiDim>
dh_;
155 data_ptr_ = std::make_shared< std::vector<double> >(local_size);
194 template <int spacedim, class Value>
195 std::shared_ptr<FieldElementwise<spacedim, Value> > create_field(unsigned int n_comp)
197 std::shared_ptr<FieldElementwise<spacedim, Value> > field_ptr(
198 new FieldElementwise<spacedim, Value>( data_ptr_, n_comp ));
Declaration of class which handles the ordering of degrees of freedom (dof) and mappings between loca...
FiniteElement< 1 > * fe1_
Vec data_petsc_
stored vector of data in PETSC format
void copy(VectorMPI &other)
void fill(double value)
Fill all values of data vector with given value.
~VectorSeqDouble()
Destructor.
std::shared_ptr< std::vector< double > > VectorSeq
void duplicate(VectorMPI other)
Return new vector with same parallel structure.
FiniteElement< 0 > * fe0_
Finite element objects (allow to create DOF handler)
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.
VectorSeqDouble()
Constructor.
std::shared_ptr< FieldFE< spacedim, Value > > create_field(Mesh &mesh, unsigned int n_comp)
Create and return shared pointer to FieldFE object.
void fill_output_data(std::shared_ptr< FieldFE< spacedim, Value > > field_ptr)
double & operator[](unsigned int idx)
double & operator[](unsigned int idx)
unsigned int size()
Getter for shared pointer of output data.
static constexpr bool value
VectorSeq data_ptr_
shared pointer to vector of data
Global macros to enhance readability and debugging, general constants.
FiniteElement< 3 > * fe3_
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(nlohmann::json &j1, nlohmann::json &j2) noexcept(is_nothrow_move_constructible< nlohmann::json >::value andis_nothrow_move_assignable< nlohmann::json >::value)
exchanges the values of two JSON objects
#define ASSERT_PTR(ptr)
Definition of assert macro checking non-null pointer (PTR)
void swap(VectorMPI &other)
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.
Abstract class for description of finite elements.
FiniteElement< 2 > * fe2_
std::shared_ptr< VectorData > VectorDataPtr
std::shared_ptr< DOFHandlerMultiDim > dh_
Vec & get_data_petsc()
Getter for PETSC vector of output data (e.g. can be used by scatters).