libMesh
|
Defines a dense subvector for use in finite element computations. More...
#include <dense_subvector.h>
Public Member Functions | |
DenseSubVector (DenseVector< T > &new_parent, const unsigned int ioff=0, const unsigned int n=0) | |
Constructor. More... | |
DenseSubVector (DenseSubVector &&)=default | |
The 5 special functions can be defaulted for this class, as it does not manage any memory itself. More... | |
DenseSubVector (const DenseSubVector &)=default | |
DenseSubVector & | operator= (const DenseSubVector &)=default |
DenseSubVector & | operator= (DenseSubVector &&)=default |
virtual | ~DenseSubVector ()=default |
DenseVector< T > & | parent () |
virtual void | zero () override final |
Set every element in the vector to 0. More... | |
const T & | operator() (const unsigned int i) const |
T & | operator() (const unsigned int i) |
virtual T | el (const unsigned int i) const override final |
virtual T & | el (const unsigned int i) override final |
virtual unsigned int | size () const override final |
virtual bool | empty () const override final |
unsigned int | i_off () const |
void | reposition (const unsigned int ioff, const unsigned int n) |
Changes the location of the subvector in the parent vector. More... | |
Real | min () const |
Real | max () const |
Real | l1_norm () const |
Real | l2_norm () const |
Real | linfty_norm () const |
void | print (std::ostream &os) const |
Pretty-print the vector to stdout . More... | |
void | print_scientific (std::ostream &os, unsigned precision=8) const |
Prints the entries of the vector with additional decimal places in scientific notation. More... | |
Private Attributes | |
DenseVector< T > & | _parent_vector |
The parent vector that contains this subvector. More... | |
unsigned int | _n |
The length of this subvector. More... | |
unsigned int | _i_off |
The offset into the parent vector. More... | |
Defines a dense subvector for use in finite element computations.
Useful for storing element load vectors before summation into a global vector, particularly when you have systems of equations. All overridden virtual functions are documented in dense_vector_base.h.
Definition at line 43 of file dense_subvector.h.
|
inline |
Constructor.
Creates a dense subvector of the vector parent
. The subvector has dimensions \((m \times n)\), and the \((0,0)\) entry of the subvector is located at the \((ioff,joff)\) location in the parent vector.
Definition at line 162 of file dense_subvector.h.
References libMesh::DenseSubVector< T >::reposition().
|
default |
The 5 special functions can be defaulted for this class, as it does not manage any memory itself.
|
default |
|
virtualdefault |
|
inlinefinaloverridevirtual |
(i) element of the vector. Implements libMesh::DenseVectorBase< T >.
Definition at line 84 of file dense_subvector.h.
|
inlinefinaloverridevirtual |
(i) element of the vector as a writable reference. Implements libMesh::DenseVectorBase< T >.
Definition at line 87 of file dense_subvector.h.
|
inlinefinaloverridevirtual |
true
iff size() is 0. Reimplemented from libMesh::DenseVectorBase< T >.
Definition at line 93 of file dense_subvector.h.
References libMesh::DenseSubVector< T >::_n.
Referenced by libMesh::NumericVector< Number >::insert().
|
inline |
Definition at line 99 of file dense_subvector.h.
References libMesh::DenseSubVector< T >::_i_off.
|
inline |
Definition at line 253 of file dense_subvector.h.
References std::abs(), libMesh::index_range(), and libMesh::Real.
|
inline |
Definition at line 267 of file dense_subvector.h.
References libMesh::index_range(), libMesh::TensorTools::norm_sq(), libMesh::Real, and std::sqrt().
|
inline |
Definition at line 281 of file dense_subvector.h.
References libMesh::make_range(), libMesh::TensorTools::norm_sq(), libMesh::Real, and std::sqrt().
|
inline |
Definition at line 236 of file dense_subvector.h.
References libMesh::libmesh_assert(), libMesh::libmesh_real(), libMesh::make_range(), and libMesh::Real.
|
inline |
Definition at line 219 of file dense_subvector.h.
References libMesh::libmesh_assert(), libMesh::libmesh_real(), libMesh::make_range(), and libMesh::Real.
|
inline |
(i,j) element of the subvector as a const reference. Definition at line 198 of file dense_subvector.h.
|
inline |
(i,j) element of the subvector as a writable reference. Definition at line 209 of file dense_subvector.h.
|
default |
|
default |
|
inline |
Definition at line 69 of file dense_subvector.h.
References libMesh::DenseSubVector< T >::_parent_vector.
Referenced by libMesh::DenseSubMatrix< T >::condense().
|
inherited |
Pretty-print the vector to stdout
.
Definition at line 51 of file dense_vector_base.C.
References libMesh::make_range().
|
inherited |
Prints the entries of the vector with additional decimal places in scientific notation.
Definition at line 31 of file dense_vector_base.C.
References libMesh::make_range().
|
inline |
Changes the location of the subvector in the parent vector.
Definition at line 174 of file dense_subvector.h.
Referenced by assemble_elasticity(), assemble_laplace(), assemble_shell(), assemble_stokes(), and libMesh::DenseSubVector< T >::DenseSubVector().
|
inlinefinaloverridevirtual |
Implements libMesh::DenseVectorBase< T >.
Definition at line 90 of file dense_subvector.h.
References libMesh::DenseSubVector< T >::_n.
Referenced by libMesh::NumericVector< Number >::insert().
|
inlinefinaloverridevirtual |
Set every element in the vector to 0.
Needs to be pure virtual since the storage method may be different in derived classes.
Implements libMesh::DenseVectorBase< T >.
Definition at line 188 of file dense_subvector.h.
References libMesh::index_range().
|
private |
The offset into the parent vector.
Definition at line 153 of file dense_subvector.h.
Referenced by libMesh::DenseSubVector< T >::i_off().
|
private |
The length of this subvector.
Definition at line 148 of file dense_subvector.h.
Referenced by libMesh::DenseSubVector< T >::empty(), and libMesh::DenseSubVector< T >::size().
|
private |
The parent vector that contains this subvector.
Definition at line 143 of file dense_subvector.h.
Referenced by libMesh::DenseSubVector< T >::parent().