BFF::flattenFromScaleFactors gives an overlap where it should give a notch (sign bug in dirichletToNeumann)
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- cpp
- Área
- computer-graphics
Línea de trabajo
Start with src/surface/boundary_first_flattening.cpp, especially dirichletToNeumann() and computeBoundaryPositions(), then compare their sign conventions with neumannToDirichlet(). Reproduce the flat disk case with one cone and a boundary cut, and check the scale-factor layout against flattenFromExteriorAngles(). Done means the regression cases pass and the cut forms the expected notch without inverted triangles; a linked pull request is already open.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Affects v1.1.0 and current master, src/surface/boundary_first_flattening.cpp.
I was placing a cone singularity, cutting from it to the boundary and flattening
with flattenFromScaleFactors(u). The cut never opened: the two sides crossed,
the layout overlapped itself, and the first ring of triangles at the cone came
out inverted. Took me a while to trust the result, because flatten() on the
same meshes is exact.
What's going on
dirichletToNeumann() and computeBoundaryPositions() disagree on the sign of
u. The layout scales edge lengths by exp(+u):
targetLength(iV) = geo.edgeLengths[e] * exp(0.5 * (uBdy(tail) + uBdy(tip)));
and neumannToDirichlet() agrees with that: it solves
u = -L^{-1} [Omegai ; Omegab - k]
i.e. L u = -(K - K~), which with L = -Δ (the cotan Laplacian as built here,
positive semidefinite) is the Yamabe equation Δu = K - K~ for the metric
exp(2u) g.
dirichletToNeumann() should invert that same relation. Splitting
L u = -(K - K~) into interior and boundary rows:
u_i = -Lii^{-1} (Omegai + Lib u_b)
k = Omegab - Lbi Lii^{-1} (Omegai + Lib u_b) + Lbb u_b
What ships is
k = Omegab - Lbi Lii^{-1} (Omegai - Lib u_b) - Lbb u_b
which is the right formula evaluated at -u_b. So a cone of +0.5 gets laid
out as a cone of -0.5: instead of removing a 0.5 rad wedge you get 0.5 rad of
extra material, and the cut sides cross. For u = 0 (what flatten() passes)
and for constant u the two agree, since L kills constants, so the default
path never shows it. flattenFromExteriorAngles() is fine too, it goes through
neumannToDirichlet().
Repro
Flat unit disk, one cone of angle 0.5 at the centre vertex, u from the Yamabe
solve with u = 0 on the outer circle, cut along one ray, then
flattenFromScaleFactors(u). Expected: a disk with a 0.5 rad notch, both cut
sides of length 2π/(2π − 0.5) ≈ 1.08646, matching flattenFromExteriorAngles
up to the uniform scale exp(mean u) (neumannToDirichlet() returns mean-zero
u). v1.1.0 gives a 0.5 rad overlap instead, with 16 inverted triangles at the
cone; the cut sides are equal to each other but short, 1.0805 on the unit disk
and about 20% short on a 5k-triangle sphere cap with one cone.
Fix
Two signs in one function:
Vector<double> BFF::dirichletToNeumann(const Vector<double>& uBdy) {
return Omegab - (Lib.transpose() * Liisolver->solve(Omegai + Lib * uBdy)) + Lbb * uBdy;
}
I have three regression tests (DtN/NtD round trip, scale-factor vs
exterior-angle layouts, and the flat disk with one cone cut to the boundary)
that all fail on v1.1.0 and pass with the change; the rest of the suite is
unchanged (201/201). PR coming right after this.
Workaround if you're on v1.1.0
Pass -u to dirichletToNeumann(), or compute k yourself and call
flattenFromBoth(u, k).
- Lenguaje dominante
- C++
- Estrellas
- 1.3k
- Forks
- 188
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nmwsharp/geometry-central
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
nmwsharp/geometry-central#265 · 1 comentario ·
-
warning: control reaches end of non-void function in VectorHeatMethodSolver::computeLogMapPosiblemente ocupada @dyollb la tomó hace 105 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
nmwsharp/geometry-central#256 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
nmwsharp/geometry-central#260 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
nmwsharp/geometry-central#255 · 1 comentario ·
-
FlipEdgeNetwork::iterativeShorten() hangs on a contractible closed loopPosiblemente ocupada @designbynumbers la tomó hace 156 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
nmwsharp/geometry-central#253 ·
Todos los issues de nmwsharp/geometry-central
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
uxlfoundation/oneDNN#6604 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[Bug]: RoundToNearest truncates in plugins compiled with spcomp 1.13Posiblemente ocupada @fmu1337 la tomó hoy. AbiertoBug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
alliedmodders/sourcemod#2627 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
lballabio/QuantLib#3134 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
new issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
llvm/llvm-project#245835 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
EchoTools/nevr-runtime#2823 ·
Los mantenedores suelen responder en 1 día