LoopStructural.interpolators.P2Unstructured2d#

class LoopStructural.interpolators.P2Unstructured2d(elements, vertices, neighbours)#

Bases: BaseUnstructured2d

This class is the base

__init__(elements, vertices, neighbours)#

This class is the base

Methods

__init__(elements, vertices, neighbours)

This class is the base

element_area(elements)

evaluate_d2(pos, property_array)

Evaluate value of interpolant

evaluate_d2_shape(indexes)

evaluate_gradient(evaluation_points, ...)

Evaluate the gradient of an interpolant at the locations

evaluate_shape(locations)

Evaluate the shape functions at the locations

evaluate_shape_d2(indexes)

evaluate second derivatives of shape functions in s and t

evaluate_shape_derivatives(locations[, elements])

compute dN/ds (1st row), dN/dt(2nd row)

evaluate_value(evaluation_points, property_array)

Evaluate value of interpolant

get_edge_normal(e)

get_element_for_location(points)

Determine the elements from a numpy array of points

get_element_gradient_for_location(pos)

Get the element gradients for a location

get_quadrature_points([npts])

inside(pos)

Check if a position is inside the support

onGeometryChange()

Called when the geometry changes

Attributes

barycentre

Return the barycentres of all tetrahedrons or of specified tetras using global index

dimension

element_size

Return the element size

elements

Return the elements

n_elements

Return the number of elements

n_nodes

Return the number of points

ncps

Returns the number of nodes for an element in the mesh

nodes

Gets the nodes of the mesh as a property rather than using a function, accessible as a property! Python magic!

shared_element_norm

Get the normal to all of the shared elements

shared_element_size

Get the size of the shared elements

property barycentre#

Return the barycentres of all tetrahedrons or of specified tetras using global index

Parameters:

array (elements - numpy) – global index

property element_size#

Return the element size

property elements#

Return the elements

evaluate_d2(pos, property_array)#

Evaluate value of interpolant

Parameters:
  • array (prop - numpy) – locations

  • array – property values at nodes

evaluate_gradient(evaluation_points, property_array)#

Evaluate the gradient of an interpolant at the locations

Parameters:
  • array (pos - numpy) – locations

  • string (prop -) – property to evaluate

evaluate_shape(locations)#

Evaluate the shape functions at the locations

Parameters:

array (locations - numpy) – locations to evaluate

evaluate_shape_d2(indexes)#

evaluate second derivatives of shape functions in s and t

Parameters:

M ([type]) – [description]

Returns:

[type] – [description]

evaluate_shape_derivatives(locations, elements=None)#

compute dN/ds (1st row), dN/dt(2nd row)

evaluate_value(evaluation_points: ndarray, property_array: ndarray)#

Evaluate value of interpolant

Parameters:
  • array (prop - numpy) – locations

  • array – property values at nodes

get_element_for_location(points: ndarray) Tuple[ndarray, ndarray, ndarray, ndarray]#

Determine the elements from a numpy array of points

Parameters:

pos (np.array) –

get_element_gradient_for_location(pos: ndarray) Tuple[ndarray, ndarray, ndarray, ndarray]#

Get the element gradients for a location

Parameters:

pos (np.array) – location to evaluate

inside(pos)#

Check if a position is inside the support

property n_elements#

Return the number of elements

property n_nodes#

Return the number of points

property ncps#

Returns the number of nodes for an element in the mesh

property nodes#

Gets the nodes of the mesh as a property rather than using a function, accessible as a property! Python magic!

Returns:

nodes (np.array((N,3))) – Fortran ordered

onGeometryChange()#

Called when the geometry changes

property shared_element_norm#

Get the normal to all of the shared elements

property shared_element_size#

Get the size of the shared elements