Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3411011

Browse files
committed
Add installation page
1 parent 2a1c25c commit 3411011

File tree

2 files changed

+40
-25
lines changed

2 files changed

+40
-25
lines changed

docs/index.md

+7-25
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ nav_order: 1
1010

1111

1212
{: .note }
13-
This is a massively reworked and updated version of `dae-cpp`, which is incompatible with the previous version. If your project still relies on the old `dae-cpp`, it is archived in the [legacy](https://github.com/dae-cpp/dae-cpp/tree/legacy) branch.
13+
This is a massively reworked and updated version of `dae-cpp`, which is incompatible with the previous version (1.x). If your project still relies on the old `dae-cpp`, it is archived in the [legacy](https://github.com/dae-cpp/dae-cpp/tree/legacy) branch.
1414

1515
## What is `dae-cpp`
1616

17-
`dae-cpp` is a cross-platform, header-only C++-17 library for solving stiff systems of [Differential-Algebraic Equations](https://en.wikipedia.org/wiki/Differential-algebraic_system_of_equations) (DAE). DAE systems can contain both differential and algebraic equations and can be written in the following matrix-vector form:
17+
`dae-cpp` is a cross-platform, header-only C++17 library for solving stiff and non-stiff systems of [Differential-Algebraic Equations](https://en.wikipedia.org/wiki/Differential-algebraic_system_of_equations) (DAE). DAE systems are equation systems that can contain both *differential* and *algebraic* equations and can be written in the following matrix-vector form:
1818

1919
$$\mathbf{M}(t) \frac{\mathrm{d}\mathbf{x}}{\mathrm{d}t} = \mathbf{f}(\mathbf{x}, t),$$
2020

21-
to be solved in the interval $$t \in [0, t_\mathrm{end}]$$ with the initial condition $$\mathbf{x}\rvert_{t=0} = \mathbf{x}_0$$. Here $$\mathbf{M}(t)$$ is the mass matrix (can depend on time), $$\mathbf{x}(t)$$ is the state vector, and $$\mathbf{f}(\mathbf{x}, t)$$ is the (nonlinear) vector function of the state vector $$\mathbf{x}$$ and time $$t$$.
21+
to be solved in the interval $$t \in [0, t_\mathrm{end}]$$ with the given initial condition $$\mathbf{x}\rvert_{t=0} = \mathbf{x}_0$$. Here $$\mathbf{M}(t)$$ is the mass matrix (can depend on time), $$\mathbf{x}(t)$$ is the state vector, and $$\mathbf{f}(\mathbf{x}, t)$$ is the (nonlinear) vector function of the state vector $$\mathbf{x}$$ and time $$t$$.
2222

2323
### How does it work
2424

@@ -32,27 +32,9 @@ Eigen's sparse solver performs two steps: factorization (decomposition) of the J
3232
- Fourth-order implicit BDF time integrator that preserves accuracy even when the time step rapidly changes.
3333
- A very flexible and customizable variable time stepping algorithm based on the solution stability and variability.
3434
- Mass matrix can be non-static (can depend on time) and it can be singular.
35-
- The library is extremely easy to use. A simple DAE can be set up using just a few lines of code (see [Quick Start](#quick-start) example below).
35+
- The library is extremely easy to use. A simple DAE can be set up using just a few lines of code (see [Quick Start](quick-start.html)).
3636

37-
### Installation
37+
### What's next?
3838

39-
This library is header only, no need to install, just copy `dae-cpp`, `Eigen`, and `autodiff` folders into your project.
40-
41-
Examples and tests can be compiled using CMake (see [Testing](#testing)).
42-
43-
### Testing
44-
45-
If you already have cloned the project without `--recurse-submodules` option, you can initialize and update `googletest` submodule by running
46-
47-
```bash
48-
git submodule update --init
49-
```
50-
51-
Then build and run the tests:
52-
53-
```bash
54-
mkdir build && cd build
55-
cmake ..
56-
make
57-
ctest
58-
```
39+
- [Installation and Testing](installation.html)
40+
- [Quick Start](quick-start.html)

docs/installation.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Installation and Testing
3+
layout: default
4+
nav_order: 1.2
5+
---
6+
7+
# Installation and Testing
8+
9+
## Installation
10+
11+
- Download the library from `dae-cpp` repository on GitHub: [https://github.com/dae-cpp/dae-cpp](https://github.com/dae-cpp/dae-cpp).
12+
- The solver is header-only, with all dependencies included. There is no need to pre-compile the sources, just copy `dae-cpp`, `Eigen`, and `autodiff` folders into your project.
13+
- Optionally: examples and tests can be compiled using CMake (see [Testing](#testing)).
14+
15+
## Testing
16+
17+
For unit and integration testing, `dae-cpp` uses [GoogleTest](https://github.com/google/googletest), Google Testing and Mocking Framework, which can be downloaded with `dae-cpp` as a [submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules).
18+
If you already have cloned the project without `--recurse-submodules` option, you can initialize and update `googletest` submodule by running
19+
20+
```bash
21+
git submodule update --init
22+
```
23+
24+
Then build and run the tests:
25+
26+
```bash
27+
mkdir build && cd build
28+
cmake ..
29+
make
30+
ctest
31+
```
32+
33+
Note that you don't have to download and run the tests. The project is tested automatically on Ubuntu (`gcc` and `clang` compilers) and Windows (MSVC compiler) via GitHub Actions.

0 commit comments

Comments
 (0)