You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+54-27Lines changed: 54 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ Published in [ACM Transactions on Graphics (TOG)](https://dl.acm.org/doi/abs/10.
28
28
-[⚡️ Requirements](#️-requirements)
29
29
-[📝 Change History](#-change-history)
30
30
-[🐍 How To Use](#-how-to-use)
31
+
-[🔍 Obtaining Logs](#-obtaining-logs)
31
32
-[🖼️ Catalogue](#️-catalogue)
32
33
-[🚀 GitHub Actions](#-github-actions)
33
34
-[💨 Getting Started](#-getting-started)
@@ -64,6 +65,7 @@ Published in [ACM Transactions on Graphics (TOG)](https://dl.acm.org/doi/abs/10.
64
65
65
66
## 📝 Change History
66
67
68
+
- (2024.12.27) Line search for strain limiting is improved [[Markdown]](./articles/bug.md#new-strain-limiting-line-search).
67
69
- (2024.12.23) Added [[Bug Fixes and Updates]](./articles/bug.md)
68
70
- (2024.12.21) Added a [house of cards example](./examples/cards.ipynb)[[Video]](https://drive.google.com/file/d/1PMdDnlyCsjinbvICKph_0UcXUfUvvUmZ/view)
69
71
- (2024.12.18) Added a [frictional contact example](./examples/friction.ipynb): armadillo sliding on the slope [[Video]](https://drive.google.com/file/d/12WGdfDTFIwCT0UFGEZzfmQreM6WSSHet/view)
Logs for the simulation can also be queried through the Python APIs. Here's an example of how to get the list of recorded logs, fetch them, and compute the average.
|**advance.max_sigma**| Max stretch | list(vid_time,strech) |
205
207
206
-
Note that some entries have multiple records at the same video time ⏱️. This occurs because the same operation is executed multiple times 🔄 within a single step during the inner Newton's iteration 🧮. For example, the linear system solve is performed at each Newton's step, so if multiple Newton's steps are 🔁 executed, multiple linear system solve times may appear in the record at the same 📊 video time.
208
+
Note that some entries have multiple records at the same video time ⏱️. This occurs because the same operation is executed multiple times 🔄 within a single step during the inner Newton's iterations 🧮. For example, the linear system solve is performed at each Newton's step, so if multiple Newton's steps are 🔁 executed, multiple linear system solve times may appear in the record at the same 📊 video time.
209
+
210
+
If you would like to retrieve the raw log stream, you can do so by
211
+
212
+
```python
213
+
# Last 8 lines. Omit for everything.
214
+
for line in session.get.log(n_lines=8):
215
+
print(line)
216
+
```
217
+
218
+
This will output something like:
219
+
220
+
```
221
+
* dt: 1.000e-03
222
+
* max_sigma: 1.045e+00
223
+
* avg_sigma: 1.030e+00
224
+
------ newton step 1 ------
225
+
====== contact_matrix_assembly ======
226
+
> dry_pass...0 msec
227
+
> rebuild...7 msec
228
+
> fillin_pass...0 msec
229
+
```
230
+
231
+
If you would like to read `stdout` and `stderr`, you can do so using `session.get.stdout()` and `session.get.stderr()` (if it exists). They return `list[str]`.
232
+
233
+
All the log files 📂 are available ✅ and can be fetched ⬇️ during the simulation 🧑💻.
207
234
208
235
## 🖼️ Catalogue
209
236
@@ -568,22 +595,22 @@ The author also extends thanks to the teams in the IP department for permitting
568
595
569
596
```
570
597
@article{Ando2024CB,
571
-
author = {Ando, Ryoichi},
572
-
title = {A Cubic Barrier with Elasticity-Inclusive Dynamic Stiffness},
573
-
year = {2024},
574
-
issue_date = {December 2024},
575
-
publisher = {Association for Computing Machinery},
576
-
address = {New York, NY, USA},
577
-
volume = {43},
578
-
number = {6},
579
-
issn = {0730-0301},
580
-
url = {https://doi.org/10.1145/3687908},
581
-
doi = {10.1145/3687908},
582
-
journal = {ACM Trans. Graph.},
583
-
month = nov,
584
-
articleno = {224},
585
-
numpages = {13},
586
-
keywords = {collision, contact}
598
+
author = {Ando, Ryoichi},
599
+
title = {A Cubic Barrier with Elasticity-Inclusive Dynamic Stiffness},
600
+
year = {2024},
601
+
issue_date = {December 2024},
602
+
publisher = {Association for Computing Machinery},
Copy file name to clipboardExpand all lines: articles/bug.md
+42-1Lines changed: 42 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,53 @@
1
1
## Bug Fixes 🐞 and Updates 🔄
2
2
3
+
### New Strain Limiting Line Search
4
+
5
+
On 2024-Dec-27, we made minor improvements to the line search algorithm for strain limiting.
6
+
The new algorithm is laid out below.
7
+
Compared to the one presented in the supplementary PDF, this new algorithm searches for `t` (time of impact) with exact numerical precision; no parameters, such as the `eps` tolerance for checking convergence or the maximum loop count, are necessary.
8
+
This new approach converges quickly and exits the loop fast.
9
+
10
+
```c++
11
+
/* Apache v2.0 License */
12
+
floatline_search_strain_limiting(
13
+
const Mat3x2f &F0, // Deformation gradient at t = 0.0
14
+
const Mat3x2f &F1, // Deformation gradient at t = 1.0
15
+
float t, // Maximal time of impact, such as t = 1.0
16
+
float max_sigma ) // Maximal sigma, such as 1.01
17
+
{
18
+
const Mat3x2f dF = F1 - F0;
19
+
if (svd3x2(F0 + t * dF).S.max() >= max_sigma) {
20
+
float upper_t = t;
21
+
float lower_t = 0.0f;
22
+
float window = upper_t - lower_t;
23
+
while (true) {
24
+
t = 0.5f * (upper_t + lower_t);
25
+
float diff = svd3x2(F0 + t * dF).S.maxCoeff() - max_sigma;
26
+
if (diff < 0.0f) {
27
+
lower_t = t;
28
+
} else {
29
+
upper_t = t;
30
+
}
31
+
float new_window = upper_t - lower_t;
32
+
if (new_window == window) {
33
+
break;
34
+
} else {
35
+
window = new_window;
36
+
}
37
+
}
38
+
t = lower_t;
39
+
}
40
+
return t;
41
+
}
42
+
```
43
+
3
44
### BVH Construction
4
45
5
46
In the supplementary PDF, we mentioned that the BVH is reconstructed every 10 video frames; however, this is not what is implemented in the public code.
6
47
7
48
In this code, the BVH is continuously updated on the CPU side in the background without blocking the simulation. At the beginning of each step, we check if the BVH construction is finished, and if it is, we update the GPU buffer.
8
49
9
-
### Hang Example (2024-Dec-22)
50
+
### Hang Example
10
51
11
52
On 2024-Dec-22, we encountered a situation where the PCG solver in our "hang" example `hang.ipynb` failed to converge, resulting in a simulation failure.
0 commit comments