carputils
Doxygen code documentation for the python framework controlling openCARP
|
Base mesh class with read functionality. More...
Public Member Functions | |
def | __init__ (self, args, kwargs) |
def | from_files (cls, basename, lonfile=None, um2mm=True) |
Load a mesh from openCARP mesh files. More... | |
def | points (self) |
def | read_points (self, filename, um2mm=True) |
Method to read point coordinates from an openCARP .pts file. More... | |
def | fibres (self) |
def | sheets (self) |
def | read_fibres (self, filename) |
Method to read fibres from a openCARP .lon file. More... | |
def | rotation_matrix (self, axis, theta) |
Return the rotation matrix associated with positive rotation about the given axis by theta radians. More... | |
def | rotate (self, geom, filename, axis, theta, rotate_fibres=True) |
Rotate points of mesh and overwrite points file. More... | |
![]() | |
def | __init__ (self, args, kwargs) |
def | read_elements (self, filename) |
Method to read elements from an openCARP .elem file. More... | |
def | element (self, i_elem) |
Return the requested element. More... | |
def | element_centroids (self) |
Compute and return the centroids of all elements in the mesh. More... | |
def | element_IDs (self) |
Return the element ids of all elements in the mesh. More... | |
![]() | |
def | __init__ (self, args, kwargs) |
def | elements (self) |
Iterate over the elements of the mesh. More... | |
Public Attributes | |
num_pts | |
num_axes | |
![]() | |
num_elems | |
![]() | |
num_elems | |
Base mesh class with read functionality.
To load a mesh from files, use the :meth:from_files
class method.
def carputils.mesh.base.Mesh.__init__ | ( | self, | |
args, | |||
kwargs | |||
) |
def carputils.mesh.base.Mesh.fibres | ( | self | ) |
def carputils.mesh.base.Mesh.from_files | ( | cls, | |
basename, | |||
lonfile = None , |
|||
um2mm = True |
|||
) |
Load a mesh from openCARP mesh files.
basename str The openCARP mesh base name lonfile str, optional The .lon file name, by default the basename is used
def carputils.mesh.base.Mesh.points | ( | self | ) |
def carputils.mesh.base.Mesh.read_fibres | ( | self, | |
filename | |||
) |
Method to read fibres from a openCARP .lon file.
filename str The full filename of the openCARP lon file
def carputils.mesh.base.Mesh.read_points | ( | self, | |
filename, | |||
um2mm = True |
|||
) |
Method to read point coordinates from an openCARP .pts file.
filename str The full filename of the openCARP pts file um2mm bool Convert units to mm.
def carputils.mesh.base.Mesh.rotate | ( | self, | |
geom, | |||
filename, | |||
axis, | |||
theta, | |||
rotate_fibres = True |
|||
) |
Rotate points of mesh and overwrite points file.
x_theta | Rotation of theta about the x-axes of the coord. system |
y_theta | Rotation of theta about the y-axes of the coord. system |
z_theta | Rotation of theta about the z-axes of the coord. system |
def carputils.mesh.base.Mesh.rotation_matrix | ( | self, | |
axis, | |||
theta | |||
) |
Return the rotation matrix associated with positive rotation about the given axis by theta radians.
based on Euler-Rodrigues formula
def carputils.mesh.base.Mesh.sheets | ( | self | ) |
carputils.mesh.base.Mesh.num_axes |
carputils.mesh.base.Mesh.num_pts |