This class implements [41] on polygonal surfaces (using Discrete differential calculus on polygonal surfaces).
More...
#include <DGtal/dec/GeodesicsInHeat.h>
template<typename TPolygonalCalculus>
class DGtal::GeodesicsInHeat< TPolygonalCalculus >
This class implements [41] on polygonal surfaces (using Discrete differential calculus on polygonal surfaces).
Description of template class 'GeodesicsInHeat'
see Geodesics In Heat using discrete polygonal calculus for details and examples.
- Template Parameters
-
Definition at line 62 of file GeodesicsInHeat.h.
◆ Conditions
template<typename TPolygonalCalculus>
◆ DenseMatrix
template<typename TPolygonalCalculus>
◆ IntegerVector
template<typename TPolygonalCalculus>
◆ LinAlgBackend
template<typename TPolygonalCalculus>
◆ PolygonalCalculus
template<typename TPolygonalCalculus>
◆ Solver
template<typename TPolygonalCalculus>
◆ SparseMatrix
template<typename TPolygonalCalculus>
◆ Vector
template<typename TPolygonalCalculus>
◆ Vertex
template<typename TPolygonalCalculus>
◆ GeodesicsInHeat() [1/4]
template<typename TPolygonalCalculus>
◆ GeodesicsInHeat() [2/4]
template<typename TPolygonalCalculus>
Constructor from an existing polygonal calculus. T
- Parameters
-
Definition at line 84 of file GeodesicsInHeat.h.
85 {
87 }
This class implements crane2013 on polygonal surfaces (using Discrete differential calculus on polygo...
const PolygonalCalculus * myCalculus
The underlying PolygonalCalculus instance.
bool myIsInit
Validitate flag.
References calculus, myCalculus, and myIsInit.
◆ ~GeodesicsInHeat()
template<typename TPolygonalCalculus>
◆ GeodesicsInHeat() [3/4]
template<typename TPolygonalCalculus>
◆ GeodesicsInHeat() [4/4]
template<typename TPolygonalCalculus>
◆ addSource()
template<typename TPolygonalCalculus>
Adds a source point at a vertex aV
- Parameters
-
Definition at line 183 of file GeodesicsInHeat.h.
184 {
188 }
Vertex myLastSourceIndex
Vertex index to the last source point (to shift the distances)
Vector mySource
Source vector.
References myLastSourceIndex, and mySource.
◆ clearSource()
template<typename TPolygonalCalculus>
◆ compute()
template<typename TPolygonalCalculus>
Main computation of the Geodesic In Heat
- Returns
- the estimated geodesic distances from the sources.
Definition at line 209 of file GeodesicsInHeat.h.
210 {
212
215
216
218 {
226 }
230
231
233 {
238 {
241 }
242
245
246
251 {
254 }
255 }
256
257
260
261
263
265 }
static DenseVector dirichletVector(const SparseMatrix &A, const DenseVector &b, const IntegerVector &p, const DenseVector &u)
static DenseVector dirichletSolution(const DenseVector &xd, const IntegerVector &p, const DenseVector &u)
Solver myHeatSolver
Heat solver.
SparseMatrix myHeatOpe
The operator for heat diffusion.
IntegerVector myBoundary
The boundary characteristic vector.
Solver myPoissonSolver
Poisson solver.
Solver myHeatDirichletSolver
Heat solver with Dirichlet boundary conditions.
PolygonalCalculus::Vector Vector
PolygonalCalculus::DenseMatrix DenseMatrix
References DGtal::DirichletConditions< LinAlgBackend >::dirichletSolution(), DGtal::DirichletConditions< LinAlgBackend >::dirichletVector(), myBoundary, myCalculus, myHeatDirichletSolver, myHeatOpe, myHeatSolver, myIsInit, myLastSourceIndex, myManageBoundary, myPoissonSolver, mySource, and surfmesh.
◆ init()
template<typename TPolygonalCalculus>
void DGtal::GeodesicsInHeat< TPolygonalCalculus >::init |
( |
double | dt, |
|
|
double | lambda = 1.0, |
|
|
bool | boundary_with_mixed_solution = false ) |
|
inline |
Initialize the solvers with dt as timestep for the heat diffusion and lambda parameter for the polygonal calculus, which guarantee definiteness for positive lambda.
- Parameters
-
dt | the timestep |
lambda | timestep |
boundary_with_mixed_solution | when 'true' and when the surface has boundaries, mix two solutions of the heat diffusion operation (Neumann and Dirichlet null conditions on boundary). |
Definition at line 135 of file GeodesicsInHeat.h.
137 {
140
144
145
146
147
148
152
153
156
157
159
160
167 {
171 }
174
176
178 }
static SparseMatrix dirichletOperator(const SparseMatrix &A, const IntegerVector &p)
double myLambda
Lambda parameter.
PolygonalCalculus::SparseMatrix SparseMatrix
References DGtal::DirichletConditions< LinAlgBackend >::dirichletOperator(), dt, laplacian(), myBoundary, myCalculus, myHeatDirichletSolver, myHeatOpe, myHeatSolver, myIsInit, myLambda, myManageBoundary, myPoissonSolver, mySource, and surfmesh.
◆ isValid()
template<typename TPolygonalCalculus>
◆ operator=() [1/2]
template<typename TPolygonalCalculus>
Copy assignment operator.
- Parameters
-
- Returns
- a reference on 'this'.
References GeodesicsInHeat().
◆ operator=() [2/2]
template<typename TPolygonalCalculus>
Move assignment operator.
- Parameters
-
- Returns
- a reference on 'this'.
References GeodesicsInHeat().
◆ source()
template<typename TPolygonalCalculus>
◆ myBoundary
template<typename TPolygonalCalculus>
◆ myCalculus
template<typename TPolygonalCalculus>
◆ myHeatDirichletSolver
template<typename TPolygonalCalculus>
◆ myHeatOpe
template<typename TPolygonalCalculus>
◆ myHeatSolver
template<typename TPolygonalCalculus>
◆ myIsInit
template<typename TPolygonalCalculus>
◆ myLambda
template<typename TPolygonalCalculus>
◆ myLastSourceIndex
template<typename TPolygonalCalculus>
◆ myManageBoundary
template<typename TPolygonalCalculus>
When 'true', manage boundaries with a mixed solution of Neumann and Dirichlet conditions.
Definition at line 304 of file GeodesicsInHeat.h.
Referenced by compute(), and init().
◆ myPoissonSolver
template<typename TPolygonalCalculus>
◆ mySource
template<typename TPolygonalCalculus>
The documentation for this class was generated from the following file: