N_heatflow.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*****************************************************************************
  2. *
  3. * MODULE: Grass PDE Numerical Library
  4. * AUTHOR(S): Soeren Gebbert, Berlin (GER) Dec 2006
  5. * soerengebbert <at> gmx <dot> de
  6. *
  7. * PURPOSE: Calculation of heatflow
  8. * part of the gpde library
  9. *
  10. * COPYRIGHT: (C) 2000 by the GRASS Development Team
  11. *
  12. * This program is free software under the GNU General Public
  13. * License (>=v2). Read the file COPYING that comes with GRASS
  14. * for details.
  15. *
  16. *****************************************************************************/
  17. #ifndef _N_HEATFLOW_H_
  18. #define _N_HEATFLOW_H_
  19. #include "N_pde.h"
  20. typedef struct
  21. {
  22. N_array_3d *t; /*temperature */
  23. N_array_3d *t_start; /*temperature start conditions */
  24. N_array_3d *gamma_x; /*x part of the gamma tensor */
  25. N_array_3d *gamma_y; /*y part of the gamma tensor */
  26. N_array_3d *gamma_z; /*z part of the gamma tensor */
  27. N_array_3d *q; /*sources and sinks */
  28. N_array_3d *rho; /*density */
  29. N_array_3d *c; /*c */
  30. N_array_3d *status; /*active/inactive/dirichlet cell status */
  31. double dt; /*calculation time */
  32. } N_heatflow_data3d;
  33. typedef struct
  34. {
  35. N_array_2d *t; /*temperature */
  36. N_array_2d *t_start; /*temperature start conditions */
  37. N_array_2d *gamma_x; /*x part of the gamma tensor */
  38. N_array_2d *gamma_y; /*y part of the gamma tensor */
  39. N_array_2d *q; /*sources and sinks */
  40. N_array_2d *rho; /*density */
  41. N_array_2d *c; /*c */
  42. N_array_2d *status; /*active/inactive/dirichlet cell status */
  43. double dt; /*calculation time */
  44. } N_heatflow_data2d;
  45. extern N_data_star *N_callback_heatflow_3d(void *heatdata,
  46. N_geom_data * geom,
  47. int depth, int row, int col);
  48. extern N_data_star *N_callback_heatflow_2d(void *heatdata,
  49. N_geom_data * geom, int row,
  50. int col);
  51. extern N_heatflow_data3d *N_alloc_heatflow_data3d(int depths, int rows,
  52. int cols);
  53. extern N_heatflow_data2d *N_alloc_heatflow_data2d(int rows, int cols);
  54. extern void N_free_heatflow_data3d(N_heatflow_data3d * data);
  55. extern void N_free_heatflow_data2d(N_heatflow_data2d * data);
  56. #endif