Nektar++
|
#include <NekVector.hpp>
Public Types | |
typedef DataType * | iterator |
typedef const DataType * | const_iterator |
Public Member Functions | |
NekVector () | |
Creates an empty vector. More... | |
NekVector (unsigned int size) | |
Creates a vector of given size. The elements are not initialized. More... | |
NekVector (unsigned int size, typename boost::call_traits< DataType >::const_reference a) | |
Creates a vector with given size and initial value. More... | |
NekVector (const std::string &vectorValues) | |
NekVector (typename boost::call_traits< DataType >::const_reference x, typename boost::call_traits< DataType >::const_reference y, typename boost::call_traits< DataType >::const_reference z) | |
NekVector (const NekVector< DataType > &rhs) | |
NekVector (unsigned int size, const DataType *const ptr) | |
NekVector (const Array< OneD, DataType > &ptr, PointerWrapper h=eCopy) | |
NekVector (unsigned int size, Array< OneD, DataType > &ptr, PointerWrapper h=eCopy) | |
NekVector (unsigned int size, const Array< OneD, const DataType > &ptr, PointerWrapper h=eCopy) | |
~NekVector () | |
NekVector< DataType > & | operator= (const NekVector< DataType > &rhs) |
unsigned int | GetDimension () const |
Returns the number of dimensions for the point. More... | |
unsigned int | GetRows () const |
DataType * | GetRawPtr () |
Array< OneD, DataType > & | GetPtr () |
const DataType * | GetRawPtr () const |
const Array< OneD, const DataType > & | GetPtr () const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
boost::call_traits< DataType >::reference | operator() (unsigned int i) |
Returns i^{th} element. More... | |
boost::call_traits< DataType >::reference | operator[] (unsigned int i) |
boost::call_traits< DataType >::reference | x () |
boost::call_traits< DataType >::reference | y () |
boost::call_traits< DataType >::reference | z () |
void | SetX (typename boost::call_traits< DataType >::const_reference val) |
void | SetY (typename boost::call_traits< DataType >::const_reference val) |
void | SetZ (typename boost::call_traits< DataType >::const_reference val) |
NekVector< DataType > & | operator+= (const NekVector< DataType > &rhs) |
NekVector< DataType > & | operator-= (const NekVector< DataType > &rhs) |
NekVector< DataType > & | operator*= (typename boost::call_traits< DataType >::const_reference rhs) |
NekVector< DataType > & | operator/= (typename boost::call_traits< DataType >::const_reference rhs) |
void | Normalize () |
boost::call_traits< DataType >::const_reference | operator() (unsigned int i) const |
boost::call_traits< DataType >::const_reference | operator[] (unsigned int i) const |
boost::call_traits< DataType >::const_reference | x () const |
boost::call_traits< DataType >::const_reference | y () const |
boost::call_traits< DataType >::const_reference | z () const |
NekVector< DataType > | operator- () const |
DataType | Magnitude () const |
DataType | Dot (const NekVector< DataType > &rhs) const |
NekVector< DataType > | Cross (const NekVector< DataType > &rhs) const |
std::string | AsString () const |
DataType | L1Norm () const |
DataType | L2Norm () const |
DataType | InfinityNorm () const |
PointerWrapper | GetWrapperType () const |
Protected Member Functions | |
Array< OneD, DataType > & | GetData () |
void | SetSize (unsigned int s) |
void | SetWrapperType (PointerWrapper p) |
void | SetData (const Array< OneD, DataType > &newData) |
void | Resize (unsigned int newSize) |
Private Member Functions | |
NekVector (const Array< OneD, const DataType > &ptr, PointerWrapper h) | |
Private Attributes | |
unsigned int | m_size |
Array< OneD, DataType > | m_data |
PointerWrapper | m_wrapperType |
Definition at line 55 of file NekVector.hpp.
typedef const DataType* Nektar::NekVector< DataType >::const_iterator |
Definition at line 113 of file NekVector.hpp.
typedef DataType* Nektar::NekVector< DataType >::iterator |
Definition at line 109 of file NekVector.hpp.
Nektar::NekVector< DataType >::NekVector |
|
explicit |
Creates a vector of given size. The elements are not initialized.
Definition at line 46 of file NekVector.cpp.
Nektar::NekVector< DataType >::NekVector | ( | unsigned int | size, |
typename boost::call_traits< DataType >::const_reference | a | ||
) |
Creates a vector with given size and initial value.
Definition at line 52 of file NekVector.cpp.
References Nektar::Array< OneD, DataType >::get(), Nektar::NekVector< DataType >::m_data, and Nektar::NekVector< DataType >::m_size.
|
explicit |
Definition at line 60 of file NekVector.cpp.
Nektar::NekVector< DataType >::NekVector | ( | typename boost::call_traits< DataType >::const_reference | x, |
typename boost::call_traits< DataType >::const_reference | y, | ||
typename boost::call_traits< DataType >::const_reference | z | ||
) |
Definition at line 79 of file NekVector.cpp.
Nektar::NekVector< DataType >::NekVector | ( | const NekVector< DataType > & | rhs | ) |
Definition at line 91 of file NekVector.cpp.
Nektar::NekVector< DataType >::NekVector | ( | unsigned int | size, |
const DataType *const | ptr | ||
) |
Definition at line 103 of file NekVector.cpp.
|
explicit |
Definition at line 109 of file NekVector.cpp.
Nektar::NekVector< DataType >::NekVector | ( | unsigned int | size, |
Array< OneD, DataType > & | ptr, | ||
PointerWrapper | h = eCopy |
||
) |
Definition at line 121 of file NekVector.cpp.
References Nektar::eCopy.
Nektar::NekVector< DataType >::NekVector | ( | unsigned int | size, |
const Array< OneD, const DataType > & | ptr, | ||
PointerWrapper | h = eCopy |
||
) |
Definition at line 151 of file NekVector.cpp.
Nektar::NekVector< DataType >::~NekVector |
Definition at line 169 of file NekVector.cpp.
|
private |
Definition at line 139 of file NekVector.cpp.
std::string Nektar::NekVector< DataType >::AsString |
Definition at line 420 of file NekVector.cpp.
References Nektar::AsString().
Referenced by Nektar::operator<<().
NekVector< DataType >::iterator Nektar::NekVector< DataType >::begin |
Definition at line 235 of file NekVector.cpp.
Referenced by Nektar::UnitTests::BOOST_AUTO_TEST_CASE(), Nektar::DiagonalBlockFullScalMatrixMultiply(), Nektar::DiagonalBlockMatrixMultiply(), Nektar::L1Norm(), Nektar::L2Norm(), and Nektar::operator==().
NekVector< DataType >::const_iterator Nektar::NekVector< DataType >::begin |
Definition at line 247 of file NekVector.cpp.
NekVector< DataType > Nektar::NekVector< DataType >::Cross | ( | const NekVector< DataType > & | rhs | ) | const |
Definition at line 414 of file NekVector.cpp.
References Nektar::Cross().
DataType Nektar::NekVector< DataType >::Dot | ( | const NekVector< DataType > & | rhs | ) | const |
Definition at line 408 of file NekVector.cpp.
References Nektar::Dot().
NekVector< DataType >::iterator Nektar::NekVector< DataType >::end |
Definition at line 241 of file NekVector.cpp.
Referenced by Nektar::UnitTests::BOOST_AUTO_TEST_CASE(), Nektar::DiagonalBlockFullScalMatrixMultiply(), Nektar::DiagonalBlockMatrixMultiply(), Nektar::L1Norm(), Nektar::L2Norm(), and Nektar::operator==().
NekVector< DataType >::const_iterator Nektar::NekVector< DataType >::end |
Definition at line 253 of file NekVector.cpp.
|
protected |
Definition at line 448 of file NekVector.cpp.
unsigned int Nektar::NekVector< DataType >::GetDimension |
Returns the number of dimensions for the point.
Definition at line 201 of file NekVector.cpp.
Referenced by Nektar::Add(), Nektar::AddEqual(), Nektar::AddEqualNegatedLhs(), Nektar::AddNegatedLhs(), Nektar::AsString(), Nektar::VariableSizedNekVectorUnitTests::BOOST_AUTO_TEST_CASE(), Nektar::UnitTests::BOOST_AUTO_TEST_CASE(), Nektar::MovementTests::BOOST_AUTO_TEST_CASE(), Nektar::Cross(), Nektar::NekVector< NekDouble >::Cross(), Nektar::Divide(), Nektar::DivideEqual(), Nektar::Dot(), Nektar::FullBlockMatrixMultiply(), Nektar::InfinityNorm(), Nektar::Magnitude(), Nektar::Multiply(), Nektar::MultiplyEqual(), Nektar::MultiplyInvertedLhs(), Nektar::Negate(), Nektar::NegateInPlace(), Nektar::operator==(), Nektar::Subtract(), Nektar::SubtractEqual(), Nektar::SubtractEqualNegatedLhs(), Nektar::SubtractNegatedLhs(), and Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_PreSolve().
Array< OneD, DataType > & Nektar::NekVector< DataType >::GetPtr |
Definition at line 217 of file NekVector.cpp.
Referenced by Nektar::MultiRegions::AssemblyMap::AssembleBnd(), Nektar::MultiRegions::DisContField::EvaluateHDGPostProcessing(), Nektar::MultiRegions::AssemblyMap::GlobalToLocalBnd(), Nektar::MultiRegions::AssemblyMap::UniversalAssembleBnd(), Nektar::MultiRegions::AssemblyMapCG::v_Assemble(), Nektar::MultiRegions::GlobalLinSysPETScStaticCond::v_DoMatrixMultiply(), Nektar::SpatialDomains::SegGeom::v_FillGeom(), Nektar::MultiRegions::AssemblyMapCG::v_GlobalToLocal(), Nektar::MultiRegions::AssemblyMapCG::v_LocalToGlobal(), Nektar::MultiRegions::AssemblyMapCG::v_UniversalAssemble(), and Nektar::MultiRegions::AssemblyMapDG::v_UniversalAssemble().
const Array< OneD, const DataType > & Nektar::NekVector< DataType >::GetPtr |
Definition at line 229 of file NekVector.cpp.
DataType * Nektar::NekVector< DataType >::GetRawPtr |
Definition at line 211 of file NekVector.cpp.
Referenced by Nektar::Add(), Nektar::AddEqual(), Nektar::AddEqualNegatedLhs(), Nektar::AddNegatedLhs(), Nektar::DiagonalBlockFullScalMatrixMultiply(), Nektar::DiagonalBlockMatrixMultiply(), Nektar::Divide(), Nektar::DivideEqual(), Nektar::FullBlockMatrixMultiply(), Nektar::Multiply(), Nektar::MultiplyEqual(), Nektar::MultiplyInvertedLhs(), Nektar::NegateInPlace(), Nektar::Subtract(), Nektar::SubtractEqual(), Nektar::SubtractEqualNegatedLhs(), and Nektar::SubtractNegatedLhs().
const DataType * Nektar::NekVector< DataType >::GetRawPtr |
Definition at line 223 of file NekVector.cpp.
unsigned int Nektar::NekVector< DataType >::GetRows |
Definition at line 206 of file NekVector.cpp.
Referenced by Nektar::AsString(), Nektar::BlockMatrixUnitTests::BOOST_AUTO_TEST_CASE(), Nektar::MatrixMultiplicationTests::BOOST_AUTO_TEST_CASE(), Nektar::UnitTests::BOOST_AUTO_TEST_CASE(), Nektar::DiagonalBlockFullScalMatrixMultiply(), Nektar::DiagonalBlockMatrixMultiply(), and Nektar::Multiply().
PointerWrapper Nektar::NekVector< DataType >::GetWrapperType |
Definition at line 442 of file NekVector.cpp.
DataType Nektar::NekVector< DataType >::InfinityNorm |
Definition at line 436 of file NekVector.cpp.
References Nektar::InfinityNorm().
Referenced by Nektar::UnitTests::BOOST_AUTO_TEST_CASE().
DataType Nektar::NekVector< DataType >::L1Norm |
Definition at line 426 of file NekVector.cpp.
References Nektar::L1Norm().
Referenced by Nektar::UnitTests::BOOST_AUTO_TEST_CASE().
DataType Nektar::NekVector< DataType >::L2Norm |
Definition at line 431 of file NekVector.cpp.
References Nektar::L2Norm().
Referenced by Nektar::UnitTests::BOOST_AUTO_TEST_CASE().
DataType Nektar::NekVector< DataType >::Magnitude |
Definition at line 402 of file NekVector.cpp.
References Nektar::Magnitude().
Referenced by Nektar::Normalize().
void Nektar::NekVector< DataType >::Normalize |
Definition at line 351 of file NekVector.cpp.
References Nektar::Normalize().
Referenced by Nektar::SpatialDomains::Movement::ReadZones().
boost::call_traits< DataType >::reference Nektar::NekVector< DataType >::operator() | ( | unsigned int | i | ) |
Returns i^{th} element.
i | The element to return. |
Retrieves the i^{th} element. Since it returns a reference you may assign a new value (i.e., p(2) = 3.2;)
This operator performs range checking.
Definition at line 260 of file NekVector.cpp.
References ASSERTL1.
boost::call_traits< DataType >::const_reference Nektar::NekVector< DataType >::operator() | ( | unsigned int | i | ) | const |
Definition at line 358 of file NekVector.cpp.
References ASSERTL1.
NekVector< DataType > & Nektar::NekVector< DataType >::operator*= | ( | typename boost::call_traits< DataType >::const_reference | rhs | ) |
Definition at line 336 of file NekVector.cpp.
References Nektar::MultiplyEqual().
NekVector< DataType > & Nektar::NekVector< DataType >::operator+= | ( | const NekVector< DataType > & | rhs | ) |
Definition at line 320 of file NekVector.cpp.
References Nektar::AddEqual().
NekVector< DataType > Nektar::NekVector< DataType >::operator- |
Definition at line 397 of file NekVector.cpp.
References Nektar::Negate().
NekVector< DataType > & Nektar::NekVector< DataType >::operator-= | ( | const NekVector< DataType > & | rhs | ) |
Definition at line 328 of file NekVector.cpp.
References Nektar::SubtractEqual().
NekVector< DataType > & Nektar::NekVector< DataType >::operator/= | ( | typename boost::call_traits< DataType >::const_reference | rhs | ) |
Definition at line 344 of file NekVector.cpp.
References Nektar::DivideEqual().
NekVector< DataType > & Nektar::NekVector< DataType >::operator= | ( | const NekVector< DataType > & | rhs | ) |
Definition at line 174 of file NekVector.cpp.
boost::call_traits< DataType >::reference Nektar::NekVector< DataType >::operator[] | ( | unsigned int | i | ) |
Definition at line 269 of file NekVector.cpp.
boost::call_traits< DataType >::const_reference Nektar::NekVector< DataType >::operator[] | ( | unsigned int | i | ) | const |
Definition at line 367 of file NekVector.cpp.
|
protected |
Definition at line 471 of file NekVector.cpp.
|
protected |
Definition at line 465 of file NekVector.cpp.
|
protected |
Definition at line 453 of file NekVector.cpp.
|
protected |
Definition at line 459 of file NekVector.cpp.
References CellMLToNektar.cellml_metadata::p.
void Nektar::NekVector< DataType >::SetX | ( | typename boost::call_traits< DataType >::const_reference | val | ) |
Definition at line 296 of file NekVector.cpp.
References ASSERTL1.
void Nektar::NekVector< DataType >::SetY | ( | typename boost::call_traits< DataType >::const_reference | val | ) |
Definition at line 304 of file NekVector.cpp.
References ASSERTL1.
void Nektar::NekVector< DataType >::SetZ | ( | typename boost::call_traits< DataType >::const_reference | val | ) |
Definition at line 312 of file NekVector.cpp.
References ASSERTL1.
boost::call_traits< DataType >::reference Nektar::NekVector< DataType >::x |
Definition at line 275 of file NekVector.cpp.
References ASSERTL1.
Referenced by Nektar::UnitTests::BOOST_AUTO_TEST_CASE(), and Nektar::Cross().
boost::call_traits< DataType >::const_reference Nektar::NekVector< DataType >::x |
Definition at line 373 of file NekVector.cpp.
References ASSERTL1.
boost::call_traits< DataType >::reference Nektar::NekVector< DataType >::y |
Definition at line 282 of file NekVector.cpp.
References ASSERTL1.
Referenced by Nektar::UnitTests::BOOST_AUTO_TEST_CASE(), and Nektar::Cross().
boost::call_traits< DataType >::const_reference Nektar::NekVector< DataType >::y |
Definition at line 381 of file NekVector.cpp.
References ASSERTL1.
boost::call_traits< DataType >::reference Nektar::NekVector< DataType >::z |
Definition at line 289 of file NekVector.cpp.
References ASSERTL1.
Referenced by Nektar::UnitTests::BOOST_AUTO_TEST_CASE(), and Nektar::Cross().
boost::call_traits< DataType >::const_reference Nektar::NekVector< DataType >::z |
Definition at line 389 of file NekVector.cpp.
References ASSERTL1.
|
private |
Definition at line 205 of file NekVector.hpp.
Referenced by Nektar::NekVector< DataType >::NekVector().
|
private |
Definition at line 204 of file NekVector.hpp.
Referenced by Nektar::NekVector< DataType >::NekVector().
|
private |
Definition at line 206 of file NekVector.hpp.