From c8405f7261c1434b9300a810d0994b3b4f0106ae Mon Sep 17 00:00:00 2001 From: Arjun Lakshmipathy Date: Mon, 26 Apr 2021 16:04:55 -0400 Subject: [PATCH] Bug..fix? --- include/geometrycentral/surface/vector_heat_method.h | 2 +- src/surface/vector_heat_method.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/geometrycentral/surface/vector_heat_method.h b/include/geometrycentral/surface/vector_heat_method.h index a1fd10b1..98542714 100644 --- a/include/geometrycentral/surface/vector_heat_method.h +++ b/include/geometrycentral/surface/vector_heat_method.h @@ -37,7 +37,7 @@ class VectorHeatMethodSolver { // === The Logarithmic map - VertexData computeLogMap(const Vertex& sourceVert, double vertexDistanceShift = 0.); + VertexData computeLogMap(const Vertex& sourceVert, double vertexDistanceShift = 0., double vertAngleRad = 0.); VertexData computeLogMap(const SurfacePoint& sourceP); diff --git a/src/surface/vector_heat_method.cpp b/src/surface/vector_heat_method.cpp index 5dfdfc5d..b6917513 100644 --- a/src/surface/vector_heat_method.cpp +++ b/src/surface/vector_heat_method.cpp @@ -252,7 +252,7 @@ VectorHeatMethodSolver::transportTangentVectors(const std::vector VectorHeatMethodSolver::computeLogMap(const Vertex& sourceVert, double vertexDistanceShift) { +VertexData VectorHeatMethodSolver::computeLogMap(const Vertex& sourceVert, double vertexDistanceShift, double vertAngleRad) { geom.requireFaceAreas(); geom.requireEdgeLengths(); geom.requireCornerAngles(); @@ -284,7 +284,7 @@ VertexData VectorHeatMethodSolver::computeLogMap(const Vertex& sourceVe // Build rhs Vector> horizontalRHS = Vector>::Zero(mesh.nVertices()); - horizontalRHS[geom.vertexIndices[sourceVert]] += 1.0; + horizontalRHS[geom.vertexIndices[sourceVert]] = -1.0 * (cos(vertAngleRad) + sin(vertAngleRad) * 1i); // Solve Vector> horizontalSol = vectorHeatSolver->solve(horizontalRHS);