@@ -207,35 +207,35 @@ equations(sys)
207
207
0 ~ rc50₊resistor50₊R* rc50₊capacitor50₊p₊i (t)* (1 + (rc50₊resistor50₊alpha* (((rc50₊capacitor50₊p₊i (t))* (rc50₊source₊V - (rc50₊capacitor50₊v (t)))) - rc50₊resistor50₊TAmbient))) - (rc50₊source₊V - (rc50₊capacitor50₊v (t)))
208
208
Differential (t)(rc50₊capacitor50₊v (t)) ~ rc50₊capacitor50₊p₊i (t)* (rc50₊capacitor50₊C^- 1 )
209
209
Differential (t)(rc50₊heat_capacitor50₊h₊T (t)) ~ rc50₊capacitor50₊p₊i (t)* (rc50₊heat_capacitor50₊V^- 1 )* (rc50₊heat_capacitor50₊cp^- 1 )* (rc50₊heat_capacitor50₊rho^- 1 )* (rc50₊source₊V - (rc50₊capacitor50₊v (t)))
210
- ```
211
-
212
- That's not all though. In addition, the tearing process has turned the sets of
213
- nonlinear equations into separate blocks and constructed a DAG for the dependencies
214
- between the blocks. We can use the bipartite graph functionality to dig in and
215
- investigate what this means:
216
-
217
- ``` julia
218
- using ModelingToolkit. BipartiteGraphs
219
- big_rc = initialize_system_structure (big_rc)
220
- inc_org = BipartiteGraphs. incidence_matrix (structure (big_rc). graph)
221
- blt_org = StructuralTransformations. sorted_incidence_matrix (big_rc, only_algeqs= true , only_algvars= true )
222
- blt_reduced = StructuralTransformations. sorted_incidence_matrix (sys, only_algeqs= true , only_algvars= true )
223
- ```
224
-
225
- ![ ] ( https://user-images.githubusercontent.com/1814174/110589027-d4ec9b00-8143-11eb-8880-651da986504d.PNG )
226
-
227
- The figure on the left is the original incidence matrix of the algebraic equations.
228
- Notice that the original formulation of the model has dependencies between different
229
- equations, and so the full set of equations must be solved together. That exposes
230
- no parallelism. However, the Block Lower Triangular (BLT) transformation exposes
231
- independent blocks. This is then further impoved by the tearing process, which
232
- removes 90% of the equations and transforms the nonlinear equations into 50
233
- independent blocks * which can now all be solved in parallel* . The conclusion
234
- is that, your attempts to parallelize are neigh: performing parallelism after
235
- structural simplification greatly improves the problem that can be parallelized,
236
- so this is better than trying to do it by hand.
237
-
238
- After performing this, you can construct the ` ODEProblem ` /` ODAEProblem ` and set
239
- ` parallel_form ` to use the exposed parallelism in multithreaded function
240
- constructions, but this showcases why ` structural_simplify ` is so important
241
- to that process.
210
+ ```
211
+
212
+ That's not all though. In addition, the tearing process has turned the sets of
213
+ nonlinear equations into separate blocks and constructed a DAG for the dependencies
214
+ between the blocks. We can use the bipartite graph functionality to dig in and
215
+ investigate what this means:
216
+
217
+ ``` julia
218
+ using ModelingToolkit. BipartiteGraphs
219
+ big_rc = initialize_system_structure (big_rc)
220
+ inc_org = BipartiteGraphs. incidence_matrix (structure (big_rc). graph)
221
+ blt_org = StructuralTransformations. sorted_incidence_matrix (big_rc, only_algeqs= true , only_algvars= true )
222
+ blt_reduced = StructuralTransformations. sorted_incidence_matrix (sys, only_algeqs= true , only_algvars= true )
223
+ ```
224
+
225
+ ![ ] ( https://user-images.githubusercontent.com/1814174/110589027-d4ec9b00-8143-11eb-8880-651da986504d.PNG )
226
+
227
+ The figure on the left is the original incidence matrix of the algebraic equations.
228
+ Notice that the original formulation of the model has dependencies between different
229
+ equations, and so the full set of equations must be solved together. That exposes
230
+ no parallelism. However, the Block Lower Triangular (BLT) transformation exposes
231
+ independent blocks. This is then further impoved by the tearing process, which
232
+ removes 90% of the equations and transforms the nonlinear equations into 50
233
+ independent blocks * which can now all be solved in parallel* . The conclusion
234
+ is that, your attempts to parallelize are neigh: performing parallelism after
235
+ structural simplification greatly improves the problem that can be parallelized,
236
+ so this is better than trying to do it by hand.
237
+
238
+ After performing this, you can construct the ` ODEProblem ` /` ODAEProblem ` and set
239
+ ` parallel_form ` to use the exposed parallelism in multithreaded function
240
+ constructions, but this showcases why ` structural_simplify ` is so important
241
+ to that process.
0 commit comments