File: spherical_ball.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 (58 lines) | stat: -rw-r--r-- 2,164 bytes parent folder | download | duplicates (7)
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
<?xml version="1.0" encoding="UTF-8"?>
<simulation xmds-version="2">
  <testing>
    <xsil_file name="spherical_ball.xsil" expected="spherical_ball_expected.xsil" absolute_tolerance="1e-5" relative_tolerance="1e-5" />
    <xsil_file name="spherical_ball_coordinate_space1.xsil" expected="spherical_ball_coordinate_space1_expected.xsil" absolute_tolerance="1e-5" relative_tolerance="1e-5" />
    <xsil_file name="spherical_ball_spectral_space.xsil" expected="spherical_ball_spectral_space_expected.xsil" absolute_tolerance="1e-4" relative_tolerance="1e-4" />
    <xsil_file name="spherical_ball_coordinate_space2.xsil" expected="spherical_ball_coordinate_space_expected.xsil" absolute_tolerance="1e-3" relative_tolerance="1e-3" />
  </testing>
  
  <name>spherical_ball</name>

  <author>Mattias Johnsson</author>
  <description>
    Calculate the volume of unit ball using spherical bessel transform
  </description>

  <geometry>
      <propagation_dimension> t </propagation_dimension>
      <transverse_dimensions>
        <dimension name="r" lattice="256"  domain="(0, 1.5)" transform="spherical-bessel" volume_prefactor="4.0*M_PI"/>
      </transverse_dimensions>
   </geometry>

  <vector name="densityvector" type="real" dimensions="r">
    <components> rho </components>
    <initialisation>
      <![CDATA[
        if (r<=1.0)
          rho = 1.0;
        else
          rho = 0.0;
      ]]>
    </initialisation>
  </vector>

  <sequence>
    <breakpoint filename="spherical_ball_coordinate_space1.xsil">
      <dependencies>densityvector</dependencies>
    </breakpoint>
    <breakpoint filename="spherical_ball_spectral_space.xsil">
      <dependencies basis="kr">densityvector</dependencies>
    </breakpoint>
    <breakpoint filename="spherical_ball_coordinate_space2.xsil">
      <dependencies>densityvector</dependencies>
    </breakpoint>
  </sequence>

  <output>
    <sampling_group basis="r(0)" initial_sample="yes">
      <moments> volume </moments>
      <dependencies>densityvector</dependencies>
      <![CDATA[
        volume = rho / (M_PI*4.0/3.0) ;// This should be close to 1.
      ]]>
    </sampling_group>
  </output>
</simulation>