File tree 3 files changed +68
-68
lines changed
9561cf6cd1a70079b986f4eb31580cbd
9ed4657d08dda04de30e6463e2f58d75
3 files changed +68
-68
lines changed Original file line number Diff line number Diff line change @@ -135,8 +135,8 @@ <h3>Weak formulation<a class="headerlink" href="#weak-formulation" title="Link t
135
135
\forall \ K \in \mathcal{T} \right\}
136
136
\]</ div >
137
137
< p > and considering the boundary conditions</ p >
138
- < div class ="amsmath math notranslate nohighlight " id ="equation-79c699de-77cf-4844-9553-75a79d1abdd0 ">
139
- < span class ="eqno "> (1)< a class ="headerlink " href ="#equation-79c699de-77cf-4844-9553-75a79d1abdd0 " title ="Permalink to this equation "> </ a > </ span > \[\begin{align}
138
+ < div class ="amsmath math notranslate nohighlight " id ="equation-62e78a09-e811-4d83-bde0-ced93b0af10f ">
139
+ < span class ="eqno "> (1)< a class ="headerlink " href ="#equation-62e78a09-e811-4d83-bde0-ced93b0af10f " title ="Permalink to this equation "> </ a > </ span > \[\begin{align}
140
140
u &= 0 \quad {\rm on} \ \partial\Omega, \\
141
141
\nabla^{2} u &= 0 \quad {\rm on} \ \partial\Omega,
142
142
\end{align}\]</ div >
Original file line number Diff line number Diff line change 2
2
"cells" : [
3
3
{
4
4
"cell_type" : " markdown" ,
5
- "id" : " 685ae755 " ,
5
+ "id" : " da4d2fc7 " ,
6
6
"metadata" : {},
7
7
"source" : [
8
8
" # Matrix-free conjugate gradient solver for the Poisson equation\n " ,
73
73
{
74
74
"cell_type" : " code" ,
75
75
"execution_count" : null ,
76
- "id" : " ddc66fd9 " ,
76
+ "id" : " 762363c0 " ,
77
77
"metadata" : {},
78
78
"outputs" : [],
79
79
"source" : [
83
83
{
84
84
"cell_type" : " code" ,
85
85
"execution_count" : null ,
86
- "id" : " 6964d0d1 " ,
86
+ "id" : " 94e731ca " ,
87
87
"metadata" : {},
88
88
"outputs" : [],
89
89
"source" : [
93
93
{
94
94
"cell_type" : " code" ,
95
95
"execution_count" : null ,
96
- "id" : " 44255e51 " ,
96
+ "id" : " a4686078 " ,
97
97
"metadata" : {},
98
98
"outputs" : [],
99
99
"source" : [
104
104
},
105
105
{
106
106
"cell_type" : " markdown" ,
107
- "id" : " 59c3e9e9 " ,
107
+ "id" : " 2dbb6eec " ,
108
108
"metadata" : {},
109
109
"source" : [
110
110
" We begin by using {py:func}`create_rectangle\n " ,
117
117
{
118
118
"cell_type" : " code" ,
119
119
"execution_count" : null ,
120
- "id" : " 6b6f83fb " ,
120
+ "id" : " 756d1326 " ,
121
121
"metadata" : {},
122
122
"outputs" : [],
123
123
"source" : [
130
130
{
131
131
"cell_type" : " code" ,
132
132
"execution_count" : null ,
133
- "id" : " 3a8a67e4 " ,
133
+ "id" : " d31322f6 " ,
134
134
"metadata" : {},
135
135
"outputs" : [],
136
136
"source" : [
141
141
},
142
142
{
143
143
"cell_type" : " markdown" ,
144
- "id" : " 6365aa84 " ,
144
+ "id" : " 5b96a993 " ,
145
145
"metadata" : {},
146
146
"source" : [
147
147
" The second argument to {py:class}`functionspace\n " ,
160
160
{
161
161
"cell_type" : " code" ,
162
162
"execution_count" : null ,
163
- "id" : " 876114dd " ,
163
+ "id" : " c5590737 " ,
164
164
"metadata" : {},
165
165
"outputs" : [],
166
166
"source" : [
171
171
},
172
172
{
173
173
"cell_type" : " markdown" ,
174
- "id" : " 167fdd03 " ,
174
+ "id" : " 3e9ffe9d " ,
175
175
"metadata" : {},
176
176
"source" : [
177
177
" We now find the degrees of freedom that are associated with the boundary\n " ,
182
182
{
183
183
"cell_type" : " code" ,
184
184
"execution_count" : null ,
185
- "id" : " 198bd848 " ,
185
+ "id" : " d3a48b1c " ,
186
186
"metadata" : {},
187
187
"outputs" : [],
188
188
"source" : [
191
191
},
192
192
{
193
193
"cell_type" : " markdown" ,
194
- "id" : " 0cd1423c " ,
194
+ "id" : " 95890c0c " ,
195
195
"metadata" : {},
196
196
"source" : [
197
197
" and use {py:func}`dirichletbc <dolfinx.fem.dirichletbc>` to define the\n " ,
204
204
{
205
205
"cell_type" : " code" ,
206
206
"execution_count" : null ,
207
- "id" : " bf29a7d3 " ,
207
+ "id" : " 71d78781 " ,
208
208
"metadata" : {},
209
209
"outputs" : [],
210
210
"source" : [
215
215
},
216
216
{
217
217
"cell_type" : " markdown" ,
218
- "id" : " c5e4c95f " ,
218
+ "id" : " 1eab21df " ,
219
219
"metadata" : {},
220
220
"source" : [
221
221
" Next, we express the variational problem using UFL."
224
224
{
225
225
"cell_type" : " code" ,
226
226
"execution_count" : null ,
227
- "id" : " 2c9126c7 " ,
227
+ "id" : " 55252acf " ,
228
228
"metadata" : {},
229
229
"outputs" : [],
230
230
"source" : [
239
239
},
240
240
{
241
241
"cell_type" : " markdown" ,
242
- "id" : " 2a3ee408 " ,
242
+ "id" : " 5a40e8fd " ,
243
243
"metadata" : {},
244
244
"source" : [
245
245
" For the matrix-free solvers we also define a second linear form `M` as\n " ,
255
255
{
256
256
"cell_type" : " code" ,
257
257
"execution_count" : null ,
258
- "id" : " 5cec9588 " ,
258
+ "id" : " 0c113747 " ,
259
259
"metadata" : {},
260
260
"outputs" : [],
261
261
"source" : [
266
266
},
267
267
{
268
268
"cell_type" : " markdown" ,
269
- "id" : " 779cb6a8 " ,
269
+ "id" : " e9afa421 " ,
270
270
"metadata" : {},
271
271
"source" : [
272
272
" ### Matrix-free conjugate gradient solver\n " ,
280
280
{
281
281
"cell_type" : " code" ,
282
282
"execution_count" : null ,
283
- "id" : " a22a065b " ,
283
+ "id" : " da910cce " ,
284
284
"metadata" : {},
285
285
"outputs" : [],
286
286
"source" : [
295
295
{
296
296
"cell_type" : " code" ,
297
297
"execution_count" : null ,
298
- "id" : " a8d3f546 " ,
298
+ "id" : " d7e393c3 " ,
299
299
"metadata" : {},
300
300
"outputs" : [],
301
301
"source" : [
306
306
},
307
307
{
308
308
"cell_type" : " markdown" ,
309
- "id" : " 331102cb " ,
309
+ "id" : " 5fdbde7d " ,
310
310
"metadata" : {
311
311
"lines_to_next_cell" : 2
312
312
},
319
319
{
320
320
"cell_type" : " code" ,
321
321
"execution_count" : null ,
322
- "id" : " 15242a9f " ,
322
+ "id" : " a6332264 " ,
323
323
"metadata" : {
324
324
"lines_to_next_cell" : 2
325
325
},
342
342
},
343
343
{
344
344
"cell_type" : " markdown" ,
345
- "id" : " 8e07715b " ,
345
+ "id" : " 9668bea6 " ,
346
346
"metadata" : {
347
347
"lines_to_next_cell" : 2
348
348
},
358
358
{
359
359
"cell_type" : " code" ,
360
360
"execution_count" : null ,
361
- "id" : " 17cc1fbe " ,
361
+ "id" : " 1927788b " ,
362
362
"metadata" : {},
363
363
"outputs" : [],
364
364
"source" : [
404
404
},
405
405
{
406
406
"cell_type" : " markdown" ,
407
- "id" : " 1af84b00 " ,
407
+ "id" : " cb0f58cc " ,
408
408
"metadata" : {},
409
409
"source" : [
410
410
" This matrix-free solver is now used to compute the finite element\n " ,
415
415
{
416
416
"cell_type" : " code" ,
417
417
"execution_count" : null ,
418
- "id" : " d59e612d " ,
418
+ "id" : " 1ed877e7 " ,
419
419
"metadata" : {},
420
420
"outputs" : [],
421
421
"source" : [
427
427
{
428
428
"cell_type" : " code" ,
429
429
"execution_count" : null ,
430
- "id" : " d9a56f9b " ,
430
+ "id" : " a7329018 " ,
431
431
"metadata" : {},
432
432
"outputs" : [],
433
433
"source" : [
438
438
{
439
439
"cell_type" : " code" ,
440
440
"execution_count" : null ,
441
- "id" : " f7edce05 " ,
441
+ "id" : " 2b5f8641 " ,
442
442
"metadata" : {},
443
443
"outputs" : [],
444
444
"source" : [
450
450
{
451
451
"cell_type" : " code" ,
452
452
"execution_count" : null ,
453
- "id" : " 6a6913df " ,
453
+ "id" : " 04f5e2e4 " ,
454
454
"metadata" : {},
455
455
"outputs" : [],
456
456
"source" : [
You can’t perform that action at this time.
0 commit comments