LoopStructural.interpolators.GeologicalInterpolator#
- class LoopStructural.interpolators.GeologicalInterpolator(data={}, up_to_date=False)#
Bases:
object
- data#
a dictionary with np.arrays for gradient, value, normal, tangent data
- Type:
dict
This class is the base class for a geological interpolator and contains all of the main interface functions. Any class that is inheriting from this should be callable by using any of these functions. This will enable interpolators to be interchanged.
- abstract __init__(data={}, up_to_date=False)#
This class is the base class for a geological interpolator and contains all of the main interface functions. Any class that is inheriting from this should be callable by using any of these functions. This will enable interpolators to be interchanged.
Methods
__init__
([data, up_to_date])This class is the base class for a geological interpolator and contains all of the main interface functions.
add_gradient_constraints
([w])add_inequality_pairs_constraints
([w, ...])add_interface_constraints
([w])add_norm_constraints
([w])add_tangent_constraints
([w])add_value_constraints
([w])add_value_inequality_constraints
([w])check_array
(array)clean
()Removes all of the data from an interpolator
debug
()Helper function for debugging when the interpolator isn't working
evaluate_gradient
(locations)evaluate_value
(locations)Get the location of all data points
get_inequality_pairs_constraints
()get_inequality_value_constraints
()Get the location of interface constraints
reset
()set_gradient_constraints
(points)set_inequality_pairs_constraints
(points)set_interface_constraints
(points)set_normal_constraints
(points)set_region
(**kwargs)set_tangent_constraints
(points)set_value_constraints
(points)set_value_inequality_constraints
(points)setup
(**kwargs)Runs all of the required setting up stuff
setup_interpolator
(**kwargs)Runs all of the required setting up stuff
solve_system
(solver[, solver_kwargs])Solves the interpolation equations
to_dict
()to_json
()Returns a json representation of the geological interpolator
update
()Attributes
- clean()#
Removes all of the data from an interpolator
- debug()#
Helper function for debugging when the interpolator isn’t working
- get_data_locations()#
Get the location of all data points
- Returns:
numpy array – Nx3 - X,Y,Z location of all data points
- get_gradient_constraints()#
- Returns:
numpy array
- get_interface_constraints()#
Get the location of interface constraints
- Returns:
numpy array – Nx4 - X,Y,Z,id location of all interface constraints
- get_norm_constraints()#
- Returns:
numpy array
- get_tangent_constraints()#
- Returns:
numpy array
- get_value_constraints()#
- Returns:
numpy array
- set_gradient_constraints(points: ndarray)#
- Parameters:
points (np.ndarray) – array containing the value constraints usually 7-8 columns. X,Y,Z,gx,gy,gz,weight
- set_normal_constraints(points: ndarray)#
- Parameters:
points (np.ndarray) – array containing the value constraints usually 7-8 columns. X,Y,Z,nx,ny,nz,weight
- set_tangent_constraints(points: ndarray)#
- Parameters:
points (np.ndarray) – array containing the value constraints usually 7-8 columns. X,Y,Z,nx,ny,nz,weight
- set_value_constraints(points: ndarray)#
- Parameters:
points (np.ndarray) – array containing the value constraints usually 4-5 columns. X,Y,Z,val,weight
- setup(**kwargs)#
Runs all of the required setting up stuff
- abstract setup_interpolator(**kwargs)#
Runs all of the required setting up stuff
- abstract solve_system(solver, solver_kwargs: dict = {}) bool #
Solves the interpolation equations
- to_json()#
Returns a json representation of the geological interpolator
- Returns:
json (dict) – json representation of the geological interpolator