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
130 template<
typename Number>
145 VectorView(
const size_type new_size, Number *ptr);
157 VectorView(
const size_type new_size,
const Number *ptr);
205 virtual void reinit (
const size_type N,
206 const bool omit_zeroing_entries=
false);
212 void reinit(
const size_type N, Number *ptr);
219 void reinit(
const size_type N,
const Number *ptr);
235 template<
typename Number>
239 this->vec_size = new_size;
240 this->max_vec_size = new_size;
246 template<
typename Number>
250 this->vec_size = new_size;
251 this->max_vec_size = new_size;
252 this->val =
const_cast<Number *
>(ptr);
257 template<
typename Number>
264 this->max_vec_size = 0;
269 template<
typename Number>
272 const bool omit_zeroing_entries)
275 this->max_vec_size = N;
276 if (omit_zeroing_entries ==
false)
281 template<
typename Number>
285 this->vec_size = new_size;
286 this->max_vec_size = new_size;
291 template<
typename Number>
295 this->vec_size = new_size;
296 this->max_vec_size = new_size;
297 this->val =
const_cast<Number *
>(ptr);
301 template<
typename Number>
310 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)
types::global_dof_index size_type
VectorView(const size_type new_size, Number *ptr)
virtual void swap(Vector< Number > &v)