Tutorials:LatticeHOWTO:Library/ja

From ALPS
Revision as of 06:15, 2 March 2012 by Kota (talk | contribs) (Created page with "{{Languages|Tutorials:LatticeHOWTO:Library}} ==格子とグラフのライブラリ== <!-- As similar lattices, finite lattices and graphs will appear in many models and simul…")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


格子とグラフのライブラリ

多くの計算モデルやシミュレーションで、格子やグラフは類似のものが用いられています。ここでは、格子やグラフの情報を”ライブラリ”として生成、使用(シミュレーションの入力パラメータの設定など)する方法を説明します。まず最初に、<LATTICEGRAPH>の定義を4分割します。

<verbatim>
 <LATTICE name="square" dimension="2">
   <BASIS>
     <VECTOR> 1 0 </VECTOR>
     <VECTOR> 0 1 </VECTOR>
   </BASIS>
 </LATTICE>


 <FINITELATTICE name="rectangular periodic" dimension="2">
   <LATTICE ref="square"/>
   <PARAMETER name="L" />
   <PARAMETER name="W" default="L" />
   <EXTENT dimension="1" size="L"/>
   <EXTENT dimension="2" size="W"/>
   <BOUNDARY type="periodic"/>
 </FINITELATTICE>


 <UNITCELL name="complex example" dimension="2" vertices="2">
   <VERTEX id="1" type="0"><COORDINATE> 0.3 0.7 </COORDINATE></VERTEX>
   <VERTEX id="2" type="1"><COORDINATE> 0.6 0.3 </COORDINATE></VERTEX>
   <EDGE><SOURCE vertex="1"/><TARGET vertex="1" offset="1 0"/></EDGE>
   <EDGE><SOURCE vertex="1"/><TARGET vertex="1" offset="0 1"/></EDGE>
   <EDGE><SOURCE vertex="1"/><TARGET vertex="2"/></EDGE>
 </UNITCELL>
 <LATTICEGRAPH>
   <FINITELATTICE ref="rectangular periodic"/>
   <UNITCELL ref="complex example"/>
 </LATTICEGRAPH>

下記の例では、ライブラリとして定義された格子、単一セル(lattices,unit cells)が<LATTICEGRAPH>要素で参照、使用されています。<LATTICE>,<FINITELATTICE>,<UNITCELL>, <GRAPH>、<LATTICEGRAPH>の中でも同様に"ライブラリ"が使用されています。

  <LATTICES>
  <LATTICE name="chain lattice" dimension="1">
   <BASIS><VECTOR>1</VECTOR></BASIS>
  </LATTICE>
  <LATTICE name="square lattice" dimension="2">
   <PARAMETER name="a" default="1"/>
   <BASIS><VECTOR>a 0</VECTOR><VECTOR>0 a</VECTOR></BASIS>
  </LATTICE>
  <LATTICE name="simple cubic lattice" dimension="3">
   <PARAMETER name="a" default="1"/>
   <BASIS>
     <VECTOR>a 0 0</VECTOR>
     <VECTOR>0 a 0</VECTOR>
     <VECTOR>0 0 a</VECTOR>
   </BASIS>
  </LATTICE>
  <UNITCELL name="simple1d" dimension="1">
   <VERTEX/>
   <EDGE><SOURCE vertex="1" offset="0"/><TARGET vertex="1" offset="1"/></EDGE>
  </UNITCELL>
  <UNITCELL name="simple2d" dimension="2">
   <VERTEX/>
   <EDGE><SOURCE vertex="1" offset="0 0"/><TARGET vertex="1" offset="0 1"/></EDGE>
   <EDGE><SOURCE vertex="1" offset="0 0"/><TARGET vertex="1" offset="1 0"/></EDGE>
  </UNITCELL>
  <UNITCELL name="simple3d" dimension="3" vertices="1">
   <VERTEX/>
   <EDGE><SOURCE vertex="1"/><TARGET vertex="1" offset="1 0 0"/></EDGE>
   <EDGE><SOURCE vertex="1"/><TARGET vertex="1" offset="0 1 0"/></EDGE>
   <EDGE><SOURCE vertex="1"/><TARGET vertex="1" offset="0 0 1"/></EDGE>
  </UNITCELL>
  <LATTICEGRAPH name = "square lattice 3x3">
   <FINITELATTICE>
     <LATTICE ref="square lattice"/>
     <EXTENT dimension="1" size="3"/>
     <EXTENT dimension="2" size="3"/>
     <BOUNDARY dimension="1" type="periodic"/>
     <BOUNDARY dimension="2" type="open"/>
   </FINITELATTICE>
   <UNITCELL ref="simple2d"/>
  </LATTICEGRAPH>
  <LATTICEGRAPH name = "dimer">
   <FINITELATTICE>
     <LATTICE ref="chain lattice"/>
     <EXTENT dimension="1" size="2"/>
     <BOUNDARY type="open"/>
   </FINITELATTICE>
   <UNITCELL ref="simple1d"/>
  </LATTICEGRAPH>
  <LATTICEGRAPH name = "simple cubic lattice">
   <FINITELATTICE>
     <LATTICE ref="simple cubic lattice"/>
     <PARAMETER name="W" default="L"/>
     <PARAMETER name="H" default="W"/>
     <EXTENT dimension="1" size="L"/>
     <EXTENT dimension="2" size="W"/>
     <EXTENT dimension="3" size="H"/>
     <BOUNDARY type="periodic"/>
   </FINITELATTICE>
   <UNITCELL ref="simple3d"/>
  </LATTICEGRAPH>
  <LATTICEGRAPH name = "chain lattice">
   <FINITELATTICE>
     <LATTICE ref="chain lattice"/>
     <EXTENT dimension="1" size ="L"/>
     <BOUNDARY type="periodic"/>
   </FINITELATTICE>
   <UNITCELL ref="simple1d"/>
  </LATTICEGRAPH>
  <LATTICEGRAPH name = "anisotropic square lattice">
   <FINITELATTICE>
     <LATTICE ref="square lattice"/>
     <PARAMETER name="W" default="L"/>
     <EXTENT dimension="1" size="L"/>
     <EXTENT dimension="2" size="W"/>
     <BOUNDARY type="periodic"/>
   </FINITELATTICE>
   <UNITCELL ref="anisotropic2d"/>
  </LATTICEGRAPH>
  </LATTICES>