Cubit Python API  17.07
Public Member Functions
MeshImport

Public Member Functions

def  add_elements (self, element_type, number_of_elements, elem_connectivity)
  Add elements of a single type. More...
 
def  add_elements_to_block (self, block_id, start_index, end_index)
  add a group of elements to a block. More...
 
def  add_elements_to_sideset (self, sideset_id, num, elem_ids, side_indices)
  Add a group of sides to a sideset. More...
 
def  add_nodes (self, dimension, num_nodes, nodes)
  Add nodes with a given dimension. More...
 
def  add_nodes_to_nodeset (self, nodeset_id, num, node_ids)
  Add a group of nodes to a nodeset. More...
 
def  create_block (self, dim, pref_id, is_new)
  Create a block with a preferred ID. More...
 
def  create_nodeset (self, pref_id)
  Create a nodeset with a preferred ID. More...
 
def  create_sideset (self, pref_id)
  Create a sideset with a preferred ID. More...
 
def  print_error (self, err)
  Print a message into the cubit message system. More...
 

Member Function Documentation

◆ add_elements()

def add_elements (   self,
  element_type,
  number_of_elements,
  elem_connectivity 
)

Add elements of a single type.

The start ID of the first element is returned; this returned ID can be used in other functions.

.. code-block:: python

mi.add_elements(cubit.HEX, 1, [1,2,3,4,5,6,7,8])

◆ add_elements_to_block()

def add_elements_to_block (   self,
  block_id,
  start_index,
  end_index 
)

add a group of elements to a block.

.. code-block:: python

mi.add_elements_to_block(1, 1, 100)

◆ add_elements_to_sideset()

def add_elements_to_sideset (   self,
  sideset_id,
  num,
  elem_ids,
  side_indices 
)

Add a group of sides to a sideset.

Sides are specified by element IDs and a side index.

.. code-block:: python

mi.add_elements_to_sideset(1, 4, [1,2,3,4], [1,1,1,1])

◆ add_nodes()

def add_nodes (   self,
  dimension,
  num_nodes,
  nodes 
)

Add nodes with a given dimension.

The start ID of the first node is returned; this returned ID can be used in other functions.

.. code-block:: python

mi.add_nodes(3, 8, [0,0,0,1,0,0,1,1,0,0,1,0,0,0,1,1,0,1,1,1,1,0,1,0])

◆ add_nodes_to_nodeset()

def add_nodes_to_nodeset (   self,
  nodeset_id,
  num,
  node_ids 
)

Add a group of nodes to a nodeset.

.. code-block:: python

mi.add_nodes_to_nodeset(1, 4, [1,2,3,4])

◆ create_block()

def create_block (   self,
  dim,
  pref_id,
  is_new 
)

Create a block with a preferred ID.

The assigned ID is returned.

◆ create_nodeset()

def create_nodeset (   self,
  pref_id 
)

Create a nodeset with a preferred ID.

The assigned ID is returned.

◆ create_sideset()

def create_sideset (   self,
  pref_id 
)

Create a sideset with a preferred ID.

The assigned ID is returned.

◆ print_error()

def print_error (   self,
  err 
)

Print a message into the cubit message system.