A slight extension to the standard template vector class so that we can include "graceful" array range checks if the RANGE_CHECKING flag is set. The generalisation to general allocators is NOT handled here, mainly because we never use it, but also because the intel and gnu compilers have different names for the internal classes, which makes writing code that works for both a pain! More...
#include <Vector.h>
Public Types | |
typedef _Tp | value_type |
Typedef to make the constructors look a bit cleaner. More... | |
typedef value_type & | reference |
Typedef to make the constructors look a bit cleaner. More... | |
typedef const value_type & | const_reference |
Typedef to make the constructors look a bit cleaner. More... | |
typedef size_t | size_type |
Typedef to make the constructors look a bit cleaner. More... | |
Public Member Functions | |
Vector () | |
Construct an empty vector. More... | |
Vector (size_type __n) | |
A constructor that creates a vector of size __n. Note the use of explicit for "strong" type checking. More... | |
Vector (size_type __n, const _Tp &__value) | |
A constructor that creates a vector of size __n and initialises every entry to __value. More... | |
Vector (std::initializer_list< _Tp > init) | |
A constructor that creates a vector with entries set by the values in the input initialiser_list Example: Vector<int> arr{0, 20, 100, 150); Vector<int> arr = {0, 20, 100, 150);. More... | |
Vector (const Vector< _Tp > &__x) | |
Copy constructor. More... | |
void | initialise (const _Tp &__value) |
Iterate over all values and set to the desired value. More... | |
reference | operator[] (size_type __n) |
Overload the bracket access operator to include array-range checking if the RANGE_CHECKING flag is set. More... | |
const_reference | operator[] (size_type __n) const |
Overloaded, range-checking, bracket access operator (const version) More... | |
Private Member Functions | |
reference | error_checked_access (size_type __n) |
const_reference | error_checked_access (size_type __n) const |
A slight extension to the standard template vector class so that we can include "graceful" array range checks if the RANGE_CHECKING flag is set. The generalisation to general allocators is NOT handled here, mainly because we never use it, but also because the intel and gnu compilers have different names for the internal classes, which makes writing code that works for both a pain!
typedef const value_type& oomph::Vector< _Tp >::const_reference |
typedef value_type& oomph::Vector< _Tp >::reference |
typedef size_t oomph::Vector< _Tp >::size_type |
typedef _Tp oomph::Vector< _Tp >::value_type |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
A constructor that creates a vector with entries set by the values in the input initialiser_list Example: Vector<int> arr{0, 20, 100, 150); Vector<int> arr = {0, 20, 100, 150);.
|
inline |
|
inlineprivate |
Definition at line 77 of file Vector.h.
Referenced by oomph::Vector< _Tp >::operator[]().
|
inlineprivate |
|
inline |
Iterate over all values and set to the desired value.
Definition at line 167 of file Vector.h.
Referenced by oomph::PeriodicOrbitTemporalMesh< ELEMENT >::assemble_residuals(), oomph::PeriodicOrbitTemporalMesh< ELEMENT >::assemble_residuals_and_jacobian(), oomph::ComplexGMRES< MATRIX >::complex_solve_helper(), oomph::Mesh::compute_error(), oomph::Mesh::compute_norm(), oomph::SpaceTimeNavierStokesEquations< DIM >::get_body_force_nst(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::get_body_force_nst(), oomph::GeneralisedElement::get_djacobian_and_dmass_matrix_dparameter(), oomph::GeneralisedElement::get_djacobian_dparameter(), oomph::GeneralisedElement::get_dresiduals_dparameter(), oomph::Problem::get_hessian_vector_products(), oomph::GeneralisedElement::get_inner_products(), oomph::GeneralisedElement::get_jacobian(), oomph::GeneralisedElement::get_jacobian_and_mass_matrix(), oomph::GeneralisedElement::get_mass_matrix(), oomph::VorticitySmootherElement< ELEMENT >::get_raw_velocity_deriv(), oomph::VorticitySmootherElement< ELEMENT >::get_raw_vorticity_deriv(), oomph::VorticitySmootherElement< ELEMENT >::get_raw_vorticity_second_deriv(), oomph::VorticitySmootherElement< ELEMENT >::get_raw_vorticity_third_deriv(), oomph::GeneralisedElement::get_residuals(), oomph::SolidFiniteElement::get_residuals_for_solid_ic(), oomph::PseudoBucklingRingElement::get_residuals_generic(), oomph::DGEulerFaceElement< ELEMENT >::numerical_flux(), oomph::GMRESBlockPreconditioner::preconditioner_solve(), oomph::HelmholtzMGPreconditioner< DIM >::residual_norm(), and oomph::VorticitySmootherElement< ELEMENT >::vorticity_error_squared().
|
inline |
Overload the bracket access operator to include array-range checking if the RANGE_CHECKING flag is set.
Definition at line 180 of file Vector.h.
References oomph::Vector< _Tp >::error_checked_access().
|
inline |
Overloaded, range-checking, bracket access operator (const version)
Definition at line 186 of file Vector.h.
References oomph::Vector< _Tp >::error_checked_access().