LoopStructural.api.LoopInterpolator#
- class LoopStructural.api.LoopInterpolator(bounding_box: BoundingBox, dimensions: int = 3, type=InterpolatorType.FINITE_DIFFERENCE, nelements: int = 1000)#
Bases:
object
Scikitlearn like interface for LoopStructural interpolators useful for quickly building an interpolator to apply to a dataset build a generic interpolation object speficying the bounding box and then fit to constraints and evaluate the interpolator
- Parameters:
bounding_box (BoundingBox) – Area where the interpolation will work
dimensions (int, optional) – number of dimensions e.g. 3d or 2d, by default 3
type (str, optional) –
- type of interpolation algorithm FDI- finite difference, PLI - linear finite elements,
by default “FDI”
nelements (int, optional) – degrees of freedom for interpolator, by default 1000
- __init__(bounding_box: BoundingBox, dimensions: int = 3, type=InterpolatorType.FINITE_DIFFERENCE, nelements: int = 1000)#
Scikitlearn like interface for LoopStructural interpolators useful for quickly building an interpolator to apply to a dataset build a generic interpolation object speficying the bounding box and then fit to constraints and evaluate the interpolator
- Parameters:
bounding_box (BoundingBox) – Area where the interpolation will work
dimensions (int, optional) – number of dimensions e.g. 3d or 2d, by default 3
type (str, optional) –
- type of interpolation algorithm FDI- finite difference, PLI - linear finite elements,
by default “FDI”
nelements (int, optional) – degrees of freedom for interpolator, by default 1000
Methods
__init__
(bounding_box[, dimensions, type, ...])Scikitlearn like interface for LoopStructural interpolators useful for quickly building an interpolator to apply to a dataset build a generic interpolation object speficying the bounding box and then fit to constraints and evaluate the interpolator
evaluate_gradient
(locations)Evaluate the gradient of the interpolator at locations
evaluate_scalar_value
(locations)Evaluate the value of the interpolator at locations
fit
([values, tangent_vectors, ...])_summary_
fit_and_evaluate_gradient
([values, ...])fit_and_evaluate_value
([values, ...])- evaluate_gradient(locations: ndarray) ndarray #
Evaluate the gradient of the interpolator at locations
- Parameters:
locations (np.ndarray) – Nx3 locations
- Returns:
np.ndarray – Nx3 gradient of implicit function
- evaluate_scalar_value(locations: ndarray) ndarray #
Evaluate the value of the interpolator at locations
- Parameters:
locations (np.ndarray) – Nx3 array of locations to evaluate the interpolator at
- Returns:
np.ndarray – value of implicit function at locations
- fit(values: ndarray | None = None, tangent_vectors: ndarray | None = None, normal_vectors: ndarray | None = None, inequality_constraints: ndarray | None = None)#
_summary_
- Parameters:
values (Optional[np.ndarray], optional) – Value constraints for implicit function, by default None
tangent_vectors (Optional[np.ndarray], optional) – tangent constraints for implicit function, by default None
normal_vectors (Optional[np.ndarray], optional) – gradient norm constraints for implicit function, by default None
inequality_constraints (Optional[np.ndarray], optional) – _description_, by default None