20 #ifndef LIBMESH_DENSE_SUBVECTOR_H 21 #define LIBMESH_DENSE_SUBVECTOR_H 52 const unsigned int ioff=0,
53 const unsigned int n=0);
70 virtual void zero()
override;
76 const T &
operator() (
const unsigned int i)
const;
83 virtual T
el(
const unsigned int i)
const override 84 {
return (*
this)(i); }
86 virtual T &
el(
const unsigned int i)
override 87 {
return (*
this)(i); }
89 virtual unsigned int size()
const override 92 virtual bool empty()
const override 104 const unsigned int n);
162 const unsigned int ioff,
163 const unsigned int n) :
164 _parent_vector(new_parent)
174 const unsigned int n)
180 libmesh_assert_less_equal ((this->i_off() + this->size()), _parent_vector.size());
189 for (
unsigned int i=0; i<this->size(); i++)
190 _parent_vector (i + this->i_off()) = 0.;
199 libmesh_assert_less (i, this->size());
200 libmesh_assert_less (i + this->i_off(), _parent_vector.size());
202 return _parent_vector (i + this->i_off());
210 libmesh_assert_less (i, this->size());
211 libmesh_assert_less (i + this->i_off(), _parent_vector.size());
213 return _parent_vector (i + this->i_off());
220 libmesh_assert (this->size());
223 for (
unsigned int i=1; i!=this->size(); i++)
226 my_min = (my_min < current? my_min : current);
237 libmesh_assert (this->size());
240 for (
unsigned int i=1; i!=this->size(); i++)
243 my_max = (my_max > current? my_max : current);
255 for (
unsigned int i=0; i!=this->size(); i++)
257 my_norm +=
std::abs(_parent_vector (i + this->i_off()));
269 for (
unsigned int i=0; i!=this->size(); i++)
273 return sqrt(my_norm);
286 for (
unsigned int i=1; i!=this->size(); i++)
289 my_norm = (my_norm > current? my_norm : current);
291 return sqrt(my_norm);
297 #endif // LIBMESH_DENSE_SUBVECTOR_H
DenseSubVector(DenseVector< T > &new_parent, const unsigned int ioff=0, const unsigned int n=0)
unsigned int i_off() const
virtual void zero() override
virtual T el(const unsigned int i) const override
DenseVector< T > & parent()
void reposition(const unsigned int ioff, const unsigned int n)
const T & operator()(const unsigned int i) const
virtual T & el(const unsigned int i) override
virtual unsigned int size() const override
virtual ~DenseSubVector()=default
DenseVector< T > & _parent_vector
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool empty() const override
DenseSubVector & operator=(const DenseSubVector &)=default