RefTriangle3 (class)

Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Mesh/RefTriangle3

class RefTriangle3(epsilon=0.05, init_dict=None, init_str=None)[source]

Bases: pyleecan.Classes.RefCell.RefCell

Store triangle elements for 2D mesh

VERSION = 1
shape_function(points)

Return the values of linear shape functions in reference triangle for a given point

jacobian(point, nodes)

Compute jacobian, jacobian determinant and jacobian derivatives for linear triangle.

:param : :type : param self : a RefElement object

grad_shape_function(point)

Return the gradient of linear shape functions in reference triangle for a given point

get_real_point(vertice, ref_pt, nb_ref_pt=1)

Return the coordinates in the cell of a point in the reference cell.

Parameters
selfRefTriangle3

an RefCell object

verticendarray

vertices of the cell

ref_ptndarray

ref point(s)

nb_ref_ptint

nb of ref points

real_pointsndarray

points coordinate

get_ref_point(vertice, point)

Return the coordinate of the equivalent point in the ref cell

Parameters
  • self (RefTriangle3) – a RefTriangle3 object

  • vertice (ndarray) – vertice of the cell

  • point (ndarray) –

    coordinates of a point

    Returns

  • -------

  • pt1_ref (ndarray) – coordinates of the ref point

is_inside(vertice, point, normal_t=None)

Check if a point is inside the cell defined by the vertices.

Parameters
  • self (RefTriangle3) – an RefTriangle3 object

  • vertice (ndarray) – vertices of the cell

  • point (ndarray) – coordinates of the checked point

  • normal_t (ndarray) – (optional) cell normal vector

Returns

is_inside – true if the point is inside the cell

Return type

bool

save(save_path='', is_folder=False)

Save the object to the save_path

Parameters
  • self – A pyleecan object

  • save_path (str) – path to the folder to save the object

  • is_folder (bool) – to split the object in different files: separate simulation machine and materials

copy()

Return a copy of the class

get_logger()

Get the object logger or its parent’s one

Parameters

obj – A pyleecan object

Returns

logger – Pyleecan object dedicated logger

Return type

logging.Logger

as_dict()[source]

Convert this object in a json seriable dict (can be use in __init__)