* hfp2d α׷ ޴ (2004 10 20)
 : ֱ⿵ <kchoi@ihanyang.ac.kr>

1. α׷  ־ ϴ  

  1.1 system.info

    꿡 ʿ    δ . α׷  Ͽ  
        оδ.    α׷ 
     ʴ´. 

    @  ׸  

      Number_of_materials 3 
	======================================================================
	: 꿡 Ǵ  ڷ  ϳ  ޵ȴ. 
	     ̿ ݻ縦 Ѵٰ ϸ  
	   2 Ǹ  ݼ ̿ ݻ縦 ϰ  
	  ٰ Ѵٸ ̶   2 ȴ. 
	======================================================================
      
      0.permitivity   1.0
      0.permiability  1.0
      0.r_rate_elec   0.0
      0.p_freq_elec   0.0
      0.r_rate_mag    0.0
      0.p_freq_mag    0.0
	======================================================================
	:  տ پִ ڴ ȣ̴. ,  ׸ Ÿ  
	  ù° 0   ̴.     
	  0  ȣ οؾ Ѵ.    3 
	   2.xxx  ̸ ٴ  ǥ  Ѵ. 

	  + 󼼻 
	    0.permitivity : 0  permitivity 
	    0.permiability : 0  permiability 
	    0.r_rate_elec : 0  gamma 
	    0.p_freq_elec : 0  ö frequency 
	    0.r_rate_mag  : 0  magnetic gamma 
	    0.p_freq_mag  : 0  magnetic ö frequency 

	    * gamma  plasma frequency  ü   0.0  
	      ϸ ݼ 쿡  ش.  ݼ   
	       ,  permitivity permiability  1.0  Ѵ.
	    * magnetic gamma  plasma frequency   meta-materials 
	      Ҷ  ָ ̿   0.0  Ѵ. 
	======================================================================

      Cells_in_X      1500
      Cells_in_Y      1000
      Cells_in_PML    32
      Size_of_cell    5
	======================================================================
	:      PML  ,  ũ  ϴ 
	  κ̸ PML     Ư Ȳ  
	  Ư  ʿ . 

	  + 󼼼 
	    Cells_in_X : X    	
	    Cells_in_Y : Y    
	    Cells_in_PML : PML   
	    Size_of_cell  :  ϳ ũ. nm ̴.    
			     ũ X 7.5um, Y 5um ̴.
	======================================================================

      Source_type     cw
      Source_shape    beam
      Source_mode     TE
      X-position      100
      Y-position      400
      Center_of_pulse 50
      Width_of_pulse  5
      Width_of_beam   200
      Omega           1.2161e+15
      theta           0.0;
	======================================================================
	: input source  parameter  ִ κ̴. 

	  + 󼼼
	    Source_type  : ҽ  ϴ κ cw(continuous wave),
			   pulse  ΰ Է¹ ִ. 
	    Source_shape : ҽ  point, gaussian  ΰ ִ.
	    Source_mode  : TE  TM  ΰ Ѵ. Ϲ 
			    ణ ٸ TE ȮϰԴ TEz, TM 
			   TMz ̴. , TE  Zθ H field  ְ 
			   X,Yθ E field ִ. TM  Zθ E 
			   field  ְ X,Yθ H field  ִ ̴.
	    X-position   : input source X ߽ ġ cell  order̴. 
	    Y-position   : input source Y ߽ ġ cell  order̴. 
	    Center_of_pulse : pulse Է¶ pulse  ߽ ġ time-step 
			      order ̴. 
	    Width_of_pulse : pulse Է  pulse  decay length   
			     time-step order̴. 
	    Width_of_beam : gaussian Է¶ gaussian beam  width  cell 
			     order̴. 
	    Omega	  : input source  angular frequency ̴. 
	    theta	  : gaussian ϶ beam  İ̴. 0.0 ̸  
			     ϸ 90  ʴ´. 
	======================================================================

      x_of_1st_point  10
      y_of_1st_point  10
      x_of_2nd_point  100
      y_of_2nd_point  100
	======================================================================
	:    field  ̴.  簢  
	  Ǹ  ,  ϴ   ϰ Ǿ ִ. 

	  + 󼼼
	    x_of_1st_point :   X ǥ 
	    y_of_1st_point :   Y ǥ 
	    x_of_2nd_point :  ϴ X ǥ 
	    y_of_2nd_point :  ϴ Y ǥ 
	======================================================================

      MAXTIMESTEP     1000
      R_time_start    99
      R_time_end      99
	======================================================================
	: ü  ð ð  ͸ Ϸ   ϴ 
	  parameter̴. 

	  + 󼼼 
	    MAXTIMESTEP : ü ð time-step order̴. 
	    R_time_start : ð  ͸ Ϸ    
			   ϴ ð time-step order̴. 
	    R_time_end : ð  ͸ Ϸ    
			  ð time-step order̴. 
	======================================================================


  1.2 system.dat

    ڰ   Ϸ 0  ϴ ȣ 迭 Ǿ 
    ִ ؽƮ ̴.      ȣ 迭Ǿ 
    ־ ϸ  ȣ ̳   ־ Ѵ. 

  1.3 node#.dat

    system.dat  Ŭ    Ϸ #   ȣ 
    üȴ.     make-structure ɿ    
    ̿ ؼ  ǿ  ̴. 



2. α׷   

  2.1 lamboot 

    α  Ŀ Ŭ    带 νĽ  
    Ѵ. lamboot  ٷ  ̴.    Ȩ丮 
    ⺻ lamhosts  ؽƮ  ϸ    . 

    van     cpu=1
    #node1  cpu=2
    node2   cpu=2
    node3   cpu=2
    node4   cpu=2
    #node5  cpu=2
    node6   cpu=2
    node7   cpu=2
    node8   cpu=2

    van  Ŭ ý  ̱ ý̰    
     CPU ý̴. #  ּó Ǿ ִ   ߻ؼ 
     ʴ  ̷ ּóϸ  ν ʴ´. ̿ 
       带 νĽŰ  lamboot -v lamhosts  
    ̸ ϸ    Ÿ. 

    [xenus@van:~]$ lamboot -v lamhosts 

    LAM 7.0.6/MPI 2 C++/ROMIO - Indiana University

    n-1<6611> ssi:boot:base:linear: booting n0 (van)
    n-1<6611> ssi:boot:base:linear: booting n1 (node2)
    n-1<6611> ssi:boot:base:linear: booting n2 (node3)
    n-1<6611> ssi:boot:base:linear: booting n3 (node4)
    n-1<6611> ssi:boot:base:linear: booting n4 (node6)
    n-1<6611> ssi:boot:base:linear: booting n5 (node7)
    n-1<6611> ssi:boot:base:linear: booting n6 (node8)
    n-1<6611> ssi:boot:base:linear: finished
    [xenus@van:~]$ 

    ̿Ͱ   ǰ  忡 lam  booting Ǹ 
     ν  ̴. 


  2.2 make-structure 

     ڵ ڽ   ȣ 迭 ̷ ؽƮ  
      ̸  丮 ־ΰ make-structure   
    Ѵ.   system.info Ͽ 걸 X,Y cell  о鿩 
    ڰ  ϰ   ġѴٸ   node#.dat Ϸ 
    ȯŲ.  ġϰ   Ǹ   ȭ 
    Ÿ. 

    [xenus@van:~/test/hfp2d]$ make-structure 
    node1.dat generated.
    node2.dat generated.
    node3.dat generated.
    node4.dat generated.
    node5.dat generated.
    node6.dat generated.
    node7.dat generated.
    node8.dat generated.
    node9.dat generated.
    node10.dat generated.
    node11.dat generated.
    node12.dat generated.
    [xenus@van:~/test/hfp2d]$ 

     ġ ʴ´ٸ    Ÿ. 

    [xenus@van:~/test/hfp2d]$ make-structure 
    Structure size not matched!
    [xenus@van:~/test/hfp2d]$


  2.3 hfp2d 

    α׷  ̸ hfp2d ̴.   ŬͿ α׷ 
      鿡 ϵ ϱ ؼ Ϲ ó ׳ Է 
    ؼ ȵȴ. ݵ   Է ؾ Ѵ. 

    [xenus@van:~/test/hfp2d]$ mpirun -np 13 hfp2d

     κ ϸ, mpirun  hfp2d  Ľýۿ ϵ  
    ϰڴٴ ǹ̴. -np 13   CPU  13  ̸ hfp2d 
    α׷ ̴.  hfp2d  CPU  13 ýۿ  
    ϵ Ǿ Ƿ ݵ     Ѵ.   
      ȭ鿡 α׷ ν  µǸ  ϴܿ  
    Ϸ  %  ŵȴ.  α׷   ̻ ־  
    Ḧ ؾ  쿡 Ctrl+C Ű  ȴ. 

    [xenus@van:~/test/hfp2d]$ mpirun -np 13 hfp2d

    # Part of configurations of materials

    * materials[0].permitivity = 1.000000
    * materials[0].permiability = 1.000000
    * materials[0].r_rate_elec = 0.000000e+00
    * materials[0].p_freq_elec = 0.000000e+00
    * materials[0].r_rate_mag = 0.000000e+00
    * materials[0].p_freq_mag = 0.000000e+00

    * materials[1].permitivity = 2.250000
    * materials[1].permiability = 1.000000
    * materials[1].r_rate_elec = 0.000000e+00
    * materials[1].p_freq_elec = 0.000000e+00
    * materials[1].r_rate_mag = 0.000000e+00
    * materials[1].p_freq_mag = 0.000000e+00

    * materials[2].permitivity = 1.000000
    * materials[2].permiability = 1.000000
    * materials[2].r_rate_elec = 1.255224e+14
    * materials[2].p_freq_elec = 1.141498e+16
    * materials[2].r_rate_mag = 0.000000e+00
    * materials[2].p_freq_mag = 0.000000e+00

    # part of informations of geometry
    * Cells_in_X = 1200
    * Cells_in_Y = 1000
    * Cells_in_PML = 32
    * Size_of_cell = 5.000000

    # Part of informations of input current source
    * Source_type = cw
    * Source_shape = beam
    * Source_mode= beam


    * X-position = 100
    * Y-position = 400
    * Center_of_pulse = 50
    * Width_of_pulse = 5
    * Width_of_beam = 200
    * Omega = 1.216100e+15
    * Theta = 0.000000

    # Part of observing area
    * X_of_1st_ob_point= 10
    * Y_of_1st_ob_point= 10
    * X_of_2nd_ob_point= 100
    * Y_of_2nd_ob_point= 100

    # Part of calculation time
    * MAXTIMESTEP= 2000
    * R_time_start= 99
    * R_time_end= 99
    =================================
    Program Start
    =================================
    System information : 
    - Mode : TE
    - Max time-step : 2000
    - Calculation space width(number of cells) : 1200
    - Calculation space height(number of cells) : 1000
    - PML depth(number of cells) : 32
    - Input beam frequency : 1.935483e+14
    - Input beam lambda : 1.548928e-06
    - CELL SIZE : 5.000000e-09
    - Delta t : 1.150905e-17
    - Node length : 100
    - source_xp : 0
    - source_yp : 400
    - w_of_beam : 200
    - Bp : 2
    =================================
    iterations =  51%  complete    \



3.  ϵ 

     α׷   time step  field  
  poynting vector  Ѵ. 

  3.1 Z-field.dat

    Z  field  ؽƮ 迭  ؽƮ ̴.   
    ҷ鿩  мϸ ȴ. ؽƮ Ǿ Ƿ   
    м  ϴ ν  ̴. 

  3.2 poynting_vector.dat

    poynting vecotr ̴.   ؽƮ Ǿ Ƿ   
    м  ϴ ν  ̴. 

  3.3    ð   

    *  ޴ ۼ * 


4. ˾Ƶθ   
    
  FDTD  Ϲ  ð ɸ ̴.   
  Ͽ α׷ ų    α׷ â ־ ϸ  
     α׷ ǰų Ʈũ     
  α׷  Ǿ  Ǿ   . ̸ ϱ  
  α׷ ׶      ٽ ؼ  
  ȭ ҷ  ִ   ϴ. ̴ screen ̸ ɾ 
  ؼ ϴ.   ũ ٸ ʴ. ٸ ɾ տ screen 
  ̶ ָ ȴ. 

  [xenus@van:~/test/hfp2d]$ screen mpirun -np 13 hfp2d

  ̷ ָ, ׳   Ȱ ȭ . ٸ, 
  Ctrl+a,d(Ctrl Ű  ִ ¿ a,d   ) Էϸ 
  ٽ   Ǵµ ̶ exit  ְ  α׷ ص 
  α׷  ʴ´. ߿ ٽ  Ŀ, 

  [xenus@van:~/test/hfp2d]$ screen -r 

  ̶  ָ  ȭ ٽ ȣǾ ȭ鿡 Ÿ. ̶ 

  [xenus@van:~/test/hfp2d]$ screen -r
  There is no screen to be resumed.
  [xenus@van:~/test/hfp2d]$ 

  ̶ Ÿ    ̹Ƿ    мϸ 
  ȴ. 


5.  ŬͿ  ׸Ϸ   

    мϴ  ڽ ͼ ̵  .  
   field     Ŷ ϰ ׸Ϸ   
  ִ. hdf5 ̺귯 ̿ϴ ε ŵϰ   .

  [xenus@van:~/test/hfp2d]$ cat Z-field.dat | h5fromtxt field.h5

    Z-field.dat ؽƮ  hdf5  Ϸ  ش. 

  [xenus@van:~/test/hfp2d]$ h5topng -c bluered field.h5 

    field.h5  hdf5   png  ׸Ϸ  
  ش. poynting_vector  ׸ bluered ſ hot  ִ   
  . ̿Ͱ ϰ   丮 field.png  ̸ ׸ 
  Ǵµ  ׸ field   Ÿ ׸ ̴. field.h5 
   ϸ Ȯڸ .h5  Ѵٸ  ϵ . 


6.  ŬͿ     

    *  ޴ ۼ * 



