mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-08 20:33:40 +01:00
Deploying to gh-pages from @ TREX-CoE/qmckl@b7a0f608c8 🚀
This commit is contained in:
parent
9dd077c84a
commit
b04fea42d5
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-12 Wed 21:53 -->
|
||||
<!-- 2021-05-12 Wed 21:59 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>QMCkl source code documentation</title>
|
||||
@ -349,7 +349,7 @@ and bug reports should be submitted at
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:53</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:59</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
102
qmckl.html
102
qmckl.html
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-12 Wed 21:53 -->
|
||||
<!-- 2021-05-12 Wed 21:59 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Introduction</title>
|
||||
@ -333,30 +333,30 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org94d1b2a">1. Using QMCkl</a></li>
|
||||
<li><a href="#org1275576">2. Developing in QMCkl</a>
|
||||
<li><a href="#org12695bb">1. Using QMCkl</a></li>
|
||||
<li><a href="#org4ab5b28">2. Developing in QMCkl</a>
|
||||
<ul>
|
||||
<li><a href="#org92b6ee1">2.1. Literate programming</a></li>
|
||||
<li><a href="#orga9b8567">2.2. Source code editing</a></li>
|
||||
<li><a href="#orgc9f9fbe">2.3. Choice of the programming language</a></li>
|
||||
<li><a href="#org3a8c9ff">2.4. Coding rules</a></li>
|
||||
<li><a href="#org70d0bfa">2.5. Design of the library</a></li>
|
||||
<li><a href="#org9478856">2.6. Naming conventions</a></li>
|
||||
<li><a href="#org6eb7a5d">2.7. Application programming interface</a></li>
|
||||
<li><a href="#org2d1e649">2.8. Global state</a></li>
|
||||
<li><a href="#org6fd33dd">2.9. Headers</a></li>
|
||||
<li><a href="#org2c186b7">2.10. Low-level functions</a></li>
|
||||
<li><a href="#org486cc40">2.11. High-level functions</a></li>
|
||||
<li><a href="#orgcdc77af">2.12. Numerical precision</a></li>
|
||||
<li><a href="#org78d464a">2.13. Algorithms</a></li>
|
||||
<li><a href="#orgd93323d">2.1. Literate programming</a></li>
|
||||
<li><a href="#org778d04e">2.2. Source code editing</a></li>
|
||||
<li><a href="#org7bc3a88">2.3. Choice of the programming language</a></li>
|
||||
<li><a href="#orga65df98">2.4. Coding rules</a></li>
|
||||
<li><a href="#org6ead2ea">2.5. Design of the library</a></li>
|
||||
<li><a href="#org8b7d275">2.6. Naming conventions</a></li>
|
||||
<li><a href="#org8f2a325">2.7. Application programming interface</a></li>
|
||||
<li><a href="#org598fbd6">2.8. Global state</a></li>
|
||||
<li><a href="#orgc00e340">2.9. Headers</a></li>
|
||||
<li><a href="#org843e8b3">2.10. Low-level functions</a></li>
|
||||
<li><a href="#orgb39d37a">2.11. High-level functions</a></li>
|
||||
<li><a href="#org2b7b551">2.12. Numerical precision</a></li>
|
||||
<li><a href="#orgfa84567">2.13. Algorithms</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org94d1b2a" class="outline-2">
|
||||
<h2 id="org94d1b2a"><span class="section-number-2">1</span> Using QMCkl</h2>
|
||||
<div id="outline-container-org12695bb" class="outline-2">
|
||||
<h2 id="org12695bb"><span class="section-number-2">1</span> Using QMCkl</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The <code>qmckl.h</code> header file installed in the <code>${prefix}/include</code> directory
|
||||
@ -385,12 +385,12 @@ Both files are located in the <code>include/</code> directory.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1275576" class="outline-2">
|
||||
<h2 id="org1275576"><span class="section-number-2">2</span> Developing in QMCkl</h2>
|
||||
<div id="outline-container-org4ab5b28" class="outline-2">
|
||||
<h2 id="org4ab5b28"><span class="section-number-2">2</span> Developing in QMCkl</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-org92b6ee1" class="outline-3">
|
||||
<h3 id="org92b6ee1"><span class="section-number-3">2.1</span> Literate programming</h3>
|
||||
<div id="outline-container-orgd93323d" class="outline-3">
|
||||
<h3 id="orgd93323d"><span class="section-number-3">2.1</span> Literate programming</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
In a traditional source code, most of the lines of source files of a program
|
||||
@ -435,8 +435,8 @@ interactively, in the same spirit as Jupyter notebooks.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga9b8567" class="outline-3">
|
||||
<h3 id="orga9b8567"><span class="section-number-3">2.2</span> Source code editing</h3>
|
||||
<div id="outline-container-org778d04e" class="outline-3">
|
||||
<h3 id="org778d04e"><span class="section-number-3">2.2</span> Source code editing</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
For a tutorial on literate programming with org-mode, follow <a href="http://www.howardism.org/Technical/Emacs/literate-programming-tutorial.html">this link</a>.
|
||||
@ -467,8 +467,8 @@ org-mode.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc9f9fbe" class="outline-3">
|
||||
<h3 id="orgc9f9fbe"><span class="section-number-3">2.3</span> Choice of the programming language</h3>
|
||||
<div id="outline-container-org7bc3a88" class="outline-3">
|
||||
<h3 id="org7bc3a88"><span class="section-number-3">2.3</span> Choice of the programming language</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<p>
|
||||
Most of the codes of the <a href="https://trex-coe.eu">TREX CoE</a> are written in Fortran with some scripts in
|
||||
@ -516,8 +516,8 @@ For more guidelines on using Fortran to generate a C interface, see
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3a8c9ff" class="outline-3">
|
||||
<h3 id="org3a8c9ff"><span class="section-number-3">2.4</span> Coding rules</h3>
|
||||
<div id="outline-container-orga65df98" class="outline-3">
|
||||
<h3 id="orga65df98"><span class="section-number-3">2.4</span> Coding rules</h3>
|
||||
<div class="outline-text-3" id="text-2-4">
|
||||
<p>
|
||||
The authors should follow the recommendations of the C99
|
||||
@ -535,8 +535,8 @@ Compliance can be checked with <code>cppcheck</code> as:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org70d0bfa" class="outline-3">
|
||||
<h3 id="org70d0bfa"><span class="section-number-3">2.5</span> Design of the library</h3>
|
||||
<div id="outline-container-org6ead2ea" class="outline-3">
|
||||
<h3 id="org6ead2ea"><span class="section-number-3">2.5</span> Design of the library</h3>
|
||||
<div class="outline-text-3" id="text-2-5">
|
||||
<p>
|
||||
The proposed API should allow the library to: deal with memory transfers
|
||||
@ -547,8 +547,8 @@ functions (see below).
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9478856" class="outline-3">
|
||||
<h3 id="org9478856"><span class="section-number-3">2.6</span> Naming conventions</h3>
|
||||
<div id="outline-container-org8b7d275" class="outline-3">
|
||||
<h3 id="org8b7d275"><span class="section-number-3">2.6</span> Naming conventions</h3>
|
||||
<div class="outline-text-3" id="text-2-6">
|
||||
<p>
|
||||
To avoid namespace collisions, we use <code>qmckl_</code> as a prefix for all exported
|
||||
@ -573,8 +573,8 @@ form is allowed.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6eb7a5d" class="outline-3">
|
||||
<h3 id="org6eb7a5d"><span class="section-number-3">2.7</span> Application programming interface</h3>
|
||||
<div id="outline-container-org8f2a325" class="outline-3">
|
||||
<h3 id="org8f2a325"><span class="section-number-3">2.7</span> Application programming interface</h3>
|
||||
<div class="outline-text-3" id="text-2-7">
|
||||
<p>
|
||||
In the C language, the number of bits used by the integer types can change
|
||||
@ -606,15 +606,15 @@ bindings in other languages in other repositories.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2d1e649" class="outline-3">
|
||||
<h3 id="org2d1e649"><span class="section-number-3">2.8</span> Global state</h3>
|
||||
<div id="outline-container-org598fbd6" class="outline-3">
|
||||
<h3 id="org598fbd6"><span class="section-number-3">2.8</span> Global state</h3>
|
||||
<div class="outline-text-3" id="text-2-8">
|
||||
<p>
|
||||
Global variables should be avoided in the library, because it is
|
||||
possible that one single program needs to use multiple instances
|
||||
of the library. To solve this problem we propose to use a pointer
|
||||
to a <a href="./qmckl_context.html"><code>context</code></a> variable, built by the library with the
|
||||
<code>qmckl_context_create</code> function. The <a id="org5e6e3a8">=context=</a> contains the global
|
||||
<code>qmckl_context_create</code> function. The <a id="org3a67e74">=context=</a> contains the global
|
||||
state of the library, and is used as the first argument of many
|
||||
QMCkl functions.
|
||||
</p>
|
||||
@ -628,8 +628,8 @@ the state is done by setters and getters, prefixed by
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6fd33dd" class="outline-3">
|
||||
<h3 id="org6fd33dd"><span class="section-number-3">2.9</span> Headers</h3>
|
||||
<div id="outline-container-orgc00e340" class="outline-3">
|
||||
<h3 id="orgc00e340"><span class="section-number-3">2.9</span> Headers</h3>
|
||||
<div class="outline-text-3" id="text-2-9">
|
||||
<p>
|
||||
A single <code>qmckl.h</code> header to be distributed by the library
|
||||
@ -717,8 +717,8 @@ and the types definitions should be written in the <code>*_f_type.f90</code> fil
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2c186b7" class="outline-3">
|
||||
<h3 id="org2c186b7"><span class="section-number-3">2.10</span> Low-level functions</h3>
|
||||
<div id="outline-container-org843e8b3" class="outline-3">
|
||||
<h3 id="org843e8b3"><span class="section-number-3">2.10</span> Low-level functions</h3>
|
||||
<div class="outline-text-3" id="text-2-10">
|
||||
<p>
|
||||
Low-level functions are very simple functions which are leaves of
|
||||
@ -727,14 +727,14 @@ the function call tree (they don't call any other QMCkl function).
|
||||
|
||||
<p>
|
||||
These functions are <i>pure</i>, and unaware of the QMCkl
|
||||
<a href="#org5e6e3a8"><code>context</code></a>. They are not allowed to allocate/deallocate memory, and
|
||||
<a href="#org3a67e74"><code>context</code></a>. They are not allowed to allocate/deallocate memory, and
|
||||
if they need temporary memory it should be provided in input.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org486cc40" class="outline-3">
|
||||
<h3 id="org486cc40"><span class="section-number-3">2.11</span> High-level functions</h3>
|
||||
<div id="outline-container-orgb39d37a" class="outline-3">
|
||||
<h3 id="orgb39d37a"><span class="section-number-3">2.11</span> High-level functions</h3>
|
||||
<div class="outline-text-3" id="text-2-11">
|
||||
<p>
|
||||
High-level functions are at the top of the function call tree.
|
||||
@ -747,27 +747,27 @@ temporary storage, to simplify the use of accelerators.
|
||||
<p>
|
||||
The high-level functions should be pure, unless the introduction
|
||||
of non-purity is justified. All the side effects should be made in
|
||||
the <a href="#org5e6e3a8"><code>context</code></a> variable.
|
||||
the <a href="#org3a67e74"><code>context</code></a> variable.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcdc77af" class="outline-3">
|
||||
<h3 id="orgcdc77af"><span class="section-number-3">2.12</span> Numerical precision</h3>
|
||||
<div id="outline-container-org2b7b551" class="outline-3">
|
||||
<h3 id="org2b7b551"><span class="section-number-3">2.12</span> Numerical precision</h3>
|
||||
<div class="outline-text-3" id="text-2-12">
|
||||
<p>
|
||||
The number of bits of precision required for a function should be
|
||||
given as an input of low-level computational functions. This input
|
||||
will be used to define the values of the different thresholds that
|
||||
might be used to avoid computing unnecessary noise. High-level
|
||||
functions will use the precision specified in the <a href="#org5e6e3a8"><code>context</code></a>
|
||||
functions will use the precision specified in the <a href="#org3a67e74"><code>context</code></a>
|
||||
variable.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org78d464a" class="outline-3">
|
||||
<h3 id="org78d464a"><span class="section-number-3">2.13</span> Algorithms</h3>
|
||||
<div id="outline-container-orgfa84567" class="outline-3">
|
||||
<h3 id="orgfa84567"><span class="section-number-3">2.13</span> Algorithms</h3>
|
||||
<div class="outline-text-3" id="text-2-13">
|
||||
<p>
|
||||
Reducing the scaling of an algorithm usually implies also reducing
|
||||
@ -783,7 +783,7 @@ implemented adapted to different problem sizes.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:53</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:59</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
158
qmckl_ao.html
158
qmckl_ao.html
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-12 Wed 21:53 -->
|
||||
<!-- 2021-05-12 Wed 21:59 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Atomic Orbitals</title>
|
||||
@ -333,52 +333,52 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#orgba3fb63">1. Context</a>
|
||||
<li><a href="#orgcd3f467">1. Context</a>
|
||||
<ul>
|
||||
<li><a href="#org116b5e7">1.1. Data structure</a></li>
|
||||
<li><a href="#org6a32339">1.2. Access functions</a></li>
|
||||
<li><a href="#orgef5f61d">1.3. Initialization functions</a></li>
|
||||
<li><a href="#orgf628e06">1.4. <span class="todo TODO">TODO</span> Fortran interfaces</a></li>
|
||||
<li><a href="#orgdf9e43a">1.1. Data structure</a></li>
|
||||
<li><a href="#org2656207">1.2. Access functions</a></li>
|
||||
<li><a href="#org3e983d0">1.3. Initialization functions</a></li>
|
||||
<li><a href="#orga446a99">1.4. <span class="todo TODO">TODO</span> Fortran interfaces</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgff54d34">2. Polynomial part</a>
|
||||
<li><a href="#org0ea0b71">2. Polynomial part</a>
|
||||
<ul>
|
||||
<li><a href="#orged4b9ce">2.1. Powers of \(x-X_i\)</a>
|
||||
<li><a href="#orge4fd660">2.1. Powers of \(x-X_i\)</a>
|
||||
<ul>
|
||||
<li><a href="#orgfaf77d1">2.1.1. Requirements</a></li>
|
||||
<li><a href="#org0c3bd3e">2.1.2. C Header</a></li>
|
||||
<li><a href="#org40ad807">2.1.3. Source</a></li>
|
||||
<li><a href="#org797eba3">2.1.4. C interface</a></li>
|
||||
<li><a href="#orgf1108d4">2.1.5. Fortran interface</a></li>
|
||||
<li><a href="#orge29fa40">2.1.6. Test</a></li>
|
||||
<li><a href="#org935bad0">2.1.1. Requirements</a></li>
|
||||
<li><a href="#orgb20b53d">2.1.2. C Header</a></li>
|
||||
<li><a href="#org86cac3e">2.1.3. Source</a></li>
|
||||
<li><a href="#orgec5e28c">2.1.4. C interface</a></li>
|
||||
<li><a href="#orgf814d8d">2.1.5. Fortran interface</a></li>
|
||||
<li><a href="#orgf6fc171">2.1.6. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org0490f05">2.2. Value, Gradient and Laplacian of a polynomial</a>
|
||||
<li><a href="#orga1c5974">2.2. Value, Gradient and Laplacian of a polynomial</a>
|
||||
<ul>
|
||||
<li><a href="#org067984a">2.2.1. Requirements</a></li>
|
||||
<li><a href="#orgc9bc0a6">2.2.2. C Header</a></li>
|
||||
<li><a href="#orga3ab811">2.2.3. Source</a></li>
|
||||
<li><a href="#org1a220b2">2.2.4. C interface</a></li>
|
||||
<li><a href="#org60471ec">2.2.5. Fortran interface</a></li>
|
||||
<li><a href="#orgc0e869e">2.2.6. Test</a></li>
|
||||
<li><a href="#org0976e7f">2.2.1. Requirements</a></li>
|
||||
<li><a href="#org12e1f9c">2.2.2. C Header</a></li>
|
||||
<li><a href="#org1836749">2.2.3. Source</a></li>
|
||||
<li><a href="#org6662068">2.2.4. C interface</a></li>
|
||||
<li><a href="#orgeac9814">2.2.5. Fortran interface</a></li>
|
||||
<li><a href="#orgdb89143">2.2.6. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgef2c244">3. Radial part</a>
|
||||
<li><a href="#org0960314">3. Radial part</a>
|
||||
<ul>
|
||||
<li><a href="#org43bd693">3.1. Gaussian basis functions</a></li>
|
||||
<li><a href="#org1ce2ed1">3.2. <span class="todo TODO">TODO</span> Slater basis functions</a></li>
|
||||
<li><a href="#orge1d9dbf">3.3. <span class="todo TODO">TODO</span> Radial functions on a grid</a></li>
|
||||
<li><a href="#org1e5aae2">3.1. Gaussian basis functions</a></li>
|
||||
<li><a href="#org0fc555f">3.2. <span class="todo TODO">TODO</span> Slater basis functions</a></li>
|
||||
<li><a href="#orgd4d72b9">3.3. <span class="todo TODO">TODO</span> Radial functions on a grid</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgaa9b030">4. Combining radial and polynomial parts</a></li>
|
||||
<li><a href="#org35fab23">4. Combining radial and polynomial parts</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgba3fb63" class="outline-2">
|
||||
<h2 id="orgba3fb63"><span class="section-number-2">1</span> Context</h2>
|
||||
<div id="outline-container-orgcd3f467" class="outline-2">
|
||||
<h2 id="orgcd3f467"><span class="section-number-2">1</span> Context</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The following arrays are stored in the context:
|
||||
@ -503,8 +503,8 @@ coefficient = [ 0.006068, 0.045308, 0.202822, 0.503903, 0.383421,
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org116b5e7" class="outline-3">
|
||||
<h3 id="org116b5e7"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-orgdf9e43a" class="outline-3">
|
||||
<h3 id="orgdf9e43a"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_ao_basis_struct</span> {
|
||||
@ -533,8 +533,8 @@ struct is then initialized and <code>provided == true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6a32339" class="outline-3">
|
||||
<h3 id="org6a32339"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div id="outline-container-org2656207" class="outline-3">
|
||||
<h3 id="org2656207"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<p>
|
||||
When all the data for the AOs have been provided, the following
|
||||
@ -548,8 +548,8 @@ function returns <code>true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgef5f61d" class="outline-3">
|
||||
<h3 id="orgef5f61d"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div id="outline-container-org3e983d0" class="outline-3">
|
||||
<h3 id="org3e983d0"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<p>
|
||||
To set the basis set, all the following functions need to be
|
||||
@ -572,17 +572,17 @@ called. When
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf628e06" class="outline-3">
|
||||
<h3 id="orgf628e06"><span class="section-number-3">1.4</span> <span class="todo TODO">TODO</span> Fortran interfaces</h3>
|
||||
<div id="outline-container-orga446a99" class="outline-3">
|
||||
<h3 id="orga446a99"><span class="section-number-3">1.4</span> <span class="todo TODO">TODO</span> Fortran interfaces</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgff54d34" class="outline-2">
|
||||
<h2 id="orgff54d34"><span class="section-number-2">2</span> Polynomial part</h2>
|
||||
<div id="outline-container-org0ea0b71" class="outline-2">
|
||||
<h2 id="org0ea0b71"><span class="section-number-2">2</span> Polynomial part</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-orged4b9ce" class="outline-3">
|
||||
<h3 id="orged4b9ce"><span class="section-number-3">2.1</span> Powers of \(x-X_i\)</h3>
|
||||
<div id="outline-container-orge4fd660" class="outline-3">
|
||||
<h3 id="orge4fd660"><span class="section-number-3">2.1</span> Powers of \(x-X_i\)</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
The <code>qmckl_ao_power</code> function computes all the powers of the <code>n</code>
|
||||
@ -594,7 +594,7 @@ the \(n\) points:
|
||||
\[ P_{ik} = X_i^k \]
|
||||
</p>
|
||||
|
||||
<table id="orge591518" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orge69edf7" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -652,8 +652,8 @@ the \(n\) points:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgfaf77d1" class="outline-4">
|
||||
<h4 id="orgfaf77d1"><span class="section-number-4">2.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-org935bad0" class="outline-4">
|
||||
<h4 id="org935bad0"><span class="section-number-4">2.1.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-2-1-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>QMCKL_NULL_CONTEXT</code></li>
|
||||
@ -666,8 +666,8 @@ the \(n\) points:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0c3bd3e" class="outline-4">
|
||||
<h4 id="org0c3bd3e"><span class="section-number-4">2.1.2</span> C Header</h4>
|
||||
<div id="outline-container-orgb20b53d" class="outline-4">
|
||||
<h4 id="orgb20b53d"><span class="section-number-4">2.1.2</span> C Header</h4>
|
||||
<div class="outline-text-4" id="text-2-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_ao_power</span> (
|
||||
@ -682,8 +682,8 @@ the \(n\) points:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org40ad807" class="outline-4">
|
||||
<h4 id="org40ad807"><span class="section-number-4">2.1.3</span> Source</h4>
|
||||
<div id="outline-container-org86cac3e" class="outline-4">
|
||||
<h4 id="org86cac3e"><span class="section-number-4">2.1.3</span> Source</h4>
|
||||
<div class="outline-text-4" id="text-2-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #228b22;">integer </span><span style="color: #a020f0;">function</span><span style="color: #a0522d;"> </span><span style="color: #0000ff;">qmckl_ao_power_f</span><span style="color: #000000; background-color: #ffffff;">(context, n, X, LMAX, P, ldp) result(info)</span>
|
||||
@ -734,15 +734,15 @@ the \(n\) points:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org797eba3" class="outline-4">
|
||||
<h4 id="org797eba3"><span class="section-number-4">2.1.4</span> C interface</h4>
|
||||
<div id="outline-container-orgec5e28c" class="outline-4">
|
||||
<h4 id="orgec5e28c"><span class="section-number-4">2.1.4</span> C interface</h4>
|
||||
</div>
|
||||
<div id="outline-container-orgf1108d4" class="outline-4">
|
||||
<h4 id="orgf1108d4"><span class="section-number-4">2.1.5</span> Fortran interface</h4>
|
||||
<div id="outline-container-orgf814d8d" class="outline-4">
|
||||
<h4 id="orgf814d8d"><span class="section-number-4">2.1.5</span> Fortran interface</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge29fa40" class="outline-4">
|
||||
<h4 id="orge29fa40"><span class="section-number-4">2.1.6</span> Test</h4>
|
||||
<div id="outline-container-orgf6fc171" class="outline-4">
|
||||
<h4 id="orgf6fc171"><span class="section-number-4">2.1.6</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-1-6">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #228b22;">integer</span>(<span style="color: #008b8b;">c_int32_t</span>) <span style="color: #a020f0;">function</span> <span style="color: #0000ff;">test_qmckl_ao_power</span>(context) <span style="color: #a020f0;">bind</span>(C)
|
||||
@ -793,8 +793,8 @@ the \(n\) points:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0490f05" class="outline-3">
|
||||
<h3 id="org0490f05"><span class="section-number-3">2.2</span> Value, Gradient and Laplacian of a polynomial</h3>
|
||||
<div id="outline-container-orga1c5974" class="outline-3">
|
||||
<h3 id="orga1c5974"><span class="section-number-3">2.2</span> Value, Gradient and Laplacian of a polynomial</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
A polynomial is centered on a nucleus \(\mathbf{R}_i\)
|
||||
@ -839,7 +839,7 @@ Laplacians at a given point in space, of all polynomials with an
|
||||
angular momentum up to <code>lmax</code>.
|
||||
</p>
|
||||
|
||||
<table id="org1ed61e1" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgf0732d2" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -918,8 +918,8 @@ angular momentum up to <code>lmax</code>.
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org067984a" class="outline-4">
|
||||
<h4 id="org067984a"><span class="section-number-4">2.2.1</span> Requirements</h4>
|
||||
<div id="outline-container-org0976e7f" class="outline-4">
|
||||
<h4 id="org0976e7f"><span class="section-number-4">2.2.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-2-2-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>QMCKL_NULL_CONTEXT</code></li>
|
||||
@ -944,8 +944,8 @@ For example, with a=0, b=2 and c=1 the string is "yyz"</li>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc9bc0a6" class="outline-4">
|
||||
<h4 id="orgc9bc0a6"><span class="section-number-4">2.2.2</span> C Header</h4>
|
||||
<div id="outline-container-org12e1f9c" class="outline-4">
|
||||
<h4 id="org12e1f9c"><span class="section-number-4">2.2.2</span> C Header</h4>
|
||||
<div class="outline-text-4" id="text-2-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_ao_polynomial_vgl</span> (
|
||||
@ -963,8 +963,8 @@ For example, with a=0, b=2 and c=1 the string is "yyz"</li>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga3ab811" class="outline-4">
|
||||
<h4 id="orga3ab811"><span class="section-number-4">2.2.3</span> Source</h4>
|
||||
<div id="outline-container-org1836749" class="outline-4">
|
||||
<h4 id="org1836749"><span class="section-number-4">2.2.3</span> Source</h4>
|
||||
<div class="outline-text-4" id="text-2-2-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #228b22;">integer </span><span style="color: #a020f0;">function</span><span style="color: #a0522d;"> </span><span style="color: #0000ff;">qmckl_ao_polynomial_vgl_f</span><span style="color: #000000; background-color: #ffffff;">(context, X, R, lmax, n, L, ldl, VGL, ldv) result(info)</span>
|
||||
@ -1099,16 +1099,16 @@ For example, with a=0, b=2 and c=1 the string is "yyz"</li>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1a220b2" class="outline-4">
|
||||
<h4 id="org1a220b2"><span class="section-number-4">2.2.4</span> C interface</h4>
|
||||
<div id="outline-container-org6662068" class="outline-4">
|
||||
<h4 id="org6662068"><span class="section-number-4">2.2.4</span> C interface</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org60471ec" class="outline-4">
|
||||
<h4 id="org60471ec"><span class="section-number-4">2.2.5</span> Fortran interface</h4>
|
||||
<div id="outline-container-orgeac9814" class="outline-4">
|
||||
<h4 id="orgeac9814"><span class="section-number-4">2.2.5</span> Fortran interface</h4>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc0e869e" class="outline-4">
|
||||
<h4 id="orgc0e869e"><span class="section-number-4">2.2.6</span> Test</h4>
|
||||
<div id="outline-container-orgdb89143" class="outline-4">
|
||||
<h4 id="orgdb89143"><span class="section-number-4">2.2.6</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-2-6">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #228b22;">integer</span>(<span style="color: #008b8b;">c_int32_t</span>) <span style="color: #a020f0;">function</span> <span style="color: #0000ff;">test_qmckl_ao_polynomial_vgl</span>(context) <span style="color: #a020f0;">bind</span>(C)
|
||||
@ -1213,12 +1213,12 @@ assert(0 == test_qmckl_ao_polynomial_vgl(context));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgef2c244" class="outline-2">
|
||||
<h2 id="orgef2c244"><span class="section-number-2">3</span> Radial part</h2>
|
||||
<div id="outline-container-org0960314" class="outline-2">
|
||||
<h2 id="org0960314"><span class="section-number-2">3</span> Radial part</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
</div>
|
||||
<div id="outline-container-org43bd693" class="outline-3">
|
||||
<h3 id="org43bd693"><span class="section-number-3">3.1</span> Gaussian basis functions</h3>
|
||||
<div id="outline-container-org1e5aae2" class="outline-3">
|
||||
<h3 id="org1e5aae2"><span class="section-number-3">3.1</span> Gaussian basis functions</h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
<p>
|
||||
<code>qmckl_ao_gaussian_vgl</code> computes the values, gradients and
|
||||
@ -1450,21 +1450,21 @@ Requirements
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1ce2ed1" class="outline-3">
|
||||
<h3 id="org1ce2ed1"><span class="section-number-3">3.2</span> <span class="todo TODO">TODO</span> Slater basis functions</h3>
|
||||
<div id="outline-container-org0fc555f" class="outline-3">
|
||||
<h3 id="org0fc555f"><span class="section-number-3">3.2</span> <span class="todo TODO">TODO</span> Slater basis functions</h3>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge1d9dbf" class="outline-3">
|
||||
<h3 id="orge1d9dbf"><span class="section-number-3">3.3</span> <span class="todo TODO">TODO</span> Radial functions on a grid</h3>
|
||||
<div id="outline-container-orgd4d72b9" class="outline-3">
|
||||
<h3 id="orgd4d72b9"><span class="section-number-3">3.3</span> <span class="todo TODO">TODO</span> Radial functions on a grid</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgaa9b030" class="outline-2">
|
||||
<h2 id="orgaa9b030"><span class="section-number-2">4</span> Combining radial and polynomial parts</h2>
|
||||
<div id="outline-container-org35fab23" class="outline-2">
|
||||
<h2 id="org35fab23"><span class="section-number-2">4</span> Combining radial and polynomial parts</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:53</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:59</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-12 Wed 21:53 -->
|
||||
<!-- 2021-05-12 Wed 21:59 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Context</title>
|
||||
@ -311,21 +311,21 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org2e697c7">1. Context handling</a>
|
||||
<li><a href="#org6cb06cf">1. Context handling</a>
|
||||
<ul>
|
||||
<li><a href="#orgbf77067">1.1. Data structure</a></li>
|
||||
<li><a href="#orgdce9f79">1.2. Creation</a></li>
|
||||
<li><a href="#org5056738">1.3. Locking</a></li>
|
||||
<li><a href="#org28b6656">1.4. <span class="todo TODO">TODO</span> Copy</a></li>
|
||||
<li><a href="#org938bf0f">1.5. Destroy</a></li>
|
||||
<li><a href="#org3bd8cb0">1.1. Data structure</a></li>
|
||||
<li><a href="#orga91d7c0">1.2. Creation</a></li>
|
||||
<li><a href="#org6e0b02b">1.3. Locking</a></li>
|
||||
<li><a href="#org313c0f3">1.4. <span class="todo TODO">TODO</span> Copy</a></li>
|
||||
<li><a href="#orgc179147">1.5. Destroy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2e697c7" class="outline-2">
|
||||
<h2 id="org2e697c7"><span class="section-number-2">1</span> Context handling</h2>
|
||||
<div id="outline-container-org6cb06cf" class="outline-2">
|
||||
<h2 id="org6cb06cf"><span class="section-number-2">1</span> Context handling</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The context variable is a handle for the state of the library,
|
||||
@ -338,7 +338,7 @@ A value of <code>QMCKL_NULL_CONTEXT</code> for the context is equivalent to a
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c" id="orgd9743de"><span style="color: #a020f0;">typedef</span> <span style="color: #228b22;">int64_t</span> <span style="color: #228b22;">qmckl_context</span> ;
|
||||
<pre class="src src-c" id="org631d3cf"><span style="color: #a020f0;">typedef</span> <span style="color: #228b22;">int64_t</span> <span style="color: #228b22;">qmckl_context</span> ;
|
||||
<span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">QMCKL_NULL_CONTEXT</span> (qmckl_context) 0
|
||||
</pre>
|
||||
</div>
|
||||
@ -356,8 +356,8 @@ and <code>ctx</code> is a <code>qmckl_context_struct*</code> pointer.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgbf77067" class="outline-3">
|
||||
<h3 id="orgbf77067"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-org3bd8cb0" class="outline-3">
|
||||
<h3 id="org3bd8cb0"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<p>
|
||||
The context keeps a ``date'' that allows to check which data needs
|
||||
@ -367,7 +367,7 @@ coordinates are updated.
|
||||
|
||||
<p>
|
||||
When a new element is added to the context, the functions
|
||||
<a href="#orgdce9f79">qmckl<sub>context</sub><sub>create</sub></a>, <a href="#org938bf0f">qmckl<sub>context</sub><sub>destroy</sub></a> and <a href="#org28b6656">qmckl<sub>context</sub><sub>copy</sub></a>
|
||||
<a href="#orga91d7c0">qmckl<sub>context</sub><sub>create</sub></a>, <a href="#orgc179147">qmckl<sub>context</sub><sub>destroy</sub></a> and <a href="#org313c0f3">qmckl<sub>context</sub><sub>copy</sub></a>
|
||||
should be updated inorder to make deep copies.
|
||||
</p>
|
||||
|
||||
@ -416,8 +416,8 @@ if the context is valid, <code>QMCKL_NULL_CONTEXT</code> otherwise.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdce9f79" class="outline-3">
|
||||
<h3 id="orgdce9f79"><span class="section-number-3">1.2</span> Creation</h3>
|
||||
<div id="outline-container-orga91d7c0" class="outline-3">
|
||||
<h3 id="orga91d7c0"><span class="section-number-3">1.2</span> Creation</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<p>
|
||||
To create a new context, <code>qmckl_context_create()</code> should be used.
|
||||
@ -491,8 +491,8 @@ To create a new context, <code>qmckl_context_create()</code> should be used.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org5056738" class="outline-3">
|
||||
<h3 id="org5056738"><span class="section-number-3">1.3</span> Locking</h3>
|
||||
<div id="outline-container-org6e0b02b" class="outline-3">
|
||||
<h3 id="org6e0b02b"><span class="section-number-3">1.3</span> Locking</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<p>
|
||||
For thread safety, the context may be locked/unlocked. The lock is
|
||||
@ -537,8 +537,8 @@ number of times the thread has locked it is saved in the
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org28b6656" class="outline-3">
|
||||
<h3 id="org28b6656"><span class="section-number-3">1.4</span> <span class="todo TODO">TODO</span> Copy</h3>
|
||||
<div id="outline-container-org313c0f3" class="outline-3">
|
||||
<h3 id="org313c0f3"><span class="section-number-3">1.4</span> <span class="todo TODO">TODO</span> Copy</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<p>
|
||||
<code>qmckl_context_copy</code> makes a deep copy of a context. It returns
|
||||
@ -586,8 +586,8 @@ number of times the thread has locked it is saved in the
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org938bf0f" class="outline-3">
|
||||
<h3 id="org938bf0f"><span class="section-number-3">1.5</span> Destroy</h3>
|
||||
<div id="outline-container-orgc179147" class="outline-3">
|
||||
<h3 id="orgc179147"><span class="section-number-3">1.5</span> Destroy</h3>
|
||||
<div class="outline-text-3" id="text-1-5">
|
||||
<p>
|
||||
The context is destroyed with <code>qmckl_context_destroy</code>, leaving the ancestors untouched.
|
||||
@ -641,7 +641,7 @@ It frees the context, and returns the previous context.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:53</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:59</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-12 Wed 21:53 -->
|
||||
<!-- 2021-05-12 Wed 21:59 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Inter-particle distances</title>
|
||||
@ -333,26 +333,26 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org02aa0fd">1. Squared distance</a>
|
||||
<li><a href="#orga44f70f">1. Squared distance</a>
|
||||
<ul>
|
||||
<li><a href="#orga78d0a7">1.1. <code>qmckl_distance_sq</code></a>
|
||||
<li><a href="#org9f2167b">1.1. <code>qmckl_distance_sq</code></a>
|
||||
<ul>
|
||||
<li><a href="#org01b9084">1.1.1. Requirements</a></li>
|
||||
<li><a href="#org57b1d5a">1.1.2. C header</a></li>
|
||||
<li><a href="#orgc59937d">1.1.3. Source</a></li>
|
||||
<li><a href="#orgcc4a654">1.1.4. Performance</a></li>
|
||||
<li><a href="#org623daa5">1.1.1. Requirements</a></li>
|
||||
<li><a href="#orgab35e1d">1.1.2. C header</a></li>
|
||||
<li><a href="#orgc04b262">1.1.3. Source</a></li>
|
||||
<li><a href="#org2041955">1.1.4. Performance</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgc9fe708">2. Distance</a>
|
||||
<li><a href="#org922d627">2. Distance</a>
|
||||
<ul>
|
||||
<li><a href="#orga5a620d">2.1. <code>qmckl_distance</code></a>
|
||||
<li><a href="#org256e91f">2.1. <code>qmckl_distance</code></a>
|
||||
<ul>
|
||||
<li><a href="#org0b82f67">2.1.1. Requirements</a></li>
|
||||
<li><a href="#org58c9132">2.1.2. C header</a></li>
|
||||
<li><a href="#orgf79be72">2.1.3. Source</a></li>
|
||||
<li><a href="#org513f7c0">2.1.4. Performance</a></li>
|
||||
<li><a href="#org61ee26a">2.1.1. Requirements</a></li>
|
||||
<li><a href="#org9030bbf">2.1.2. C header</a></li>
|
||||
<li><a href="#org4215a1d">2.1.3. Source</a></li>
|
||||
<li><a href="#org0ad41b3">2.1.4. Performance</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -361,12 +361,12 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org02aa0fd" class="outline-2">
|
||||
<h2 id="org02aa0fd"><span class="section-number-2">1</span> Squared distance</h2>
|
||||
<div id="outline-container-orga44f70f" class="outline-2">
|
||||
<h2 id="orga44f70f"><span class="section-number-2">1</span> Squared distance</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-orga78d0a7" class="outline-3">
|
||||
<h3 id="orga78d0a7"><span class="section-number-3">1.1</span> <code>qmckl_distance_sq</code></h3>
|
||||
<div id="outline-container-org9f2167b" class="outline-3">
|
||||
<h3 id="org9f2167b"><span class="section-number-3">1.1</span> <code>qmckl_distance_sq</code></h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<p>
|
||||
<code>qmckl_distance_sq</code> computes the matrix of the squared distances
|
||||
@ -379,7 +379,7 @@ between all pairs of points in two sets, one point within each set:
|
||||
\]
|
||||
</p>
|
||||
|
||||
<table id="orga8eefbe" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org71b5d80" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -472,8 +472,8 @@ between all pairs of points in two sets, one point within each set:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org01b9084" class="outline-4">
|
||||
<h4 id="org01b9084"><span class="section-number-4">1.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-org623daa5" class="outline-4">
|
||||
<h4 id="org623daa5"><span class="section-number-4">1.1.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-1-1-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>QMCKL_NULL_CONTEXT</code></li>
|
||||
@ -491,8 +491,8 @@ between all pairs of points in two sets, one point within each set:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org57b1d5a" class="outline-4">
|
||||
<h4 id="org57b1d5a"><span class="section-number-4">1.1.2</span> C header</h4>
|
||||
<div id="outline-container-orgab35e1d" class="outline-4">
|
||||
<h4 id="orgab35e1d"><span class="section-number-4">1.1.2</span> C header</h4>
|
||||
<div class="outline-text-4" id="text-1-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_distance</span> (
|
||||
@ -512,8 +512,8 @@ between all pairs of points in two sets, one point within each set:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc59937d" class="outline-4">
|
||||
<h4 id="orgc59937d"><span class="section-number-4">1.1.3</span> Source</h4>
|
||||
<div id="outline-container-orgc04b262" class="outline-4">
|
||||
<h4 id="orgc04b262"><span class="section-number-4">1.1.3</span> Source</h4>
|
||||
<div class="outline-text-4" id="text-1-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #228b22;">integer</span><span style="color: #a0522d;"> function qmckl_distance_sq_f(context, transa, transb, m, n, </span><span style="color: #a020f0;">&</span>
|
||||
@ -648,8 +648,8 @@ between all pairs of points in two sets, one point within each set:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcc4a654" class="outline-4">
|
||||
<h4 id="orgcc4a654"><span class="section-number-4">1.1.4</span> Performance</h4>
|
||||
<div id="outline-container-org2041955" class="outline-4">
|
||||
<h4 id="org2041955"><span class="section-number-4">1.1.4</span> Performance</h4>
|
||||
<div class="outline-text-4" id="text-1-1-4">
|
||||
<p>
|
||||
This function might be more efficient when <code>A</code> and <code>B</code> are
|
||||
@ -659,12 +659,12 @@ transposed.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgc9fe708" class="outline-2">
|
||||
<h2 id="orgc9fe708"><span class="section-number-2">2</span> Distance</h2>
|
||||
<div id="outline-container-org922d627" class="outline-2">
|
||||
<h2 id="org922d627"><span class="section-number-2">2</span> Distance</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-orga5a620d" class="outline-3">
|
||||
<h3 id="orga5a620d"><span class="section-number-3">2.1</span> <code>qmckl_distance</code></h3>
|
||||
<div id="outline-container-org256e91f" class="outline-3">
|
||||
<h3 id="org256e91f"><span class="section-number-3">2.1</span> <code>qmckl_distance</code></h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
<code>qmckl_distance</code> computes the matrix of the distances between all
|
||||
@ -677,7 +677,7 @@ pairs of points in two sets, one point within each set:
|
||||
\]
|
||||
</p>
|
||||
|
||||
<table id="orgac29251" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgb093358" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -770,8 +770,8 @@ pairs of points in two sets, one point within each set:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0b82f67" class="outline-4">
|
||||
<h4 id="org0b82f67"><span class="section-number-4">2.1.1</span> Requirements</h4>
|
||||
<div id="outline-container-org61ee26a" class="outline-4">
|
||||
<h4 id="org61ee26a"><span class="section-number-4">2.1.1</span> Requirements</h4>
|
||||
<div class="outline-text-4" id="text-2-1-1">
|
||||
<ul class="org-ul">
|
||||
<li><code>context</code> is not <code>QMCKL_NULL_CONTEXT</code></li>
|
||||
@ -789,8 +789,8 @@ pairs of points in two sets, one point within each set:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org58c9132" class="outline-4">
|
||||
<h4 id="org58c9132"><span class="section-number-4">2.1.2</span> C header</h4>
|
||||
<div id="outline-container-org9030bbf" class="outline-4">
|
||||
<h4 id="org9030bbf"><span class="section-number-4">2.1.2</span> C header</h4>
|
||||
<div class="outline-text-4" id="text-2-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_distance</span> (
|
||||
@ -810,8 +810,8 @@ pairs of points in two sets, one point within each set:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf79be72" class="outline-4">
|
||||
<h4 id="orgf79be72"><span class="section-number-4">2.1.3</span> Source</h4>
|
||||
<div id="outline-container-org4215a1d" class="outline-4">
|
||||
<h4 id="org4215a1d"><span class="section-number-4">2.1.3</span> Source</h4>
|
||||
<div class="outline-text-4" id="text-2-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #228b22;">integer</span><span style="color: #a0522d;"> function qmckl_distance_f(context, transa, transb, m, n, </span><span style="color: #a020f0;">&</span>
|
||||
@ -950,8 +950,8 @@ pairs of points in two sets, one point within each set:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org513f7c0" class="outline-4">
|
||||
<h4 id="org513f7c0"><span class="section-number-4">2.1.4</span> Performance</h4>
|
||||
<div id="outline-container-org0ad41b3" class="outline-4">
|
||||
<h4 id="org0ad41b3"><span class="section-number-4">2.1.4</span> Performance</h4>
|
||||
<div class="outline-text-4" id="text-2-1-4">
|
||||
<p>
|
||||
This function might be more efficient when <code>A</code> and <code>B</code> are
|
||||
@ -964,7 +964,7 @@ transposed.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:53</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:59</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-12 Wed 21:53 -->
|
||||
<!-- 2021-05-12 Wed 21:59 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Electrons</title>
|
||||
@ -311,21 +311,21 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org9f17571">1. Context</a>
|
||||
<li><a href="#org695a45a">1. Context</a>
|
||||
<ul>
|
||||
<li><a href="#org17b3a98">1.1. Data structure</a></li>
|
||||
<li><a href="#org56670b0">1.2. Access functions</a></li>
|
||||
<li><a href="#org666c137">1.3. Initialization functions</a></li>
|
||||
<li><a href="#orgd3018f3">1.4. Test</a></li>
|
||||
<li><a href="#org5c8a5e4">1.1. Data structure</a></li>
|
||||
<li><a href="#orgd151127">1.2. Access functions</a></li>
|
||||
<li><a href="#org9365d7a">1.3. Initialization functions</a></li>
|
||||
<li><a href="#org0d3083f">1.4. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orge22c971">2. Computation</a>
|
||||
<li><a href="#orgf3baf21">2. Computation</a>
|
||||
<ul>
|
||||
<li><a href="#org7d8e32d">2.1. Electron-electron distances</a>
|
||||
<li><a href="#org3a6e404">2.1. Electron-electron distances</a>
|
||||
<ul>
|
||||
<li><a href="#orgefdf5b5">2.1.1. Get</a></li>
|
||||
<li><a href="#org2c2e432">2.1.2. Compute</a></li>
|
||||
<li><a href="#org443c5da">2.1.3. Test</a></li>
|
||||
<li><a href="#org8c9af3d">2.1.1. Get</a></li>
|
||||
<li><a href="#orga6b78c5">2.1.2. Compute</a></li>
|
||||
<li><a href="#orgac11e3a">2.1.3. Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -334,8 +334,8 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9f17571" class="outline-2">
|
||||
<h2 id="org9f17571"><span class="section-number-2">1</span> Context</h2>
|
||||
<div id="outline-container-org695a45a" class="outline-2">
|
||||
<h2 id="org695a45a"><span class="section-number-2">1</span> Context</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The following data stored in the context:
|
||||
@ -421,8 +421,8 @@ The following data stored in the context:
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org17b3a98" class="outline-3">
|
||||
<h3 id="org17b3a98"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-org5c8a5e4" class="outline-3">
|
||||
<h3 id="org5c8a5e4"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_electron_struct</span> {
|
||||
@ -450,8 +450,8 @@ struct is then initialized and <code>provided == true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org56670b0" class="outline-3">
|
||||
<h3 id="org56670b0"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div id="outline-container-orgd151127" class="outline-3">
|
||||
<h3 id="orgd151127"><span class="section-number-3">1.2</span> Access functions</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<p>
|
||||
When all the data relative to electrons have been set, the
|
||||
@ -465,8 +465,8 @@ following function returns <code>true</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org666c137" class="outline-3">
|
||||
<h3 id="org666c137"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div id="outline-container-org9365d7a" class="outline-3">
|
||||
<h3 id="org9365d7a"><span class="section-number-3">1.3</span> Initialization functions</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<p>
|
||||
To set the data relative to the electrons in the context, the
|
||||
@ -496,8 +496,8 @@ electrons have been set.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd3018f3" class="outline-3">
|
||||
<h3 id="orgd3018f3"><span class="section-number-3">1.4</span> Test</h3>
|
||||
<div id="outline-container-org0d3083f" class="outline-3">
|
||||
<h3 id="org0d3083f"><span class="section-number-3">1.4</span> Test</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Reference input data </span>*/
|
||||
@ -542,8 +542,8 @@ rc = qmckl_set_electron_coord (context, coord);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge22c971" class="outline-2">
|
||||
<h2 id="orge22c971"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div id="outline-container-orgf3baf21" class="outline-2">
|
||||
<h2 id="orgf3baf21"><span class="section-number-2">2</span> Computation</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
The computed data is stored in the context so that it can be reused
|
||||
@ -556,12 +556,12 @@ current date is stored.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7d8e32d" class="outline-3">
|
||||
<h3 id="org7d8e32d"><span class="section-number-3">2.1</span> Electron-electron distances</h3>
|
||||
<div id="outline-container-org3a6e404" class="outline-3">
|
||||
<h3 id="org3a6e404"><span class="section-number-3">2.1</span> Electron-electron distances</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
</div>
|
||||
<div id="outline-container-orgefdf5b5" class="outline-4">
|
||||
<h4 id="orgefdf5b5"><span class="section-number-4">2.1.1</span> Get</h4>
|
||||
<div id="outline-container-org8c9af3d" class="outline-4">
|
||||
<h4 id="org8c9af3d"><span class="section-number-4">2.1.1</span> Get</h4>
|
||||
<div class="outline-text-4" id="text-2-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span> <span style="color: #0000ff;">qmckl_get_electron_ee_distance</span>(<span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>, <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">distance</span>);
|
||||
@ -570,10 +570,10 @@ current date is stored.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2c2e432" class="outline-4">
|
||||
<h4 id="org2c2e432"><span class="section-number-4">2.1.2</span> Compute</h4>
|
||||
<div id="outline-container-orga6b78c5" class="outline-4">
|
||||
<h4 id="orga6b78c5"><span class="section-number-4">2.1.2</span> Compute</h4>
|
||||
<div class="outline-text-4" id="text-2-1-2">
|
||||
<table id="org564ec53" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org7fbaff8" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -670,8 +670,8 @@ current date is stored.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org443c5da" class="outline-4">
|
||||
<h4 id="org443c5da"><span class="section-number-4">2.1.3</span> Test</h4>
|
||||
<div id="outline-container-orgac11e3a" class="outline-4">
|
||||
<h4 id="orgac11e3a"><span class="section-number-4">2.1.3</span> Test</h4>
|
||||
<div class="outline-text-4" id="text-2-1-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c">/* <span style="color: #b22222;">Reference input data </span>*/
|
||||
@ -694,7 +694,7 @@ rc = qmckl_get_electron_ee_distance(context, distance);
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:53</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:59</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-12 Wed 21:53 -->
|
||||
<!-- 2021-05-12 Wed 21:59 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Error handling</title>
|
||||
@ -311,16 +311,16 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#orgf4adbd0">1. Decoding errors</a></li>
|
||||
<li><a href="#orgab73371">2. Data structure in context</a></li>
|
||||
<li><a href="#org1f7a4ca">3. Updating errors in the context</a></li>
|
||||
<li><a href="#orgfce3a3e">4. Failing</a></li>
|
||||
<li><a href="#org48a30cf">1. Decoding errors</a></li>
|
||||
<li><a href="#org26274c0">2. Data structure in context</a></li>
|
||||
<li><a href="#orgfe5a587">3. Updating errors in the context</a></li>
|
||||
<li><a href="#orge3f57a8">4. Failing</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf4adbd0" class="outline-2">
|
||||
<h2 id="orgf4adbd0"><span class="section-number-2">1</span> Decoding errors</h2>
|
||||
<div id="outline-container-org48a30cf" class="outline-2">
|
||||
<h2 id="org48a30cf"><span class="section-number-2">1</span> Decoding errors</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
To decode the error messages, <code>qmckl_string_of_error</code> converts an
|
||||
@ -414,8 +414,8 @@ The text strings are extracted from the previous table.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgab73371" class="outline-2">
|
||||
<h2 id="orgab73371"><span class="section-number-2">2</span> Data structure in context</h2>
|
||||
<div id="outline-container-org26274c0" class="outline-2">
|
||||
<h2 id="org26274c0"><span class="section-number-2">2</span> Data structure in context</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
The strings are declared with a maximum fixed size to avoid
|
||||
@ -438,8 +438,8 @@ dynamic memory allocation.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1f7a4ca" class="outline-2">
|
||||
<h2 id="org1f7a4ca"><span class="section-number-2">3</span> Updating errors in the context</h2>
|
||||
<div id="outline-container-orgfe5a587" class="outline-2">
|
||||
<h2 id="orgfe5a587"><span class="section-number-2">3</span> Updating errors in the context</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
<p>
|
||||
The error is updated in the context using <code>qmckl_set_error</code>.
|
||||
@ -485,8 +485,8 @@ explaining the error. The exit code can't be <code>QMCKL_SUCCESS</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgfce3a3e" class="outline-2">
|
||||
<h2 id="orgfce3a3e"><span class="section-number-2">4</span> Failing</h2>
|
||||
<div id="outline-container-orge3f57a8" class="outline-2">
|
||||
<h2 id="orge3f57a8"><span class="section-number-2">4</span> Failing</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<p>
|
||||
To make a function fail, the <code>qmckl_failwith</code> function should be
|
||||
@ -549,7 +549,7 @@ For example, this function can be used as
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:53</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:59</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-12 Wed 21:53 -->
|
||||
<!-- 2021-05-12 Wed 21:59 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Memory management</title>
|
||||
@ -311,15 +311,15 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org199d24c">1. Memory data structure for the context</a></li>
|
||||
<li><a href="#orge0550f3">2. Passing info to allocation routines</a></li>
|
||||
<li><a href="#org467fef6">3. Allocation/deallocation functions</a></li>
|
||||
<li><a href="#org14a3261">1. Memory data structure for the context</a></li>
|
||||
<li><a href="#org731ecc8">2. Passing info to allocation routines</a></li>
|
||||
<li><a href="#org6a48719">3. Allocation/deallocation functions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org199d24c" class="outline-2">
|
||||
<h2 id="org199d24c"><span class="section-number-2">1</span> Memory data structure for the context</h2>
|
||||
<div id="outline-container-org14a3261" class="outline-2">
|
||||
<h2 id="org14a3261"><span class="section-number-2">1</span> Memory data structure for the context</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
Every time a new block of memory is allocated, the information
|
||||
@ -361,8 +361,8 @@ array, and the number of allocated blocks.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge0550f3" class="outline-2">
|
||||
<h2 id="orge0550f3"><span class="section-number-2">2</span> Passing info to allocation routines</h2>
|
||||
<div id="outline-container-org731ecc8" class="outline-2">
|
||||
<h2 id="org731ecc8"><span class="section-number-2">2</span> Passing info to allocation routines</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
Passing information to the allocation routine should be done by
|
||||
@ -371,8 +371,8 @@ passing an instance of a <code>qmckl_memory_info_struct</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org467fef6" class="outline-2">
|
||||
<h2 id="org467fef6"><span class="section-number-2">3</span> Allocation/deallocation functions</h2>
|
||||
<div id="outline-container-org6a48719" class="outline-2">
|
||||
<h2 id="org6a48719"><span class="section-number-2">3</span> Allocation/deallocation functions</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
<p>
|
||||
Memory allocation inside the library should be done with
|
||||
@ -410,8 +410,8 @@ If the allocation failed, the <code>NULL</code> pointer is returned.
|
||||
/* <span style="color: #b22222;">If qmckl_memory_struct is full, reallocate a larger one </span>*/
|
||||
<span style="color: #a020f0;">if</span> (ctx->memory.n_allocated == ctx->memory.array_size) {
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">size_t</span> <span style="color: #a0522d;">old_size</span> = ctx->memory.array_size;
|
||||
<span style="color: #228b22;">qmckl_memory_info_struct</span> * <span style="color: #a0522d;">new_array</span> = reallocarray(ctx->memory.element,
|
||||
2L * old_size,
|
||||
<span style="color: #228b22;">qmckl_memory_info_struct</span> * <span style="color: #a0522d;">new_array</span> = realloc(ctx->memory.element,
|
||||
2L * old_size *
|
||||
<span style="color: #a020f0;">sizeof</span>(qmckl_memory_info_struct));
|
||||
<span style="color: #a020f0;">if</span> (new_array == <span style="color: #008b8b;">NULL</span>) {
|
||||
qmckl_unlock(context);
|
||||
@ -535,7 +535,7 @@ allocation and needs to be updated.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:53</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:59</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-05-12 Wed 21:53 -->
|
||||
<!-- 2021-05-12 Wed 21:59 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Numerical precision</title>
|
||||
@ -333,16 +333,16 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org72a1755">1. Control of the numerical precision</a></li>
|
||||
<li><a href="#org90657ee">2. Precision</a></li>
|
||||
<li><a href="#orgcdb7352">3. Range</a></li>
|
||||
<li><a href="#org16043c6">4. Helper functions</a></li>
|
||||
<li><a href="#orgd2bfadf">1. Control of the numerical precision</a></li>
|
||||
<li><a href="#org76f444c">2. Precision</a></li>
|
||||
<li><a href="#org0810937">3. Range</a></li>
|
||||
<li><a href="#org6dc8c08">4. Helper functions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org72a1755" class="outline-2">
|
||||
<h2 id="org72a1755"><span class="section-number-2">1</span> Control of the numerical precision</h2>
|
||||
<div id="outline-container-orgd2bfadf" class="outline-2">
|
||||
<h2 id="orgd2bfadf"><span class="section-number-2">1</span> Control of the numerical precision</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
Controlling numerical precision enables optimizations. Here, the
|
||||
@ -353,7 +353,7 @@ Arithmetic (IEEE 754),
|
||||
refers to the number of exponent bits.
|
||||
</p>
|
||||
|
||||
<table id="org3d9fa59" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="orgbdc9a5f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -397,8 +397,8 @@ integer. The update functions return <code>QMCKL_SUCCESS</code> or
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org90657ee" class="outline-2">
|
||||
<h2 id="org90657ee"><span class="section-number-2">2</span> Precision</h2>
|
||||
<div id="outline-container-org76f444c" class="outline-2">
|
||||
<h2 id="org76f444c"><span class="section-number-2">2</span> Precision</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
<code>qmckl_context_set_numprec_precision</code> modifies the parameter for the
|
||||
@ -485,8 +485,8 @@ numerical precision in the context.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcdb7352" class="outline-2">
|
||||
<h2 id="orgcdb7352"><span class="section-number-2">3</span> Range</h2>
|
||||
<div id="outline-container-org0810937" class="outline-2">
|
||||
<h2 id="org0810937"><span class="section-number-2">3</span> Range</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
<p>
|
||||
<code>qmckl_set_numprec_range</code> modifies the parameter for the numerical
|
||||
@ -561,8 +561,8 @@ range in a given context.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org16043c6" class="outline-2">
|
||||
<h2 id="org16043c6"><span class="section-number-2">4</span> Helper functions</h2>
|
||||
<div id="outline-container-org6dc8c08" class="outline-2">
|
||||
<h2 id="org6dc8c08"><span class="section-number-2">4</span> Helper functions</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<p>
|
||||
<code>qmckl_get_numprec_epsilon</code> returns \(\epsilon = 2^{1-n}\) where <code>n</code> is the precision.
|
||||
@ -581,7 +581,7 @@ We need to remove the sign bit from the precision.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:53</p>
|
||||
<p class="date">Created: 2021-05-12 Wed 21:59</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user