65 PrimalIdentity primal_identity =
calculus.template identity<order, DGtal::PRIMAL>();
66 if (!is_identity(primal_identity.myContainer, 1))
return false;
70 SolveForm output = primal_identity * input;
71 typedef typename Calculus::LinearAlgebraBackend LinearAlgebraBackend;
72 typedef typename LinearAlgebraBackend::SolverConjugateGradient LinearSolver;
75 SolveForm input_solved = solver.
compute(primal_identity).
solve(output);
79 DualIdentity dual_identity =
calculus.template identity<order, DGtal::DUAL>();
80 if (!is_identity(dual_identity.myContainer, 1))
return false;
85 const PrimalHodge primal_hodge =
calculus.template hodge<order, DGtal::PRIMAL>();
86 const DualHodge dual_hodge=
calculus.template hodge<Calculus::dimensionEmbedded-order,
DGtal::DUAL>();
88 DGtal::trace.
info() <<
"testing primal to primal hodge composition order " << order << std::endl;
92 PrimalPrimal primal_primal = dual_hodge * primal_hodge;
93 if (!is_identity(primal_primal.myContainer, pow(-1, order*(Calculus::dimensionEmbedded-order))))
return false;
96 DGtal::trace.
info() <<
"testing dual to dual hodge composition order " << order << std::endl;
100 DualDual dual_dual = primal_hodge * dual_hodge;
101 if (!is_identity(dual_dual.myContainer, pow(-1, order*(Calculus::dimensionEmbedded-order))))
return false;
Aim: This wraps a linear algebra solver around a discrete exterior calculus.
SolutionKForm solve(const InputKForm &input_kform) const
DiscreteExteriorCalculusSolver & compute(const Operator &linear_operator)
Aim: LinearOperator represents discrete linear operator between discrete kforms in the DEC package.
static bool test(const Calculus &calculus)