material.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. /* material.h: The header file for declaring the functions that are used
  17. * to define the ez, hx and hy field update coefficients. Also a
  18. * function to initialize the parameters used by the other functions. */
  19. #ifndef _MATERIAL_H
  20. #define _MATERIAL_H
  21. // Coefficients used when updating the ez-field
  22. double ezCe(int mm, int nn, int choice);
  23. double ezCh(int mm, int nn, int choice);
  24. // Coefficients used when updating the hx-field
  25. double hxCe(int mm, int nn, int choice);
  26. double hxCh(int mm, int nn, int choice);
  27. // Coefficients used when updating the hy-field
  28. double hyCe(int mm, int nn, int choice);
  29. double hyCh(int mm, int nn, int choice);
  30. void materialInit(int sizeX, int sizeY, double cdtds, double imp0);
  31. #endif