CFL
Auxiliary.hpp
Go to the documentation of this file.
1 // Copyright (c) Dmitry Kramkov, 2000-2006. All rights reserved.
2 
3 #ifndef __cflAuxiliary_hpp__
4 #define __cflAuxiliary_hpp__
5 
6 #include <vector>
7 #include "cfl/Function.hpp"
8 #include "cfl/Error.hpp"
9 
10 
11 
12 
25 namespace cfl
26 {
34 
41  template <class T>
42  const T * begin(const std::valarray<T> & rIn);
43 
52  template <class T>
53  const T * end(const std::valarray<T> & rIn);
54 
61  template <class T>
62  bool equal(const std::valarray<T> & rIn1, const std::valarray<T> & rIn2);
63 
65 
68  class Tridiag
69  {
70  public:
74  Tridiag();
75 
82  Tridiag(const std::valarray<double> & rL,
83  const std::valarray<double> & rD,
84  const std::valarray<double> & rU
85  );
86 
94  void solve(std::valarray<double> & rX) const;
95 
103  void assign(const std::valarray<double> & rL,
104  const std::valarray<double> & rD,
105  const std::valarray<double> & rU
106  );
107  private:
108  std::valarray<double> m_uL, m_uD, m_uU;
109  };
110 
112 }
113 
114 #include "cfl/Inline/iAuxiliary.hpp"
115 #endif // of __cflAuxiliary_hpp__
const T * end(const std::valarray< T > &rIn)
void solve(std::valarray< double > &rX) const
const T * begin(const std::valarray< T > &rIn)
Exceptions in cfl library.
STL class.
bool equal(const std::valarray< T > &rIn1, const std::valarray< T > &rIn2)
Main namespace for cfl library.
Definition: Approx.hpp:22
void assign(const std::valarray< double > &rL, const std::valarray< double > &rD, const std::valarray< double > &rU)
Solver for tridiagonal system of equations.
Definition: Auxiliary.hpp:68
One-dimensional function object in cfl library.