OpenLB 1.7
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
scalarVector.h File Reference
#include <vector>
#include <limits>
#include <iostream>
#include <type_traits>
#include "genericVector.h"
#include "meta.h"
#include "utilities/omath.h"
#include "utilities/oalgorithm.h"
+ Include dependency graph for scalarVector.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  olb::ScalarVector< T, D, IMPL >
 Vector of scalars. More...
 

Namespaces

namespace  olb
 Top level namespace for all of OpenLB.
 

Functions

template<typename T , unsigned D, typename IMPL >
constexpr T olb::norm_squared (const ScalarVector< T, D, IMPL > &a)
 Squared euclidean vector norm.
 
template<typename T , unsigned D, typename IMPL >
constexpr T olb::norm (const ScalarVector< T, D, IMPL > &a)
 Euclidean vector norm.
 
template<typename T , unsigned D, typename IMPL >
bool olb::closeToZero (const ScalarVector< T, D, IMPL > &a)
 Returns true iff all components are within floating point error distance of 0.
 
template<typename T , unsigned D, typename IMPL >
constexpr std::vector< T > olb::toStdVector (const ScalarVector< T, D, IMPL > &a)
 Copies data into a standard vector.
 
template<typename T , unsigned D, typename U , typename IMPL , typename IMPL_ >
constexpr bool olb::operator< (const ScalarVector< T, D, IMPL > &lhs, const ScalarVector< U, D, IMPL_ > &rhs)
 Returns true if all lhs components are smaller than rhs.
 
template<typename T , unsigned D, typename U , typename IMPL , typename IMPL_ >
constexpr bool olb::operator> (const ScalarVector< T, D, IMPL > &lhs, const ScalarVector< U, D, IMPL_ > &rhs)
 Returns true if all lhs components are greater than rhs.
 
template<typename T , unsigned D, typename U , typename IMPL , typename IMPL_ >
constexpr bool olb::operator<= (const ScalarVector< T, D, IMPL > &lhs, const ScalarVector< U, D, IMPL_ > &rhs)
 Returns true if all lhs components are smaller or equal than rhs.
 
template<typename T , unsigned D, typename U , typename IMPL , typename IMPL_ >
constexpr bool olb::operator>= (const ScalarVector< T, D, IMPL > &lhs, const ScalarVector< U, D, IMPL_ > &rhs)
 Returns true if all lhs components are smaller or equal than rhs.
 
template<typename T , unsigned D, typename U , typename IMPL , typename IMPL_ >
constexpr bool olb::lex_smaller (const ScalarVector< T, D, IMPL > &lhs, const ScalarVector< U, D, IMPL_ > &rhs)
 Returns true if lhs is lexicographically smaller than rhs.
 
template<typename T , unsigned D, typename U , typename IMPL , typename IMPL_ >
constexpr bool olb::lex_greater (const ScalarVector< T, D, IMPL > &lhs, const ScalarVector< U, D, IMPL_ > &rhs)
 Returns true if lhs is lexicographically greater than rhs.
 
template<typename T , unsigned D, typename U , typename IMPL , typename IMPL_ >
constexpr bool olb::lex_smaller_eq (const ScalarVector< T, D, IMPL > &lhs, const ScalarVector< U, D, IMPL_ > &rhs)
 Returns true if lhs is lexicographically smaller or equal to rhs.
 
template<typename T , unsigned D, typename U , typename IMPL , typename IMPL_ >
constexpr bool olb::lex_greater_eq (const ScalarVector< T, D, IMPL > &lhs, const ScalarVector< U, D, IMPL_ > &rhs)
 Returns true if lhs is lexicographically greater or equal to rhs.
 
template<typename T , unsigned D, typename IMPL >
std::ostream & olb::operator<< (std::ostream &os, const ScalarVector< T, D, IMPL > &o)
 Print vector entries to ostream in a human-readable fashion.