carputils
Doxygen code documentation for the python framework controlling openCARP
Public Member Functions | Public Attributes | List of all members
carputils.mesh.base.Mesh Class Reference

Base mesh class with read functionality. More...

Inheritance diagram for carputils.mesh.base.Mesh:
carputils.mesh.base.ElementMaskedArrayMixin carputils.mesh.base.ElementMixinBase

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...
 
- Public Member Functions inherited from carputils.mesh.base.ElementMaskedArrayMixin
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...
 
- Public Member Functions inherited from carputils.mesh.base.ElementMixinBase
def __init__ (self, args, kwargs)
 
def elements (self)
 Iterate over the elements of the mesh. More...
 

Public Attributes

 num_pts
 
 num_axes
 
- Public Attributes inherited from carputils.mesh.base.ElementMaskedArrayMixin
 num_elems
 
- Public Attributes inherited from carputils.mesh.base.ElementMixinBase
 num_elems
 

Detailed Description

Base mesh class with read functionality.

To load a mesh from files, use the :meth:from_files class method.

Constructor & Destructor Documentation

◆ __init__()

def carputils.mesh.base.Mesh.__init__ (   self,
  args,
  kwargs 
)

Member Function Documentation

◆ fibres()

def carputils.mesh.base.Mesh.fibres (   self)

◆ from_files()

def carputils.mesh.base.Mesh.from_files (   cls,
  basename,
  lonfile = None,
  um2mm = True 
)

Load a mesh from openCARP mesh files.

Parameters

basename str The openCARP mesh base name lonfile str, optional The .lon file name, by default the basename is used

◆ points()

def carputils.mesh.base.Mesh.points (   self)

◆ read_fibres()

def carputils.mesh.base.Mesh.read_fibres (   self,
  filename 
)

Method to read fibres from a openCARP .lon file.

Parameters

filename str The full filename of the openCARP lon file

◆ read_points()

def carputils.mesh.base.Mesh.read_points (   self,
  filename,
  um2mm = True 
)

Method to read point coordinates from an openCARP .pts file.

Parameters

filename str The full filename of the openCARP pts file um2mm bool Convert units to mm.

◆ rotate()

def carputils.mesh.base.Mesh.rotate (   self,
  geom,
  filename,
  axis,
  theta,
  rotate_fibres = True 
)

Rotate points of mesh and overwrite points file.

Parameters
x_thetaRotation of theta about the x-axes of the coord. system
y_thetaRotation of theta about the y-axes of the coord. system
z_thetaRotation of theta about the z-axes of the coord. system

◆ rotation_matrix()

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

◆ sheets()

def carputils.mesh.base.Mesh.sheets (   self)

Member Data Documentation

◆ num_axes

carputils.mesh.base.Mesh.num_axes

◆ num_pts

carputils.mesh.base.Mesh.num_pts

The documentation for this class was generated from the following file: