RefSegmentP1 (class)¶
Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Mesh/RefSegmentP1
-
class
RefSegmentP1
(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
(g_point, nb_gpt)¶ Return the values of linear shape functions in reference 2 node segment for a given point
- Parameters
- selfRefSegmentP1
an RefCell object
- pointndarray
ref point
- value: array
interpolated field
-
jacobian
(point, vertices)¶ Compute jacobian, jacobian determinant and jacobian derivatives for linear triangle.
:param : :type : param self : a RefElement object
-
grad_shape_function
(points)¶ Return the values 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
- selfRefCell
an RefCell object
- verticendarray
vertices of the cell
- ref_ptndarray
ref point(s)
- nb_ref_ptint
nb of ref points
- real_pointsndarray
points coordinate
-
is_inside
(vertice, point, normal_t=None)¶ Check if a point is inside the cell.
- Parameters
self (RefSegmentP1) – a RefSegmentP1 object
vertice (ndarray) – vertice of the cell
point (ndarray) – coordinates of a point
normal (ndarray) –
normal of another cell. Additional facultative criterion.
Returns
------- –
is_inside (bool) – true if the point is inside the cell
-
get_ref_point
(vertice, point)¶ Return the coordinate of the equivalent point in the ref cell
- Parameters
self (RefSegmentP1) – a RefSegmentP1 object
vertice (ndarray) – vertice of the cell
point (ndarray) –
coordinates of a point
Returns
------- –
pt1_ref (ndarray) – coordinates of the ref point
-
get_normal
(vertice)¶ Return the normal vector.
- Parameters
self (RefSegmentP1) – a RefSegmentP1 object
vertice (ndarray) – vertice of the cell
- Returns
normal – Normal coordinate
- Return type
ndarray
-
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
-