File: fibre_with_correlation_functions.xmds

package info (click to toggle)
xmds2 2.2.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 53,384 kB
  • ctags: 7,223
  • sloc: python: 54,076; cpp: 3,929; ansic: 1,463; makefile: 135; sh: 20
file content (89 lines) | stat: -rw-r--r-- 2,630 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?xml version="1.0" encoding="UTF-8"?>
<simulation xmds-version="2">
  <testing>
    <xsil_file name="fibre_with_correlation_function.xsil" expected="fibre_with_correlation_function_expected.xsil" absolute_tolerance="5e-5" relative_tolerance="1e-3" />
  </testing>
  <name>fibre_with_correlation_function</name>
  <author>Unknown author</author>
  <description>
    Example fibre noise simulation
  </description>
  
  <geometry>
    <propagation_dimension> t </propagation_dimension>
    <transverse_dimensions>
      <dimension name="x" lattice="64"  domain="(-5, 5)" aliases="xp" />
    </transverse_dimensions>
  </geometry>
  
  <features>
    <auto_vectorise />
    <benchmark />
    <bing />
    <globals>
      <![CDATA[
      const real ggamma = 1.0;
      const real beta = sqrt(4.0*M_PI*ggamma/10.0);
      ]]>
    </globals>
  </features>
  
  <vector name="main" initial_basis="x" type="complex">
    <components>phi</components>
    <initialisation>
      <![CDATA[
        phi = 0.0;
      ]]>
    </initialisation>
  </vector>
  
  <noise_vector name="noise" kind="wiener" type="complex" method="solirte" seed="293485">
    <components>n_1</components>
  </noise_vector>
  
  <sequence>
    <integrate algorithm="SI" interval="2.5" steps="200000" tolerance="1e-6">
      <samples>50 1 1</samples>
      <operators>
        <operator kind="ex" constant="yes">
          <operator_names>L</operator_names>
          <![CDATA[
            L = -i*kx*kx;
          ]]>
        </operator>
        <integration_vectors>main</integration_vectors>
        <dependencies>noise</dependencies>
        <![CDATA[
          dphi_dt = L[phi] - ggamma*phi + beta*n_1;
        ]]>
      </operators>
    </integrate>
  </sequence>
  
  <output format="binary">
      <sampling_group basis="kx" initial_sample="yes">
        <moments>pow_dens</moments>
        <dependencies>main</dependencies>
        <![CDATA[
          pow_dens = mod2(phi);
        ]]>
      </sampling_group>
      <sampling_group basis="x xp" initial_sample="no">
        <moments>g1 g2</moments>
        <dependencies>main</dependencies>
        <![CDATA[
          g1 = abs(conj(phi) * phi(x => xp));
          g2 = mod2(phi) * mod2(phi(x => xp));
        ]]>
      </sampling_group>
      <sampling_group basis="kx kxp" initial_sample="no">
        <moments>g1 g2 g2minus</moments>
        <dependencies>main</dependencies>
        <![CDATA[
          g1 = abs(conj(phi) * phi(kx => kxp));
          g2 = mod2(phi) * mod2(phi(kx => kxp));
          g2minus = mod2(phi) * mod2(phi(kx => -kxp));
        ]]>
      </sampling_group>
  </output>
</simulation>