LoopStructural.interpolators.PiecewiseLinearInterpolator#
- LoopStructural.interpolators.PiecewiseLinearInterpolator#
Methods
__init__(mesh)Piecewise Linear Interpolator Approximates scalar field by finding coefficients to a piecewise linear equation on a tetrahedral mesh.
add_constraints_to_least_squares(A, B, idc)Adds constraints to the least squares system.
add_equality_block(A, B)add_equality_constraints(node_idx, values[, ...])Adds hard constraints to the least squares system.
add_gradient_constraints([w])add_gradient_orthogonal_constraints(points, ...)constraints scalar field to be orthogonal to a given vector
add_inequality_constraints_to_matrix(A, ...)Adds constraints for a matrix where the linear function l < Ax > u constrains the objective function
add_inequality_feature(feature[, lower, mask])Add an inequality constraint to the interpolator using an existing feature.
add_inequality_pairs_constraints([w, ...])add_interface_constraints([w])add_norm_constraints([w])add_tangent_constraints([w])Adds the constraints \(f(X)\cdotT=0\)
add_value_constraints([w])add_value_inequality_constraints([w])build_inequality_matrix()build_matrix()Assemble constraints into interpolation matrix.
calculate_residual_for_constraints()Calculates Ax-B for all constraints added to the interpolator This could be a proxy to identify which constraints are controlling the model
check_array(array)Validate and convert input to numpy array.
clean()Removes all of the data from an interpolator
clear_constraints()Clear the constraints from the interpolator, this makes sure we are not storing the constraints after the solver has been run
compute_column_scaling_matrix(A)Compute column scaling matrix S for matrix A so that A @ S has columns with unit norm.
debug()Helper function for debugging when the interpolator isn't working
evaluate_gradient(locations)Evaluate the gradient of the scalar field at the evaluation points :param evaluation_points: xyz locations to evaluate the gradient :type evaluation_points: np.array
evaluate_value(locations)Evaluate the value of the interpolator at location
get_data_locations()Get the location of all data points
get_gradient_constraints()get_inequality_pairs_constraints()get_inequality_value_constraints()get_interface_constraints()Get the location of interface constraints
get_norm_constraints()get_tangent_constraints()get_value_constraints()minimise_edge_jumps([w, vector_func, ...])reset()Reset the interpolation constraints
set_gradient_constraints(points)Set gradient constraints for the interpolation.
set_inequality_pairs_constraints(points)set_interface_constraints(points)set_interpolation_weights(weights)Set the interpolation weights dictionary
set_nelements(nelements)Set the number of elements for the interpolation support.
set_normal_constraints(points)set_region([region])Set the region of the support the interpolator is working on
set_tangent_constraints(points)set_value_constraints(points)Set value constraints for the interpolation.
set_value_inequality_constraints(points)setup(**kwargs)Runs all of the required setting up stuff
setup_interpolator(**kwargs)Searches through kwargs for any interpolation weights and updates the dictionary.
solve_system([solver, tol, solver_kwargs])Main entry point to run the solver and update the node value attribute for the discreteinterpolator class
to_dict()to_json()Return a JSON representation of the geological interpolator.
update()Check if the solver is up to date, if not rerun interpolation using the previously used solver.
vtk()Attributes
dataGet the constraint data dictionary.
dofNumber of degrees of freedom for the interpolator
n_elementsNumber of elements in the interpolator
regionThe active region of the interpolator.
region_mapalias of
P1Interpolator