FieldUtilities

public static class FieldUtilities

Methods

ODEsolver

#
public static Polyline[] ODEsolver(byte[] context, long sixtyFourBitHash, Func<Point3d, (int, Vector3d)> vectorField, IEnumerable<Point3d> seeds, double initialStepSize, double minSeparation, double maxLength, int maxNCurves, double absError, double relError, bool parallel, FieldLineDirection direction, bool unitise, bool disableInterpolation, out int[] reasons)
context (byte[])
sixtyFourBitHash (long)
vectorField (Func<Point3d, (int, Vector3d)>)
seeds (IEnumerable<Point3d>)
initialStepSize (double)
minSeparation (double)
maxLength (double)
maxNCurves (int)
absError (double)
relError (double)
parallel (bool)
direction (FieldUtilities.FieldLineDirection)
unitise (bool)
disableInterpolation (bool)
reasons (out int[])

PopulateLevelSet

#
public static PointCloud PopulateLevelSet(byte[] context, long sixtyFourBitHash, Func<Point3d, (double, Vector3d)> scalarField, Func<Point3d, (double, Vector3d)> isovalueField, double isovalue, BoundingBox bb, int maxNSol, double tol, double minSeparation, bool parallel)
context (byte[])
sixtyFourBitHash (long)
scalarField (Func<Point3d, (double, Vector3d)>)
isovalueField (Func<Point3d, (double, Vector3d)>)
isovalue (double)
bb (BoundingBox)
maxNSol (int)
tol (double)
minSeparation (double)
parallel (bool)

PopulateLevelSet

#
public static PointCloud PopulateLevelSet(Field scalarField, double isoValue, Box bounds, int maximumSamples, int randomSeed, CancellationToken token)
Populates a constant level set of a field with random points.
scalarField (Field)Field to sample.
isoValue (double)Scalar constant to populate.
bounds (Box)Boundary of volume to populate.
maximumSamples (int)Maximum number of samples, the returned cloud may contain many fewer points.
randomSeed (int)Random seed.
token (CancellationToken)Cancellation token.
Pointcloud containing between zero and maximumSamples points.

PopulateLevelSet

#
public static PointCloud PopulateLevelSet(Field scalarField, Field isoField, Box bounds, int maximumSamples, int randomSeed, CancellationToken token)
Populates a variable level set of a field with random points.
scalarField (Field)Field to sample.
isoField (Field)Scalar field encoding level set in space.
bounds (Box)Boundary of volume to populate.
maximumSamples (int)Maximum number of samples, the returned cloud may contain many fewer points.
randomSeed (int)Random seed.
token (CancellationToken)Cancellation token.
Pointcloud containing between zero and maximumSamples points.

PopulateLevelSet

#
public static PointCloud PopulateLevelSet(Func<Point3d, (double, Vector3d)> scalarField, double isoValue, Box bounds, int maximumSamples, int randomSeed, byte[] context = null, CancellationToken token = default(CancellationToken))
Populates a variable level set of a field with random points.
scalarField (Func<Point3d, (double, Vector3d)>)Field to sample.
isoValue (double)Scalar field encoding level set in space.
bounds (Box)Boundary of volume to populate.
maximumSamples (int)Maximum number of samples, the returned cloud may contain many fewer points.
randomSeed (int)Random seed.
context (byte[] = null)Optional 64-element byte array for your convenience.
token (CancellationToken = null)Cancellation token.
Pointcloud containing between zero and maximumSamples points.

PopulateLevelSet

#
public static PointCloud PopulateLevelSet(Func<Point3d, (double, Vector3d)> scalarField, Func<Point3d, (double, Vector3d)> isovalueField, Box bounds, int maximumSamples, int randomSeed, byte[] context = null, CancellationToken token = default(CancellationToken))
Populates a variable level set of a field with random points.
scalarField (Func<Point3d, (double, Vector3d)>)Field to sample.
isovalueField (Func<Point3d, (double, Vector3d)>)Scalar field encoding level set in space.
bounds (Box)Boundary of volume to populate.
maximumSamples (int)Maximum number of samples, the returned cloud may contain many fewer points.
randomSeed (int)Random seed.
context (byte[] = null)Optional 64-element byte array for your convenience.
token (CancellationToken = null)Cancellation token.
Pointcloud containing between zero and maximumSamples points.

Soup

#
public static Mesh Soup(PointCloud p, double radius)
p (PointCloud)
radius (double)

StreamPlotLines

#
public static (Polyline fieldLine, FieldUtilities.FieldLineStoppingReason reason)[] StreamPlotLines(Func<Point3d, (int code, Vector3d vector)> vectorField, Point3d[] seeds, FieldLineDirection direction, double minimumSeparation, double maximumLength, double absoluteError, double relativeError, Solution solution)
Compute a series of field lines.
vectorField (Func<Point3d, (int code, Vector3d vector)>)Vector field. Return codes okay=0, outsideRegion=1, failure=2
seeds (Point3d[])Seed points for field lines.
direction (FieldUtilities.FieldLineDirection)Direction of field lines given seed points.
minimumSeparation (double)Minimum allowed separation between field lines.
maximumLength (double)Maximum length of field lines.
absoluteError (double)Absolute error tolerance.
relativeError (double)Relative error tolerance.
solution (Solution)Solution within which this process runs.
Array of field lines and stopping reasons.