richards_evolutive_time.hpp 966 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef RICHARDS_EVOLUTIVE_TIME_HPP
  2. #define RICHARDS_EVOLUTIVE_TIME_HPP
  3. #include "geometry.hpp"
  4. #include "richards.hpp"
  5. namespace Kernel{
  6. class RichardsEvolutiveTime{
  7. private:
  8. static constexpr size_t max_Richards_time_subdivisions=256;
  9. size_t ix;
  10. size_t nZ;
  11. double* Z;
  12. double dX;
  13. double flux_bot;
  14. double* div_w;
  15. void compute_flux_bot();
  16. void compute_div_w();
  17. Richards richards;
  18. public:
  19. //Input
  20. double dt;
  21. double* init_P;
  22. double* previous_P; //relatively to k
  23. double hydr_left;
  24. double l_left;
  25. double Pl_left;
  26. double hydr_middle;
  27. double l_middle;
  28. double Pl_middle;
  29. double hydr_right;
  30. double l_right;
  31. double Pl_right;
  32. //Output
  33. double* P;
  34. double hsat;
  35. bool has_converged;
  36. RichardsEvolutiveTime();
  37. void init(size_t ix,const Geometry* geometry);
  38. void run();
  39. };
  40. inline
  41. RichardsEvolutiveTime::RichardsEvolutiveTime(){
  42. }
  43. }
  44. #endif