Chi-Tech
Unpartitioned Meshes

Functions

void chi_lua::chiUnpartitionedMeshUploadVertex (int handle, double x, double y, double z)
 
void chi_lua::chiUnpartitionedMeshUploadCell (int handle, lua_table cell_table)
 
void chi_lua::chiUnpartitionedMeshFinalizeEmpty (int handle)
 
void chi_lua::chiCreateEmptyUnpartitionedMesh ()
 
void chi_lua::chiDestroyUnpartitionedMesh (int handle)
 
Handle chi_lua::chiUnpartitionedMeshFromVTU (char file_name, char field)
 
Handle chi_lua::chiUnpartitionedMeshFromPVTU (char file_name, char field)
 
Handle chi_lua::chiUnpartitionedMeshFromEnsightGold (char file_name, float scale)
 
Handle chi_lua::chiUnpartitionedMeshFromWavefrontOBJ (char file_name)
 
Handle chi_lua::chiUnpartitionedMeshFromMshFormat (char file_name)
 
Handle chi_lua::chiUnpartitionedMeshFromExodusII (char file_name, float scale)
 

Detailed Description

Function Documentation

◆ chiCreateEmptyUnpartitionedMesh()

void chi_lua::chiCreateEmptyUnpartitionedMesh ( )

Creates an empty unpartitioned mesh. An empty unpartitioned mesh is meant to be manipulated with calls to chiUnpartitionedMeshUploadVertex() and chiUnpartitionedMeshUploadCell(). It essentially supports building a mesh manually.

_

Example

Example usage

void chiCreateEmptyUnpartitionedMesh()

Definition at line 2036 of file lua_functions.c.

◆ chiDestroyUnpartitionedMesh()

void chi_lua::chiDestroyUnpartitionedMesh ( int  handle)

Destroy an unpartitioned mesh. This routine should be called for memory sensitive simulations because each process will have a full copy of this data.

Parameters
handleint Handle to mesh.

_

Example

Example usage

void chiDestroyUnpartitionedMesh(int handle)

Definition at line 2052 of file lua_functions.c.

◆ chiUnpartitionedMeshFinalizeEmpty()

void chi_lua::chiUnpartitionedMeshFinalizeEmpty ( int  handle)

Finalizes a mesh. This usually involves computing centroids and establishing connectivity.

Parameters
handleint Handle to mesh.

_

Example

Example usage

cell = {}
cell.type = "POLYHEDRON"
cell.sub_type = "HEXAHEDRON"
cell.num_faces = 6
cell.material_id = 0
cell.face0 = {1,2,6,5}
cell.face1 = {0,4,7,3}
cell.face2 = {2,3,7,6}
cell.face3 = {0,1,5,4}
cell.face4 = {4,5,6,7}
cell.face5 = {0,3,2,1}
void chiUnpartitionedMeshUploadVertex(int handle, double x, double y, double z)
void chiUnpartitionedMeshFinalizeEmpty(int handle)
void chiUnpartitionedMeshUploadCell(int handle, lua_table cell_table)

Definition at line 2020 of file lua_functions.c.

◆ chiUnpartitionedMeshFromEnsightGold()

Handle chi_lua::chiUnpartitionedMeshFromEnsightGold ( char  file_name,
float  scale 
)

Creates an unpartitioned mesh from starccm+ exported Ensight Gold mesh files.

Parameters
file_namechar Filename of the .case file.
scalefloat Scale to apply to the mesh

_

Example

An example mesh creation below:

umesh = chiUnpartitionedMeshFromEnsightGold("resources/TestObjects/Sphere.case")
chiSurfaceMesherCreate(SURFACEMESHER_PREDEFINED)
chiVolumeMesherCreate(VOLUMEMESHER_UNPARTITIONED, umesh)
Handle chiMeshHandlerCreate()
void chiSurfaceMesherCreate(int SurfaceMesherType)
void chiSurfaceMesherExecute()
Handle chiUnpartitionedMeshFromEnsightGold(char file_name, float scale)
void chiVolumeMesherCreate(int Type, varying OtherArgs)
void chiVolumeMesherExecute()
Returns
Handle A handle to the newly created UnpartitionedMesh

Definition at line 2133 of file lua_functions.c.

◆ chiUnpartitionedMeshFromExodusII()

Handle chi_lua::chiUnpartitionedMeshFromExodusII ( char  file_name,
float  scale 
)

Creates an unpartitioned mesh from ExodusII format.

Parameters
file_namechar Filename of the .case file.
scalefloat Scale to apply to the mesh

_

Example

An example mesh creation below:

umesh = chiUnpartitionedMeshFromExodusII("resources/TestObjects/Mesh.e")
chiSurfaceMesherCreate(SURFACEMESHER_PREDEFINED)
chiVolumeMesherCreate(VOLUMEMESHER_UNPARTITIONED, umesh)
Handle chiUnpartitionedMeshFromExodusII(char file_name, float scale)
Returns
Handle A handle to the newly created UnpartitionedMesh

Definition at line 2207 of file lua_functions.c.

◆ chiUnpartitionedMeshFromMshFormat()

Handle chi_lua::chiUnpartitionedMeshFromMshFormat ( char  file_name)

Creates an unpartitioned mesh from a .msh file.

Parameters
file_namechar Filename of the .msh file.

_

Example

An example mesh creation below:

chiSurfaceMesherCreate(SURFACEMESHER_PREDEFINED)
chiVolumeMesherCreate(VOLUMEMESHER_UNPARTITIONED, umesh)
Handle chiUnpartitionedMeshFromMshFormat(char file_name)
Returns
Handle A handle to the newly created UnpartitionedMesh

Definition at line 2182 of file lua_functions.c.

◆ chiUnpartitionedMeshFromPVTU()

Handle chi_lua::chiUnpartitionedMeshFromPVTU ( char  file_name,
char  field 
)

Creates an unpartitioned mesh from VTK Partitioned Unstructured mesh files (.pvtu).

Parameters
file_namechar Filename of the .vtu file.
fieldchar Name of the cell data field from which to read material and boundary identifiers (optional).

_

Example

An example mesh creation below:

umesh = chiUnpartitionedMeshFromPVTU("ZMeshTest_0.vtu")
chiSurfaceMesherCreate(SURFACEMESHER_PREDEFINED)
chiVolumeMesherCreate(VOLUMEMESHER_UNPARTITIONED, umesh)
Handle chiUnpartitionedMeshFromPVTU(char file_name, char field)
Returns
Handle A handle to the newly created UnpartitionedMesh

Definition at line 2107 of file lua_functions.c.

◆ chiUnpartitionedMeshFromVTU()

Handle chi_lua::chiUnpartitionedMeshFromVTU ( char  file_name,
char  field 
)

Creates an unpartitioned mesh from VTK Unstructured mesh files.

Parameters
file_namechar Filename of the .vtu file.
fieldchar Name of the cell data field from which to read material and boundary identifiers (optional).

_

Example

An example mesh creation below:

umesh = chiUnpartitionedMeshFromVTU("ZMeshTest_0.vtu")
chiSurfaceMesherCreate(SURFACEMESHER_PREDEFINED)
chiVolumeMesherCreate(VOLUMEMESHER_UNPARTITIONED, umesh)
Handle chiUnpartitionedMeshFromVTU(char file_name, char field)
Returns
Handle A handle to the newly created UnpartitionedMesh

Definition at line 2079 of file lua_functions.c.

◆ chiUnpartitionedMeshFromWavefrontOBJ()

Handle chi_lua::chiUnpartitionedMeshFromWavefrontOBJ ( char  file_name)

Creates an unpartitioned mesh from a wavefront .obj file.

Parameters
file_namechar Filename of the .case file.

_

Example

An example mesh creation below:

umesh = chiUnpartitionedMeshFromWavefrontOBJ("resources/TestObjects/TriangleMesh2x2.obj")
chiSurfaceMesherCreate(SURFACEMESHER_PREDEFINED)
chiVolumeMesherCreate(VOLUMEMESHER_UNPARTITIONED, umesh)
Handle chiUnpartitionedMeshFromWavefrontOBJ(char file_name)
Returns
Handle A handle to the newly created UnpartitionedMesh

Definition at line 2157 of file lua_functions.c.

◆ chiUnpartitionedMeshUploadCell()

void chi_lua::chiUnpartitionedMeshUploadCell ( int  handle,
lua_table  cell_table 
)

Uploads a cell

Parameters
handleint Handle to mesh.
cell_tablelua_table A Lua-table containing fields of data. See cell_table below.

_

cell_table

A lua-table with the following fields:

  • type string. The value of this field contains the cell's primary type. The value can be "SLAB", "POLYGON" or "POLYHEDRON".
  • sub_type string. The value of this field constains the cell's secondary type. The value can be "SLAB", "POLYGON", "TRIANGLE", "QUADRILATERAL", "POLYHEDRON", "TETRAHEDRON" or "HEXAHEDRON".
  • num_faces int. The value of this field represent the number of faces specified for this cell. Each face is contained in a field "faceX" where X is the face index.
  • material_id int. (Optional) The value of this field holds a material identifier. If not provided, will be defaulted to -1.
  • faceX table. A field holding a lua-table containing the vertex-ids of face X. There must be num_faces of these fields, i.e., "face0", "face1", etc.

Example

Example usage

cell = {}
cell.type = "POLYHEDRON"
cell.sub_type = "HEXAHEDRON"
cell.num_faces = 6
cell.material_id = 0
cell.face0 = {1,2,6,5}
cell.face1 = {0,4,7,3}
cell.face2 = {2,3,7,6}
cell.face3 = {0,1,5,4}
cell.face4 = {4,5,6,7}
cell.face5 = {0,3,2,1}

Definition at line 1981 of file lua_functions.c.

◆ chiUnpartitionedMeshUploadVertex()

void chi_lua::chiUnpartitionedMeshUploadVertex ( int  handle,
double  x,
double  y,
double  z 
)

Uploads a vertex.

Parameters
handleint Handle to mesh.
xdouble x-coordinate.
ydouble y-coordinate.
zdouble z-coordinate.

_

Example

Example usage

Definition at line 1926 of file lua_functions.c.