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_interface_constraints([w])

add_norm_constraints([w])

add_tangent_constraints([w])

add_value_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_data_locations()

Get the location of all data points

get_gradient_constraints()

returns:

numpy array

get_inequality_constraints()

get_interface_constraints()

Get the location of interface constraints

get_norm_constraints()

returns:

numpy array

get_tangent_constraints()

returns:

numpy array

get_value_constraints()

returns:

numpy array

reset()

set_gradient_constraints(points)

param points:

array containing the value constraints usually 7-8 columns.

set_inequality_pairs_constraints(pointsa, ...)

set_interface_constraints(points)

set_normal_constraints(points)

param points:

array containing the value constraints usually 7-8 columns.

set_region(**kwargs)

set_tangent_constraints(points)

param points:

array containing the value constraints usually 7-8 columns.

set_value_constraints(points)

param points:

array containing the value constraints usually 4-5 columns.

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(**kwargs)

Solves the interpolation equations

to_dict()

to_json()

Returns a json representation of the geological interpolator

update()

Attributes

data

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(**kwargs)#

Solves the interpolation equations

to_json()#

Returns a json representation of the geological interpolator

Returns:

json (dict) – json representation of the geological interpolator