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

A generic mesh class adding the core functionality for 2D meshes. More...

Inheritance diagram for carputils.mesh.general.Mesh2D:
carputils.mesh.general.Mesh carputils.mesh.grid.Grid

Public Member Functions

def __init__ (self, triangulate=False)
 
def elements (self)
 Generate and return array of element point indices. More...
 
- Public Member Functions inherited from carputils.mesh.general.Mesh
def __init__ (self)
 
def add_region (self, tag, func)
 Add a new tag region. More...
 
def points (self)
 Generate and return numpy array of point coordinates. More...
 
def n_pts (self)
 Return the number of points/nodes in the mesh. More...
 
def elements (self)
 Generate and return list of numpy arrays of element node indices. More...
 
def n_elem (self)
 Count and return the total number of elements in the mesh. More...
 
def element_centres (self)
 Calculate the centroids of the mesh elements. More...
 
def element_tags (self)
 Determine element tags based on rules passed to :meth:add_region. More...
 
def fibres (self)
 Generate numpy array of fibre vectors and return. More...
 
def generate_carp (self, meshname)
 Generate the mesh and store it to disk in openCARP format. More...
 
def generate_vtk (self, filename)
 Generate VTK file of mesh. More...
 

Detailed Description

A generic mesh class adding the core functionality for 2D meshes.

Parameters

triangulate bool, optional Whether to divide the hybrid mesh into tetrahedra

Constructor & Destructor Documentation

◆ __init__()

def carputils.mesh.general.Mesh2D.__init__ (   self,
  triangulate = False 
)

Member Function Documentation

◆ elements()

def carputils.mesh.general.Mesh2D.elements (   self)

Generate and return array of element point indices.

Returns

list of arrays List of arrays of shape (nelem, nlocalnode) for each hybrid element type in the generated mesh


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