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

Element mixin implementing numpy masked array storage. More...

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

Public Member Functions

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_elems
 
- Public Attributes inherited from carputils.mesh.base.ElementMixinBase
 num_elems
 

Detailed Description

Element mixin implementing numpy masked array storage.

Constructor & Destructor Documentation

◆ __init__()

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

Member Function Documentation

◆ element()

def carputils.mesh.base.ElementMaskedArrayMixin.element (   self,
  i_elem 
)

Return the requested element.

Parameters

i_elem int The index of the requested element

Returns

Element The element

◆ element_centroids()

def carputils.mesh.base.ElementMaskedArrayMixin.element_centroids (   self)

Compute and return the centroids of all elements in the mesh.

Returns

array Shape (num_elems, 3), the coordinate of the centroid of each elem

◆ element_IDs()

def carputils.mesh.base.ElementMaskedArrayMixin.element_IDs (   self)

Return the element ids of all elements in the mesh.

Returns

array

Shape (num_elems, 1)

◆ read_elements()

def carputils.mesh.base.ElementMaskedArrayMixin.read_elements (   self,
  filename 
)

Method to read elements from an openCARP .elem file.

Parameters

filename str The full filename of the openCARP elem file

Member Data Documentation

◆ num_elems

carputils.mesh.base.ElementMaskedArrayMixin.num_elems

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