all_vertical_richards.hpp 974 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef ALL_VERTICAL_RICHARDS_HPP
  2. #define ALL_VERTICAL_RICHARDS_HPP
  3. #include "geometry.hpp"
  4. #include "richards_evolutive_time.hpp"
  5. namespace Kernel{
  6. class AllVerticalRichards{
  7. private:
  8. static constexpr double max_error_x=1e-8;
  9. const Geometry* geometry;
  10. double** pumps;
  11. bool* indice_x_Richards;
  12. RichardsEvolutiveTime* richards_evolutive_time;
  13. public:
  14. //Input
  15. double dt;
  16. double* error_x;
  17. double n1_previous_hydr;
  18. double** init_P; //P_0
  19. double** previous_P; //P_{k-1}
  20. double* hydr;
  21. double* l;
  22. double* Pl;
  23. double* Psoil;
  24. //Output
  25. double** P; //P_k
  26. double* hsat;
  27. bool has_converged;
  28. AllVerticalRichards();
  29. void init(const Geometry* geometry,double** pumps);
  30. void init_indice_x_Richards();
  31. void update_indice_x_Richards();
  32. void compute_hsat();
  33. void run();
  34. };
  35. inline
  36. AllVerticalRichards::AllVerticalRichards(){
  37. richards_evolutive_time=nullptr;
  38. }
  39. }
  40. #endif