Chi-Tech
chi_mesh::VolumeMesherExtruder Class Reference

#include <volmesher_extruder.h>

Inheritance diagram for chi_mesh::VolumeMesherExtruder:
chi_mesh::VolumeMesher

Data Structures

struct  MeshLayer
 

Public Types

enum class  TemplateType : int { UNPARTITIONED_MESH = 2 }
 
- Public Types inherited from chi_mesh::VolumeMesher
enum  PartitionType { KBA_STYLE_XYZ = 2 , PARMETIS = 3 }
 

Public Member Functions

 VolumeMesherExtruder (std::shared_ptr< const chi_mesh::UnpartitionedMesh > in_unpartitioned_mesh)
 
const std::vector< double > & GetVertexLayers () const
 
void AddLayer (const MeshLayer &new_layer)
 
void Execute () override
 
- Public Member Functions inherited from chi_mesh::VolumeMesher
 VolumeMesher (VolumeMesherType type)
 
virtual ~VolumeMesher ()=default
 
void SetContinuum (MeshContinuumPtr &grid)
 
MeshContinuumPtrGetContinuum ()
 
void SetGridAttributes (MeshAttributes new_attribs, std::array< size_t, 3 > ortho_Nis={0, 0, 0})
 
VolumeMesherType Type () const
 
virtual void Execute ()
 

Private Member Functions

void SetupLayers (int default_layer_count=1)
 
chi_mesh::Vector3 ProjectCentroidToLevel (const chi_mesh::Vector3 &centroid, size_t level)
 
int GetCellKBAPartitionIDFromCentroid (chi_mesh::Vector3 &centroid)
 
bool HasLocalScope (const chi_mesh::Cell &template_cell, const chi_mesh::MeshContinuum &template_continuum, size_t z_level)
 
std::unique_ptr< chi_mesh::CellMakeExtrudedCell (const chi_mesh::Cell &template_cell, const chi_mesh::MeshContinuum &grid, size_t z_level, uint64_t cell_global_id, int partition_id, size_t num_template_cells)
 
void CreateLocalNodes (chi_mesh::MeshContinuum &template_grid, chi_mesh::MeshContinuum &grid)
 
void ExtrudeCells (chi_mesh::MeshContinuum &template_grid, chi_mesh::MeshContinuum &grid)
 

Private Attributes

const TemplateType template_type_
 
std::shared_ptr< const UnpartitionedMeshtemplate_unpartitioned_mesh_ = nullptr
 
std::vector< MeshLayerinput_layers_
 
std::vector< double > vertex_layers_
 
size_t node_z_index_incr_ =0
 
uint64_t zmax_bndry_id = 4
 
uint64_t zmin_bndry_id = 5
 

Additional Inherited Members

- Static Public Member Functions inherited from chi_mesh::VolumeMesher
static std::pair< int, int > GetCellXYPartitionID (chi_mesh::Cell *cell)
 
static std::tuple< int, int, int > GetCellXYZPartitionID (chi_mesh::Cell *cell)
 
static void CreatePolygonCells (const chi_mesh::UnpartitionedMesh &umesh, chi_mesh::MeshContinuumPtr &grid)
 
static void SetMatIDFromLogical (const chi_mesh::LogicalVolume &log_vol, bool sense, int mat_id)
 
static void SetBndryIDFromLogical (const chi_mesh::LogicalVolume &log_vol, bool sense, const std::string &bndry_name)
 
static void SetMatIDToAll (int mat_id)
 
static void SetMatIDFromLuaFunction (const std::string &lua_fname)
 
static void SetBndryIDFromLuaFunction (const std::string &lua_fname)
 
static void SetupOrthogonalBoundaries ()
 
- Data Fields inherited from chi_mesh::VolumeMesher
VOLUME_MESHER_OPTIONS options
 

Detailed Description

An extruder mesher taking a flat surface and extruding it.

Definition at line 13 of file volmesher_extruder.h.

Member Enumeration Documentation

◆ TemplateType

Enumerator
UNPARTITIONED_MESH 

Definition at line 16 of file volmesher_extruder.h.

Constructor & Destructor Documentation

◆ VolumeMesherExtruder()

chi_mesh::VolumeMesherExtruder::VolumeMesherExtruder ( std::shared_ptr< const chi_mesh::UnpartitionedMesh in_unpartitioned_mesh)
inlineexplicit

Definition at line 39 of file volmesher_extruder.h.

Member Function Documentation

◆ AddLayer()

void chi_mesh::VolumeMesherExtruder::AddLayer ( const MeshLayer new_layer)
inline

Definition at line 46 of file volmesher_extruder.h.

◆ CreateLocalNodes()

void chi_mesh::VolumeMesherExtruder::CreateLocalNodes ( chi_mesh::MeshContinuum template_grid,
chi_mesh::MeshContinuum grid 
)
private

Creates nodes that are owned locally from the 2D template grid.

Definition at line 13 of file volmesher_extruder_createlocal_nodes.cc.

◆ Execute()

void chi_mesh::VolumeMesherExtruder::Execute ( )
overridevirtual

Execution... nough said.

Reimplemented from chi_mesh::VolumeMesher.

Definition at line 20 of file volmesher_extruder_execute.cc.

◆ ExtrudeCells()

void chi_mesh::VolumeMesherExtruder::ExtrudeCells ( chi_mesh::MeshContinuum template_grid,
chi_mesh::MeshContinuum grid 
)
private

Extrude template cells into polygons.

Definition at line 9 of file volmesher_extruder_extrudecells.cc.

◆ GetCellKBAPartitionIDFromCentroid()

int chi_mesh::VolumeMesherExtruder::GetCellKBAPartitionIDFromCentroid ( chi_mesh::Vector3 centroid)
private

Computes a cell's partition id based on a centroid.

Definition at line 66 of file volmesher_extruder_utils.cc.

◆ GetVertexLayers()

const std::vector< double > & chi_mesh::VolumeMesherExtruder::GetVertexLayers ( ) const
inline

Definition at line 45 of file volmesher_extruder.h.

◆ HasLocalScope()

bool chi_mesh::VolumeMesherExtruder::HasLocalScope ( const chi_mesh::Cell template_cell,
const chi_mesh::MeshContinuum template_continuum,
size_t  z_level 
)
private

Determines if a template cell is in the current partition or a direct neighbor to the current partition.

Definition at line 88 of file volmesher_extruder_utils.cc.

◆ MakeExtrudedCell()

std::unique_ptr< chi_mesh::Cell > chi_mesh::VolumeMesherExtruder::MakeExtrudedCell ( const chi_mesh::Cell template_cell,
const chi_mesh::MeshContinuum grid,
size_t  z_level,
uint64_t  cell_global_id,
int  partition_id,
size_t  num_template_cells 
)
private

Makes an extruded cell from a template cell.

Definition at line 155 of file volmesher_extruder_utils.cc.

◆ ProjectCentroidToLevel()

chi_mesh::Vector3 chi_mesh::VolumeMesherExtruder::ProjectCentroidToLevel ( const chi_mesh::Vector3 centroid,
size_t  level 
)
private

Projects a centroid to an extruded equivalent layer.

Definition at line 52 of file volmesher_extruder_utils.cc.

◆ SetupLayers()

void chi_mesh::VolumeMesherExtruder::SetupLayers ( int  default_layer_count = 1)
private

Creates actual z-levels for the input layer specification.

Definition at line 12 of file volmesher_extruder_utils.cc.

Field Documentation

◆ input_layers_

std::vector<MeshLayer> chi_mesh::VolumeMesherExtruder::input_layers_
private

Definition at line 30 of file volmesher_extruder.h.

◆ node_z_index_incr_

size_t chi_mesh::VolumeMesherExtruder::node_z_index_incr_ =0
private

Definition at line 32 of file volmesher_extruder.h.

◆ template_type_

const TemplateType chi_mesh::VolumeMesherExtruder::template_type_
private

Definition at line 27 of file volmesher_extruder.h.

◆ template_unpartitioned_mesh_

std::shared_ptr<const UnpartitionedMesh> chi_mesh::VolumeMesherExtruder::template_unpartitioned_mesh_ = nullptr
private

Definition at line 28 of file volmesher_extruder.h.

◆ vertex_layers_

std::vector<double> chi_mesh::VolumeMesherExtruder::vertex_layers_
private

Definition at line 31 of file volmesher_extruder.h.

◆ zmax_bndry_id

uint64_t chi_mesh::VolumeMesherExtruder::zmax_bndry_id = 4
private

Definition at line 34 of file volmesher_extruder.h.

◆ zmin_bndry_id

uint64_t chi_mesh::VolumeMesherExtruder::zmin_bndry_id = 5
private

Definition at line 35 of file volmesher_extruder.h.


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