Chi-Tech
chi_mesh::UnpartitionedMesh Class Reference

#include <chi_unpartitioned_mesh.h>

Data Structures

struct  BoundBox
 
struct  LightWeightCell
 
struct  LightWeightFace
 
struct  Options
 

Public Member Functions

const BoundBoxGetBoundBox () const
 
OptionsGetMeshOptions ()
 
const OptionsGetMeshOptions () const
 
MeshAttributesGetMeshAttributes ()
 
const MeshAttributesGetMeshAttributes () const
 
const std::vector< std::set< uint64_t > > & GetVertextCellSubscriptions () const
 
void AddCell (LightWeightCell *&cell)
 
size_t GetNumberOfCells () const
 
std::vector< LightWeightCell * > & GetRawCells ()
 
const std::vector< LightWeightCell * > & GetRawCells () const
 
const std::vector< chi_mesh::Vertex > & GetVertices () const
 
std::vector< chi_mesh::Vertex > & GetVertices ()
 
void BuildMeshConnectivity ()
 
void ComputeCentroidsAndCheckQuality ()
 
uint64_t MakeBoundaryID (const std::string &boundary_name)
 
void SetAttributes (MeshAttributes new_attribs, std::array< size_t, 3 > ortho_Nis={0, 0, 0})
 
void ReadFromVTU (const Options &options)
 
void ReadFromPVTU (const Options &options)
 
void ReadFromEnsightGold (const Options &options)
 
void ReadFromWavefrontOBJ (const Options &options)
 
void ReadFromMsh (const Options &options)
 
void ReadFromExodus (const Options &options)
 
void PushProxyCell (const std::string &type_str, const std::string &sub_type_str, int cell_num_faces, int cell_material_id, const std::vector< std::vector< uint64_t > > &proxy_faces)
 
 ~UnpartitionedMesh ()
 
void CleanUp ()
 

Protected Types

typedef vtkSmartPointer< vtkUnstructuredGrid > vtkUGridPtr
 
typedef std::pair< vtkUGridPtr, std::string > vtkUGridPtrAndName
 

Protected Member Functions

void CopyUGridCellsAndPoints (vtkUnstructuredGrid &ugrid, double scale, int dimension_to_copy)
 
void SetMaterialIDsFromList (const std::vector< int > &material_ids)
 
void SetBoundaryIDsFromBlocks (std::vector< vtkUGridPtrAndName > &bndry_grid_blocks)
 

Static Protected Member Functions

static LightWeightCellCreateCellFromVTKPolyhedron (vtkCell *vtk_cell)
 
static LightWeightCellCreateCellFromVTKPolygon (vtkCell *vtk_cell)
 
static LightWeightCellCreateCellFromVTKLine (vtkCell *vtk_cell)
 
static LightWeightCellCreateCellFromVTKVertex (vtkCell *vtk_cell)
 

Protected Attributes

std::vector< chi_mesh::Vertexvertices_
 
std::vector< LightWeightCell * > raw_cells_
 
std::vector< LightWeightCell * > raw_boundary_cells_
 
std::vector< std::set< uint64_t > > vertex_cell_subscriptions_
 
MeshAttributes attributes_ = NONE
 
Options mesh_options_
 
std::shared_ptr< BoundBoxbound_box_ = nullptr
 

Detailed Description

This object is intented for unpartitioned meshes that still require partitioning.

Definition at line 18 of file chi_unpartitioned_mesh.h.

Member Typedef Documentation

◆ vtkUGridPtr

typedef vtkSmartPointer<vtkUnstructuredGrid> chi_mesh::UnpartitionedMesh::vtkUGridPtr
protected

Definition at line 84 of file chi_unpartitioned_mesh.h.

◆ vtkUGridPtrAndName

typedef std::pair<vtkUGridPtr, std::string> chi_mesh::UnpartitionedMesh::vtkUGridPtrAndName
protected

Definition at line 85 of file chi_unpartitioned_mesh.h.

Constructor & Destructor Documentation

◆ ~UnpartitionedMesh()

chi_mesh::UnpartitionedMesh::~UnpartitionedMesh ( )

Destructor.

Definition at line 11 of file unpartmesh_00a_general.cc.

Member Function Documentation

◆ AddCell()

void chi_mesh::UnpartitionedMesh::AddCell ( LightWeightCell *&  cell)
inline

Definition at line 109 of file chi_unpartitioned_mesh.h.

◆ BuildMeshConnectivity()

void chi_mesh::UnpartitionedMesh::BuildMeshConnectivity ( )

Establishes neighbor connectivity for the light-weight mesh.

Definition at line 12 of file unpartmesh_00b_connectivity.cc.

◆ CleanUp()

void chi_mesh::UnpartitionedMesh::CleanUp ( )
inline

Definition at line 144 of file chi_unpartitioned_mesh.h.

◆ ComputeCentroidsAndCheckQuality()

void chi_mesh::UnpartitionedMesh::ComputeCentroidsAndCheckQuality ( )

Compute centroids for all cells.

Definition at line 21 of file unpartmesh_00a_general.cc.

◆ CopyUGridCellsAndPoints()

void chi_mesh::UnpartitionedMesh::CopyUGridCellsAndPoints ( vtkUnstructuredGrid &  ugrid,
double  scale,
int  dimension_to_copy 
)
protected

Copies the vtk data structures to the current object's internal data.

Definition at line 15 of file unpartmesh_00d_vtk_copies.cc.

◆ CreateCellFromVTKLine()

chi_mesh::UnpartitionedMesh::LightWeightCell * chi_mesh::UnpartitionedMesh::CreateCellFromVTKLine ( vtkCell *  vtk_cell)
staticprotected

Creates a raw slab cell from a vtk-line.

Definition at line 205 of file unpartmesh_00c_vtk_cellsvtk2chi.cc.

◆ CreateCellFromVTKPolygon()

chi_mesh::UnpartitionedMesh::LightWeightCell * chi_mesh::UnpartitionedMesh::CreateCellFromVTKPolygon ( vtkCell *  vtk_cell)
staticprotected

Creates a raw polygon cell from a vtk-polygon.

Definition at line 148 of file unpartmesh_00c_vtk_cellsvtk2chi.cc.

◆ CreateCellFromVTKPolyhedron()

chi_mesh::UnpartitionedMesh::LightWeightCell * chi_mesh::UnpartitionedMesh::CreateCellFromVTKPolyhedron ( vtkCell *  vtk_cell)
staticprotected

Creates a raw polyhedron cell from a vtk-polyhedron.

Definition at line 10 of file unpartmesh_00c_vtk_cellsvtk2chi.cc.

◆ CreateCellFromVTKVertex()

chi_mesh::UnpartitionedMesh::LightWeightCell * chi_mesh::UnpartitionedMesh::CreateCellFromVTKVertex ( vtkCell *  vtk_cell)
staticprotected

Creates a raw point cell from a vtk-vertex.

Definition at line 253 of file unpartmesh_00c_vtk_cellsvtk2chi.cc.

◆ GetBoundBox()

const BoundBox & chi_mesh::UnpartitionedMesh::GetBoundBox ( ) const
inline

Definition at line 96 of file chi_unpartitioned_mesh.h.

◆ GetMeshAttributes() [1/2]

MeshAttributes & chi_mesh::UnpartitionedMesh::GetMeshAttributes ( )
inline

Definition at line 101 of file chi_unpartitioned_mesh.h.

◆ GetMeshAttributes() [2/2]

const MeshAttributes & chi_mesh::UnpartitionedMesh::GetMeshAttributes ( ) const
inline

Definition at line 102 of file chi_unpartitioned_mesh.h.

◆ GetMeshOptions() [1/2]

Options & chi_mesh::UnpartitionedMesh::GetMeshOptions ( )
inline

Definition at line 98 of file chi_unpartitioned_mesh.h.

◆ GetMeshOptions() [2/2]

const Options & chi_mesh::UnpartitionedMesh::GetMeshOptions ( ) const
inline

Definition at line 99 of file chi_unpartitioned_mesh.h.

◆ GetNumberOfCells()

size_t chi_mesh::UnpartitionedMesh::GetNumberOfCells ( ) const
inline

Definition at line 110 of file chi_unpartitioned_mesh.h.

◆ GetRawCells() [1/2]

std::vector< LightWeightCell * > & chi_mesh::UnpartitionedMesh::GetRawCells ( )
inline

Definition at line 111 of file chi_unpartitioned_mesh.h.

◆ GetRawCells() [2/2]

const std::vector< LightWeightCell * > & chi_mesh::UnpartitionedMesh::GetRawCells ( ) const
inline

Definition at line 112 of file chi_unpartitioned_mesh.h.

◆ GetVertextCellSubscriptions()

const std::vector< std::set< uint64_t > > & chi_mesh::UnpartitionedMesh::GetVertextCellSubscriptions ( ) const
inline

Definition at line 104 of file chi_unpartitioned_mesh.h.

◆ GetVertices() [1/2]

std::vector< chi_mesh::Vertex > & chi_mesh::UnpartitionedMesh::GetVertices ( )
inline

Definition at line 118 of file chi_unpartitioned_mesh.h.

◆ GetVertices() [2/2]

const std::vector< chi_mesh::Vertex > & chi_mesh::UnpartitionedMesh::GetVertices ( ) const
inline

Definition at line 117 of file chi_unpartitioned_mesh.h.

◆ MakeBoundaryID()

uint64_t chi_mesh::UnpartitionedMesh::MakeBoundaryID ( const std::string &  boundary_name)

Makes or gets a boundary that uniquely identifies the given name.

Definition at line 149 of file unpartmesh_00a_general.cc.

◆ PushProxyCell()

void chi_mesh::UnpartitionedMesh::PushProxyCell ( const std::string &  type_str,
const std::string &  sub_type_str,
int  cell_num_faces,
int  cell_material_id,
const std::vector< std::vector< uint64_t > > &  proxy_faces 
)

Makes a cell from proxy information and pushes the cell to the mesh.

Definition at line 5 of file unpartmesh_05_pushproxycell.cc.

◆ ReadFromEnsightGold()

void chi_mesh::UnpartitionedMesh::ReadFromEnsightGold ( const Options options)

Reads an Ensight-Gold unstructured mesh.

Definition at line 23 of file unpartmesh_01c_readfromensight.cc.

◆ ReadFromExodus()

void chi_mesh::UnpartitionedMesh::ReadFromExodus ( const Options options)

Reads an Exodus unstructured mesh.

Definition at line 23 of file unpartmesh_01f_readfromexodus.cc.

◆ ReadFromMsh()

void chi_mesh::UnpartitionedMesh::ReadFromMsh ( const Options options)

Reads an unpartitioned mesh from a gmesh .msh legacy ASCII format 2 file.

Lambda for reading nodes.

Lamda for checking if an element is 1D.

Lamda for checking if an element is 2D.

Lamda for checking if an element is 2D.

Lambda for checking supported elements.

Lambda giving the cell subtype, given the MSH cell type.

Definition at line 13 of file unpartmesh_01e_readfrommsh.cc.

◆ ReadFromPVTU()

void chi_mesh::UnpartitionedMesh::ReadFromPVTU ( const Options options)

Reads a VTK unstructured mesh. This reader will use the following options:

  • file_name, of course.
  • material_id_fieldname, cell data for material_id.

Definition at line 23 of file unpartmesh_01b_readfrompvtu.cc.

◆ ReadFromVTU()

void chi_mesh::UnpartitionedMesh::ReadFromVTU ( const Options options)

Reads a VTK unstructured mesh. This reader will use the following options:

  • file_name, of course.
  • material_id_fieldname, cell data for material_id.

Definition at line 23 of file unpartmesh_01a_readfromvtu.cc.

◆ ReadFromWavefrontOBJ()

void chi_mesh::UnpartitionedMesh::ReadFromWavefrontOBJ ( const Options options)

Reads an unpartitioned mesh from a wavefront .obj file.

Definition at line 13 of file unpartmesh_01d_readfromwavefrontobj.cc.

◆ SetAttributes()

void chi_mesh::UnpartitionedMesh::SetAttributes ( MeshAttributes  new_attribs,
std::array< size_t, 3 >  ortho_Nis = {0, 0, 0} 
)

Definition at line 165 of file unpartmesh_00a_general.cc.

◆ SetBoundaryIDsFromBlocks()

void chi_mesh::UnpartitionedMesh::SetBoundaryIDsFromBlocks ( std::vector< vtkUGridPtrAndName > &  bndry_grid_blocks)
protected

Set boundary-ids from boundary grid_blocks.

Definition at line 209 of file unpartmesh_00d_vtk_copies.cc.

◆ SetMaterialIDsFromList()

void chi_mesh::UnpartitionedMesh::SetMaterialIDsFromList ( const std::vector< int > &  material_ids)
protected

Set material-ids from list.

Definition at line 198 of file unpartmesh_00d_vtk_copies.cc.

Field Documentation

◆ attributes_

MeshAttributes chi_mesh::UnpartitionedMesh::attributes_ = NONE
protected

Definition at line 74 of file chi_unpartitioned_mesh.h.

◆ bound_box_

std::shared_ptr<BoundBox> chi_mesh::UnpartitionedMesh::bound_box_ = nullptr
protected

Definition at line 76 of file chi_unpartitioned_mesh.h.

◆ mesh_options_

Options chi_mesh::UnpartitionedMesh::mesh_options_
protected

Definition at line 75 of file chi_unpartitioned_mesh.h.

◆ raw_boundary_cells_

std::vector<LightWeightCell*> chi_mesh::UnpartitionedMesh::raw_boundary_cells_
protected

Definition at line 71 of file chi_unpartitioned_mesh.h.

◆ raw_cells_

std::vector<LightWeightCell*> chi_mesh::UnpartitionedMesh::raw_cells_
protected

Definition at line 70 of file chi_unpartitioned_mesh.h.

◆ vertex_cell_subscriptions_

std::vector<std::set<uint64_t> > chi_mesh::UnpartitionedMesh::vertex_cell_subscriptions_
protected

Definition at line 72 of file chi_unpartitioned_mesh.h.

◆ vertices_

std::vector<chi_mesh::Vertex> chi_mesh::UnpartitionedMesh::vertices_
protected

Definition at line 69 of file chi_unpartitioned_mesh.h.


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