quickstart.html - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
HTML git clone git://src.adamsgaard.dk/sphere
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
quickstart.html (9966B)
---
1 <!DOCTYPE html>
2
3 <html lang="en" data-content_root="./">
4 <head>
5 <meta charset="utf-8" />
6 <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
7
8 <title>Quick start — sphere 2.15 documentation</title>
9 <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
10 <link rel="stylesheet" type="text/css" href="_static/classic.css?v=2bf1fcf8" />
11
12 <script src="_static/documentation_options.js?v=d19175c4"></script>
13 <script src="_static/doctools.js?v=fd6eb6e6"></script>
14 <script src="_static/sphinx_highlight.js?v=6ffebe34"></script>
15
16 <link rel="index" title="Index" href="genindex.html" />
17 <link rel="search" title="Search" href="search.html" />
18 <link rel="next" title="Introduction" href="introduction.html" />
19 <link rel="prev" title="The sphere documentation" href="index.html" />
20 </head><body>
21 <div class="related" role="navigation" aria-label="Related">
22 <h3>Navigation</h3>
23 <ul>
24 <li class="right" style="margin-right: 10px">
25 <a href="genindex.html" title="General Index"
26 accesskey="I">index</a></li>
27 <li class="right" >
28 <a href="py-modindex.html" title="Python Module Index"
29 >modules</a> |</li>
30 <li class="right" >
31 <a href="introduction.html" title="Introduction"
32 accesskey="N">next</a> |</li>
33 <li class="right" >
34 <a href="index.html" title="The sphere documentation"
35 accesskey="P">previous</a> |</li>
36 <li class="nav-item nav-item-0"><a href="index.html">sphere 2.15 documentation</a> »</li>
37 <li class="nav-item nav-item-this"><a href="">Quick start</a></li>
38 </ul>
39 </div>
40
41 <div class="document">
42 <div class="documentwrapper">
43 <div class="bodywrapper">
44 <div class="body" role="main">
45
46 <section id="quick-start">
47 <h1>Quick start<a class="headerlink" href="#quick-start" title="Link to this heading">¶</a></h1>
48 <section id="requirements">
49 <h2>Requirements<a class="headerlink" href="#requirements" title="Link to this heading">¶</a></h2>
50 <p>Common requirements:</p>
51 <ul class="simple">
52 <li><p>CMake 3.12 or newer</p></li>
53 <li><p>A C++ compiler supported by the selected backend</p></li>
54 <li><p>Python 3 with NumPy for simulation setup and analysis</p></li>
55 </ul>
56 <p>CUDA backend requirements:</p>
57 <ul class="simple">
58 <li><p>Nvidia CUDA toolkit</p></li>
59 <li><p>Nvidia GPU with suitable double-precision support</p></li>
60 </ul>
61 <p>OpenMP CPU backend requirements:</p>
62 <ul class="simple">
63 <li><p>OpenMP-capable compiler/runtime</p></li>
64 <li><p>On macOS with Apple clang: <code class="docutils literal notranslate"><span class="pre">brew</span> <span class="pre">install</span> <span class="pre">libomp</span></code></p></li>
65 </ul>
66 </section>
67 <section id="build">
68 <h2>Build<a class="headerlink" href="#build" title="Link to this heading">¶</a></h2>
69 <p>CUDA backend (default):</p>
70 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cmake</span> <span class="o">.</span>
71 <span class="n">make</span>
72 </pre></div>
73 </div>
74 <p>OpenMP CPU backend:</p>
75 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cmake</span> <span class="o">-</span><span class="n">DSPHERE_GPU</span><span class="o">=</span><span class="n">OFF</span> <span class="o">.</span>
76 <span class="n">make</span>
77 </pre></div>
78 </div>
79 </section>
80 <section id="run-checks">
81 <h2>Run checks<a class="headerlink" href="#run-checks" title="Link to this heading">¶</a></h2>
82 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">sphere</span> <span class="o">--</span><span class="n">version</span>
83 <span class="o">./</span><span class="n">sphere</span> <span class="o">--</span><span class="n">help</span>
84 <span class="n">ctest</span> <span class="o">--</span><span class="n">output</span><span class="o">-</span><span class="n">on</span><span class="o">-</span><span class="n">failure</span>
85 </pre></div>
86 </div>
87 <p>Some CFD tests may expose known solver stability limitations on specific
88 systems; review failing test output before relying on a solver configuration.</p>
89 </section>
90 <section id="python-workflow">
91 <h2>Python workflow<a class="headerlink" href="#python-workflow" title="Link to this heading">¶</a></h2>
92 <p>Use the bundled Python package by setting <code class="docutils literal notranslate"><span class="pre">PYTHONPATH</span></code> from the repository
93 root:</p>
94 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">PYTHONPATH</span><span class="o">=</span><span class="n">python</span> <span class="n">python3</span> <span class="n">experiments</span><span class="o">/</span><span class="n">collision</span><span class="o">.</span><span class="n">py</span>
95 </pre></div>
96 </div>
97 <p>Most workflows follow this pattern:</p>
98 <ol class="arabic simple">
99 <li><p>Create a <code class="docutils literal notranslate"><span class="pre">sphere.sim</span></code> object in Python.</p></li>
100 <li><p>Initialize particles, material properties, boundaries, and time settings.</p></li>
101 <li><p>Write an input binary with <code class="docutils literal notranslate"><span class="pre">writebin</span></code>.</p></li>
102 <li><p>Run the compiled <code class="docutils literal notranslate"><span class="pre">sphere</span></code> binary, directly or through the Python API.</p></li>
103 <li><p>Read output binaries for analysis, visualization, or export.</p></li>
104 </ol>
105 </section>
106 <section id="build-documentation">
107 <h2>Build documentation<a class="headerlink" href="#build-documentation" title="Link to this heading">¶</a></h2>
108 <p>Install Python documentation dependencies:</p>
109 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">r</span> <span class="n">doc</span><span class="o">/</span><span class="n">requirements</span><span class="o">.</span><span class="n">txt</span>
110 </pre></div>
111 </div>
112 <p>Full HTML documentation also requires Doxygen for the C++ reference:</p>
113 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="o">-</span><span class="n">C</span> <span class="n">doc</span><span class="o">/</span><span class="n">sphinx</span> <span class="n">html</span>
114 </pre></div>
115 </div>
116 <p>PDF documentation additionally requires a working TeX installation:</p>
117 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="o">-</span><span class="n">C</span> <span class="n">doc</span><span class="o">/</span><span class="n">sphinx</span> <span class="n">latexpdf</span>
118 </pre></div>
119 </div>
120 </section>
121 </section>
122
123
124 <div class="clearer"></div>
125 </div>
126 </div>
127 </div>
128 <div class="sphinxsidebar" role="navigation" aria-label="Main">
129 <div class="sphinxsidebarwrapper">
130 <div>
131 <h3><a href="index.html">Table of Contents</a></h3>
132 <ul>
133 <li><a class="reference internal" href="#">Quick start</a><ul>
134 <li><a class="reference internal" href="#requirements">Requirements</a></li>
135 <li><a class="reference internal" href="#build">Build</a></li>
136 <li><a class="reference internal" href="#run-checks">Run checks</a></li>
137 <li><a class="reference internal" href="#python-workflow">Python workflow</a></li>
138 <li><a class="reference internal" href="#build-documentation">Build documentation</a></li>
139 </ul>
140 </li>
141 </ul>
142
143 </div>
144 <div>
145 <h4>Previous topic</h4>
146 <p class="topless"><a href="index.html"
147 title="previous chapter">The sphere documentation</a></p>
148 </div>
149 <div>
150 <h4>Next topic</h4>
151 <p class="topless"><a href="introduction.html"
152 title="next chapter">Introduction</a></p>
153 </div>
154 <div role="note" aria-label="source link">
155 <h3>This Page</h3>
156 <ul class="this-page-menu">
157 <li><a href="_sources/quickstart.rst.txt"
158 rel="nofollow">Show Source</a></li>
159 </ul>
160 </div>
161 <search id="searchbox" style="display: none" role="search">
162 <h3 id="searchlabel">Quick search</h3>
163 <div class="searchformwrapper">
164 <form class="search" action="search.html" method="get">
165 <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
166 <input type="submit" value="Go" />
167 </form>
168 </div>
169 </search>
170 <script>document.getElementById('searchbox').style.display = "block"</script>
171 </div>
172 </div>
173 <div class="clearer"></div>
174 </div>
175 <div class="related" role="navigation" aria-label="Related">
176 <h3>Navigation</h3>
177 <ul>
178 <li class="right" style="margin-right: 10px">
179 <a href="genindex.html" title="General Index"
180 >index</a></li>
181 <li class="right" >
182 <a href="py-modindex.html" title="Python Module Index"
183 >modules</a> |</li>
184 <li class="right" >
185 <a href="introduction.html" title="Introduction"
186 >next</a> |</li>
187 <li class="right" >
188 <a href="index.html" title="The sphere documentation"
189 >previous</a> |</li>
190 <li class="nav-item nav-item-0"><a href="index.html">sphere 2.15 documentation</a> »</li>
191 <li class="nav-item nav-item-this"><a href="">Quick start</a></li>
192 </ul>
193 </div>
194 <div class="footer" role="contentinfo">
195 © Copyright 2014, Anders Damsgaard.
196 Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 9.1.0.
197 </div>
198 </body>
199