16 #ifndef dealii_vector_view_h 17 #define dealii_vector_view_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 22 #include <deal.II/base/subscriptor.h> 23 #include <deal.II/lac/vector.h> 27 DEAL_II_NAMESPACE_OPEN
132 template <
typename Number>
147 VectorView(
const size_type new_size, Number *ptr);
159 VectorView(
const size_type new_size,
const Number *ptr);
207 virtual void reinit (
const size_type N,
208 const bool omit_zeroing_entries=
false);
214 void reinit(
const size_type N, Number *ptr);
221 void reinit(
const size_type N,
const Number *ptr);
237 template <
typename Number>
241 this->vec_size = new_size;
242 this->max_vec_size = new_size;
244 this->values.release();
245 this->values.reset (ptr);
250 template <
typename Number>
254 this->vec_size = new_size;
255 this->max_vec_size = new_size;
256 this->values.reset (const_cast<Number *>(ptr));
261 template <
typename Number>
268 this->max_vec_size = 0;
271 this->values.release();
275 template <
typename Number>
278 const bool omit_zeroing_entries)
281 this->max_vec_size = N;
282 if (omit_zeroing_entries ==
false)
287 template <
typename Number>
291 this->vec_size = new_size;
292 this->max_vec_size = new_size;
294 this->values.release();
295 this->values.reset (ptr);
299 template <
typename Number>
303 this->vec_size = new_size;
304 this->max_vec_size = new_size;
306 this->values.release();
307 this->values.reset (const_cast<Number *>(ptr));
311 template <
typename Number>
320 DEAL_II_NAMESPACE_CLOSE
#define AssertThrow(cond, exc)
Vector< Number > & operator=(const Number s)
static ::ExceptionBase & ExcMessage(std::string arg1)
unsigned int global_dof_index
virtual void reinit(const size_type N, const bool omit_zeroing_entries=false)
void swap(Vector< Number > &u, Vector< Number > &v)
types::global_dof_index size_type
VectorView(const size_type new_size, Number *ptr)
virtual void swap(Vector< Number > &v)