Commit 9cb7f34
Add embedded manifolds: curves in R^2/R^3 and surfaces in R^3
Generalize the tensor-product FEM from codimension-0 domains to embedded
manifolds, with a single code path that reduces exactly to the old behavior.
- TensorFEM gains an ambient-dimension type parameter: TensorFEM{d,e,T}
(intrinsic dim d, ambient/embedding dim e >= d). fem1d/fem2d take
ambient=Val(e) (default Val(d)) so constructor return types stay inferrable;
fem3d is unchanged (e=3 forced). Aliases FEM1D/FEM2D/FEM3D fix only d.
- The operators :dx,:dy,:dz are the ambient components of the intrinsic
(tangential) gradient, computed via the Jacobian pseudo-inverse g\J' with
g = J'J the first fundamental form; quadrature weights use the surface /
arc-length measure sqrt(det g). At e=d this is inv(J) and |det J|, so codim-0
results are unchanged within roundoff. No normal vector is ever needed.
- amg: the auxiliary Dirichlet energy now sums all e ambient gradient
components (the full tangential energy), not just d.
- PyVista plotting for surfaces (TensorFEM{2,3}) and curves (TensorFEM{1,e}):
graph the solution into the first free dimension when e<3 (a planar curve is
drawn as the height-graph (x,y,u)), color it in place when e=3.
- test/test_manifold.jl: scalar p-Laplace + mass solves on a circle (R^2 and
R^3) and a sphere, validated against manufactured Laplace-Beltrami
eigenfunctions and by embedding-independence to machine precision, plus
surface/curve plotting smoke tests.
- docs: new "Embedded manifolds" section with a runnable example; front-end
table and module/struct docstrings updated.1 parent e1246e7 commit 9cb7f34
8 files changed
Lines changed: 488 additions & 105 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
169 | 214 | | |
170 | 215 | | |
171 | 216 | | |
| |||
175 | 220 | | |
176 | 221 | | |
177 | 222 | | |
178 | | - | |
179 | | - | |
| 223 | + | |
| 224 | + | |
180 | 225 | | |
181 | 226 | | |
182 | 227 | | |
| |||
247 | 292 | | |
248 | 293 | | |
249 | 294 | | |
250 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
251 | 300 | | |
252 | 301 | | |
253 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
0 commit comments