MeshImport

Class Member Functions

print_error Print a message into the cubit message system.
int add_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
int add_elements add elements of a single type the start id of the first element is returned this returned id can be used in other functions
int create_block create a block with a preferred id the assigned id is returned
Bool add_elements_to_block add a group of elements to a block
int create_nodeset create a nodeset with a preferred id the assigned id is returned
Bool add_nodes_to_nodeset add a group of nodes to a nodeset
int create_sideset create a sideset with a preferred id the assigned id is returned
Bool add_elements_to_sideset add a group of sides to a sidset sides are specified by element ids and a side index

Member Function Documentation


print_error(err)

Print a message into the cubit message system.

Parameters

err

int add_nodes(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

Example

 mi = cubit.MeshImport()
 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])


Parameters

dimension
num_nodes
nodes

int add_elements(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

Example

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


Parameters

element_type
number_of_elements
elem_connectivity

int create_block(dim, pref_id)

create a block with a preferred id the assigned id is returned

Parameters

dim
pref_id

Bool add_elements_to_block(block_id, start_index, end_index)

add a group of elements to a block

Example

 mi.add_elements_to_block(1, 1, 100)


Parameters

block_id
start_index
end_index

int create_nodeset(pref_id)

create a nodeset with a preferred id the assigned id is returned

Parameters

pref_id

Bool add_nodes_to_nodeset(nodeset_id, num, node_ids)

add a group of nodes to a nodeset

Example

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


Parameters

nodeset_id
num
node_ids

int create_sideset(pref_id)

create a sideset with a preferred id the assigned id is returned

Parameters

pref_id

Bool add_elements_to_sideset(sideset_id, num, elem_ids, side_indices)

add a group of sides to a sidset sides are specified by element ids and a side index

Example

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


Parameters

sideset_id
num
elem_ids
side_indices