⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fdtd1.h

📁 国外一大学教授讲章
💻 H
字号:
#ifndef _STDIO_H         #include <stdio.h>#endif#ifndef _STDLIB_H#include <stdlib.h>#endif                   struct Grid {              double *ez;  double *hy;  int sizeX;  int time, maxTime;  double cdtds;};typedef struct Grid Grid;/* memory allocation macro */#define ALLOC_1D(name,nx,type)                                     \    name = (type *)calloc(nx,sizeof(type));                         \    if (!name) {                                                    \      perror("ALLOC_1D");                                           \      fprintf(stderr,                                               \              "Allocation failed for " #name ". Terminating...\n"); \      exit(-1);                                                     \    }/* macros for accessing arrays and such */#define Hy(MM)    g.hy[MM]   #define Ez(MM)    g.ez[MM]   #define SizeX     g.sizeX    #define Time      g.time#define MaxTime   g.maxTime#define Cdtds     g.cdtds    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -