Cubit Python API  15.8
Functions
CubitMeshInterface Namespace Reference

This document explains how to access Cubit mesh data from C++ or python. More...

Functions

void  get_elem_connectivity (DLIList< MRefEntity * > &mref_list, int *elem_connectivity)
  Get the element connectivity. More...
 
void  get_mesh_data_size (DLIList< MRefEntity * > &mref_list, int &num_node, int &num_elem, int &num_node_per_elem, int &connectivity_size)
  Get the size of mesh data to be returned from an MRefEntity. More...
 
void  get_node_coordinates (DLIList< MRefEntity * > &mref_list, double *node_data)
  Get the node coordinate data. More...
 
void  get_side_and_centroid_data (MRefEntity *mref_entity, MRefEntity *mref_parent, std::vector< AdjacencyInfo > &adj_info_list)
 
void  init_mesh_access ()
  Use init_mesh_access to initialize mesh data access. More...
 

Detailed Description

This document explains how to access Cubit mesh data from C++ or python.

The purpose of CubitMeshInterface is to provide developers with a query interface for Cubit mesh data.

Most function prototypes are easy to understand. A few are more ambiguous and for those some examples are provided. Note that input parameters that require entity types, such as "volume", "quad", "curve", and so forth, expect lower case spellings of those entity types.

Examples are provided for C++ and python developers.

Function Documentation

◆ get_elem_connectivity()

void CubitMeshInterface::get_elem_connectivity ( DLIList< MRefEntity * > &  mref_list,
    int *  elem_connectivity 
  )    

Get the element connectivity.

Parameters
mref Specifies the geometry entity for which the mesh data is to be queried
elem_connectivity Pointer to memory where element connectivity will be written. Data is written to the elem_connectivity array as: number of nodes in element 1 1st node index in element 1 2nd node index in element 1 3rd node index in element 1 ... nth node index in element 1 number of nodes in element 2 1st node index in element 2 2nd node index in element 2 3rd node index in element 2 ... nth node index in element 2 number of nodes in element 3 ...

◆ get_mesh_data_size()

void CubitMeshInterface::get_mesh_data_size ( DLIList< MRefEntity * > &  mref_list,
    int &  num_node,
    int &  num_elem,
    int &  num_node_per_elem,
    int &  connectivity_size 
  )    

Get the size of mesh data to be returned from an MRefEntity.

Parameters
mref Specifies the geometry entity for which the mesh data is to be queried
num_node The number of nodes in the mesh
num_elem The number of elements in the mesh
num_node_per_elem The number of nodes per element
connectivity_size returns the number of data entries that will be written to the elem_connectivity array in get_elem_connectivity(). This gives the size of memory to be allocated for elem_connectivity before calling get_elem_connectivity().

◆ get_node_coordinates()

void CubitMeshInterface::get_node_coordinates ( DLIList< MRefEntity * > &  mref_list,
    double *  node_data 
  )    

Get the node coordinate data.

Parameters
mref Specifies the geometry entity for which the mesh data is to be queried
node_data Pointer to memory where node coordinates will be written. Allocated size must be at least 3 * number of nodes in the mesh

◆ get_side_and_centroid_data()

void CubitMeshInterface::get_side_and_centroid_data ( MRefEntity *  mref_entity,
    MRefEntity *  mref_parent,
    std::vector< AdjacencyInfo > &  adj_info_list 
  )    

 

◆ init_mesh_access()

void CubitMeshInterface::init_mesh_access (   )  

Use init_mesh_access to initialize mesh data access.