Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Commit

Permalink
Bugfix Laplacian
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Reeves committed Jul 12, 2019
1 parent ca74ac8 commit 5c847ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SpatialSlur/Fields/Extensions/MeshFieldExtensions.cs
Expand Up @@ -86,7 +86,7 @@ void Body(int from, int to)
public static MeshField3d<double> GetLaplacian(this MeshField3d<double> field, Func<HeMesh3d.Halfedge, double> getWeight, bool parallel = true)
{
var result = MeshField3d.Double.Create(field);
GetLaplacian(result, getWeight, parallel);
GetLaplacian(field, getWeight, result, parallel);
return result;
}

Expand All @@ -98,7 +98,7 @@ public static MeshField3d<double> GetLaplacian(this MeshField3d<double> field, F
/// <param name="getWeight"></param>
/// <param name="result"></param>
/// <param name="parallel"></param>
public static void GetLaplacian(this MeshField3d<double> field, Func<HeMesh3d.Halfedge, double> getWeight, double[] result, bool parallel = true)
public static void GetLaplacian(this MeshField3d<double> field, Func<HeMesh3d.Halfedge, double> getWeight, ArrayView<double> result, bool parallel = true)
{
if (parallel)
Parallel.ForEach(Partitioner.Create(0, field.Count), range => Body(range.Item1, range.Item2));
Expand Down

0 comments on commit 5c847ae

Please sign in to comment.