Droplet Lagrangian Transient One-dimensional Reacting Code Implementation of both liquid and gas phase governing equations.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

47 lines
1.3KB

  1. #ifndef PRINT_DEF
  2. #define PRINT_DEF
  3. #include <string.h> //for strings
  4. #include <stdio.h> //for printf,scanf (library for C)
  5. #include <stdlib.h> //for atoi, atof
  6. #include <string> //C++ header for string
  7. #include <cstring>
  8. #include <iostream>
  9. #include <stdexcept>
  10. #endif
  11. #include <vector>
  12. #include <sstream>
  13. #ifndef PARSE_DEF ```
  14. #define PARSE_DEF
  15. #define MAXBUFLEN 200
  16. void getFromString (const char* buf, int* n);
  17. void getFromString (const char* buf, size_t* n);
  18. void getFromString (const char* buf, double* n);
  19. void getFromString (const char* buf, char* n);
  20. int parseString(FILE* input, const char* keyword, const size_t bufLen, char* n);
  21. template<typename T>
  22. int parseNumber(FILE* input, const char* keyword, const size_t bufLen, T* n);
  23. template<typename T>
  24. int parseArray(FILE* input, const char* keyword, const size_t bufLen,
  25. const size_t arrLen, T y[]);
  26. template<typename T>
  27. int parseDropSpec(FILE* input, const char* keyword, const size_t bufLen,int* dropType, std::vector<T>& dropPara);
  28. template<>
  29. int parseDropSpec<std::string>(FILE* input, const char* keyword, const size_t bufLen,int* dropType, std::vector<std::string>& dropPara);
  30. int parseDrop(FILE* input, const char* keyword,char dropSpec[][10],double dropMole[],const size_t bufLen);
  31. #include "parse.hpp"
  32. #endif