Droplet Lagrangian Transient One-dimensional Reacting Code Implementation of both liquid and gas phase governing equations.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

47 rindas
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