EnclosingSimplexMonotonic1D¶
- class EnclosingSimplexMonotonic1D(*args)¶
Specialized point location algorithm for monotonic 1D meshes.
- Parameters:
- points2-d sequence of float
Points.
Methods
Accessor to the tolerance for membership test.
Accessor to the object's name.
getName
()Accessor to the object's name.
Collection of simplex accessor.
Collection of vertices accessor.
hasName
()Test if the object is named.
query
(*args)Get the index of the enclosing simplex of the given point.
queryScalar
(*args)Accessor to the enclosing simplex index.
setBarycentricCoordinatesEpsilon
(epsilon)Accessor to the tolerance for membership test.
setName
(name)Accessor to the object's name.
setVerticesAndSimplices
(vertices, simplices)Rebuild a new data structure for these vertices and simplices.
See also
Examples
>>> import openturns as ot >>> mesh = ot.Mesh([[0.0], [0.04],[0.1], [0.2],[0.5], [1.0]]) >>> locator = ot.EnclosingSimplexMonotonic1D(mesh.getVertices()) >>> simplex = locator.query([0.62])
- __init__(*args)¶
- getBarycentricCoordinatesEpsilon()¶
Accessor to the tolerance for membership test.
- Returns:
- epsilonfloat
Tolerance for the membership. A point is in a simplex if its barycentric coordinates are all in and .
- getClassName()¶
Accessor to the object’s name.
- Returns:
- class_namestr
The object class name (object.__class__.__name__).
- getName()¶
Accessor to the object’s name.
- Returns:
- namestr
The name of the object.
- getSimplices()¶
Collection of simplex accessor.
- Returns:
- simplices
IndicesCollection
Collection of simplices.
- simplices
- hasName()¶
Test if the object is named.
- Returns:
- hasNamebool
True if the name is not empty.
- query(*args)¶
Get the index of the enclosing simplex of the given point.
- Available usages:
query(point)
query(sample)
- Parameters:
- pointsequence of float
Given point.
- sample2-d sequence of float
Given points.
- Returns:
- indexint
If point is enclosed in a simplex, return its index; otherwise return an int which is at least greater than the number of simplices.
- indices
Indices
Index of enclosing simplex of each point of the sample. If there is no enclosing simplex, value is an int which is at least greater than the number of simplices.
- queryScalar(*args)¶
Accessor to the enclosing simplex index.
- Available usages:
queryScalar(x)
queryScalar(point)
- Parameters:
- xfloat
Given point.
- pointsequence of float
Sequence of 1D points.
- Returns:
- indexint
If x is inside RegularGrid bounds, return the index of the interval in which it is contained; otherwise return an int which is at least greater than the number of intervals.
- indices
Indices
Index of the enclosing simplex of the given 1D points.
- setBarycentricCoordinatesEpsilon(epsilon)¶
Accessor to the tolerance for membership test.
- Parameters:
- epsilonfloat
Tolerance for the membership. A point is in a simplex if its barycentric coordinates are all in and .
- setName(name)¶
Accessor to the object’s name.
- Parameters:
- namestr
The name of the object.
- setVerticesAndSimplices(vertices, simplices)¶
Rebuild a new data structure for these vertices and simplices.
- Parameters:
- vertices
Sample
Vertices.
- simplices
IndicesCollection
Simplices.
- vertices