Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Nektar::NekVector< DataType > Class Template Reference

#include <NekVector.hpp>

Collaboration diagram for Nektar::NekVector< DataType >:
Collaboration graph
[legend]

Public Types

typedef DataType * iterator
typedef const DataType * const_iterator

Public Member Functions

 NekVector ()
 Creates an empty vector.
 NekVector (unsigned int size)
 Creates a vector of given size. The elements are not initialized.
 NekVector (unsigned int size, typename boost::call_traits< DataType >::const_reference a)
 Creates a vector with given size and initial value.
 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.
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.
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

Detailed Description

template<typename DataType>
class Nektar::NekVector< DataType >

Definition at line 69 of file NekVector.hpp.

Member Typedef Documentation

template<typename DataType>
typedef const DataType* Nektar::NekVector< DataType >::const_iterator

Definition at line 154 of file NekVector.hpp.

template<typename DataType>
typedef DataType* Nektar::NekVector< DataType >::iterator

Definition at line 150 of file NekVector.hpp.

Constructor & Destructor Documentation

template<typename DataType >
Nektar::NekVector< DataType >::NekVector ( )

Creates an empty vector.

Definition at line 44 of file NekVector.cpp.

template<typename DataType >
Nektar::NekVector< DataType >::NekVector ( unsigned int  size)
explicit

Creates a vector of given size. The elements are not initialized.

Definition at line 52 of file NekVector.cpp.

:
m_size(size),
m_data(size),
{
}
template<typename DataType>
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 60 of file NekVector.cpp.

References Nektar::Array< OneD, DataType >::get(), Nektar::NekVector< DataType >::m_data, and Nektar::NekVector< DataType >::m_size.

:
m_size(size),
m_data(size),
{
std::fill_n(m_data.get(), m_size, a);
}
template<typename DataType>
Nektar::NekVector< DataType >::NekVector ( const std::string &  vectorValues)
explicit

Definition at line 69 of file NekVector.cpp.

References ASSERTL0, Nektar::Array< OneD, DataType >::begin(), ErrorUtil::efatal, Nektar::NekVector< DataType >::m_data, Nektar::NekVector< DataType >::m_size, and NEKERROR.

:
m_size(0),
m_data(),
{
try
{
std::vector<DataType> values = FromString<DataType>(vectorValues);
m_size = values.size();
m_data = Array<OneD, DataType>(m_size);
std::copy(values.begin(), values.end(), m_data.begin());
ASSERTL0(m_size > 0, "Error converting string values to vector");
}
catch(std::runtime_error& e)
{
}
}
template<typename DataType>
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 90 of file NekVector.cpp.

References Nektar::NekVector< DataType >::m_data, Nektar::NekVector< DataType >::x(), Nektar::NekVector< DataType >::y(), and Nektar::NekVector< DataType >::z().

:
m_size(3),
{
m_data[0] = x;
m_data[1] = y;
m_data[2] = z;
}
template<typename DataType>
Nektar::NekVector< DataType >::NekVector ( const NekVector< DataType > &  rhs)

Definition at line 103 of file NekVector.cpp.

References Nektar::NekVector< DataType >::begin(), Nektar::eCopy, Nektar::NekVector< DataType >::end(), Nektar::Array< OneD, DataType >::get(), Nektar::NekVector< DataType >::m_data, Nektar::NekVector< DataType >::m_size, and Nektar::NekVector< DataType >::m_wrapperType.

:
m_size(rhs.GetDimension()),
m_data(rhs.m_data),
m_wrapperType(rhs.m_wrapperType)
{
{
m_data = Array<OneD, DataType>(m_size);
std::copy(rhs.begin(), rhs.end(), m_data.get());
}
}
template<typename DataType>
Nektar::NekVector< DataType >::NekVector ( unsigned int  size,
const DataType *const  ptr 
)

Definition at line 116 of file NekVector.cpp.

:
m_size(size),
m_data(size, ptr),
{
}
template<typename DataType>
Nektar::NekVector< DataType >::NekVector ( const Array< OneD, DataType > &  ptr,
PointerWrapper  h = eCopy 
)
explicit

Definition at line 124 of file NekVector.cpp.

References Nektar::CopyArray(), Nektar::eCopy, Nektar::NekVector< DataType >::m_data, and Nektar::NekVector< DataType >::m_size.

:
m_size(ptr.num_elements()),
m_data(ptr),
{
if( h == eCopy )
{
m_data = Array<OneD, DataType>(m_size);
}
}
template<typename DataType>
Nektar::NekVector< DataType >::NekVector ( unsigned int  size,
Array< OneD, DataType > &  ptr,
PointerWrapper  h = eCopy 
)

Definition at line 137 of file NekVector.cpp.

References ASSERTL0, Nektar::Array< OneD, DataType >::begin(), Nektar::eCopy, Nektar::NekVector< DataType >::m_data, and Nektar::Array< OneD, const DataType >::num_elements().

:
m_size(size),
m_data(ptr),
{
if( h == eCopy )
{
ASSERTL0(size <= ptr.num_elements(), "Attempting to populate a vector of size " +
boost::lexical_cast<std::string>(size) + " but the incoming array only has " +
boost::lexical_cast<std::string>(ptr.num_elements()) + " elements.");
m_data = Array<OneD, DataType>(size);
std::copy(ptr.begin(), ptr.begin()+size, m_data.begin());
}
}
template<typename DataType>
Nektar::NekVector< DataType >::NekVector ( unsigned int  size,
const Array< OneD, const DataType > &  ptr,
PointerWrapper  h = eCopy 
)

Definition at line 167 of file NekVector.cpp.

References ASSERTL0, Nektar::Array< OneD, const DataType >::begin(), Nektar::Array< OneD, DataType >::begin(), Nektar::eCopy, Nektar::NekVector< DataType >::m_data, and Nektar::Array< OneD, const DataType >::num_elements().

:
m_size(size),
{
if( h == eCopy )
{
ASSERTL0(size <= ptr.num_elements(), "Attempting to populate a vector of size " +
boost::lexical_cast<std::string>(size) + " but the incoming array only has " +
boost::lexical_cast<std::string>(ptr.num_elements()) + " elements.");
m_data = Array<OneD, DataType>(size);
std::copy(ptr.begin(), ptr.begin()+size, m_data.begin());
}
}
template<typename DataType >
Nektar::NekVector< DataType >::~NekVector ( )

Definition at line 184 of file NekVector.cpp.

{}
template<typename DataType>
Nektar::NekVector< DataType >::NekVector ( const Array< OneD, const DataType > &  ptr,
PointerWrapper  h 
)
private

Definition at line 154 of file NekVector.cpp.

References Nektar::CopyArray(), Nektar::eCopy, Nektar::NekVector< DataType >::m_data, and Nektar::NekVector< DataType >::m_size.

:
m_size(ptr.num_elements()),
{
if( h == eCopy )
{
m_data = Array<OneD, DataType>(m_size);
}
}

Member Function Documentation

template<typename DataType >
std::string Nektar::NekVector< DataType >::AsString ( ) const

Definition at line 391 of file NekVector.cpp.

References Nektar::AsString().

{ return Nektar::AsString(*this); }
template<typename DataType >
NekVector< DataType >::iterator Nektar::NekVector< DataType >::begin ( )

Definition at line 242 of file NekVector.cpp.

Referenced by Nektar::DiagonalBlockMatrixMultiply(), Nektar::L1Norm(), Nektar::L2Norm(), Nektar::NekVector< DataType >::NekVector(), Nektar::NekVector< DataType >::operator=(), and Nektar::operator==().

{ return GetRawPtr(); }
template<typename DataType >
NekVector< DataType >::const_iterator Nektar::NekVector< DataType >::begin ( ) const

Definition at line 248 of file NekVector.cpp.

{ return GetRawPtr(); }
template<typename DataType>
NekVector< DataType > Nektar::NekVector< DataType >::Cross ( const NekVector< DataType > &  rhs) const

Definition at line 385 of file NekVector.cpp.

References Nektar::Cross().

{
return Nektar::Cross(*this, rhs);
}
template<typename DataType>
DataType Nektar::NekVector< DataType >::Dot ( const NekVector< DataType > &  rhs) const

Definition at line 382 of file NekVector.cpp.

References Nektar::Dot().

{ return Nektar::Dot(*this, rhs); }
template<typename DataType >
NekVector< DataType >::iterator Nektar::NekVector< DataType >::end ( )

Definition at line 245 of file NekVector.cpp.

Referenced by Nektar::DiagonalBlockMatrixMultiply(), Nektar::L1Norm(), Nektar::L2Norm(), Nektar::NekVector< DataType >::NekVector(), Nektar::NekVector< DataType >::operator=(), and Nektar::operator==().

{ return GetRawPtr() + this->GetDimension(); }
template<typename DataType >
NekVector< DataType >::const_iterator Nektar::NekVector< DataType >::end ( ) const

Definition at line 251 of file NekVector.cpp.

{ return GetRawPtr() + GetDimension(); }
template<typename DataType >
Array< OneD, DataType > & Nektar::NekVector< DataType >::GetData ( )
protected

Definition at line 407 of file NekVector.cpp.

{ return m_data; }
template<typename DataType >
unsigned int Nektar::NekVector< DataType >::GetDimension ( ) const

Returns the number of dimensions for the point.

Definition at line 212 of file NekVector.cpp.

Referenced by Nektar::Add(), Nektar::AddEqual(), Nektar::AddEqualNegatedLhs(), Nektar::AddNegatedLhs(), Nektar::AsString(), Nektar::Cross(), Nektar::Divide(), Nektar::DivideEqual(), Nektar::Dot(), Nektar::FullBlockMatrixMultiply(), Nektar::InfinityNorm(), Nektar::Magnitude(), Nektar::Multiply(), Nektar::MultiplyEqual(), Nektar::MultiplyInvertedLhs(), Nektar::Negate(), Nektar::NegateInPlace(), Nektar::NekVector< DataType >::operator=(), Nektar::operator==(), DBUtils::Output1DArray(), Nektar::MultiRegions::GlobalLinSysIterative::Set_Rhs_Magnitude(), Nektar::Subtract(), Nektar::SubtractEqual(), Nektar::SubtractEqualNegatedLhs(), and Nektar::SubtractNegatedLhs().

{
return m_size;
}
template<typename DataType >
Array< OneD, DataType > & Nektar::NekVector< DataType >::GetPtr ( )

Definition at line 230 of file NekVector.cpp.

Referenced by Nektar::MultiRegions::AssemblyMap::AssembleBnd(), Nektar::LibUtilities::NodalTriElec::CalculateWeights(), Nektar::LibUtilities::NodalTriEvenlySpaced::CalculateWeights(), Nektar::LibUtilities::NodalTetElec::CalculateWeights(), Nektar::LibUtilities::NodalTetEvenlySpaced::CalculateWeights(), Nektar::LibUtilities::NodalTriFekete::CalculateWeights(), Nektar::MultiRegions::DisContField3D::EvaluateHDGPostProcessing(), Nektar::MultiRegions::DisContField2D::EvaluateHDGPostProcessing(), Nektar::MultiRegions::AssemblyMap::GlobalToLocalBnd(), Nektar::MultiRegions::AssemblyMap::LocalBndToGlobal(), Nektar::SpatialDomains::SegGeom::SegGeom(), Nektar::LibUtilities::ToArray(), Nektar::StdRegions::ToArray(), Nektar::MultiRegions::AssemblyMap::UniversalAssembleBnd(), Nektar::MultiRegions::AssemblyMapCG::v_Assemble(), Nektar::MultiRegions::AssemblyMapCG::v_GlobalToLocal(), Nektar::MultiRegions::AssemblyMapCG::v_LocalToGlobal(), Nektar::MultiRegions::GlobalLinSysStaticCond::v_Solve(), Nektar::MultiRegions::AssemblyMapCG::v_UniversalAssemble(), and Nektar::MultiRegions::AssemblyMapDG::v_UniversalAssemble().

{ return this->GetData(); }
template<typename DataType >
const Array< OneD, const DataType > & Nektar::NekVector< DataType >::GetPtr ( ) const

Definition at line 239 of file NekVector.cpp.

{ return m_data; }
template<typename DataType >
DataType * Nektar::NekVector< DataType >::GetRawPtr ( )

Definition at line 224 of file NekVector.cpp.

Referenced by Nektar::Add(), Nektar::AddEqual(), Nektar::AddEqualNegatedLhs(), Nektar::AddNegatedLhs(), 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().

{
return this->GetData().get();
}
template<typename DataType >
const DataType * Nektar::NekVector< DataType >::GetRawPtr ( ) const

Definition at line 233 of file NekVector.cpp.

{
return m_data.get();
}
template<typename DataType >
unsigned int Nektar::NekVector< DataType >::GetRows ( ) const

Definition at line 218 of file NekVector.cpp.

Referenced by Nektar::AsString(), Nektar::LibUtilities::NodalTriElec::CalculateInterpMatrix(), Nektar::LibUtilities::NodalTriEvenlySpaced::CalculateInterpMatrix(), Nektar::LibUtilities::NodalTetElec::CalculateInterpMatrix(), Nektar::LibUtilities::NodalTetEvenlySpaced::CalculateInterpMatrix(), Nektar::LibUtilities::NodalTriFekete::CalculateInterpMatrix(), Nektar::LibUtilities::NodalTriElec::CalculateWeights(), Nektar::LibUtilities::NodalTriEvenlySpaced::CalculateWeights(), Nektar::LibUtilities::NodalTetElec::CalculateWeights(), Nektar::LibUtilities::NodalTetEvenlySpaced::CalculateWeights(), Nektar::LibUtilities::NodalTriFekete::CalculateWeights(), Nektar::LibUtilities::DubinerPolyXDerivative(), Nektar::StdRegions::GetSize(), Nektar::LibUtilities::GetSize(), Nektar::LibUtilities::MakeQuadratureWeights(), Nektar::LibUtilities::MakeTetWeights(), Nektar::Multiply(), Nektar::LibUtilities::TetXDerivative(), Nektar::StdRegions::VectorToString(), and Nektar::LibUtilities::VectorToString().

{
return m_size;
}
template<typename DataType >
PointerWrapper Nektar::NekVector< DataType >::GetWrapperType ( ) const

Definition at line 404 of file NekVector.cpp.

{ return m_wrapperType; }
template<typename DataType >
DataType Nektar::NekVector< DataType >::InfinityNorm ( ) const

Definition at line 401 of file NekVector.cpp.

References Nektar::InfinityNorm().

{ return Nektar::InfinityNorm(*this); }
template<typename DataType >
DataType Nektar::NekVector< DataType >::L1Norm ( ) const

Definition at line 395 of file NekVector.cpp.

References Nektar::L1Norm().

{ return Nektar::L1Norm(*this); }
template<typename DataType >
DataType Nektar::NekVector< DataType >::L2Norm ( ) const

Definition at line 398 of file NekVector.cpp.

References Nektar::L2Norm().

{ return Nektar::L2Norm(*this); }
template<typename DataType >
DataType Nektar::NekVector< DataType >::Magnitude ( ) const

Definition at line 379 of file NekVector.cpp.

References Nektar::Magnitude().

Referenced by Nektar::Normalize().

{ return Nektar::Magnitude(*this); }
template<typename DataType >
void Nektar::NekVector< DataType >::Normalize ( )

Definition at line 337 of file NekVector.cpp.

References Nektar::Normalize().

{ return Nektar::Normalize(*this); }
template<typename DataType >
boost::call_traits< DataType >::reference Nektar::NekVector< DataType >::operator() ( unsigned int  i)

Returns i^{th} element.

Parameters
iThe element to return.
Precondition
i < dim
Returns
A reference to the i^{th} element.

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 254 of file NekVector.cpp.

References ASSERTL1.

{
ASSERTL1((i >= 0) && (i < this->GetDimension()), "Invalid access to m_data via parenthesis operator");
return this->GetData()[i];
}
template<typename DataType >
boost::call_traits< DataType >::const_reference Nektar::NekVector< DataType >::operator() ( unsigned int  i) const

Definition at line 340 of file NekVector.cpp.

References ASSERTL1.

{
ASSERTL1(( i >= 0) && (i < GetDimension()), "Invalid access to m_data via parenthesis operator");
return m_data[i];
}
template<typename DataType>
NekVector< DataType > & Nektar::NekVector< DataType >::operator*= ( typename boost::call_traits< DataType >::const_reference  rhs)

Definition at line 323 of file NekVector.cpp.

References Nektar::MultiplyEqual().

{
MultiplyEqual(*this, rhs);
return *this;
}
template<typename DataType>
NekVector< DataType > & Nektar::NekVector< DataType >::operator+= ( const NekVector< DataType > &  rhs)

Definition at line 309 of file NekVector.cpp.

References Nektar::AddEqual().

{
AddEqual(*this, rhs);
return *this;
}
template<typename DataType >
NekVector< DataType > Nektar::NekVector< DataType >::operator- ( ) const

Definition at line 375 of file NekVector.cpp.

References Nektar::Negate().

{ return Negate(*this); }
template<typename DataType>
NekVector< DataType > & Nektar::NekVector< DataType >::operator-= ( const NekVector< DataType > &  rhs)

Definition at line 316 of file NekVector.cpp.

References Nektar::SubtractEqual().

{
SubtractEqual(*this, rhs);
return *this;
}
template<typename DataType>
NekVector< DataType > & Nektar::NekVector< DataType >::operator/= ( typename boost::call_traits< DataType >::const_reference  rhs)

Definition at line 330 of file NekVector.cpp.

References Nektar::DivideEqual().

{
DivideEqual(*this, rhs);
return *this;
}
template<typename DataType>
NekVector< DataType > & Nektar::NekVector< DataType >::operator= ( const NekVector< DataType > &  rhs)

Definition at line 187 of file NekVector.cpp.

References ASSERTL0, Nektar::NekVector< DataType >::begin(), Nektar::eCopy, Nektar::NekVector< DataType >::end(), Nektar::eWrapper, and Nektar::NekVector< DataType >::GetDimension().

{
{
// If the current vector is a copy, then regardless of the rhs type
// we just copy over the values, resizing if needed.
if( GetDimension() != rhs.GetDimension() )
{
m_size = rhs.GetDimension();
m_data = Array<OneD, DataType>(m_size);
}
}
else if( m_wrapperType == eWrapper )
{
// If the current vector is wrapped, then just copy over the top,
// but the sizes of the two vectors must be the same.
ASSERTL0(GetDimension() == rhs.GetDimension(), "Wrapped NekVectors must have the same dimension in operator=");
}
std::copy(rhs.begin(), rhs.end(), m_data.get());
return *this;
}
template<typename DataType >
boost::call_traits< DataType >::reference Nektar::NekVector< DataType >::operator[] ( unsigned int  i)

Definition at line 261 of file NekVector.cpp.

{
return this->GetData()[i];
}
template<typename DataType >
boost::call_traits< DataType >::const_reference Nektar::NekVector< DataType >::operator[] ( unsigned int  i) const

Definition at line 347 of file NekVector.cpp.

{
return m_data[i];
}
template<typename DataType >
void Nektar::NekVector< DataType >::Resize ( unsigned int  newSize)
protected

Definition at line 419 of file NekVector.cpp.

{
if(m_data.num_elements() < newSize )
{
m_data = Array<OneD, DataType>(newSize);
}
m_size = newSize;
}
template<typename DataType>
void Nektar::NekVector< DataType >::SetData ( const Array< OneD, DataType > &  newData)
protected

Definition at line 416 of file NekVector.cpp.

{ m_data = newData; }
template<typename DataType >
void Nektar::NekVector< DataType >::SetSize ( unsigned int  s)
protected

Definition at line 410 of file NekVector.cpp.

{ m_size = s; }
template<typename DataType >
void Nektar::NekVector< DataType >::SetWrapperType ( PointerWrapper  p)
protected

Definition at line 413 of file NekVector.cpp.

{ m_wrapperType = p; }
template<typename DataType>
void Nektar::NekVector< DataType >::SetX ( typename boost::call_traits< DataType >::const_reference  val)

Definition at line 288 of file NekVector.cpp.

References ASSERTL1.

{
ASSERTL1(this->GetDimension() >= 1, "Invalid use of NekVector::SetX");
this->GetData()[0] = val;
}
template<typename DataType>
void Nektar::NekVector< DataType >::SetY ( typename boost::call_traits< DataType >::const_reference  val)

Definition at line 295 of file NekVector.cpp.

References ASSERTL1.

{
ASSERTL1(this->GetDimension() >= 2, "Invalid use of NekVector::SetX");
this->GetData()[1] = val;
}
template<typename DataType>
void Nektar::NekVector< DataType >::SetZ ( typename boost::call_traits< DataType >::const_reference  val)

Definition at line 302 of file NekVector.cpp.

References ASSERTL1.

{
ASSERTL1(this->GetDimension() >= 3, "Invalid use of NekVector::SetX");
this->GetData()[2] = val;
}
template<typename DataType >
boost::call_traits< DataType >::reference Nektar::NekVector< DataType >::x ( )

Definition at line 267 of file NekVector.cpp.

References ASSERTL1.

Referenced by Nektar::Cross(), and Nektar::NekVector< DataType >::NekVector().

{
ASSERTL1(this->GetDimension() >= 1, "Invalid use of NekVector::x");
return (*this)(0);
}
template<typename DataType >
boost::call_traits< DataType >::const_reference Nektar::NekVector< DataType >::x ( ) const

Definition at line 353 of file NekVector.cpp.

References ASSERTL1.

{
ASSERTL1( GetDimension() >= 1, "Invalid use of NekVector::x");
return (*this)(0);
}
template<typename DataType >
boost::call_traits< DataType >::reference Nektar::NekVector< DataType >::y ( )

Definition at line 274 of file NekVector.cpp.

References ASSERTL1.

Referenced by Nektar::Cross(), and Nektar::NekVector< DataType >::NekVector().

{
ASSERTL1(this->GetDimension() >= 2, "Invalid use of NekVector::y");
return (*this)(1);
}
template<typename DataType >
boost::call_traits< DataType >::const_reference Nektar::NekVector< DataType >::y ( ) const

Definition at line 360 of file NekVector.cpp.

References ASSERTL1.

{
ASSERTL1( GetDimension() >= 2, "Invalid use of NekVector::y");
return (*this)(1);
}
template<typename DataType >
boost::call_traits< DataType >::reference Nektar::NekVector< DataType >::z ( )

Definition at line 281 of file NekVector.cpp.

References ASSERTL1.

Referenced by Nektar::Cross(), and Nektar::NekVector< DataType >::NekVector().

{
ASSERTL1(this->GetDimension() >= 3, "Invalid use of NekVector::z");
return (*this)(2);
}
template<typename DataType >
boost::call_traits< DataType >::const_reference Nektar::NekVector< DataType >::z ( ) const

Definition at line 367 of file NekVector.cpp.

References ASSERTL1.

{
ASSERTL1( GetDimension() >= 3, "Invalid use of NekVector::z");
return (*this)(2);
}

Member Data Documentation

template<typename DataType>
Array<OneD, DataType> Nektar::NekVector< DataType >::m_data
private

Definition at line 241 of file NekVector.hpp.

Referenced by Nektar::NekVector< DataType >::NekVector().

template<typename DataType>
unsigned int Nektar::NekVector< DataType >::m_size
private

Definition at line 240 of file NekVector.hpp.

Referenced by Nektar::NekVector< DataType >::NekVector().

template<typename DataType>
PointerWrapper Nektar::NekVector< DataType >::m_wrapperType
private

Definition at line 242 of file NekVector.hpp.

Referenced by Nektar::NekVector< DataType >::NekVector().