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-67f99d26-b407-48dc-86e9-733119bbfd12 ">
139
- < span class ="eqno "> (1)< a class ="headerlink " href ="#equation-67f99d26-b407-48dc-86e9-733119bbfd12 " title ="Permalink to this equation "> </ a > </ span > \[\begin{align}
138
+ < div class ="amsmath math notranslate nohighlight " id ="equation-89da9da6-aa04-4e96-95a9-2b1fd26fed74 ">
139
+ < span class ="eqno "> (1)< a class ="headerlink " href ="#equation-89da9da6-aa04-4e96-95a9-2b1fd26fed74 " 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" : " 3922407b " ,
5
+ "id" : " 3d7d6025 " ,
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" : " 7a51a2f3 " ,
76
+ "id" : " 4518d1b5 " ,
77
77
"metadata" : {},
78
78
"outputs" : [],
79
79
"source" : [
83
83
{
84
84
"cell_type" : " code" ,
85
85
"execution_count" : null ,
86
- "id" : " af71bbf0 " ,
86
+ "id" : " 9f194888 " ,
87
87
"metadata" : {},
88
88
"outputs" : [],
89
89
"source" : [
93
93
{
94
94
"cell_type" : " code" ,
95
95
"execution_count" : null ,
96
- "id" : " 1d3f4f9b " ,
96
+ "id" : " cb839917 " ,
97
97
"metadata" : {},
98
98
"outputs" : [],
99
99
"source" : [
104
104
},
105
105
{
106
106
"cell_type" : " markdown" ,
107
- "id" : " a3c515ff " ,
107
+ "id" : " 7e9737fb " ,
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" : " 4caba363 " ,
120
+ "id" : " 81746e51 " ,
121
121
"metadata" : {},
122
122
"outputs" : [],
123
123
"source" : [
130
130
{
131
131
"cell_type" : " code" ,
132
132
"execution_count" : null ,
133
- "id" : " 1fe5e4d8 " ,
133
+ "id" : " 8fbdabcc " ,
134
134
"metadata" : {},
135
135
"outputs" : [],
136
136
"source" : [
141
141
},
142
142
{
143
143
"cell_type" : " markdown" ,
144
- "id" : " f0e1f1ac " ,
144
+ "id" : " 9e25b35a " ,
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" : " 903cc564 " ,
163
+ "id" : " ba4808fd " ,
164
164
"metadata" : {},
165
165
"outputs" : [],
166
166
"source" : [
171
171
},
172
172
{
173
173
"cell_type" : " markdown" ,
174
- "id" : " ee27344c " ,
174
+ "id" : " cd2c2e97 " ,
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" : " a578502f " ,
185
+ "id" : " e08fdeb6 " ,
186
186
"metadata" : {},
187
187
"outputs" : [],
188
188
"source" : [
191
191
},
192
192
{
193
193
"cell_type" : " markdown" ,
194
- "id" : " 346be8a2 " ,
194
+ "id" : " 15602459 " ,
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" : " 12807cfd " ,
207
+ "id" : " da23b481 " ,
208
208
"metadata" : {},
209
209
"outputs" : [],
210
210
"source" : [
215
215
},
216
216
{
217
217
"cell_type" : " markdown" ,
218
- "id" : " 39c305b0 " ,
218
+ "id" : " 6d7b2f01 " ,
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" : " 6094aee8 " ,
227
+ "id" : " 93ebdfc1 " ,
228
228
"metadata" : {},
229
229
"outputs" : [],
230
230
"source" : [
239
239
},
240
240
{
241
241
"cell_type" : " markdown" ,
242
- "id" : " 3430ce53 " ,
242
+ "id" : " 1c96277b " ,
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" : " 6df6bef5 " ,
258
+ "id" : " c8cf3f12 " ,
259
259
"metadata" : {},
260
260
"outputs" : [],
261
261
"source" : [
266
266
},
267
267
{
268
268
"cell_type" : " markdown" ,
269
- "id" : " 72f5cd60 " ,
269
+ "id" : " dabf8f18 " ,
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" : " 40a25169 " ,
283
+ "id" : " 606e08ee " ,
284
284
"metadata" : {},
285
285
"outputs" : [],
286
286
"source" : [
295
295
{
296
296
"cell_type" : " code" ,
297
297
"execution_count" : null ,
298
- "id" : " 0bfacea6 " ,
298
+ "id" : " 11f06acc " ,
299
299
"metadata" : {},
300
300
"outputs" : [],
301
301
"source" : [
306
306
},
307
307
{
308
308
"cell_type" : " markdown" ,
309
- "id" : " c525318e " ,
309
+ "id" : " 36ee356a " ,
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" : " de624e92 " ,
322
+ "id" : " 5f4765ad " ,
323
323
"metadata" : {
324
324
"lines_to_next_cell" : 2
325
325
},
342
342
},
343
343
{
344
344
"cell_type" : " markdown" ,
345
- "id" : " 9b1d5160 " ,
345
+ "id" : " f3034def " ,
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" : " c3326050 " ,
361
+ "id" : " 3c9bb885 " ,
362
362
"metadata" : {},
363
363
"outputs" : [],
364
364
"source" : [
404
404
},
405
405
{
406
406
"cell_type" : " markdown" ,
407
- "id" : " 1fd54213 " ,
407
+ "id" : " c97f5675 " ,
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" : " 311d8f63 " ,
418
+ "id" : " f95b779c " ,
419
419
"metadata" : {},
420
420
"outputs" : [],
421
421
"source" : [
427
427
{
428
428
"cell_type" : " code" ,
429
429
"execution_count" : null ,
430
- "id" : " 1da31c7e " ,
430
+ "id" : " c14c740f " ,
431
431
"metadata" : {},
432
432
"outputs" : [],
433
433
"source" : [
438
438
{
439
439
"cell_type" : " code" ,
440
440
"execution_count" : null ,
441
- "id" : " 2c41ecc7 " ,
441
+ "id" : " abfbb2e9 " ,
442
442
"metadata" : {},
443
443
"outputs" : [],
444
444
"source" : [
450
450
{
451
451
"cell_type" : " code" ,
452
452
"execution_count" : null ,
453
- "id" : " ce902b99 " ,
453
+ "id" : " 353c559d " ,
454
454
"metadata" : {},
455
455
"outputs" : [],
456
456
"source" : [
You can’t perform that action at this time.
0 commit comments