Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit f815378

Browse files
committed
Fix another issue with second fundatemental form of pseudo-Riemannian submanifolds
1 parent 7f96e90 commit f815378

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

src/sage/manifolds/differentiable/pseudo_riemannian_submanifold.py

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,23 @@ def second_fundamental_form(self):
10511051
sage: N.extrinsic_curvature().display() # long time
10521052
K = -4/(x^4 + 8*x^2 + 16) dx*dx
10531053
1054+
An example with a non-Euclidean ambient metric::
1055+
1056+
sage: M = Manifold(2, 'M', structure='Riemannian')
1057+
sage: N = Manifold(1, 'N', ambient=M, structure='Riemannian',
1058+
....: start_index=1)
1059+
sage: CM.<x,y> = M.chart()
1060+
sage: CN.<u> = N.chart()
1061+
sage: g = M.metric()
1062+
sage: g[0, 0], g[1, 1] = 1, 1/(1 + y^2)^2
1063+
sage: phi = N.diff_map(M, (u, u))
1064+
sage: N.set_embedding(phi)
1065+
sage: N.second_fundamental_form()
1066+
Field of symmetric bilinear forms K on the 1-dimensional Riemannian
1067+
submanifold N embedded in the 2-dimensional Riemannian manifold M
1068+
sage: N.second_fundamental_form().display()
1069+
K = 2*sqrt(u^4 + 2*u^2 + 2)*u/(u^6 + 3*u^4 + 4*u^2 + 2) du*du
1070+
10541071
"""
10551072
if self._ambient._dim - self._dim != 1:
10561073
raise ValueError("second_fundamental_form is defined only for"
@@ -1074,14 +1091,18 @@ def second_fundamental_form(self):
10741091

10751092
for chart in self.atlas():
10761093
gamma_n = matrix(SR, self._dim + 1, self._dim + 1)
1094+
subs = dict(zip(self._ambient.default_chart()[:],
1095+
self._immersion.expression(chart)))
10771096
for i in range(self._dim + 1):
10781097
for j in range(self._dim + 1):
1079-
gamma_n[i, j] = sum(
1080-
nab[self._ambient.frames()[0], :][i][j][k].expr() *
1098+
Gam_ij = [nab[self._ambient.frames()[0],
1099+
:][i][j][k].expr().subs(subs)
1100+
for k in range(self._dim + 1)]
1101+
gamma_n[i, j] = chart.simplify(sum(
1102+
Gam_ij[k] *
10811103
n.restrict(chart.domain()).comp(
1082-
n.restrict(chart.domain())._fmodule.bases()[0])
1083-
[:][k].expr() for k in
1084-
range(self._dim + 1))
1104+
n.restrict(chart.domain())._fmodule.bases()[0])
1105+
[:][k].expr() for k in range(self._dim + 1)))
10851106
dXdu = self._immersion.differential_functions(chart)
10861107
dNdu = matrix(SR, self._dim + 1, self._dim)
10871108
for i in range(self._dim + 1):
@@ -1093,7 +1114,11 @@ def second_fundamental_form(self):
10931114
self._immersion.restrict(chart.domain())).restrict(
10941115
chart.domain())[:, chart]
10951116
K = dXdu.transpose() * g * (dNdu + gamma_n * dXdu)
1096-
resu[chart.frame(), :] = K
1117+
si = self._sindex
1118+
for i in self.irange():
1119+
for j in self.irange(i): # since K is symmetric
1120+
resu[chart.frame(), i, j, chart] = chart.simplify(
1121+
K[i - si, j - si].expr())
10971122

10981123
self._second_fundamental_form = resu
10991124
return self._second_fundamental_form

0 commit comments

Comments
 (0)