mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-11-03 20:54:09 +01:00
Deploying to gh-pages from @ TREX-CoE/qmckl@271c4cfe84 🚀
This commit is contained in:
parent
3afd7e5caf
commit
43513a01ec
@ -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-03-20 Sat 15:59 -->
|
||||
<!-- 2021-03-23 Tue 21:25 -->
|
||||
<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>
|
||||
@ -348,7 +348,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-03-20 Sat 15:59</p>
|
||||
<p class="date">Created: 2021-03-23 Tue 21:25</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-03-20 Sat 15:59 -->
|
||||
<!-- 2021-03-23 Tue 21:25 -->
|
||||
<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>
|
||||
@ -348,7 +348,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-03-20 Sat 15:59</p>
|
||||
<p class="date">Created: 2021-03-23 Tue 21:25</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-03-20 Sat 15:59 -->
|
||||
<!-- 2021-03-23 Tue 21:25 -->
|
||||
<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="#orgd3a8f6b">1. Using QMCkl</a></li>
|
||||
<li><a href="#org4a4216a">2. Developing in QMCkl</a>
|
||||
<li><a href="#org651d39a">1. Using QMCkl</a></li>
|
||||
<li><a href="#org2e58781">2. Developing in QMCkl</a>
|
||||
<ul>
|
||||
<li><a href="#orga44ec5f">2.1. Literate programming</a></li>
|
||||
<li><a href="#org14d8050">2.2. Source code editing</a></li>
|
||||
<li><a href="#orgb256d2a">2.3. Choice of the programming language</a></li>
|
||||
<li><a href="#orgc77316b">2.4. Coding rules</a></li>
|
||||
<li><a href="#orgbc13081">2.5. Design of the library</a></li>
|
||||
<li><a href="#org53f2964">2.6. Naming conventions</a></li>
|
||||
<li><a href="#orgef1f700">2.7. Application programming interface</a></li>
|
||||
<li><a href="#org4744ec4">2.8. Global state</a></li>
|
||||
<li><a href="#org1a8c9fd">2.9. Low-level functions</a></li>
|
||||
<li><a href="#orgaa44b17">2.10. High-level functions</a></li>
|
||||
<li><a href="#org298a340">2.11. Numerical precision</a></li>
|
||||
<li><a href="#orge2cdfdc">2.12. Algorithms</a></li>
|
||||
<li><a href="#org0b6542b">2.13. Rules for the API</a></li>
|
||||
<li><a href="#orgd5c6f98">2.1. Literate programming</a></li>
|
||||
<li><a href="#orgef2320b">2.2. Source code editing</a></li>
|
||||
<li><a href="#orgb98bdd1">2.3. Choice of the programming language</a></li>
|
||||
<li><a href="#org9612495">2.4. Coding rules</a></li>
|
||||
<li><a href="#orgd2c4524">2.5. Design of the library</a></li>
|
||||
<li><a href="#orgd1be4ca">2.6. Naming conventions</a></li>
|
||||
<li><a href="#orgd2f4a9a">2.7. Application programming interface</a></li>
|
||||
<li><a href="#org83249fd">2.8. Global state</a></li>
|
||||
<li><a href="#org4068345">2.9. Low-level functions</a></li>
|
||||
<li><a href="#org1a8d2e6">2.10. High-level functions</a></li>
|
||||
<li><a href="#orgbd559b6">2.11. Numerical precision</a></li>
|
||||
<li><a href="#orgf3b0ef0">2.12. Algorithms</a></li>
|
||||
<li><a href="#org6c0f6fc">2.13. Rules for the API</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd3a8f6b" class="outline-2">
|
||||
<h2 id="orgd3a8f6b"><span class="section-number-2">1</span> Using QMCkl</h2>
|
||||
<div id="outline-container-org651d39a" class="outline-2">
|
||||
<h2 id="org651d39a"><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 has to be included in C codes when
|
||||
@ -385,12 +385,12 @@ Both files are located in the <code>include/</code> directory.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4a4216a" class="outline-2">
|
||||
<h2 id="org4a4216a"><span class="section-number-2">2</span> Developing in QMCkl</h2>
|
||||
<div id="outline-container-org2e58781" class="outline-2">
|
||||
<h2 id="org2e58781"><span class="section-number-2">2</span> Developing in QMCkl</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-orga44ec5f" class="outline-3">
|
||||
<h3 id="orga44ec5f"><span class="section-number-3">2.1</span> Literate programming</h3>
|
||||
<div id="outline-container-orgd5c6f98" class="outline-3">
|
||||
<h3 id="orgd5c6f98"><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
|
||||
@ -436,8 +436,8 @@ interactively, in the same spirit as Jupyter notebooks.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org14d8050" class="outline-3">
|
||||
<h3 id="org14d8050"><span class="section-number-3">2.2</span> Source code editing</h3>
|
||||
<div id="outline-container-orgef2320b" class="outline-3">
|
||||
<h3 id="orgef2320b"><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>.
|
||||
@ -469,8 +469,8 @@ org-mode.
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgb256d2a" class="outline-3">
|
||||
<h3 id="orgb256d2a"><span class="section-number-3">2.3</span> Choice of the programming language</h3>
|
||||
<div id="outline-container-orgb98bdd1" class="outline-3">
|
||||
<h3 id="orgb98bdd1"><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
|
||||
@ -518,8 +518,8 @@ For more guidelines on using Fortran to generate a C interface, see
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc77316b" class="outline-3">
|
||||
<h3 id="orgc77316b"><span class="section-number-3">2.4</span> Coding rules</h3>
|
||||
<div id="outline-container-org9612495" class="outline-3">
|
||||
<h3 id="org9612495"><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
|
||||
@ -535,8 +535,8 @@ freed</li>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-orgbc13081" class="outline-3">
|
||||
<h3 id="orgbc13081"><span class="section-number-3">2.5</span> Design of the library</h3>
|
||||
<div id="outline-container-orgd2c4524" class="outline-3">
|
||||
<h3 id="orgd2c4524"><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-org53f2964" class="outline-3">
|
||||
<h3 id="org53f2964"><span class="section-number-3">2.6</span> Naming conventions</h3>
|
||||
<div id="outline-container-orgd1be4ca" class="outline-3">
|
||||
<h3 id="orgd1be4ca"><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-orgef1f700" class="outline-3">
|
||||
<h3 id="orgef1f700"><span class="section-number-3">2.7</span> Application programming interface</h3>
|
||||
<div id="outline-container-orgd2f4a9a" class="outline-3">
|
||||
<h3 id="orgd2f4a9a"><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
|
||||
@ -607,15 +607,15 @@ bindings in other languages in other repositories.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4744ec4" class="outline-3">
|
||||
<h3 id="org4744ec4"><span class="section-number-3">2.8</span> Global state</h3>
|
||||
<div id="outline-container-org83249fd" class="outline-3">
|
||||
<h3 id="org83249fd"><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="orgccc31a0">=context=</a> contains the global
|
||||
<code>qmckl_context_create</code> function. The <a id="org776fed0">=context=</a> contains the global
|
||||
state of the library, and is used as the first argument of many
|
||||
QMCkl functions.
|
||||
</p>
|
||||
@ -635,8 +635,8 @@ versions can be destroyed with <code>qmckl_context_destroy</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1a8c9fd" class="outline-3">
|
||||
<h3 id="org1a8c9fd"><span class="section-number-3">2.9</span> Low-level functions</h3>
|
||||
<div id="outline-container-org4068345" class="outline-3">
|
||||
<h3 id="org4068345"><span class="section-number-3">2.9</span> Low-level functions</h3>
|
||||
<div class="outline-text-3" id="text-2-9">
|
||||
<p>
|
||||
Low-level functions are very simple functions which are leaves of
|
||||
@ -645,14 +645,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="#orgccc31a0"><code>context</code></a>. They are not allowed to allocate/deallocate memory, and
|
||||
<a href="#org776fed0"><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-orgaa44b17" class="outline-3">
|
||||
<h3 id="orgaa44b17"><span class="section-number-3">2.10</span> High-level functions</h3>
|
||||
<div id="outline-container-org1a8d2e6" class="outline-3">
|
||||
<h3 id="org1a8d2e6"><span class="section-number-3">2.10</span> High-level functions</h3>
|
||||
<div class="outline-text-3" id="text-2-10">
|
||||
<p>
|
||||
High-level functions are at the top of the function call tree.
|
||||
@ -665,27 +665,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="#orgccc31a0"><code>context</code></a> variable.
|
||||
the <a href="#org776fed0"><code>context</code></a> variable.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org298a340" class="outline-3">
|
||||
<h3 id="org298a340"><span class="section-number-3">2.11</span> Numerical precision</h3>
|
||||
<div id="outline-container-orgbd559b6" class="outline-3">
|
||||
<h3 id="orgbd559b6"><span class="section-number-3">2.11</span> Numerical precision</h3>
|
||||
<div class="outline-text-3" id="text-2-11">
|
||||
<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="#orgccc31a0"><code>context</code></a>
|
||||
functions will use the precision specified in the <a href="#org776fed0"><code>context</code></a>
|
||||
variable.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge2cdfdc" class="outline-3">
|
||||
<h3 id="orge2cdfdc"><span class="section-number-3">2.12</span> Algorithms</h3>
|
||||
<div id="outline-container-orgf3b0ef0" class="outline-3">
|
||||
<h3 id="orgf3b0ef0"><span class="section-number-3">2.12</span> Algorithms</h3>
|
||||
<div class="outline-text-3" id="text-2-12">
|
||||
<p>
|
||||
Reducing the scaling of an algorithm usually implies also reducing
|
||||
@ -698,8 +698,8 @@ implemented adapted to different problem sizes.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0b6542b" class="outline-3">
|
||||
<h3 id="org0b6542b"><span class="section-number-3">2.13</span> Rules for the API</h3>
|
||||
<div id="outline-container-org6c0f6fc" class="outline-3">
|
||||
<h3 id="org6c0f6fc"><span class="section-number-3">2.13</span> Rules for the API</h3>
|
||||
<div class="outline-text-3" id="text-2-13">
|
||||
<ul class="org-ul">
|
||||
<li><code>stdint</code> should be used for integers (<code>int32_t</code>, <code>int64_t</code>)</li>
|
||||
@ -713,7 +713,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-03-20 Sat 15:59</p>
|
||||
<p class="date">Created: 2021-03-23 Tue 21:25</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-03-20 Sat 15:59 -->
|
||||
<!-- 2021-03-23 Tue 21:25 -->
|
||||
<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,14 +333,14 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org0ffb8fa">1. Polynomial part</a>
|
||||
<li><a href="#org74e721f">1. Polynomial part</a>
|
||||
<ul>
|
||||
<li><a href="#orgb0acbfd">1.1. Powers of \(x-X_i\)</a></li>
|
||||
<li><a href="#org7792c01">1.2. Value, Gradient and Laplacian of a polynomial</a></li>
|
||||
<li><a href="#org33d5013">1.1. Powers of \(x-X_i\)</a></li>
|
||||
<li><a href="#org4b2a3e5">1.2. Value, Gradient and Laplacian of a polynomial</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgc48157c">2. Gaussian basis functions</a></li>
|
||||
<li><a href="#orgba8162d">3. <span class="todo TODO">TODO</span> Slater basis functions</a></li>
|
||||
<li><a href="#orgb815dab">2. Gaussian basis functions</a></li>
|
||||
<li><a href="#org4766aa5">3. <span class="todo TODO">TODO</span> Slater basis functions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -389,12 +389,12 @@ In this section we describe the kernels used to compute the values,
|
||||
gradients and Laplacian of the atomic basis functions.
|
||||
</p>
|
||||
|
||||
<div id="outline-container-org0ffb8fa" class="outline-2">
|
||||
<h2 id="org0ffb8fa"><span class="section-number-2">1</span> Polynomial part</h2>
|
||||
<div id="outline-container-org74e721f" class="outline-2">
|
||||
<h2 id="org74e721f"><span class="section-number-2">1</span> Polynomial part</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-orgb0acbfd" class="outline-3">
|
||||
<h3 id="orgb0acbfd"><span class="section-number-3">1.1</span> Powers of \(x-X_i\)</h3>
|
||||
<div id="outline-container-org33d5013" class="outline-3">
|
||||
<h3 id="org33d5013"><span class="section-number-3">1.1</span> Powers of \(x-X_i\)</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<p>
|
||||
The <code>qmckl_ao_power</code> function computes all the powers of the <code>n</code>
|
||||
@ -574,8 +574,8 @@ Requirements:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7792c01" class="outline-3">
|
||||
<h3 id="org7792c01"><span class="section-number-3">1.2</span> Value, Gradient and Laplacian of a polynomial</h3>
|
||||
<div id="outline-container-org4b2a3e5" class="outline-3">
|
||||
<h3 id="org4b2a3e5"><span class="section-number-3">1.2</span> Value, Gradient and Laplacian of a polynomial</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<p>
|
||||
A polynomial is centered on a nucleus \(\mathbf{R}_i\)
|
||||
@ -960,8 +960,8 @@ munit_assert_int(0, ==, test_qmckl_ao_polynomial_vgl(context));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc48157c" class="outline-2">
|
||||
<h2 id="orgc48157c"><span class="section-number-2">2</span> Gaussian basis functions</h2>
|
||||
<div id="outline-container-orgb815dab" class="outline-2">
|
||||
<h2 id="orgb815dab"><span class="section-number-2">2</span> Gaussian basis functions</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
<code>qmckl_ao_gaussian_vgl</code> computes the values, gradients and
|
||||
@ -1193,13 +1193,13 @@ Requirements :
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgba8162d" class="outline-2">
|
||||
<h2 id="orgba8162d"><span class="section-number-2">3</span> <span class="todo TODO">TODO</span> Slater basis functions</h2>
|
||||
<div id="outline-container-org4766aa5" class="outline-2">
|
||||
<h2 id="org4766aa5"><span class="section-number-2">3</span> <span class="todo TODO">TODO</span> Slater basis functions</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-03-20 Sat 15:59</p>
|
||||
<p class="date">Created: 2021-03-23 Tue 21:25</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-03-20 Sat 15:59 -->
|
||||
<!-- 2021-03-23 Tue 21:25 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Context</title>
|
||||
@ -333,51 +333,51 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org95a04bd">1. Context handling</a>
|
||||
<li><a href="#org1f8bb26">1. Context handling</a>
|
||||
<ul>
|
||||
<li><a href="#orga7ca711">1.1. Data structure</a></li>
|
||||
<li><a href="#org9f6d849">1.2. Creation</a></li>
|
||||
<li><a href="#orgb851511">1.3. Access to the previous context</a></li>
|
||||
<li><a href="#orgb4cd544">1.4. Locking</a></li>
|
||||
<li><a href="#orgc4c8967">1.5. Copy</a></li>
|
||||
<li><a href="#org9b95ba0">1.6. Destroy</a></li>
|
||||
<li><a href="#org1bd1546">1.1. Data structure</a></li>
|
||||
<li><a href="#org547611c">1.2. Creation</a></li>
|
||||
<li><a href="#orgab98e7e">1.3. Access to the previous context</a></li>
|
||||
<li><a href="#orgce17ec2">1.4. Locking</a></li>
|
||||
<li><a href="#org54cd706">1.5. Copy</a></li>
|
||||
<li><a href="#org96d5107">1.6. Destroy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org0f2231c">2. Memory allocation handling</a>
|
||||
<li><a href="#org7dfa449">2. Memory allocation handling</a>
|
||||
<ul>
|
||||
<li><a href="#org4b12848">2.1. Data structure</a></li>
|
||||
<li><a href="#orgb628973">2.2. Append memory</a></li>
|
||||
<li><a href="#org2d326c6">2.3. Remove memory</a></li>
|
||||
<li><a href="#org7f68145">2.1. Data structure</a></li>
|
||||
<li><a href="#orgfe2faa6">2.2. Append memory</a></li>
|
||||
<li><a href="#org6673d49">2.3. Remove memory</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgc23251d">3. Error handling</a>
|
||||
<li><a href="#org8ced40f">3. Error handling</a>
|
||||
<ul>
|
||||
<li><a href="#orgda9e324">3.1. Data structure</a></li>
|
||||
<li><a href="#org1efeff8">3.2. Updating errors</a></li>
|
||||
<li><a href="#orge0001cb">3.1. Data structure</a></li>
|
||||
<li><a href="#org73c6984">3.2. Updating errors</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orga04bd35">4. Control of the numerical precision</a>
|
||||
<li><a href="#orgb5bac03">4. Control of the numerical precision</a>
|
||||
<ul>
|
||||
<li><a href="#org8114fc0">4.1. Precision</a></li>
|
||||
<li><a href="#orgfe3627f">4.2. Range</a></li>
|
||||
<li><a href="#org32a66a3">4.3. Helper functions</a></li>
|
||||
<li><a href="#org14623c0">4.1. Precision</a></li>
|
||||
<li><a href="#org63c3be2">4.2. Range</a></li>
|
||||
<li><a href="#org7e8d441">4.3. Helper functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org239a5da">5. <span class="todo TODO">TODO</span> Basis set</a>
|
||||
<li><a href="#org726b951">5. <span class="todo TODO">TODO</span> Basis set</a>
|
||||
<ul>
|
||||
<li><a href="#orgc97bb9b">5.1. Data structure</a></li>
|
||||
<li><a href="#org185dc35">5.2. <code>qmckl_context_update_ao_basis</code></a>
|
||||
<li><a href="#org8ce7135">5.1. Data structure</a></li>
|
||||
<li><a href="#org03947a0">5.2. <code>qmckl_context_update_ao_basis</code></a>
|
||||
<ul>
|
||||
<li><a href="#org14dbdd7">5.2.1. Source</a></li>
|
||||
<li><a href="#orgcf2dd54">5.2.2. Fortran interface</a></li>
|
||||
<li><a href="#orgf80cc12">5.2.3. <span class="todo TODO">TODO</span> Test</a></li>
|
||||
<li><a href="#orgc421adc">5.2.1. Source</a></li>
|
||||
<li><a href="#orge6b3490">5.2.2. Fortran interface</a></li>
|
||||
<li><a href="#org2e8acd6">5.2.3. <span class="todo TODO">TODO</span> Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org9d381d2">5.3. <code>qmckl_context_set_ao_basis</code></a>
|
||||
<li><a href="#org8a4e904">5.3. <code>qmckl_context_set_ao_basis</code></a>
|
||||
<ul>
|
||||
<li><a href="#org44b52f3">5.3.1. Source</a></li>
|
||||
<li><a href="#orgefcb70a">5.3.2. Fortran interface</a></li>
|
||||
<li><a href="#orgf5560b3">5.3.3. <span class="todo TODO">TODO</span> Test</a></li>
|
||||
<li><a href="#orgf7bcf78">5.3.1. Source</a></li>
|
||||
<li><a href="#org35cd041">5.3.2. Fortran interface</a></li>
|
||||
<li><a href="#org970a631">5.3.3. <span class="todo TODO">TODO</span> Test</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -401,8 +401,8 @@ A value of <code>QMCKL_NULL_CONTEXT</code> for the context is equivalent to a
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org95a04bd" class="outline-2">
|
||||
<h2 id="org95a04bd"><span class="section-number-2">1</span> Context handling</h2>
|
||||
<div id="outline-container-org1f8bb26" class="outline-2">
|
||||
<h2 id="org1f8bb26"><span class="section-number-2">1</span> Context handling</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
The context appears as an immutable data structure: modifying a
|
||||
@ -419,8 +419,8 @@ and <code>ctx</code> is a <code>qmckl_context_struct*</code> pointer.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga7ca711" class="outline-3">
|
||||
<h3 id="orga7ca711"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div id="outline-container-org1bd1546" class="outline-3">
|
||||
<h3 id="org1bd1546"><span class="section-number-3">1.1</span> Data structure</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<p>
|
||||
The main data structure contains pointers to other data structures,
|
||||
@ -430,7 +430,7 @@ pointers.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c" id="org08b6aaa"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_context_struct</span> {
|
||||
<pre class="src src-c" id="org529e80c"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_context_struct</span> {
|
||||
|
||||
/* <span style="color: #b22222;">Pointer to the previous context, before modification </span>*/
|
||||
<span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_context_struct</span> * <span style="color: #a0522d;">prev</span>;
|
||||
@ -510,8 +510,8 @@ if the context is valid, <code>QMCKL_NULL_CONTEXT</code> otherwise.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9f6d849" class="outline-3">
|
||||
<h3 id="org9f6d849"><span class="section-number-3">1.2</span> Creation</h3>
|
||||
<div id="outline-container-org547611c" class="outline-3">
|
||||
<h3 id="org547611c"><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.
|
||||
@ -549,8 +549,8 @@ To create a new context, <code>qmckl_context_create()</code> should be used.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgb851511" class="outline-3">
|
||||
<h3 id="orgb851511"><span class="section-number-3">1.3</span> Access to the previous context</h3>
|
||||
<div id="outline-container-orgab98e7e" class="outline-3">
|
||||
<h3 id="orgab98e7e"><span class="section-number-3">1.3</span> Access to the previous context</h3>
|
||||
<div class="outline-text-3" id="text-1-3">
|
||||
<p>
|
||||
<code>qmckl_context_previous</code> returns the previous context. It returns
|
||||
@ -572,8 +572,8 @@ To create a new context, <code>qmckl_context_create()</code> should be used.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-orgb4cd544" class="outline-3">
|
||||
<h3 id="orgb4cd544"><span class="section-number-3">1.4</span> Locking</h3>
|
||||
<div id="outline-container-orgce17ec2" class="outline-3">
|
||||
<h3 id="orgce17ec2"><span class="section-number-3">1.4</span> Locking</h3>
|
||||
<div class="outline-text-3" id="text-1-4">
|
||||
<p>
|
||||
For thread safety, the context may be locked/unlocked. The lock is
|
||||
@ -633,8 +633,8 @@ number of times the thread has locked it is saved in the
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc4c8967" class="outline-3">
|
||||
<h3 id="orgc4c8967"><span class="section-number-3">1.5</span> Copy</h3>
|
||||
<div id="outline-container-org54cd706" class="outline-3">
|
||||
<h3 id="org54cd706"><span class="section-number-3">1.5</span> Copy</h3>
|
||||
<div class="outline-text-3" id="text-1-5">
|
||||
<p>
|
||||
<code>qmckl_context_copy</code> makes a shallow copy of a context. It returns
|
||||
@ -680,8 +680,8 @@ number of times the thread has locked it is saved in the
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org9b95ba0" class="outline-3">
|
||||
<h3 id="org9b95ba0"><span class="section-number-3">1.6</span> Destroy</h3>
|
||||
<div id="outline-container-org96d5107" class="outline-3">
|
||||
<h3 id="org96d5107"><span class="section-number-3">1.6</span> Destroy</h3>
|
||||
<div class="outline-text-3" id="text-1-6">
|
||||
<p>
|
||||
The context is destroyed with <code>qmckl_context_destroy</code>, leaving the ancestors untouched.
|
||||
@ -741,12 +741,12 @@ It frees the context, and returns the previous context.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org0f2231c" class="outline-2">
|
||||
<h2 id="org0f2231c"><span class="section-number-2">2</span> Memory allocation handling</h2>
|
||||
<div id="outline-container-org7dfa449" class="outline-2">
|
||||
<h2 id="org7dfa449"><span class="section-number-2">2</span> Memory allocation handling</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
<div id="outline-container-org4b12848" class="outline-3">
|
||||
<h3 id="org4b12848"><span class="section-number-3">2.1</span> Data structure</h3>
|
||||
<div id="outline-container-org7f68145" class="outline-3">
|
||||
<h3 id="org7f68145"><span class="section-number-3">2.1</span> Data structure</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<p>
|
||||
Pointers to all allocated memory domains are stored in the context,
|
||||
@ -755,7 +755,7 @@ computation of the amount of currently used memory by the library.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c" id="orga1b5251"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_memory_struct</span> {
|
||||
<pre class="src src-c" id="org44c9f15"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_memory_struct</span> {
|
||||
<span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_memory_struct</span> * <span style="color: #a0522d;">next</span> ;
|
||||
<span style="color: #228b22;">void</span> * <span style="color: #a0522d;">pointer</span> ;
|
||||
<span style="color: #228b22;">size_t</span> <span style="color: #a0522d;">size</span> ;
|
||||
@ -765,8 +765,8 @@ computation of the amount of currently used memory by the library.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgb628973" class="outline-3">
|
||||
<h3 id="orgb628973"><span class="section-number-3">2.2</span> Append memory</h3>
|
||||
<div id="outline-container-orgfe2faa6" class="outline-3">
|
||||
<h3 id="orgfe2faa6"><span class="section-number-3">2.2</span> Append memory</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
The following function, called in <a href="./qmckl_memory.html"><code>qmckl_memory.c</code></a>, appends a new
|
||||
@ -824,8 +824,8 @@ immediately with <code>QMCKL_SUCCESS</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org2d326c6" class="outline-3">
|
||||
<h3 id="org2d326c6"><span class="section-number-3">2.3</span> Remove memory</h3>
|
||||
<div id="outline-container-org6673d49" class="outline-3">
|
||||
<h3 id="org6673d49"><span class="section-number-3">2.3</span> Remove memory</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<p>
|
||||
The following function, called in <a href="./qmckl_memory.html"><code>qmckl_memory.c</code></a>, removes a
|
||||
@ -876,15 +876,15 @@ immediately with <code>QMCKL_SUCCESS</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc23251d" class="outline-2">
|
||||
<h2 id="orgc23251d"><span class="section-number-2">3</span> Error handling</h2>
|
||||
<div id="outline-container-org8ced40f" class="outline-2">
|
||||
<h2 id="org8ced40f"><span class="section-number-2">3</span> Error handling</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
</div>
|
||||
<div id="outline-container-orgda9e324" class="outline-3">
|
||||
<h3 id="orgda9e324"><span class="section-number-3">3.1</span> Data structure</h3>
|
||||
<div id="outline-container-orge0001cb" class="outline-3">
|
||||
<h3 id="orge0001cb"><span class="section-number-3">3.1</span> Data structure</h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c" id="org16476ce"><span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">QMCKL_MAX_FUN_LEN</span> 256
|
||||
<pre class="src src-c" id="org8d8d369"><span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">QMCKL_MAX_FUN_LEN</span> 256
|
||||
<span style="color: #483d8b;">#define</span> <span style="color: #a0522d;">QMCKL_MAX_MSG_LEN</span> 1024
|
||||
|
||||
<span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_error_struct</span> {
|
||||
@ -899,8 +899,8 @@ immediately with <code>QMCKL_SUCCESS</code>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1efeff8" class="outline-3">
|
||||
<h3 id="org1efeff8"><span class="section-number-3">3.2</span> Updating errors</h3>
|
||||
<div id="outline-container-org73c6984" class="outline-3">
|
||||
<h3 id="org73c6984"><span class="section-number-3">3.2</span> Updating errors</h3>
|
||||
<div class="outline-text-3" id="text-3-2">
|
||||
<p>
|
||||
The error is updated in the context using
|
||||
@ -1049,8 +1049,8 @@ For example, this function can be used as
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orga04bd35" class="outline-2">
|
||||
<h2 id="orga04bd35"><span class="section-number-2">4</span> Control of the numerical precision</h2>
|
||||
<div id="outline-container-orgb5bac03" class="outline-2">
|
||||
<h2 id="orgb5bac03"><span class="section-number-2">4</span> Control of the numerical precision</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<p>
|
||||
Controlling numerical precision enables optimizations. Here, the
|
||||
@ -1058,7 +1058,7 @@ default parameters determining the target numerical precision and
|
||||
range are defined.
|
||||
</p>
|
||||
|
||||
<table id="org60fea84" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org6c6e25f" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -1104,7 +1104,7 @@ range are defined.
|
||||
</div>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c" id="org6bed533"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_precision_struct</span> {
|
||||
<pre class="src src-c" id="org4ec6b22"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_precision_struct</span> {
|
||||
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">precision</span>;
|
||||
<span style="color: #228b22;">int</span> <span style="color: #a0522d;">range</span>;
|
||||
} <span style="color: #228b22;">qmckl_precision_struct</span>;
|
||||
@ -1125,8 +1125,8 @@ integer. The update functions return <code>QMCKL_SUCCESS</code> or
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org8114fc0" class="outline-3">
|
||||
<h3 id="org8114fc0"><span class="section-number-3">4.1</span> Precision</h3>
|
||||
<div id="outline-container-org14623c0" class="outline-3">
|
||||
<h3 id="org14623c0"><span class="section-number-3">4.1</span> Precision</h3>
|
||||
<div class="outline-text-3" id="text-4-1">
|
||||
<p>
|
||||
<code>qmckl_context_update_precision</code> modifies the parameter for the
|
||||
@ -1248,8 +1248,8 @@ different precision parameter.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgfe3627f" class="outline-3">
|
||||
<h3 id="orgfe3627f"><span class="section-number-3">4.2</span> Range</h3>
|
||||
<div id="outline-container-org63c3be2" class="outline-3">
|
||||
<h3 id="org63c3be2"><span class="section-number-3">4.2</span> Range</h3>
|
||||
<div class="outline-text-3" id="text-4-2">
|
||||
<p>
|
||||
<code>qmckl_context_update_range</code> modifies the parameter for the numerical range in a given context.
|
||||
@ -1357,8 +1357,8 @@ different precision parameter.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org32a66a3" class="outline-3">
|
||||
<h3 id="org32a66a3"><span class="section-number-3">4.3</span> Helper functions</h3>
|
||||
<div id="outline-container-org7e8d441" class="outline-3">
|
||||
<h3 id="org7e8d441"><span class="section-number-3">4.3</span> Helper functions</h3>
|
||||
<div class="outline-text-3" id="text-4-3">
|
||||
<p>
|
||||
<code>qmckl_context_get_epsilon</code> returns \(\epsilon = 2^{1-n}\) where <code>n</code> is the precision.
|
||||
@ -1374,8 +1374,8 @@ different precision parameter.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outline-container-org239a5da" class="outline-2">
|
||||
<h2 id="org239a5da"><span class="section-number-2">5</span> <span class="todo TODO">TODO</span> Basis set</h2>
|
||||
<div id="outline-container-org726b951" class="outline-2">
|
||||
<h2 id="org726b951"><span class="section-number-2">5</span> <span class="todo TODO">TODO</span> Basis set</h2>
|
||||
<div class="outline-text-2" id="text-5">
|
||||
<p>
|
||||
For H<sub>2</sub> with the following basis set,
|
||||
@ -1422,11 +1422,11 @@ COEFFICIENT = [ 0.006068, 0.045308, 0.202822, 0.503903, 0.383421,
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc97bb9b" class="outline-3">
|
||||
<h3 id="orgc97bb9b"><span class="section-number-3">5.1</span> Data structure</h3>
|
||||
<div id="outline-container-org8ce7135" class="outline-3">
|
||||
<h3 id="org8ce7135"><span class="section-number-3">5.1</span> Data structure</h3>
|
||||
<div class="outline-text-3" id="text-5-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c" id="orgbf64c08"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_ao_basis_struct</span> {
|
||||
<pre class="src src-c" id="orgd0c68c6"><span style="color: #a020f0;">typedef</span> <span style="color: #a020f0;">struct</span> <span style="color: #228b22;">qmckl_ao_basis_struct</span> {
|
||||
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">shell_num</span>;
|
||||
<span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">prim_num</span>;
|
||||
@ -1444,8 +1444,8 @@ COEFFICIENT = [ 0.006068, 0.045308, 0.202822, 0.503903, 0.383421,
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org185dc35" class="outline-3">
|
||||
<h3 id="org185dc35"><span class="section-number-3">5.2</span> <code>qmckl_context_update_ao_basis</code></h3>
|
||||
<div id="outline-container-org03947a0" class="outline-3">
|
||||
<h3 id="org03947a0"><span class="section-number-3">5.2</span> <code>qmckl_context_update_ao_basis</code></h3>
|
||||
<div class="outline-text-3" id="text-5-2">
|
||||
<p>
|
||||
Updates the data describing the AO basis set into the context.
|
||||
@ -1529,8 +1529,8 @@ Updates the data describing the AO basis set into the context.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org14dbdd7" class="outline-4">
|
||||
<h4 id="org14dbdd7"><span class="section-number-4">5.2.1</span> Source</h4>
|
||||
<div id="outline-container-orgc421adc" class="outline-4">
|
||||
<h4 id="orgc421adc"><span class="section-number-4">5.2.1</span> Source</h4>
|
||||
<div class="outline-text-4" id="text-5-2-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_exit_code</span>
|
||||
@ -1677,8 +1677,8 @@ Updates the data describing the AO basis set into the context.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgcf2dd54" class="outline-4">
|
||||
<h4 id="orgcf2dd54"><span class="section-number-4">5.2.2</span> Fortran interface</h4>
|
||||
<div id="outline-container-orge6b3490" class="outline-4">
|
||||
<h4 id="orge6b3490"><span class="section-number-4">5.2.2</span> Fortran interface</h4>
|
||||
<div class="outline-text-4" id="text-5-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">interface</span>
|
||||
@ -1704,13 +1704,13 @@ Updates the data describing the AO basis set into the context.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf80cc12" class="outline-4">
|
||||
<h4 id="orgf80cc12"><span class="section-number-4">5.2.3</span> <span class="todo TODO">TODO</span> Test</h4>
|
||||
<div id="outline-container-org2e8acd6" class="outline-4">
|
||||
<h4 id="org2e8acd6"><span class="section-number-4">5.2.3</span> <span class="todo TODO">TODO</span> Test</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9d381d2" class="outline-3">
|
||||
<h3 id="org9d381d2"><span class="section-number-3">5.3</span> <code>qmckl_context_set_ao_basis</code></h3>
|
||||
<div id="outline-container-org8a4e904" class="outline-3">
|
||||
<h3 id="org8a4e904"><span class="section-number-3">5.3</span> <code>qmckl_context_set_ao_basis</code></h3>
|
||||
<div class="outline-text-3" id="text-5-3">
|
||||
<p>
|
||||
Sets the data describing the AO basis set into the context.
|
||||
@ -1789,8 +1789,8 @@ Sets the data describing the AO basis set into the context.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org44b52f3" class="outline-4">
|
||||
<h4 id="org44b52f3"><span class="section-number-4">5.3.1</span> Source</h4>
|
||||
<div id="outline-container-orgf7bcf78" class="outline-4">
|
||||
<h4 id="orgf7bcf78"><span class="section-number-4">5.3.1</span> Source</h4>
|
||||
<div class="outline-text-4" id="text-5-3-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c"><span style="color: #228b22;">qmckl_context</span>
|
||||
@ -1819,8 +1819,8 @@ Sets the data describing the AO basis set into the context.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgefcb70a" class="outline-4">
|
||||
<h4 id="orgefcb70a"><span class="section-number-4">5.3.2</span> Fortran interface</h4>
|
||||
<div id="outline-container-org35cd041" class="outline-4">
|
||||
<h4 id="org35cd041"><span class="section-number-4">5.3.2</span> Fortran interface</h4>
|
||||
<div class="outline-text-4" id="text-5-3-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-f90"><span style="color: #a020f0;">interface</span>
|
||||
@ -1846,15 +1846,15 @@ Sets the data describing the AO basis set into the context.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf5560b3" class="outline-4">
|
||||
<h4 id="orgf5560b3"><span class="section-number-4">5.3.3</span> <span class="todo TODO">TODO</span> Test</h4>
|
||||
<div id="outline-container-org970a631" class="outline-4">
|
||||
<h4 id="org970a631"><span class="section-number-4">5.3.3</span> <span class="todo TODO">TODO</span> Test</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-03-20 Sat 15:59</p>
|
||||
<p class="date">Created: 2021-03-23 Tue 21:25</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
|
658
qmckl_distance.html
Normal file
658
qmckl_distance.html
Normal file
@ -0,0 +1,658 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"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-03-23 Tue 21:25 -->
|
||||
<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>
|
||||
<meta name="generator" content="Org mode" />
|
||||
<meta name="author" content="TREX CoE" />
|
||||
<style type="text/css">
|
||||
<!--/*--><![CDATA[/*><!--*/
|
||||
.title { text-align: center;
|
||||
margin-bottom: .2em; }
|
||||
.subtitle { text-align: center;
|
||||
font-size: medium;
|
||||
font-weight: bold;
|
||||
margin-top:0; }
|
||||
.todo { font-family: monospace; color: red; }
|
||||
.done { font-family: monospace; color: green; }
|
||||
.priority { font-family: monospace; color: orange; }
|
||||
.tag { background-color: #eee; font-family: monospace;
|
||||
padding: 2px; font-size: 80%; font-weight: normal; }
|
||||
.timestamp { color: #bebebe; }
|
||||
.timestamp-kwd { color: #5f9ea0; }
|
||||
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
|
||||
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
|
||||
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
|
||||
.underline { text-decoration: underline; }
|
||||
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
|
||||
p.verse { margin-left: 3%; }
|
||||
pre {
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 3px 3px 3px #eee;
|
||||
padding: 8pt;
|
||||
font-family: monospace;
|
||||
overflow: auto;
|
||||
margin: 1.2em;
|
||||
}
|
||||
pre.src {
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
padding-top: 1.2em;
|
||||
}
|
||||
pre.src:before {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
top: -10px;
|
||||
right: 10px;
|
||||
padding: 3px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
pre.src:hover:before { display: inline;}
|
||||
/* Languages per Org manual */
|
||||
pre.src-asymptote:before { content: 'Asymptote'; }
|
||||
pre.src-awk:before { content: 'Awk'; }
|
||||
pre.src-C:before { content: 'C'; }
|
||||
/* pre.src-C++ doesn't work in CSS */
|
||||
pre.src-clojure:before { content: 'Clojure'; }
|
||||
pre.src-css:before { content: 'CSS'; }
|
||||
pre.src-D:before { content: 'D'; }
|
||||
pre.src-ditaa:before { content: 'ditaa'; }
|
||||
pre.src-dot:before { content: 'Graphviz'; }
|
||||
pre.src-calc:before { content: 'Emacs Calc'; }
|
||||
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
||||
pre.src-fortran:before { content: 'Fortran'; }
|
||||
pre.src-gnuplot:before { content: 'gnuplot'; }
|
||||
pre.src-haskell:before { content: 'Haskell'; }
|
||||
pre.src-hledger:before { content: 'hledger'; }
|
||||
pre.src-java:before { content: 'Java'; }
|
||||
pre.src-js:before { content: 'Javascript'; }
|
||||
pre.src-latex:before { content: 'LaTeX'; }
|
||||
pre.src-ledger:before { content: 'Ledger'; }
|
||||
pre.src-lisp:before { content: 'Lisp'; }
|
||||
pre.src-lilypond:before { content: 'Lilypond'; }
|
||||
pre.src-lua:before { content: 'Lua'; }
|
||||
pre.src-matlab:before { content: 'MATLAB'; }
|
||||
pre.src-mscgen:before { content: 'Mscgen'; }
|
||||
pre.src-ocaml:before { content: 'Objective Caml'; }
|
||||
pre.src-octave:before { content: 'Octave'; }
|
||||
pre.src-org:before { content: 'Org mode'; }
|
||||
pre.src-oz:before { content: 'OZ'; }
|
||||
pre.src-plantuml:before { content: 'Plantuml'; }
|
||||
pre.src-processing:before { content: 'Processing.js'; }
|
||||
pre.src-python:before { content: 'Python'; }
|
||||
pre.src-R:before { content: 'R'; }
|
||||
pre.src-ruby:before { content: 'Ruby'; }
|
||||
pre.src-sass:before { content: 'Sass'; }
|
||||
pre.src-scheme:before { content: 'Scheme'; }
|
||||
pre.src-screen:before { content: 'Gnu Screen'; }
|
||||
pre.src-sed:before { content: 'Sed'; }
|
||||
pre.src-sh:before { content: 'shell'; }
|
||||
pre.src-sql:before { content: 'SQL'; }
|
||||
pre.src-sqlite:before { content: 'SQLite'; }
|
||||
/* additional languages in org.el's org-babel-load-languages alist */
|
||||
pre.src-forth:before { content: 'Forth'; }
|
||||
pre.src-io:before { content: 'IO'; }
|
||||
pre.src-J:before { content: 'J'; }
|
||||
pre.src-makefile:before { content: 'Makefile'; }
|
||||
pre.src-maxima:before { content: 'Maxima'; }
|
||||
pre.src-perl:before { content: 'Perl'; }
|
||||
pre.src-picolisp:before { content: 'Pico Lisp'; }
|
||||
pre.src-scala:before { content: 'Scala'; }
|
||||
pre.src-shell:before { content: 'Shell Script'; }
|
||||
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
|
||||
/* additional language identifiers per "defun org-babel-execute"
|
||||
in ob-*.el */
|
||||
pre.src-cpp:before { content: 'C++'; }
|
||||
pre.src-abc:before { content: 'ABC'; }
|
||||
pre.src-coq:before { content: 'Coq'; }
|
||||
pre.src-groovy:before { content: 'Groovy'; }
|
||||
/* additional language identifiers from org-babel-shell-names in
|
||||
ob-shell.el: ob-shell is the only babel language using a lambda to put
|
||||
the execution function name together. */
|
||||
pre.src-bash:before { content: 'bash'; }
|
||||
pre.src-csh:before { content: 'csh'; }
|
||||
pre.src-ash:before { content: 'ash'; }
|
||||
pre.src-dash:before { content: 'dash'; }
|
||||
pre.src-ksh:before { content: 'ksh'; }
|
||||
pre.src-mksh:before { content: 'mksh'; }
|
||||
pre.src-posh:before { content: 'posh'; }
|
||||
/* Additional Emacs modes also supported by the LaTeX listings package */
|
||||
pre.src-ada:before { content: 'Ada'; }
|
||||
pre.src-asm:before { content: 'Assembler'; }
|
||||
pre.src-caml:before { content: 'Caml'; }
|
||||
pre.src-delphi:before { content: 'Delphi'; }
|
||||
pre.src-html:before { content: 'HTML'; }
|
||||
pre.src-idl:before { content: 'IDL'; }
|
||||
pre.src-mercury:before { content: 'Mercury'; }
|
||||
pre.src-metapost:before { content: 'MetaPost'; }
|
||||
pre.src-modula-2:before { content: 'Modula-2'; }
|
||||
pre.src-pascal:before { content: 'Pascal'; }
|
||||
pre.src-ps:before { content: 'PostScript'; }
|
||||
pre.src-prolog:before { content: 'Prolog'; }
|
||||
pre.src-simula:before { content: 'Simula'; }
|
||||
pre.src-tcl:before { content: 'tcl'; }
|
||||
pre.src-tex:before { content: 'TeX'; }
|
||||
pre.src-plain-tex:before { content: 'Plain TeX'; }
|
||||
pre.src-verilog:before { content: 'Verilog'; }
|
||||
pre.src-vhdl:before { content: 'VHDL'; }
|
||||
pre.src-xml:before { content: 'XML'; }
|
||||
pre.src-nxml:before { content: 'XML'; }
|
||||
/* add a generic configuration mode; LaTeX export needs an additional
|
||||
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
|
||||
pre.src-conf:before { content: 'Configuration File'; }
|
||||
|
||||
table { border-collapse:collapse; }
|
||||
caption.t-above { caption-side: top; }
|
||||
caption.t-bottom { caption-side: bottom; }
|
||||
td, th { vertical-align:top; }
|
||||
th.org-right { text-align: center; }
|
||||
th.org-left { text-align: center; }
|
||||
th.org-center { text-align: center; }
|
||||
td.org-right { text-align: right; }
|
||||
td.org-left { text-align: left; }
|
||||
td.org-center { text-align: center; }
|
||||
dt { font-weight: bold; }
|
||||
.footpara { display: inline; }
|
||||
.footdef { margin-bottom: 1em; }
|
||||
.figure { padding: 1em; }
|
||||
.figure p { text-align: center; }
|
||||
.inlinetask {
|
||||
padding: 10px;
|
||||
border: 2px solid gray;
|
||||
margin: 10px;
|
||||
background: #ffffcc;
|
||||
}
|
||||
#org-div-home-and-up
|
||||
{ text-align: right; font-size: 70%; white-space: nowrap; }
|
||||
textarea { overflow-x: auto; }
|
||||
.linenr { font-size: smaller }
|
||||
.code-highlighted { background-color: #ffff00; }
|
||||
.org-info-js_info-navigation { border-style: none; }
|
||||
#org-info-js_console-label
|
||||
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
|
||||
.org-info-js_search-highlight
|
||||
{ background-color: #ffff00; color: #000000; font-weight: bold; }
|
||||
.org-svg { width: 90%; }
|
||||
/*]]>*/-->
|
||||
</style>
|
||||
<link rel="stylesheet" title="Standard" href="qmckl.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript" src="org-info.js">
|
||||
/**
|
||||
*
|
||||
* @source: org-info.js
|
||||
*
|
||||
* @licstart The following is the entire license notice for the
|
||||
* JavaScript code in org-info.js.
|
||||
*
|
||||
* Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
*
|
||||
*
|
||||
* The JavaScript code in this tag is free software: you can
|
||||
* redistribute it and/or modify it under the terms of the GNU
|
||||
* General Public License (GNU GPL) as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
||||
*
|
||||
* As additional permission under GNU GPL version 3 section 7, you
|
||||
* may distribute non-source (e.g., minimized or compacted) forms of
|
||||
* that code without the copy of the GNU GPL normally required by
|
||||
* section 4, provided you include this license notice and a URL
|
||||
* through which recipients can access the Corresponding Source.
|
||||
*
|
||||
* @licend The above is the entire license notice
|
||||
* for the JavaScript code in org-info.js.
|
||||
*
|
||||
*/
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this tag.
|
||||
|
||||
Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
|
||||
The JavaScript code in this tag is free software: you can
|
||||
redistribute it and/or modify it under the terms of the GNU
|
||||
General Public License (GNU GPL) as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option)
|
||||
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
||||
|
||||
As additional permission under GNU GPL version 3 section 7, you
|
||||
may distribute non-source (e.g., minimized or compacted) forms of
|
||||
that code without the copy of the GNU GPL normally required by
|
||||
section 4, provided you include this license notice and a URL
|
||||
through which recipients can access the Corresponding Source.
|
||||
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this tag.
|
||||
*/
|
||||
|
||||
<!--/*--><![CDATA[/*><!--*/
|
||||
org_html_manager.set("TOC_DEPTH", "4");
|
||||
org_html_manager.set("LINK_HOME", "index.html");
|
||||
org_html_manager.set("LINK_UP", "");
|
||||
org_html_manager.set("LOCAL_TOC", "1");
|
||||
org_html_manager.set("VIEW_BUTTONS", "0");
|
||||
org_html_manager.set("MOUSE_HINT", "underline");
|
||||
org_html_manager.set("FIXED_TOC", "0");
|
||||
org_html_manager.set("TOC", "1");
|
||||
org_html_manager.set("VIEW", "info");
|
||||
org_html_manager.setup(); // activate after the parameters are set
|
||||
/*]]>*///-->
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/*
|
||||
@licstart The following is the entire license notice for the
|
||||
JavaScript code in this tag.
|
||||
|
||||
Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
|
||||
The JavaScript code in this tag is free software: you can
|
||||
redistribute it and/or modify it under the terms of the GNU
|
||||
General Public License (GNU GPL) as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option)
|
||||
any later version. The code is distributed WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
|
||||
|
||||
As additional permission under GNU GPL version 3 section 7, you
|
||||
may distribute non-source (e.g., minimized or compacted) forms of
|
||||
that code without the copy of the GNU GPL normally required by
|
||||
section 4, provided you include this license notice and a URL
|
||||
through which recipients can access the Corresponding Source.
|
||||
|
||||
|
||||
@licend The above is the entire license notice
|
||||
for the JavaScript code in this tag.
|
||||
*/
|
||||
<!--/*--><![CDATA[/*><!--*/
|
||||
function CodeHighlightOn(elem, id)
|
||||
{
|
||||
var target = document.getElementById(id);
|
||||
if(null != target) {
|
||||
elem.cacheClassElem = elem.className;
|
||||
elem.cacheClassTarget = target.className;
|
||||
target.className = "code-highlighted";
|
||||
elem.className = "code-highlighted";
|
||||
}
|
||||
}
|
||||
function CodeHighlightOff(elem, id)
|
||||
{
|
||||
var target = document.getElementById(id);
|
||||
if(elem.cacheClassElem)
|
||||
elem.className = elem.cacheClassElem;
|
||||
if(elem.cacheClassTarget)
|
||||
target.className = elem.cacheClassTarget;
|
||||
}
|
||||
/*]]>*///-->
|
||||
</script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
displayAlign: "center",
|
||||
displayIndent: "0em",
|
||||
|
||||
"HTML-CSS": { scale: 100,
|
||||
linebreaks: { automatic: "false" },
|
||||
webFont: "TeX"
|
||||
},
|
||||
SVG: {scale: 100,
|
||||
linebreaks: { automatic: "false" },
|
||||
font: "TeX"},
|
||||
NativeMML: {scale: 100},
|
||||
TeX: { equationNumbers: {autoNumber: "AMS"},
|
||||
MultLineWidth: "85%",
|
||||
TagSide: "right",
|
||||
TagIndent: ".8em"
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="org-div-home-and-up">
|
||||
<a accesskey="h" href=""> UP </a>
|
||||
|
|
||||
<a accesskey="H" href="index.html"> HOME </a>
|
||||
</div><div id="content">
|
||||
<h1 class="title">Inter-particle distances</h1>
|
||||
<div id="table-of-contents">
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org032975d">1. Squared distance</a>
|
||||
<ul>
|
||||
<li><a href="#org2c50595">1.1. <code>qmckl_distance_sq</code></a>
|
||||
<ul>
|
||||
<li><a href="#orgba09c81">1.1.1. Requirements</a></li>
|
||||
<li><a href="#org368ed4b">1.1.2. C header</a></li>
|
||||
<li><a href="#orgc679945">1.1.3. Source</a></li>
|
||||
<li><a href="#org7ca276c">1.1.4. Performance</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
Functions for the computation of distances between particles.
|
||||
</p>
|
||||
|
||||
<div id="outline-container-org032975d" class="outline-2">
|
||||
<h2 id="org032975d"><span class="section-number-2">1</span> Squared distance</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
<div id="outline-container-org2c50595" class="outline-3">
|
||||
<h3 id="org2c50595"><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
|
||||
between all pairs of points in two sets, one point within each set:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
\[
|
||||
C_{ij} = \sum_{k=1}^3 (A_{k,i}-B_{k,j})^2
|
||||
\]
|
||||
</p>
|
||||
|
||||
<table id="org16ca596" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
<col class="org-left" />
|
||||
|
||||
<col class="org-left" />
|
||||
|
||||
<col class="org-left" />
|
||||
|
||||
<col class="org-left" />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-left">qmckl<sub>context</sub></td>
|
||||
<td class="org-left">context</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Global state</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">char</td>
|
||||
<td class="org-left">transa</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Array <code>A</code> is <code>'N'</code>: Normal, <code>'T'</code>: Transposed</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">char</td>
|
||||
<td class="org-left">transb</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Array <code>B</code> is <code>'N'</code>: Normal, <code>'T'</code>: Transposed</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">int64<sub>t</sub></td>
|
||||
<td class="org-left">m</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Number of points in the first set</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">int64<sub>t</sub></td>
|
||||
<td class="org-left">n</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Number of points in the second set</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">double</td>
|
||||
<td class="org-left">A[3][lda]</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Array containing the \(m \times 3\) matrix \(A\)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">int64<sub>t</sub></td>
|
||||
<td class="org-left">lda</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Leading dimension of array <code>A</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">double</td>
|
||||
<td class="org-left">B[3][ldb]</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Array containing the \(n \times 3\) matrix \(B\)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">int64<sub>t</sub></td>
|
||||
<td class="org-left">ldb</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Leading dimension of array <code>B</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">double</td>
|
||||
<td class="org-left">C[n][ldc]</td>
|
||||
<td class="org-left">out</td>
|
||||
<td class="org-left">Array containing the \(m \times n\) matrix \(C\)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-left">int64<sub>t</sub></td>
|
||||
<td class="org-left">ldc</td>
|
||||
<td class="org-left">in</td>
|
||||
<td class="org-left">Leading dimension of array <code>C</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgba09c81" class="outline-4">
|
||||
<h4 id="orgba09c81"><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>
|
||||
<li><code>m > 0</code></li>
|
||||
<li><code>n > 0</code></li>
|
||||
<li><code>lda >= 3</code> if <code>transa == 'N'</code></li>
|
||||
<li><code>lda >= m</code> if <code>transa == 'T'</code></li>
|
||||
<li><code>ldb >= 3</code> if <code>transb == 'N'</code></li>
|
||||
<li><code>ldb >= n</code> if <code>transb == 'T'</code></li>
|
||||
<li><code>ldc >= m</code></li>
|
||||
<li><code>A</code> is allocated with at least \(3 \times m \times 8\) bytes</li>
|
||||
<li><code>B</code> is allocated with at least \(3 \times n \times 8\) bytes</li>
|
||||
<li><code>C</code> is allocated with at least \(m \times n \times 8\) bytes</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org368ed4b" class="outline-4">
|
||||
<h4 id="org368ed4b"><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_sq</span> (
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">qmckl_context</span> <span style="color: #a0522d;">context</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">char</span> <span style="color: #a0522d;">transa</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">char</span> <span style="color: #a0522d;">transb</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">m</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">n</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">A</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">lda</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">double</span>* <span style="color: #a0522d;">B</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">ldb</span>,
|
||||
<span style="color: #228b22;">double</span>* <span style="color: #a0522d;">C</span>,
|
||||
<span style="color: #a020f0;">const</span> <span style="color: #228b22;">int64_t</span> <span style="color: #a0522d;">ldc</span> );
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc679945" class="outline-4">
|
||||
<h4 id="orgc679945"><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: #a020f0;">function</span><span style="color: #a0522d;"> </span><span style="color: #0000ff;">qmckl_distance_sq_f</span><span style="color: #000000; background-color: #ffffff;">(context, transa, transb, m, n, A, LDA, B, LDB, C, LDC) result(info)</span>
|
||||
<span style="color: #a020f0;">use</span> <span style="color: #0000ff;">qmckl</span>
|
||||
<span style="color: #a020f0;">implicit</span> <span style="color: #228b22;">none</span>
|
||||
<span style="color: #228b22;">integer</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> context</span>
|
||||
<span style="color: #228b22;">character</span> , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> transa, transb</span>
|
||||
<span style="color: #228b22;">integer</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> m, n</span>
|
||||
<span style="color: #228b22;">integer</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> lda</span>
|
||||
<span style="color: #228b22;">real</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> A(lda,*)</span>
|
||||
<span style="color: #228b22;">integer</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> ldb</span>
|
||||
<span style="color: #228b22;">real</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> B(ldb,*)</span>
|
||||
<span style="color: #228b22;">integer</span>*8 , <span style="color: #a020f0;">intent</span>(in) ::<span style="color: #a0522d;"> ldc</span>
|
||||
<span style="color: #228b22;">real</span>*8 , <span style="color: #a020f0;">intent</span>(out) ::<span style="color: #a0522d;"> C(ldc,*)</span>
|
||||
|
||||
<span style="color: #228b22;">integer</span>*8 ::<span style="color: #a0522d;"> i,j</span>
|
||||
<span style="color: #228b22;">real</span>*8 ::<span style="color: #a0522d;"> x, y, z</span>
|
||||
<span style="color: #228b22;">integer</span> ::<span style="color: #a0522d;"> transab</span>
|
||||
|
||||
info = 0
|
||||
|
||||
<span style="color: #a020f0;">if</span> (context == QMCKL_NULL_CONTEXT) <span style="color: #a020f0;">then</span>
|
||||
info = QMCKL_INVALID_CONTEXT
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">if</span> (m <= 0_8) <span style="color: #a020f0;">then</span>
|
||||
info = QMCKL_INVALID_ARG_4
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">if</span> (n <= 0_8) <span style="color: #a020f0;">then</span>
|
||||
info = QMCKL_INVALID_ARG_5
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">if</span> (transa == <span style="color: #8b2252;">'N'</span> <span style="color: #a020f0;">.or.</span> transa == <span style="color: #8b2252;">'n'</span>) <span style="color: #a020f0;">then</span>
|
||||
transab = 0
|
||||
<span style="color: #a020f0;">else if</span> (transa == <span style="color: #8b2252;">'T'</span> <span style="color: #a020f0;">.or.</span> transa == <span style="color: #8b2252;">'t'</span>) <span style="color: #a020f0;">then</span>
|
||||
transab = 1
|
||||
<span style="color: #a020f0;">else</span>
|
||||
transab = -100
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">if</span> (transb == <span style="color: #8b2252;">'N'</span> <span style="color: #a020f0;">.or.</span> transb == <span style="color: #8b2252;">'n'</span>) <span style="color: #a020f0;">then</span>
|
||||
<span style="color: #a020f0;">continue</span>
|
||||
<span style="color: #a020f0;">else if</span> (transa == <span style="color: #8b2252;">'T'</span> <span style="color: #a020f0;">.or.</span> transa == <span style="color: #8b2252;">'t'</span>) <span style="color: #a020f0;">then</span>
|
||||
transab = transab + 2
|
||||
<span style="color: #a020f0;">else</span>
|
||||
transab = -100
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">if</span> (transab < 0) <span style="color: #a020f0;">then</span>
|
||||
info = QMCKL_INVALID_ARG_1
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">if</span> (<span style="color: #a020f0;">iand</span>(transab,1) == 0 <span style="color: #a020f0;">.and.</span> LDA < 3) <span style="color: #a020f0;">then</span>
|
||||
info = QMCKL_INVALID_ARG_7
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">if</span> (<span style="color: #a020f0;">iand</span>(transab,1) == 1 <span style="color: #a020f0;">.and.</span> LDA < m) <span style="color: #a020f0;">then</span>
|
||||
info = QMCKL_INVALID_ARG_7
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">if</span> (<span style="color: #a020f0;">iand</span>(transab,2) == 0 <span style="color: #a020f0;">.and.</span> LDA < 3) <span style="color: #a020f0;">then</span>
|
||||
info = QMCKL_INVALID_ARG_7
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
<span style="color: #a020f0;">if</span> (<span style="color: #a020f0;">iand</span>(transab,2) == 2 <span style="color: #a020f0;">.and.</span> LDA < m) <span style="color: #a020f0;">then</span>
|
||||
info = QMCKL_INVALID_ARG_7
|
||||
<span style="color: #a020f0;">return</span>
|
||||
<span style="color: #a020f0;">endif</span>
|
||||
|
||||
|
||||
<span style="color: #a020f0;">select case</span> (transab)
|
||||
|
||||
<span style="color: #a020f0;">case</span>(0)
|
||||
|
||||
<span style="color: #a020f0;">do</span> j=1,n
|
||||
<span style="color: #a020f0;">do</span> i=1,m
|
||||
x = A(1,i) - B(1,j)
|
||||
y = A(2,i) - B(2,j)
|
||||
z = A(3,i) - B(3,j)
|
||||
C(i,j) = x*x + y*y + z*z
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
|
||||
<span style="color: #a020f0;">case</span>(1)
|
||||
|
||||
<span style="color: #a020f0;">do</span> j=1,n
|
||||
<span style="color: #a020f0;">do</span> i=1,m
|
||||
x = A(i,1) - B(1,j)
|
||||
y = A(i,2) - B(2,j)
|
||||
z = A(i,3) - B(3,j)
|
||||
C(i,j) = x*x + y*y + z*z
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
|
||||
<span style="color: #a020f0;">case</span>(2)
|
||||
|
||||
<span style="color: #a020f0;">do</span> j=1,n
|
||||
<span style="color: #a020f0;">do</span> i=1,m
|
||||
x = A(1,i) - B(j,1)
|
||||
y = A(2,i) - B(j,2)
|
||||
z = A(3,i) - B(j,3)
|
||||
C(i,j) = x*x + y*y + z*z
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
|
||||
<span style="color: #a020f0;">case</span>(3)
|
||||
|
||||
<span style="color: #a020f0;">do</span> j=1,n
|
||||
<span style="color: #a020f0;">do</span> i=1,m
|
||||
x = A(i,1) - B(j,1)
|
||||
y = A(i,2) - B(j,2)
|
||||
z = A(i,3) - B(j,3)
|
||||
C(i,j) = x*x + y*y + z*z
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
<span style="color: #a020f0;">end do</span>
|
||||
|
||||
<span style="color: #a020f0;">end select</span>
|
||||
|
||||
<span style="color: #a020f0;">end function</span> <span style="color: #0000ff;">qmckl_distance_sq_f</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7ca276c" class="outline-4">
|
||||
<h4 id="org7ca276c"><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
|
||||
transposed.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-03-23 Tue 21:25</p>
|
||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</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-03-20 Sat 15:59 -->
|
||||
<!-- 2021-03-23 Tue 21:25 -->
|
||||
<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,14 +311,14 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#orgf7ec1bc"></a></li>
|
||||
<li><a href="#org501b090"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf7ec1bc" class="outline-2">
|
||||
<h2 id="orgf7ec1bc"></h2>
|
||||
<div class="outline-text-2" id="text-orgf7ec1bc">
|
||||
<div id="outline-container-org501b090" class="outline-2">
|
||||
<h2 id="org501b090"></h2>
|
||||
<div class="outline-text-2" id="text-org501b090">
|
||||
<p>
|
||||
The library should never make the calling programs abort, nor
|
||||
perform any input/output operations. This decision has to be taken
|
||||
@ -329,7 +329,7 @@ by the developer of the code calling the library.
|
||||
All the functions return with an exit code, defined as
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-c" id="org0c036f7"><span style="color: #a020f0;">typedef</span> <span style="color: #228b22;">int32_t</span> <span style="color: #228b22;">qmckl_exit_code</span>;
|
||||
<pre class="src src-c" id="orgd5bcfb2"><span style="color: #a020f0;">typedef</span> <span style="color: #228b22;">int32_t</span> <span style="color: #228b22;">qmckl_exit_code</span>;
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
@ -345,7 +345,7 @@ error code is returned to the program.
|
||||
Here is the complete list of exit codes.
|
||||
</p>
|
||||
|
||||
<table id="orge862df5" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
<table id="org5ecae54" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
@ -558,7 +558,7 @@ The text strings are extracted from the previous table.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-03-20 Sat 15:59</p>
|
||||
<p class="date">Created: 2021-03-23 Tue 21:25</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-03-20 Sat 15:59 -->
|
||||
<!-- 2021-03-23 Tue 21:25 -->
|
||||
<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,7 +311,7 @@ for the JavaScript code in this tag.
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org7336149"></a></li>
|
||||
<li><a href="#orgdebfac7"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -321,9 +321,9 @@ optimized libraries to fine-tune the memory allocation.
|
||||
</p>
|
||||
|
||||
|
||||
<div id="outline-container-org7336149" class="outline-2">
|
||||
<h2 id="org7336149"></h2>
|
||||
<div class="outline-text-2" id="text-org7336149">
|
||||
<div id="outline-container-orgdebfac7" class="outline-2">
|
||||
<h2 id="orgdebfac7"></h2>
|
||||
<div class="outline-text-2" id="text-orgdebfac7">
|
||||
<p>
|
||||
Memory allocation inside the library should be done with
|
||||
<code>qmckl_malloc</code>. It lets the library choose how the memory will be
|
||||
@ -434,7 +434,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-03-20 Sat 15:59</p>
|
||||
<p class="date">Created: 2021-03-23 Tue 21:25</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-03-20 Sat 15:59 -->
|
||||
<!-- 2021-03-23 Tue 21:25 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Testing</title>
|
||||
@ -311,7 +311,7 @@ for the JavaScript code in this tag.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: TREX CoE</p>
|
||||
<p class="date">Created: 2021-03-20 Sat 15:59</p>
|
||||
<p class="date">Created: 2021-03-23 Tue 21:25</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