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-5bcb0bbf-4a2b-4b54-9519-f70e695ad288 ">
139
- < span class ="eqno "> (1)< a class ="headerlink " href ="#equation-5bcb0bbf-4a2b-4b54-9519-f70e695ad288 " title ="Permalink to this equation "> </ a > </ span > \[\begin{align}
138
+ < div class ="amsmath math notranslate nohighlight " id ="equation-9efbdd38-0735-4689-90e0-e55ff6c2b099 ">
139
+ < span class ="eqno "> (1)< a class ="headerlink " href ="#equation-9efbdd38-0735-4689-90e0-e55ff6c2b099 " 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" : " 0d93fc44 " ,
5
+ "id" : " 95a926e3 " ,
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" : " 1d70a8c6 " ,
76
+ "id" : " 48100df0 " ,
77
77
"metadata" : {},
78
78
"outputs" : [],
79
79
"source" : [
83
83
{
84
84
"cell_type" : " code" ,
85
85
"execution_count" : null ,
86
- "id" : " 1500ed61 " ,
86
+ "id" : " c626a4bb " ,
87
87
"metadata" : {},
88
88
"outputs" : [],
89
89
"source" : [
93
93
{
94
94
"cell_type" : " code" ,
95
95
"execution_count" : null ,
96
- "id" : " 21863876 " ,
96
+ "id" : " e859bf90 " ,
97
97
"metadata" : {},
98
98
"outputs" : [],
99
99
"source" : [
104
104
},
105
105
{
106
106
"cell_type" : " markdown" ,
107
- "id" : " 3fe53cbb " ,
107
+ "id" : " 213b70ae " ,
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" : " 2543823d " ,
120
+ "id" : " 044c171a " ,
121
121
"metadata" : {},
122
122
"outputs" : [],
123
123
"source" : [
130
130
{
131
131
"cell_type" : " code" ,
132
132
"execution_count" : null ,
133
- "id" : " f87fc9b4 " ,
133
+ "id" : " ab872f5e " ,
134
134
"metadata" : {},
135
135
"outputs" : [],
136
136
"source" : [
141
141
},
142
142
{
143
143
"cell_type" : " markdown" ,
144
- "id" : " 4bd01caf " ,
144
+ "id" : " 4f94a544 " ,
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" : " 29277542 " ,
163
+ "id" : " 3be5ce26 " ,
164
164
"metadata" : {},
165
165
"outputs" : [],
166
166
"source" : [
171
171
},
172
172
{
173
173
"cell_type" : " markdown" ,
174
- "id" : " e855cda1 " ,
174
+ "id" : " 577dcf66 " ,
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" : " 51bec7e1 " ,
185
+ "id" : " 53d44585 " ,
186
186
"metadata" : {},
187
187
"outputs" : [],
188
188
"source" : [
191
191
},
192
192
{
193
193
"cell_type" : " markdown" ,
194
- "id" : " 55433906 " ,
194
+ "id" : " 80d246e8 " ,
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" : " 171e8551 " ,
207
+ "id" : " 2bf1ca72 " ,
208
208
"metadata" : {},
209
209
"outputs" : [],
210
210
"source" : [
215
215
},
216
216
{
217
217
"cell_type" : " markdown" ,
218
- "id" : " 28340d62 " ,
218
+ "id" : " c3d22254 " ,
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" : " d3e7faf7 " ,
227
+ "id" : " 8467f624 " ,
228
228
"metadata" : {},
229
229
"outputs" : [],
230
230
"source" : [
239
239
},
240
240
{
241
241
"cell_type" : " markdown" ,
242
- "id" : " 42fff922 " ,
242
+ "id" : " 076240fd " ,
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" : " 6f2eb031 " ,
258
+ "id" : " c9eeef65 " ,
259
259
"metadata" : {},
260
260
"outputs" : [],
261
261
"source" : [
266
266
},
267
267
{
268
268
"cell_type" : " markdown" ,
269
- "id" : " 5c2edc6c " ,
269
+ "id" : " 208064c9 " ,
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" : " be3eb6b2 " ,
283
+ "id" : " 7f543857 " ,
284
284
"metadata" : {},
285
285
"outputs" : [],
286
286
"source" : [
295
295
{
296
296
"cell_type" : " code" ,
297
297
"execution_count" : null ,
298
- "id" : " 57c7f7be " ,
298
+ "id" : " cc02d22b " ,
299
299
"metadata" : {},
300
300
"outputs" : [],
301
301
"source" : [
306
306
},
307
307
{
308
308
"cell_type" : " markdown" ,
309
- "id" : " 3ee4e1ce " ,
309
+ "id" : " fdd12417 " ,
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" : " fa99d8d0 " ,
322
+ "id" : " ed93a746 " ,
323
323
"metadata" : {
324
324
"lines_to_next_cell" : 2
325
325
},
342
342
},
343
343
{
344
344
"cell_type" : " markdown" ,
345
- "id" : " f2b52b47 " ,
345
+ "id" : " 061cd07b " ,
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" : " 159e1940 " ,
361
+ "id" : " 60cad26c " ,
362
362
"metadata" : {},
363
363
"outputs" : [],
364
364
"source" : [
404
404
},
405
405
{
406
406
"cell_type" : " markdown" ,
407
- "id" : " 07b8f3fe " ,
407
+ "id" : " f39b73eb " ,
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" : " a98dfc6d " ,
418
+ "id" : " e0005e4d " ,
419
419
"metadata" : {},
420
420
"outputs" : [],
421
421
"source" : [
427
427
{
428
428
"cell_type" : " code" ,
429
429
"execution_count" : null ,
430
- "id" : " 7c31f031 " ,
430
+ "id" : " 3ef2ff24 " ,
431
431
"metadata" : {},
432
432
"outputs" : [],
433
433
"source" : [
438
438
{
439
439
"cell_type" : " code" ,
440
440
"execution_count" : null ,
441
- "id" : " 68159b12 " ,
441
+ "id" : " 6fb3225e " ,
442
442
"metadata" : {},
443
443
"outputs" : [],
444
444
"source" : [
450
450
{
451
451
"cell_type" : " code" ,
452
452
"execution_count" : null ,
453
- "id" : " 737551a1 " ,
453
+ "id" : " 780e4ff4 " ,
454
454
"metadata" : {},
455
455
"outputs" : [],
456
456
"source" : [
You can’t perform that action at this time.
0 commit comments