mirror of
https://github.com/triqs/dft_tools
synced 2025-01-12 05:58:18 +01:00
Work on doc
This commit is contained in:
parent
f3480b60c6
commit
b1f61b2f7a
@ -1,20 +1,15 @@
|
|||||||
Building an application
|
Using triqs in C++
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
The goal of these notes is to give a practical
|
The goal of these notes is to give a practical
|
||||||
introduction to the development of a code that uses the TRIQS headers and
|
introduction to the development of a code that uses the TRIQS headers and
|
||||||
libraries. Rather than being completely general this tutorial will guide you
|
libraries, including the proper `cmake` configuration files.
|
||||||
through the development of a simple CT-INT impurity solver.
|
|
||||||
|
|
||||||
At first, we will see how to write a code that uses TRIQS but that is not meant
|
We will expose successively various cases :
|
||||||
to become part of TRIQS. This is especially relevant when you write a pure C++
|
|
||||||
code for your personal use. You will learn how to write a Monte Carlo
|
|
||||||
simulation with a simple example.
|
|
||||||
|
|
||||||
The next step will be to *pythonize* your code. This is very convenient to
|
.. warning::
|
||||||
change parameters or do simple pre-simulation calculations. It is also
|
|
||||||
the way most of TRIQS applications are done.
|
|
||||||
|
|
||||||
|
To be written.
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
@ -1,18 +1,11 @@
|
|||||||
Building
|
|
||||||
==================
|
|
||||||
|
|
||||||
.. highlight:: c
|
.. highlight:: c
|
||||||
|
|
||||||
Let's say you want to write a new code that uses the libraries and headers of
|
A simple C++ code
|
||||||
TRIQS but that is not meant to be a part of TRIQS. Here's how you should
|
--------------------
|
||||||
proceed in order to do that.
|
Basically, this structure means that you have successfully installed TRIQS in
|
||||||
|
:file:`/home/triqs/install` and that you plan to have your new project under
|
||||||
|
:file:`/home/project`. Obviously you can choose any other directory but this
|
||||||
Setting the stage
|
structure will be assumed below.
|
||||||
-----------------
|
|
||||||
|
|
||||||
Just to be clear, let me start by showing the directory structure
|
|
||||||
I will use:
|
|
||||||
|
|
||||||
.. code-block :: bash
|
.. code-block :: bash
|
||||||
|
|
||||||
@ -20,15 +13,6 @@ I will use:
|
|||||||
/home/project/src --> the sources of my project
|
/home/project/src --> the sources of my project
|
||||||
/home/project/build --> the directory where I will compile my code
|
/home/project/build --> the directory where I will compile my code
|
||||||
|
|
||||||
Basically, this structure means that you have successfully installed TRIQS in
|
|
||||||
:file:`/home/triqs/install` and that you plan to have your new project under
|
|
||||||
:file:`/home/project`. Obviously you can choose any other directory but this
|
|
||||||
structure will be assumed below.
|
|
||||||
|
|
||||||
|
|
||||||
Start your project
|
|
||||||
------------------
|
|
||||||
|
|
||||||
As we just said, we will start our project in a directory
|
As we just said, we will start our project in a directory
|
||||||
:file:`/home/project`. We will have the sources in :file:`/home/project/src`
|
:file:`/home/project`. We will have the sources in :file:`/home/project/src`
|
||||||
and later build (compile) the project in :file:`/home/project/build`. Let's
|
and later build (compile) the project in :file:`/home/project/build`. Let's
|
||||||
@ -102,3 +86,9 @@ That's it! You can modify your sources and then recompile with make. Obviously
|
|||||||
with bigger projects your :file:`CMakeLists.txt` file will change, but the
|
with bigger projects your :file:`CMakeLists.txt` file will change, but the
|
||||||
principle remains the same.
|
principle remains the same.
|
||||||
|
|
||||||
|
A simple C++ code, with its tests and documentation
|
||||||
|
------------------------------------------------------
|
||||||
|
|
||||||
|
A mixed C++/Python code
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user