35 #ifndef NEKTAR_LIB_UTILITIES_NEK_VECTOR_HPP
36 #define NEKTAR_LIB_UTILITIES_NEK_VECTOR_HPP
50 #include <type_traits>
51 #include <boost/call_traits.hpp>
55 template<
typename DataType>
72 typename boost::call_traits<DataType>::const_reference
y,
73 typename boost::call_traits<DataType>::const_reference
z);
188 template<
typename DataType>
193 template<
typename DataType>
198 template<
typename DataType>
202 template<
typename DataType>
206 template<
typename LhsDataType,
207 typename RhsDataType>
213 template<
typename ResultDataType,
typename InputDataType>
218 template<
typename ResultDataType,
typename InputDataType>
223 template<
typename ResultDataType,
typename InputDataType>
227 template<
typename ResultDataType,
typename InputDataType>
231 template<
typename DataType>
240 template<
typename ResultDataType,
typename InputDataType>
245 template<
typename ResultDataType>
249 template<
typename DataType>
255 template<
typename ResultDataType,
typename InputDataType>
260 template<
typename ResultDataType,
typename InputDataType>
264 template<
typename DataType,
typename InputDataType>
269 template<
typename ResultDataType,
typename InputDataType>
274 template<
typename ResultDataType>
278 template<
typename DataType>
283 template<
typename ResultDataType,
typename InputDataType>
288 template<
typename ResultDataType,
typename InputDataType>
293 template<
typename DataType>
298 template<
typename DataType>
305 template<
typename DataType>
312 template<
typename DataType>
319 template<
typename DataType>
326 template<
typename DataType>
330 return Add(lhs, rhs);
333 template<
typename DataType>
340 template<
typename DataType>
343 template<
typename DataType>
346 template<
typename DataType>
349 template<
typename DataType>
352 template<
typename DataType>
355 template<
typename DataType>
358 template<
typename DataType>
360 const NekVector<DataType>& rhs);
362 template<
typename DataType>
366 template<
typename DataType>
369 template<
typename DataType>
372 template<
typename DataType>
375 template<
typename DataType>
378 template<
typename DataType>
384 template<
typename DataType>
387 template<
typename DataType>
389 const NekVector<DataType>& rhs);
390 template<
typename DataType>
#define LIB_UTILITIES_EXPORT
1D Array of constant elements with garbage collection and bounds checking.
boost::call_traits< DataType >::reference x()
void SetZ(typename boost::call_traits< DataType >::const_reference val)
void SetWrapperType(PointerWrapper p)
boost::call_traits< DataType >::reference operator[](unsigned int i)
Array< OneD, DataType > & GetData()
NekVector< DataType > Cross(const NekVector< DataType > &rhs) const
Array< OneD, DataType > & GetPtr()
unsigned int GetDimension() const
Returns the number of dimensions for the point.
NekVector< DataType > & operator+=(const NekVector< DataType > &rhs)
NekVector< DataType > & operator=(const NekVector< DataType > &rhs)
PointerWrapper GetWrapperType() const
void SetY(typename boost::call_traits< DataType >::const_reference val)
Array< OneD, DataType > m_data
void Resize(unsigned int newSize)
PointerWrapper m_wrapperType
DataType Dot(const NekVector< DataType > &rhs) const
unsigned int GetRows() const
std::string AsString() const
void SetSize(unsigned int s)
NekVector< DataType > & operator/=(typename boost::call_traits< DataType >::const_reference rhs)
boost::call_traits< DataType >::reference y()
NekVector< DataType > & operator*=(typename boost::call_traits< DataType >::const_reference rhs)
const DataType * const_iterator
DataType InfinityNorm() const
boost::call_traits< DataType >::reference operator()(unsigned int i)
Returns i^{th} element.
DataType Magnitude() const
NekVector< DataType > & operator-=(const NekVector< DataType > &rhs)
NekVector()
Creates an empty vector.
void SetData(const Array< OneD, DataType > &newData)
boost::call_traits< DataType >::reference z()
NekVector< DataType > operator-() const
void SetX(typename boost::call_traits< DataType >::const_reference val)
The above copyright notice and this permission notice shall be included.
void Normalize(NekVector< DataType > &v)
std::string AsString(const NekVector< DataType > &v)
bool operator==(const Array< OneD, T1 > &lhs, const Array< OneD, T2 > &rhs)
void InvertInPlace(NekDouble &v)
SNekMat SNekMat void SubtractEqual(NekMatrix< DataType, StandardMatrixTag > &result, const NekMatrix< RhsDataType, RhsMatrixType > &rhs)
void MultiplyInvertedLhs(NekVector< ResultDataType > &result, const NekDouble &lhs, const NekVector< InputDataType > &rhs)
NekVector< DataType > operator*(const NekMatrix< LhsDataType, MatrixType > &lhs, const NekVector< DataType > &rhs)
void AddEqualNegatedLhs(NekMatrix< DataType, StandardMatrixTag > &result, const NekMatrix< RhsDataType, RhsMatrixType > &rhs)
SNekMat void AddEqual(NekMatrix< DataType, StandardMatrixTag > &result, const NekMatrix< RhsDataType, RhsMatrixType > &rhs)
DataType InfinityNorm(const NekVector< DataType > &v)
void Divide(NekVector< ResultDataType > &result, const NekVector< InputDataType > &lhs, const NekDouble &rhs)
NekVector< DataType > Negate(const NekVector< DataType > &v)
void Subtract(NekMatrix< DataType, StandardMatrixTag > &result, const NekMatrix< LhsDataType, LhsMatrixType > &lhs, const NekMatrix< RhsDataType, RhsMatrixType > &rhs)
std::vector< DataType > FromString(const std::string &str)
Array< OneD, DataType > operator+(const Array< OneD, DataType > &lhs, typename Array< OneD, DataType >::size_type offset)
void Multiply(NekMatrix< ResultDataType, StandardMatrixTag > &result, const NekMatrix< LhsDataType, LhsMatrixType > &lhs, const ResultDataType &rhs)
void DivideEqual(NekVector< ResultDataType > &result, const NekDouble &rhs)
NekVector< DataType > createVectorFromPoints(const NekPoint< DataType > &source, const NekPoint< DataType > &dest)
void AddNegatedLhs(NekMatrix< DataType, StandardMatrixTag > &result, const NekMatrix< LhsDataType, LhsMatrixType > &lhs, const NekMatrix< RhsDataType, RhsMatrixType > &rhs)
void SubtractEqualNegatedLhs(NekMatrix< DataType, StandardMatrixTag > &result, const NekMatrix< RhsDataType, RhsMatrixType > &rhs)
void NegateInPlace(NekVector< DataType > &v)
DataType Magnitude(const NekVector< DataType > &v)
const NekSingle void MultiplyEqual(NekMatrix< LhsDataType, StandardMatrixTag > &lhs, typename boost::call_traits< LhsDataType >::const_reference rhs)
NekPoint< DataType > operator/(const NekPoint< DataType > &lhs, typename boost::call_traits< DataType >::param_type rhs)
NekVector< DataType > Cross(const NekVector< DataType > &lhs, const NekVector< DataType > &rhs)
void SubtractNegatedLhs(NekMatrix< DataType, StandardMatrixTag > &result, const NekMatrix< LhsDataType, LhsMatrixType > &lhs, const NekMatrix< RhsDataType, RhsMatrixType > &rhs)
std::ostream & operator<<(std::ostream &os, const NekMatrix< DataType, FormType > &rhs)
DataType L2Norm(const NekVector< DataType > &v)
DataType L1Norm(const NekVector< DataType > &v)
NekPoint< DataType > findPointAlongVector(const NekVector< DataType > &lhs, const DataType &t)
bool operator!=(const Array< OneD, T1 > &lhs, const Array< OneD, T2 > &rhs)
NekMatrix< typename NekMatrix< LhsDataType, LhsMatrixType >::NumberType, StandardMatrixTag > operator-(const NekMatrix< LhsDataType, LhsMatrixType > &lhs, const NekMatrix< RhsDataType, RhsMatrixType > &rhs)
PointerWrapper
Specifies if the pointer passed to a NekMatrix or NekVector is copied into an internal representation...
SNekMat SNekMat void Add(NekMatrix< DataType, StandardMatrixTag > &result, const NekMatrix< LhsDataType, LhsMatrixType > &lhs, const NekMatrix< RhsDataType, RhsMatrixType > &rhs)
DataType Dot(const NekVector< DataType > &lhs, const NekVector< DataType > &rhs)