geometry.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef GEOMETRY_HPP
  2. #define GEOMETRY_HPP
  3. #include <iostream>
  4. #include <limits>
  5. using namespace std;
  6. using Func = double (*)(double);
  7. extern double inf;
  8. //! The Geometry class contains all geometric parameters of the domain.
  9. class Geometry{
  10. public:
  11. //! Geometry constructor
  12. Geometry(double lX,size_t nX,size_t nZ,Func hsoil,Func dhsoil,Func hbot,Func dhbot);
  13. //! Horizontal length of the domain
  14. double lX;
  15. //! Number of horizontal steps
  16. size_t nX;
  17. //! Horizontal step
  18. double dX;
  19. //! Level of the soil depending on X, e.g, hsoil[k]=level of the soil at X=k*dX.
  20. //! Vector of size nX.
  21. double* hsoil;
  22. //! Derivative of the soil depending on X, vector of size nX.
  23. double* dhsoil;
  24. //! Level of the bottom depending on X, e.g, hbot[k]=level of the bottom at X=k*dX.
  25. //! Vector of size nX.
  26. double* hbot;
  27. //! Derivative of the bottom depending on X, vector of size nX.
  28. double* dhbot;
  29. //! Number of vertical step at a given X, vector of size nX.
  30. size_t* nZ;
  31. //! Vertical step at a given X, vector of size nX.
  32. double* dZ;
  33. //! Vertical considered positions at a given X, vector of vectors of size nX. For each k, Z[k] is a vector of size nZ[k]
  34. double** Z;
  35. };
  36. #endif