geometry-central icon indicating copy to clipboard operation
geometry-central copied to clipboard

HeatMethodDistanceSolver::computeDistance without creating new array?

Open medakk opened this issue 4 years ago • 1 comments

Could a method be added to the heat solver so that it can use an existing VertexData<double> object? When calling this function many times it would be useful to reuse an existing array. Something like:

void HeatMethodDistanceSolver::computeDistance(Vertex v, VertexData<double>& out)

medakk avatar Feb 28 '21 09:02 medakk

Ah yes, for certain! We should definitely have this.

One detail to check: I thiiiiink the linear solver wrappers might also make a copy internally whenever you solve a linear system (as a lazy way to avoid thinking about different memory layouts for linear algebra backends). If we really want to have an allocation-free computeDistance() method, we might need to look in to the solvers as well.

If anyone else wants to submit a pull for this it is very welcome :) Otherwise I will try to get to it soon, but hard to say timing-wise.

nmwsharp avatar Mar 01 '21 00:03 nmwsharp