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-47dfc387-39e1-4c65-9b13-811d114aed3a ">
139
- < span class ="eqno "> (1)< a class ="headerlink " href ="#equation-47dfc387-39e1-4c65-9b13-811d114aed3a " title ="Permalink to this equation "> </ a > </ span > \[\begin{align}
138
+ < div class ="amsmath math notranslate nohighlight " id ="equation-c71e9064-751d-4c26-95b8-26620dd67d00 ">
139
+ < span class ="eqno "> (1)< a class ="headerlink " href ="#equation-c71e9064-751d-4c26-95b8-26620dd67d00 " 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" : " 5038c9a0 " ,
5
+ "id" : " 4486d074 " ,
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" : " 5a772011 " ,
76
+ "id" : " bca0779c " ,
77
77
"metadata" : {},
78
78
"outputs" : [],
79
79
"source" : [
83
83
{
84
84
"cell_type" : " code" ,
85
85
"execution_count" : null ,
86
- "id" : " 89b7390c " ,
86
+ "id" : " c9947055 " ,
87
87
"metadata" : {},
88
88
"outputs" : [],
89
89
"source" : [
93
93
{
94
94
"cell_type" : " code" ,
95
95
"execution_count" : null ,
96
- "id" : " 0c121460 " ,
96
+ "id" : " 1d2e4902 " ,
97
97
"metadata" : {},
98
98
"outputs" : [],
99
99
"source" : [
104
104
},
105
105
{
106
106
"cell_type" : " markdown" ,
107
- "id" : " 37273250 " ,
107
+ "id" : " 46b2652a " ,
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" : " b05676cb " ,
120
+ "id" : " 0421b6f3 " ,
121
121
"metadata" : {},
122
122
"outputs" : [],
123
123
"source" : [
130
130
{
131
131
"cell_type" : " code" ,
132
132
"execution_count" : null ,
133
- "id" : " 9b83bdb1 " ,
133
+ "id" : " 1ad4cabc " ,
134
134
"metadata" : {},
135
135
"outputs" : [],
136
136
"source" : [
141
141
},
142
142
{
143
143
"cell_type" : " markdown" ,
144
- "id" : " 672487c8 " ,
144
+ "id" : " 3d4bf154 " ,
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" : " 6a1aa8c0 " ,
163
+ "id" : " d1915452 " ,
164
164
"metadata" : {},
165
165
"outputs" : [],
166
166
"source" : [
171
171
},
172
172
{
173
173
"cell_type" : " markdown" ,
174
- "id" : " 18289314 " ,
174
+ "id" : " ad6a49c7 " ,
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" : " f2b0bfe7 " ,
185
+ "id" : " 31b1c299 " ,
186
186
"metadata" : {},
187
187
"outputs" : [],
188
188
"source" : [
191
191
},
192
192
{
193
193
"cell_type" : " markdown" ,
194
- "id" : " 6ceb5963 " ,
194
+ "id" : " 734df530 " ,
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" : " 5d7cc8c2 " ,
207
+ "id" : " 89d4ec67 " ,
208
208
"metadata" : {},
209
209
"outputs" : [],
210
210
"source" : [
215
215
},
216
216
{
217
217
"cell_type" : " markdown" ,
218
- "id" : " caaf4d04 " ,
218
+ "id" : " a687b3f1 " ,
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" : " 1198be2c " ,
227
+ "id" : " 9457e35d " ,
228
228
"metadata" : {},
229
229
"outputs" : [],
230
230
"source" : [
239
239
},
240
240
{
241
241
"cell_type" : " markdown" ,
242
- "id" : " 26939899 " ,
242
+ "id" : " e56777dc " ,
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" : " e98ef176 " ,
258
+ "id" : " 92e2df3d " ,
259
259
"metadata" : {},
260
260
"outputs" : [],
261
261
"source" : [
266
266
},
267
267
{
268
268
"cell_type" : " markdown" ,
269
- "id" : " 514882a4 " ,
269
+ "id" : " 8c4e304f " ,
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" : " 4c0036cd " ,
283
+ "id" : " 116d0266 " ,
284
284
"metadata" : {},
285
285
"outputs" : [],
286
286
"source" : [
295
295
{
296
296
"cell_type" : " code" ,
297
297
"execution_count" : null ,
298
- "id" : " 1ce0b236 " ,
298
+ "id" : " 3302e107 " ,
299
299
"metadata" : {},
300
300
"outputs" : [],
301
301
"source" : [
306
306
},
307
307
{
308
308
"cell_type" : " markdown" ,
309
- "id" : " 5c58fcf7 " ,
309
+ "id" : " 8654e846 " ,
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" : " f806c9c9 " ,
322
+ "id" : " d6b8ac8e " ,
323
323
"metadata" : {
324
324
"lines_to_next_cell" : 2
325
325
},
342
342
},
343
343
{
344
344
"cell_type" : " markdown" ,
345
- "id" : " c343cc19 " ,
345
+ "id" : " 65d78966 " ,
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" : " 0e9fc2db " ,
361
+ "id" : " b385c10f " ,
362
362
"metadata" : {},
363
363
"outputs" : [],
364
364
"source" : [
404
404
},
405
405
{
406
406
"cell_type" : " markdown" ,
407
- "id" : " ffe4df28 " ,
407
+ "id" : " 6e45da1a " ,
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" : " e2ae190c " ,
418
+ "id" : " 1968ac88 " ,
419
419
"metadata" : {},
420
420
"outputs" : [],
421
421
"source" : [
427
427
{
428
428
"cell_type" : " code" ,
429
429
"execution_count" : null ,
430
- "id" : " 9011e5bd " ,
430
+ "id" : " 4dafa784 " ,
431
431
"metadata" : {},
432
432
"outputs" : [],
433
433
"source" : [
438
438
{
439
439
"cell_type" : " code" ,
440
440
"execution_count" : null ,
441
- "id" : " 78050089 " ,
441
+ "id" : " 291f1b7e " ,
442
442
"metadata" : {},
443
443
"outputs" : [],
444
444
"source" : [
450
450
{
451
451
"cell_type" : " code" ,
452
452
"execution_count" : null ,
453
- "id" : " 962cb18a " ,
453
+ "id" : " fe7733e9 " ,
454
454
"metadata" : {},
455
455
"outputs" : [],
456
456
"source" : [
You can’t perform that action at this time.
0 commit comments