TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
PrePostNN.h
1/****************************************************************************
2* Copyright (c) 2023, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15#ifndef PrePostNN_included
16#define PrePostNN_included
17#include <string>
18#include <vector>
19
20using namespace std;
21
22enum pp_lambda {INDEFL,LNORM,LU,LUS};
23enum pp_T {INDEFT,TF,TR};
24
26{
27public:
28 PrePostNN(string filename);
29 ~PrePostNN();
30
31 void AllDisplay();
32
33 vector<double> get_alpha() {return alpha;}
34 vector<double> get_lmean() {return lmean;}
35 vector<double> get_lmax() {return lmax;}
36 vector<double> get_tfn() {return tfn;}
37 double get_bsigma() {return bsigma;}
38 double get_t_thresh() {return t_thresh;}
39 vector<vector<double>> get_lambda_au() {return lambda_au;}
40 vector<vector<double>> get_lambda_as() {return lambda_as;}
41 enum pp_lambda get_ppl() {return ppl;}
42 enum pp_T get_ppt() {return ppt;}
43 vector<int> get_ilambda() {return ilambda;}
44 vector<int> get_iT() {return iT;}
45
46private:
47 void display(string tag,vector<double> vec);
48 void display(string tag,vector<int> vec);
49 void display(string tag,vector<vector<double>> mat);
50 string trim(const std::string& str, const std::string& whitespace = " \t");
51 vector<double> ReadDataFromLine(string buffer,string tag,size_t npos);
52 double ReadOneDataFromLine(string buffer,string tag,size_t npos);
53 enum pp_T ReadPPTFromLine(string buffer,string tag,size_t npos);
54 enum pp_lambda ReadPPLFromLine(string buffer,string tag,size_t npos);
55 vector<int> ReadIndexFromLine(string buffer,string tag,size_t npos);
56 vector<vector<double>> ReadDataFromSeveralLines(ifstream& f,int nblines);
57
58 vector<double> alpha;
59 vector<double> lmean;
60 vector<double> lmax;
61 vector<double> tfn;
62 double bsigma;
63 double t_thresh;
64 vector<vector<double>> lambda_au;
65 vector<vector<double>> lambda_as;
66 enum pp_lambda ppl;
67 enum pp_T ppt;
68 vector<int> ilambda;
69 vector<int> iT;
70
71};
72
73#endif
vector< double > get_alpha()
Definition PrePostNN.h:33
void AllDisplay()
vector< vector< double > > get_lambda_as()
Definition PrePostNN.h:40
vector< double > get_tfn()
Definition PrePostNN.h:36
enum pp_lambda get_ppl()
Definition PrePostNN.h:41
vector< double > get_lmax()
Definition PrePostNN.h:35
vector< double > get_lmean()
Definition PrePostNN.h:34
vector< vector< double > > get_lambda_au()
Definition PrePostNN.h:39
double get_t_thresh()
Definition PrePostNN.h:38
double get_bsigma()
Definition PrePostNN.h:37
enum pp_T get_ppt()
Definition PrePostNN.h:42
vector< int > get_ilambda()
Definition PrePostNN.h:43
vector< int > get_iT()
Definition PrePostNN.h:44
PrePostNN(string filename)
Definition PrePostNN.cpp:23