CppADCodeGen  2.3.0
A C++ Algorithmic Differentiation Package with Source Code Generation
mainpage.md
1 # CppADCodeGen
2 
3 CppADCodeGen performs **hybrid Automatic Differentiation** (AD), that is, uses
4 operator-overloading and produces source-code. Such source-code can be
5 statically compiled at runtime using an existing compiler and linked dynamically
6 or, alternatively, go through a JIT compilation using Clang/LLVM.
7 
8 In addition to C source generation, CppADCodeGen can also produce
9  [Latex](http://www.latex-project.org/),
10  html+[MathML](http://www.w3.org/Math/), and
11  [dot](https://en.wikipedia.org/wiki/DOT_%28graph_description_language%29)
12  source-code files for your algorithm.
13 Latex sources can be used to create PDF files for documentation purposes,
14 html+MathML can be used to display your algorithm in a web browser, and
15 dot files can be used to create images with a graph of your model
16 (see [graphviz](http://graphviz.org/)).
17 
18 CppADCodeGen can also be used to perform differentiation index reduction of
19 Differential Algebraic Equations (DAE) through Pantelides, Soares-Secchi, and Dummy
20 Derivatives methods.
21 
22 CppADCodeGen is built on top of the [CppAD](http://www.coin-or.org/CppAD)
23 library, which is a header only C++ AD library using operator overloading.
24 
25 ## License ##
26 
27 CppADCodeGen is available with both the **EPL** and **GPL** licenses
28 (suitable for both open-source and closed-source commercial projects).
29 See epl-v10.txt and gpl3.txt for a copy of the licenses.
30 
31 ## Requirements ##
32 
33 CppADCodeGen is a C++11 header only library, therefore there aren't many dependencies:
34 
35  - **CppAD** (2017),
36  - A **C++11** compiler (such as GCC and Clang),
37  - Clang/LLVM (only for JIT compilation), and
38  - Eigen 3 (only for DAE differentiation index reduction).
39 
40 Runtime compilation and dynamic linking:
41  - Linux (it might be very easy to support other OSes but it is not implemented yet)
42 
43 ## Installing ##
44 
45 ### General installation ###
46 
47 Get the sources from GitHub:
48 ```
49  git clone https://github.com/joaoleal/CppADCodeGen.git CppADCodeGen
50 ```
51 Create a new folder to build the project:
52 ```
53  mkdir cppadcg-build
54 ```
55 Build the project (no compilation of C/C++ occurs, just generation of header files):
56 ```
57  cd cppadcg-build
58  cmake ../CppADCodeGen
59 ```
60 Either install the project in your system:
61 ```
62  make install
63 ```
64 or to some other folder:
65 ```
66  make DESTDIR=someotherfolder install
67 ```
68 
69 ### Debian/Ubuntu ###
70 
71 A debian installation package can be created at the root of the project.
72 Typically you can create the installer by just typing:
73 ```
74  dpkg-buildpackage
75 ```
76 It will create a debian package outside the project's folder.
77 
78 ## Using CppADCodeGen ##
79 
80 See the [wiki](https://github.com/joaoleal/CppADCodeGen/wiki).
81 
82 The folder example includes some simple use cases.
83 
84 ---
85 
86 ## Repository Content
87 
88 |Directories | Description |
89 |------------|-----------------------------------------------------------------|
90 |bin | Helper shell and sed scripts used for CppAD development. |
91 |bug | Directory containing demonstration of known bugs (may be empty).|
92 |doc | Holds files for generation of developer documentation. |
93 |debian | Debian package creation files (Linux). |
94 |include | The CppADCodeGen header files. |
95 |example | CppADCodegen example files are here. |
96 |pkgconfig | pkg-config support files. |
97 |test | Contains tests for CppADCodeGen. |
98 |speed | Contains some benchmarks for CppADCodeGen. |
99 
100 
101 | Files | Description |
102 |---------------|--------------------------------------------------------------|
103 |AUTHORS | Statement of authorship and copyright. |
104 |CMakeLists.txt | CppADCodeGen CMake input file. |
105 |COPYING | Statement of user license to use software. |
106 |epl-v10.txt | A copy of the Eclipse Public License version 1. |
107 |gpl3.txt | A copy of the GNU General Public License version 3. |
108 |INSTALL | Points to README.md. |