all_vertical_richards.hpp 947 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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** init_P; //P_0
  18. double** previous_P; //P_{k-1}
  19. double* hydr;
  20. double* l;
  21. double* Pl;
  22. double* Psoil;
  23. //Output
  24. double** P; //P_k
  25. double* hsat;
  26. bool has_converged;
  27. AllVerticalRichards();
  28. void init(const Geometry* geometry,double** pumps);
  29. void init_indice_x_Richards();
  30. void update_indice_x_Richards();
  31. void compute_hsat();
  32. void run();
  33. };
  34. inline
  35. AllVerticalRichards::AllVerticalRichards(){
  36. richards_evolutive_time=nullptr;
  37. }
  38. }
  39. #endif