Chi-Tech
chi_mesh::VolumeMesher Class Reference

#include <chi_volumemesher.h>

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

Data Structures

struct  VOLUME_MESHER_OPTIONS
 

Public Types

enum  PartitionType { KBA_STYLE_XYZ = 2 , PARMETIS = 3 }
 

Public Member Functions

 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 ()
 

Static Public Member Functions

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

VOLUME_MESHER_OPTIONS options
 

Private Attributes

chi_mesh::MeshContinuumPtr grid_ptr_
 
const VolumeMesherType type_
 

Detailed Description

Parent volume mesher class.

Definition at line 40 of file chi_volumemesher.h.

Member Enumeration Documentation

◆ PartitionType

Enumerator
KBA_STYLE_XYZ 
PARMETIS 

Definition at line 46 of file chi_volumemesher.h.

Constructor & Destructor Documentation

◆ VolumeMesher()

chi_mesh::VolumeMesher::VolumeMesher ( VolumeMesherType  type)
explicit

Definition at line 5 of file chi_volumemesher_01_utils.cc.

◆ ~VolumeMesher()

virtual chi_mesh::VolumeMesher::~VolumeMesher ( )
virtualdefault

Member Function Documentation

◆ CreatePolygonCells()

void chi_mesh::VolumeMesher::CreatePolygonCells ( const chi_mesh::UnpartitionedMesh umesh,
chi_mesh::MeshContinuumPtr grid 
)
static

Creates 2D polygon cells for each face of an unpartitioned mesh.

Definition at line 12 of file chi_volumemesher_01b_create_polygoncells.cc.

◆ Execute()

void chi_mesh::VolumeMesher::Execute ( )
virtual

◆ GetCellXYPartitionID()

std::pair< int, int > chi_mesh::VolumeMesher::GetCellXYPartitionID ( chi_mesh::Cell cell)
static

Obtains the xy partition IDs of a cell. Cell xy_partition ids are obtained from the surface mesher.

Definition at line 16 of file chi_volumemesher_01a_get_PIDs.cc.

◆ GetCellXYZPartitionID()

std::tuple< int, int, int > chi_mesh::VolumeMesher::GetCellXYZPartitionID ( chi_mesh::Cell cell)
static

Obtains the xyz partition IDs of a cell. Cell xy_partition ids are obtained from the surface mesher. z id is obtained from the volume mesher.

Definition at line 102 of file chi_volumemesher_01a_get_PIDs.cc.

◆ GetContinuum()

chi_mesh::MeshContinuumPtr & chi_mesh::VolumeMesher::GetContinuum ( )

Gets the smart-pointer for the grid.

Definition at line 18 of file chi_volumemesher_01_utils.cc.

◆ SetBndryIDFromLogical()

void chi_mesh::VolumeMesher::SetBndryIDFromLogical ( const chi_mesh::LogicalVolume log_vol,
bool  sense,
const std::string &  bndry_name 
)
static

Sets material id's using a logical volume.

Definition at line 62 of file chi_volumemesher_01c_set_IDs.cc.

◆ SetBndryIDFromLuaFunction()

void chi_mesh::VolumeMesher::SetBndryIDFromLuaFunction ( const std::string &  lua_fname)
static

Sets boundary id's using a lua function. The lua function is called for each boundary face with 7 arguments, the face's centroid x,y,z values, the face's normal x,y,z values and the face's current boundary id. The function must return a new_bndry_name (string).

The lua function's prototype should be:

function LuaFuncName(x,y,z,nx,ny,nz,id)
--stuff
end

Definition at line 257 of file chi_volumemesher_01c_set_IDs.cc.

◆ SetContinuum()

void chi_mesh::VolumeMesher::SetContinuum ( MeshContinuumPtr grid)

Sets the grid member of the volume mesher.

Definition at line 11 of file chi_volumemesher_01_utils.cc.

◆ SetGridAttributes()

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

Sets grid attributes. This is normally a private member of the grid but this class is a friend.

Definition at line 26 of file chi_volumemesher_01_utils.cc.

◆ SetMatIDFromLogical()

void chi_mesh::VolumeMesher::SetMatIDFromLogical ( const chi_mesh::LogicalVolume log_vol,
bool  sense,
int  mat_id 
)
static

Sets material id's using a logical volume.

Definition at line 17 of file chi_volumemesher_01c_set_IDs.cc.

◆ SetMatIDFromLuaFunction()

void chi_mesh::VolumeMesher::SetMatIDFromLuaFunction ( const std::string &  lua_fname)
static

Sets material id's using a lua function. The lua function is called with for each cell with 4 arguments, the cell's centroid x,y,z values and the cell's current material id.

The lua function's prototype should be:

function LuaFuncName(x,y,z,id)
--stuff
end

Definition at line 152 of file chi_volumemesher_01c_set_IDs.cc.

◆ SetMatIDToAll()

void chi_mesh::VolumeMesher::SetMatIDToAll ( int  mat_id)
static

Sets material id's for all cells to the specified material id.

Definition at line 114 of file chi_volumemesher_01c_set_IDs.cc.

◆ SetupOrthogonalBoundaries()

void chi_mesh::VolumeMesher::SetupOrthogonalBoundaries ( )
static

Sets boundary numbers on boundaries orthogonal to the cardinal directions as "XMAX", "XMIN", "YMAX", "YMIN", "ZMAX", "ZMIN".

Definition at line 14 of file chi_volumemesher_01d_set_ortho_bndries.cc.

◆ Type()

chi_mesh::VolumeMesherType chi_mesh::VolumeMesher::Type ( ) const

Gets the volume mesher's type.

Definition at line 36 of file chi_volumemesher_01_utils.cc.

Field Documentation

◆ grid_ptr_

chi_mesh::MeshContinuumPtr chi_mesh::VolumeMesher::grid_ptr_
private

Definition at line 43 of file chi_volumemesher.h.

◆ options

VOLUME_MESHER_OPTIONS chi_mesh::VolumeMesher::options

Definition at line 64 of file chi_volumemesher.h.

◆ type_

const VolumeMesherType chi_mesh::VolumeMesher::type_
private

Definition at line 44 of file chi_volumemesher.h.


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