LoopStructural.interpolators.P1Unstructured2d#
- class LoopStructural.interpolators.P1Unstructured2d(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_gradient
(evaluation_points, ...)Evaluate the gradient of an interpolant at the locations
evaluate_shape
(locations)Evaluate the shape functions at the locations
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_element_for_location
(points[, ...])Determine the elements from a numpy array of points
Get the element gradients for a location
inside
(pos)Check if a position is inside the support
Called when the geometry changes
vtk
([node_properties, cell_properties])Create a vtk unstructured grid from the mesh
Attributes
aabb_table
Return the barycentres of all tetrahedrons or of specified tetras using global index
dimension
Return the element size
Return the elements
Return the number of elements
Return the number of points
Returns the number of nodes for an element in the mesh
Gets the nodes of the mesh as a property rather than using a function, accessible as a property! Python magic!
Get the normal to all of the shared elements
shared_element_relationships
Get the size of the shared elements
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_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_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, return_verts=True, return_bc=True, return_inside=True, return_tri=True) 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
Get the normal to all of the shared elements
Get the size of the shared elements
- vtk(node_properties={}, cell_properties={})#
Create a vtk unstructured grid from the mesh