Skip to content

Commit 5e09975

Browse files
committed
Update version, CHANGELOG, and examples
1 parent a59a19b commit 5e09975

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

docs/CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,25 @@ nav_order: 11
88

99
All notable user-facing changes to the `dae-cpp` project are documented in this page.
1010

11-
## v2.0.1
11+
## v2.1.0
1212

1313
New
1414
{: .label .label-green }
1515

16+
Version 2.1 allows the user to define the shape (structure) of the Jacobian matrix. I.e., instead of providing analytic Jacobian (or not providing it at all, which is slow if the system is large enough), the user can specify the positions of non-zero elements in the Jacobian. The solver will use automatic differentiation for the specified elements only. This works nearly as fast as analytic Jacobian without requiring the user to differentiate the vector function manually.
17+
18+
- Added `JacobianMatrixShape` and `VectorFunctionElements` helper classes to define the Jacobian matrix shape and the vector function
19+
- Added `JacobianCompare` class that helps the user to compare the user-defined Jacobian (either defined explicitly or using Jacobian shape) with the one computed automatically from the system RHS
20+
- Added `jacobian_shape` and `jacobian_compare` examples
21+
- Updated `autodiff` to `v1.1.2`
22+
- Updated Eigen (commit from 28th March 2024, see issue [#52](https://github.com/dae-cpp/dae-cpp/issues/52))
23+
- Updated `googletest` from `v.1.14.x` to `v1.15.2`
24+
- Added integration test that uses Jacobian derived from the given shape
25+
- Added unit tests for all new classes (`JacobianMatrixShape`, `VectorFunctionElements`, `JacobianCompare`)
26+
- Minor solver updates
27+
28+
## v2.0.1
29+
1630
- Added [Flame Propagation](https://github.com/dae-cpp/dae-cpp/blob/master/examples/flame_propagation/flame_propagation.cpp) example (stiff equation)
1731
- Added `daecpp::dual_type` for automatic differentiation of the vector function (used in [Flame Propagation](https://github.com/dae-cpp/dae-cpp/blob/master/examples/flame_propagation/flame_propagation.cpp) example)
1832
- Added integration test based on the "Flame Propagation" example

docs/examples.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,21 @@ When you light a match, the ball of flame grows rapidly until it reaches a criti
4242
Then it remains at that size because the amount of oxygen being consumed by the combustion
4343
in the interior of the ball balances the amount of oxigen available through the surface.
4444
This example solves **stiff** equation of flame propagation for the scalar variable $$y(t)$$ which represents the radius of the ball.
45+
46+
## Jacobian matrix shape
47+
48+
Jacobian matrix shape source file example: [jacobian_shape.cpp](https://github.com/dae-cpp/dae-cpp/blob/master/examples/jacobian_shape/jacobian_shape.cpp)
49+
{: .fs-5 .fw-400 }
50+
51+
This example demonstrates how to define the shape (structure) of the Jacobian matrix.
52+
I.e., instead of providing the full analytic Jacobian (or not providing it at all, which is slow if the system is big), the user can specify the positions of non-zero elements in the Jacobian.
53+
The solver will use automatic differentiation for the specified elements only.
54+
This works (nearly) as fast as the analytic Jacobian without requiring the user to differentiate the vector function manually.
55+
56+
## Checking user-defined Jacobian
57+
58+
Jacobian matrix checking source file example: [jacobian_compare.cpp](https://github.com/dae-cpp/dae-cpp/blob/master/examples/jacobian_compare/jacobian_compare.cpp)
59+
{: .fs-5 .fw-400 }
60+
61+
In this example, we do not solve any DAEs. Instead, we define a simple vector function, the corresponding Jacobian matrix, and then we use a built-in helper class `JacobianCompare` to compare our manually derived Jacobian with the one computed algorithmically from the vector function.
62+
We will make a few mistakes in the analytic Jacobian on purpose to see what information `JacobianCompare` can provide.

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ layout: home
44
nav_order: 1
55
---
66

7-
![version](https://img.shields.io/badge/version-2.0.1-blue)
7+
![version](https://img.shields.io/badge/version-2.1.0-blue)
88

99
<p align="center">
1010
<img src="../assets/images/logo.png" alt="dae-cpp logo" width="250"/>

0 commit comments

Comments
 (0)