antioch-0.4.0
Functions
ascii_parser_unit.C File Reference
#include "antioch/chemical_mixture.h"
#include "antioch/transport_mixture.h"
#include "antioch/ascii_parser.h"
#include <iomanip>
#include <string>

Go to the source code of this file.

Functions

template<typename Scalar >
int tester (const std::string &filename)
 
int main (int argc, char *argv[])
 

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 54 of file ascii_parser_unit.C.

References antioch_error.

55 {
56  // Check command line count.
57  if( argc < 2 )
58  {
59  // TODO: Need more consistent error handling.
60  std::cerr << "Error: Must specify ascii transport input file." << std::endl;
61  antioch_error();
62  }
63 
64  return tester<double>(std::string(argv[1]));
65 }
#define antioch_error()
template<typename Scalar >
int tester ( const std::string &  filename)

Definition at line 35 of file ascii_parser_unit.C.

References Antioch::ASCIIParser< NumericType >::set_ignored_columns(), and Antioch::TransportMixture< CoeffType >::transport_species().

36 {
37 
38  std::vector<std::string> species_list;
39  species_list.push_back("N2");
40  species_list.push_back("O2");
41  species_list.push_back("H2");
42 
43  Antioch::ChemicalMixture<Scalar> chem_mix(species_list);
44 
45  Antioch::ASCIIParser<Scalar> parser(filename,true);
46 
47  parser.set_ignored_columns(std::vector<unsigned int>(1,0));
48 
49  Antioch::TransportMixture<Scalar> tran_mixture( chem_mix, static_cast<Antioch::ParserBase<Scalar>*>(&parser));
50 
51  return tran_mixture.transport_species().empty(); // false is winner
52 }
Class storing chemical mixture properties.
Definition: ascii_parser.h:55
Class storing chemical mixture properties.
A parser is an instance related to a file.

Generated on Thu Jul 7 2016 11:09:47 for antioch-0.4.0 by  doxygen 1.8.8