Commit cca55e4
Sebastien Loisel
Isoparametric FEM2D_P2 element map; positive-weight guard (v0.12.3)
FEM2D_P2 now builds the element geometry from all 7 P2+bubble node positions via
the shape functions, so displacing edge/centroid nodes genuinely curves the
element (node-varying Jacobian) instead of being silently flattened to the affine
corner triangle. The physical-derivative operators use J(node)^{-T} per node and
the quadrature weight is the signed det J(node)·R.w. Dropping abs(det) means
inverted/folded elements now produce non-positive weights.
FEM3D was already isoparametric (per-node J from D_xi/D_eta/D_zeta over all
(k+1)^3 nodes); switch its weights from abs(det J) to signed det J for the same
reason, and drop a dead duplicate z-derivative block in _fem3d_structured.
Both discretizations now refuse to build (hence to solve) when any quadrature
weight is non-positive, since the barrier method requires strictly positive
weights. Straight elements are bit-unchanged (tests green, dx/dy/dz ~1e-14).1 parent 417161c commit cca55e4
4 files changed
Lines changed: 63 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
79 | 93 | | |
80 | 94 | | |
81 | 95 | | |
| |||
210 | 224 | | |
211 | 225 | | |
212 | 226 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | 227 | | |
219 | 228 | | |
220 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
138 | 145 | | |
139 | 146 | | |
140 | 147 | | |
| |||
375 | 382 | | |
376 | 383 | | |
377 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
378 | 393 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
385 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
386 | 405 | | |
| 406 | + | |
387 | 407 | | |
388 | | - | |
389 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
390 | 421 | | |
391 | 422 | | |
392 | 423 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
0 commit comments