#include <analytic_function.h>
Public Member Functions | |
DenseVector (const unsigned int n=0) | |
DenseVector (const unsigned int n, const T &val) | |
template<typename T2 > | |
DenseVector (const DenseVector< T2 > &other_vector) | |
template<typename T2 > | |
DenseVector (const std::vector< T2 > &other_vector) | |
DenseVector (DenseVector &&)=default | |
DenseVector (const DenseVector &)=default | |
DenseVector & | operator= (const DenseVector &)=default |
DenseVector & | operator= (DenseVector &&)=default |
virtual | ~DenseVector ()=default |
virtual unsigned int | size () const override |
virtual bool | empty () const override |
virtual void | zero () override |
const T & | operator() (const unsigned int i) const |
T & | operator() (const unsigned int i) |
virtual T | el (const unsigned int i) const override |
virtual T & | el (const unsigned int i) override |
template<typename T2 > | |
DenseVector< T > & | operator= (const DenseVector< T2 > &other_vector) |
void | swap (DenseVector< T > &other_vector) |
void | resize (const unsigned int n) |
template<typename T2 > | |
void | append (const DenseVector< T2 > &other_vector) |
void | scale (const T factor) |
DenseVector< T > & | operator*= (const T factor) |
template<typename T2 , typename T3 > | |
boostcopy::enable_if_c< ScalarTraits< T2 >::value, void >::type | add (const T2 factor, const DenseVector< T3 > &vec) |
template<typename T2 > | |
CompareTypes< T, T2 >::supertype | dot (const DenseVector< T2 > &vec) const |
template<typename T2 > | |
CompareTypes< T, T2 >::supertype | indefinite_dot (const DenseVector< T2 > &vec) const |
template<typename T2 > | |
bool | operator== (const DenseVector< T2 > &vec) const |
template<typename T2 > | |
bool | operator!= (const DenseVector< T2 > &vec) const |
template<typename T2 > | |
DenseVector< T > & | operator+= (const DenseVector< T2 > &vec) |
template<typename T2 > | |
DenseVector< T > & | operator-= (const DenseVector< T2 > &vec) |
Real | min () const |
Real | max () const |
Real | l1_norm () const |
Real | l2_norm () const |
Real | linfty_norm () const |
void | get_principal_subvector (unsigned int sub_n, DenseVector< T > &dest) const |
std::vector< T > & | get_values () |
const std::vector< T > & | get_values () const |
void | print (std::ostream &os) const |
void | print_scientific (std::ostream &os, unsigned precision=8) const |
Private Attributes | |
std::vector< T > | _val |
Defines a dense vector for use in Finite Element-type computations. This class is to basically compliment the DenseMatrix
class. It has additional capabilities over the std::vector
that make it useful for finite elements, particularly for systems of equations. All overridden virtual functions are documented in dense_vector_base.h.
Definition at line 34 of file analytic_function.h.
|
inlineexplicit |
|
inlineexplicit |
Constructor. Creates a dense vector of dimension n
where all entries have value val
.
Definition at line 285 of file dense_vector.h.
|
inline |
|
inline |
|
default |
The 5 special functions can be defaulted for this class, as it does not manage any memory itself.
|
default |
|
virtualdefault |
|
inline |
Adds factor
times vec
to this vector. This should only work if T += T2 * T3 is valid C++ and if T2 is scalar. Return type is void
Definition at line 436 of file dense_vector.h.
Referenced by libMesh::EulerSolver::_general_residual(), libMesh::NewmarkSolver::_general_residual(), and libMesh::DenseMatrix< Number >::vector_mult_add().
|
inline |
Append additional entries to (resizing, but unchanging) the vector.
Definition at line 367 of file dense_vector.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::coarsened_dof_values().
|
inline |
vec
.In the complex-valued case, uses the complex conjugate of vec
.
Definition at line 451 of file dense_vector.h.
|
inlineoverridevirtual |
(i) element of the vector. Implements libMesh::DenseVectorBase< T >.
Definition at line 112 of file dense_vector.h.
|
inlineoverridevirtual |
(i) element of the vector as a writable reference. Implements libMesh::DenseVectorBase< T >.
Definition at line 115 of file dense_vector.h.
|
inlineoverridevirtual |
true
iff size() is 0. Reimplemented from libMesh::DenseVectorBase< T >.
Definition at line 97 of file dense_vector.h.
Referenced by libMesh::NumericVector< Number >::add_vector(), and libMesh::NumericVector< Number >::insert().
|
inline |
Puts the principal subvector of size sub_n
(i.e. first sub_n entries) into dest
.
Definition at line 672 of file dense_vector.h.
|
inline |
This should be used with caution (i.e. one should not change the size of the vector, etc.) but is useful for interoperating with low level BLAS routines which expect a simple array.
Definition at line 256 of file dense_vector.h.
Referenced by libMesh::DenseMatrix< Number >::_evd_lapack(), libMesh::DenseMatrix< Number >::_lu_back_substitute_lapack(), libMesh::DenseMatrix< Number >::_matvec_blas(), libMesh::DenseMatrix< Number >::_svd_solve_lapack(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), and libMesh::FEMContext::pre_fe_reinit().
|
inline |
Definition at line 261 of file dense_vector.h.
|
inline |
vec
.In the complex-valued case, does not use the complex conjugate of vec
.
Definition at line 484 of file dense_vector.h.
|
inline |
Definition at line 601 of file dense_vector.h.
|
inline |
Definition at line 622 of file dense_vector.h.
|
inline |
Definition at line 648 of file dense_vector.h.
|
inline |
Definition at line 583 of file dense_vector.h.
|
inline |
Definition at line 565 of file dense_vector.h.
|
inline |
true
if vec
is not exactly equal to this vector, false otherwise. Definition at line 517 of file dense_vector.h.
|
inline |
|
inline |
i
of the vector as a writable reference. Definition at line 401 of file dense_vector.h.
|
inline |
Multiplies every element in the vector by factor
.
Definition at line 423 of file dense_vector.h.
|
inline |
Adds vec
to this vector.
Definition at line 534 of file dense_vector.h.
|
inline |
Subtracts vec
from this vector.
Definition at line 550 of file dense_vector.h.
|
default |
|
default |
|
inline |
|
inline |
true
if vec
is exactly equal to this vector, false otherwise. Definition at line 500 of file dense_vector.h.
|
inherited |
Pretty-print the vector to stdout
.
Definition at line 51 of file dense_vector_base.C.
|
inherited |
Prints the entries of the vector with additional decimal places in scientific notation.
Definition at line 31 of file dense_vector_base.C.
|
inline |
Resize the vector. Sets all elements to 0.
Definition at line 355 of file dense_vector.h.
Referenced by libMesh::DenseMatrix< Number >::_cholesky_back_substitute(), libMesh::DenseMatrix< Number >::_evd_lapack(), libMesh::DenseMatrix< Number >::_lu_back_substitute(), libMesh::DenseMatrix< Number >::_svd_lapack(), libMesh::DenseMatrix< Number >::_svd_solve_lapack(), libMesh::HPCoarsenTest::add_projection(), libMesh::DofMap::build_constraint_matrix_and_vector(), libMesh::FEGenericBase< FEOutputType< T >::type >::coarsened_dof_values(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints(), libMesh::DGFEMContext::neighbor_side_fe_reinit(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::CompositeFEMFunction< Output >::operator()(), libMesh::CompositeFunction< Output >::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::MeshFunction::operator()(), libMesh::BoundaryProjectSolution::operator()(), libMesh::MeshTools::Generation::Private::GaussLobattoRedistributionFunction::operator()(), libMesh::FEMContext::pre_fe_reinit(), libMesh::DenseVector< Output >::resize(), libMesh::HPCoarsenTest::select_refinement(), libMesh::DenseMatrix< Number >::vector_mult(), libMesh::DenseMatrix< Number >::vector_mult_add(), and libMesh::DenseMatrix< Number >::vector_mult_transpose().
|
inline |
|
inlineoverridevirtual |
Implements libMesh::DenseVectorBase< T >.
Definition at line 92 of file dense_vector.h.
Referenced by libMesh::EulerSolver::_general_residual(), libMesh::Euler2Solver::_general_residual(), libMesh::NewmarkSolver::_general_residual(), libMesh::DenseMatrix< Number >::_lu_back_substitute(), libMesh::DenseMatrix< Number >::_matvec_blas(), libMesh::DenseMatrix< Number >::_svd_lapack(), libMesh::DenseMatrix< Number >::_svd_solve_lapack(), libMesh::HPCoarsenTest::add_projection(), libMesh::NumericVector< Number >::add_vector(), libMesh::FEMSystem::assembly(), libMesh::DofMap::constrain_element_dyad_matrix(), libMesh::DofMap::constrain_element_matrix_and_vector(), libMesh::DofMap::constrain_element_vector(), libMesh::MeshFunction::discontinuous_gradient(), libMesh::MeshFunction::discontinuous_value(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::MeshFunction::gradient(), libMesh::MeshFunction::hessian(), libMesh::DofMap::heterogenously_constrain_element_matrix_and_vector(), libMesh::DofMap::heterogenously_constrain_element_vector(), libMesh::VectorSetAction< Val >::insert(), libMesh::NumericVector< Number >::insert(), libMesh::LaplacianErrorEstimator::internal_side_integration(), libMesh::ConstFunction< Output >::operator()(), libMesh::ConstFEMFunction< Output >::operator()(), libMesh::WrappedFunction< Output >::operator()(), libMesh::ParsedFEMFunction< T >::operator()(), libMesh::CompositeFEMFunction< Output >::operator()(), libMesh::CompositeFunction< Output >::operator()(), libMesh::MeshFunction::operator()(), libMesh::DenseMatrix< Number >::outer_product(), libMesh::HPCoarsenTest::select_refinement(), libMesh::DenseMatrix< Number >::vector_mult(), libMesh::DenseMatrix< Number >::vector_mult_add(), and libMesh::DenseMatrix< Number >::vector_mult_transpose().
|
inline |
STL-like swap method
Definition at line 346 of file dense_vector.h.
Referenced by libMesh::EulerSolver::_general_residual(), and libMesh::Euler2Solver::_general_residual().
|
inlineoverridevirtual |
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 379 of file dense_vector.h.
Referenced by libMesh::HPCoarsenTest::add_projection(), libMesh::FEGenericBase< FEOutputType< T >::type >::coarsened_dof_values(), libMesh::FEMSystem::numerical_jacobian(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), libMesh::CompositeFEMFunction< Output >::operator()(), libMesh::CompositeFunction< Output >::operator()(), libMesh::BoundaryProjectSolution::operator()(), and libMesh::HPCoarsenTest::select_refinement().
|
private |
The actual data values, stored as a 1D array.
Definition at line 268 of file dense_vector.h.
Referenced by libMesh::DenseVector< Output >::empty(), libMesh::DenseVector< Output >::get_values(), and libMesh::DenseVector< Output >::size().