• 大小: 8KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-04
  • 语言: C/C++
  • 标签: FDTD  偶极子  C程序  

资源简介

本资源给出了完整的FDTD偶极子仿真的c语言程序,并附带数据处理的matlab程序

资源截图

代码片段和文件信息

/* 3D simulation with dipole source at center of grid. */

#include “fdtd-alloc.h“
#include “fdtd-macro.h“ 
#include “fdtd-proto.h“
#include “ezinc.h“

int main()
{
  Grid *g;

  ALLOC_1D(g 1 Grid); // allocate memory for grid structure
  gridInit(g);        // initialize 3D grid

  abcInit(g);         // initialize ABC
  ezIncInit1(g);
  snapshot3dInit(g);  // initialize snapshots


  /* do time stepping */
  for (Time = 0; Time < MaxTime; Time++) {
    updateH(g);       // update magnetic fields 
    updateE(g);       // update electric fields 
    //Ez(center_X-1 center_Y-1 center_Z) += ezInc1(Time 0);
Ez(center_X-1 center_Y-1 center_Z-1) += ezInc1(Time 0);
    abc(g);           // apply ABC
    snapshot3d(g);    // take a snapshot (if appropriate)
  

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4039  2013-12-17 10:22  FDTD偶极子\creat_fig.m

     文件        845  2013-12-16 13:43  FDTD偶极子\3ddemo.c

     文件       4711  2009-11-11 20:53  FDTD偶极子\abc3dfirst.c

     文件       1445  2013-12-15 12:36  FDTD偶极子\ezinc.c

     文件       2816  2013-12-16 17:02  FDTD偶极子\grid3d.c

     文件       4670  2013-12-17 02:50  FDTD偶极子\snapshot3d.c

     文件       4954  2013-12-16 08:08  FDTD偶极子\update3d.c

     文件        305  2013-12-15 12:36  FDTD偶极子\ezinc.h

     文件       1649  2007-10-30 01:08  FDTD偶极子\fdtd-alloc.h

     文件        417  2007-10-30 01:17  FDTD偶极子\fdtd-grid.h

     文件       5182  2013-12-15 12:34  FDTD偶极子\fdtd-macro.h

     文件        292  2013-12-15 12:40  FDTD偶极子\fdtd-proto.h

     目录          0  2013-12-18 09:12  FDTD偶极子

----------- ---------  ---------- -----  ----

                31325                    13


评论

共有 条评论