grid1dez.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. 2D FDTD simulator
  3. Copyright (C) 2019 Emilia Blåsten
  4. This program is free software: you can redistribute it and/or
  5. modify it under the terms of the GNU Affero General Public License
  6. as published by the Free Software Foundation, either version 3 of
  7. the License, or (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public
  13. License along with this program. If not, see
  14. <http://www.gnu.org/licenses/>.
  15. */
  16. /* grid1dez.h: The header file for Grid1D and its functions. The
  17. * functions themselves are defined in the corresponding .c file.*/
  18. #ifndef _GRID1DEZ_H
  19. #define _GRID1DEZ_H
  20. struct Grid1D {
  21. double *hy, *hyUpdateHcoeff, *hyUpdateEcoeff;
  22. double *ez, *ezUpdateHcoeff, *ezUpdateEcoeff;
  23. int sizeX;
  24. int time, maxTime;
  25. double cdtds;
  26. };
  27. typedef struct Grid1D Grid1D;
  28. Grid1D *gridCreate1d(int sizeX);
  29. void gridInit1d(Grid1D *g, int time, int maxTime, double cdtds);
  30. void gridDestroy1d(Grid1D *g);
  31. #endif