Nalu
Nalu: a generalized unstructured massively parallel low Mach flow code designed to support a variety of energy applications of interest (most notably Wind ECP) built on the Sierra Toolkit and Trilinos solver Tpetra/Epetra stack. The open source BSD, clause 3 license model has been chosen for the code base. See LICENSE for more information. http://NaluCFD.org
Functions.h
Go to the documentation of this file.
1 #ifndef FUNCTIONS_H
2 #define FUNCTIONS_H
3 
4 #include <vector>
5 
6 namespace sierra {
7 namespace nalu {
8 
9 //============================================================================
17 //============================================================================
24 double errorf( const double x );
25 
26 //============================================================================
29 double errorfc( const double x );
30 
31 //============================================================================
37 double inv_errorf( const double x );
38 
39 //============================================================================
51 double F_chi( const double Z );
52 
53 //============================================================================
57 class FChi {
58  public:
59  FChi(){};
60  ~FChi(){};
61 
62  double query( const double Z );
63 };
64 
65 //============================================================================
68 double F_gamma( const double Z, const double Z_st );
69 
70 double F_gamma( const std::vector<double> & Z,
71  std::vector<std::vector<double> > Z_st, // local copy
72  std::vector<double> gamma_mas_st ); // local copy
73 
74 //============================================================================
78 class FGamma {
79  public:
80  explicit FGamma( const int nMixFrac ) { zBuf_.resize( nMixFrac, 0.0 ); }
81  ~FGamma(){};
82 
83  void setZStoich( const std::vector<std::vector<double> > & zStoich )
84  { zStoich_ = zStoich; }
85  void setGammaMaxStoich( const std::vector<double> & gammaMaxStoich )
86  { gammaMaxStoich_ = gammaMaxStoich; }
87  double query( const double * Z ) const;
88 
89  private:
90  mutable std::vector<double> zBuf_;
91  std::vector<std::vector<double> > zStoich_;
92  std::vector<double> gammaMaxStoich_;
93 };
94 
95 } // end nalu namespace
96 } // end sierra namespace
97 
98 #endif
double inv_errorf(const double x)
Compute the inverse error function using Newton&#39;s method.
Definition: Functions.C:80
Definition: ABLForcingAlgorithm.C:26
Class to wrap the F_chi() function with an interface that is compatible with our Functor implementati...
Definition: Functions.h:57
double F_chi(const double Z)
Compute the quantity:
Definition: Functions.C:172
void setGammaMaxStoich(const std::vector< double > &gammaMaxStoich)
Definition: Functions.h:85
void setZStoich(const std::vector< std::vector< double > > &zStoich)
Definition: Functions.h:83
#define Z
std::vector< std::vector< double > > zStoich_
Definition: Functions.h:91
std::vector< double > gammaMaxStoich_
Definition: Functions.h:92
double query(const double Z)
Class to wrap the F_chi() function with an interface that is compatible with our Functor implementati...
Definition: Functions.C:183
double errorfc(const double x)
Compute the complementary error function using series solutions.
Definition: Functions.C:69
~FGamma()
Definition: Functions.h:81
double F_gamma(const std::vector< double > &Zpoint, std::vector< std::vector< double > > Z_st, std::vector< double > gamma_st)
Compute the value of F_gamma (not Gamma itself) for one or two mixture fractions. ...
Definition: Functions.C:224
FChi()
Definition: Functions.h:59
double errorf(const double x)
This file contains generic mathematical functions that are needed at run-time by our Converter classe...
Definition: Functions.C:28
Class to wrap the F_gamma() function with an interface that is compatible with our Functor implementa...
Definition: Functions.h:78
~FChi()
Definition: Functions.h:60
FGamma(const int nMixFrac)
Definition: Functions.h:80
std::vector< double > zBuf_
Definition: Functions.h:90