Chi-Tech
chi_mesh::SplitFileMeshGenerator Class Reference

#include <SplitFileMeshGenerator.h>

Inheritance diagram for chi_mesh::SplitFileMeshGenerator:
chi_mesh::MeshGenerator ChiObject

Data Structures

struct  SplitMeshInfo
 

Public Member Functions

 SplitFileMeshGenerator (const chi::InputParameters &params)
 
void Execute () override
 
- Public Member Functions inherited from chi_mesh::MeshGenerator
virtual void Execute ()
 
 MeshGenerator (const chi::InputParameters &params)
 
virtual std::unique_ptr< UnpartitionedMeshGenerateUnpartitionedMesh (std::unique_ptr< UnpartitionedMesh > input_umesh)
 
- Public Member Functions inherited from ChiObject
 ChiObject ()
 
 ChiObject (const chi::InputParameters &params)
 
void SetStackID (size_t stack_id)
 
size_t StackID () const
 
virtual void PushOntoStack (std::shared_ptr< ChiObject > &new_object)
 
virtual ~ChiObject ()=default
 

Static Public Member Functions

static chi::InputParameters GetInputParameters ()
 
- Static Public Member Functions inherited from chi_mesh::MeshGenerator
static chi::InputParameters GetInputParameters ()
 
- Static Public Member Functions inherited from ChiObject
static chi::InputParameters GetInputParameters ()
 

Protected Types

typedef std::pair< int, uint64_t > CellPIDGID
 

Protected Member Functions

void WriteSplitMesh (const std::vector< int64_t > &cell_pids, const UnpartitionedMesh &umesh, int num_parts)
 
SplitMeshInfo ReadSplitMesh ()
 
- Protected Member Functions inherited from chi_mesh::MeshGenerator
std::vector< int64_t > PartitionMesh (const UnpartitionedMesh &input_umesh, int num_partitions)
 
std::shared_ptr< MeshContinuumSetupMesh (std::unique_ptr< UnpartitionedMesh > input_umesh_ptr, const std::vector< int64_t > &cell_pids)
 
bool CellHasLocalScope (int location_id, const chi_mesh::UnpartitionedMesh::LightWeightCell &lwcell, uint64_t cell_global_id, const std::vector< std::set< uint64_t > > &vertex_subscriptions, const std::vector< int64_t > &cell_partition_ids) const
 

Static Protected Member Functions

static void SerializeCell (const UnpartitionedMesh::LightWeightCell &cell, chi_data_types::ByteArray &serial_buffer)
 
static std::shared_ptr< MeshContinuumSetupLocalMesh (SplitMeshInfo &mesh_info)
 
- Static Protected Member Functions inherited from chi_mesh::MeshGenerator
static void BroadcastPIDs (std::vector< int64_t > &cell_pids, int root, MPI_Comm communicator)
 
static std::unique_ptr< chi_mesh::CellSetupCell (const UnpartitionedMesh::LightWeightCell &raw_cell, uint64_t global_id, uint64_t partition_id, const VertexListHelper &vertices)
 
static void SetGridAttributes (chi_mesh::MeshContinuum &grid, MeshAttributes new_attribs, std::array< size_t, 3 > ortho_cells_per_dimension)
 
static void ComputeAndPrintStats (const chi_mesh::MeshContinuum &grid)
 

Protected Attributes

const int num_parts_
 
const std::string split_mesh_dir_path_
 
const std::string split_file_prefix_
 
const bool read_only_
 
const int verbosity_level_
 
- Protected Attributes inherited from chi_mesh::MeshGenerator
const double scale_
 
const bool replicated_
 
std::vector< MeshGenerator * > inputs_
 
chi::GraphPartitionerpartitioner_ = nullptr
 

Detailed Description

Generates the mesh only on location 0, thereafter partitions the mesh but instead of broadcasting the mesh to other locations it creates binary mesh files for each location.

Definition at line 17 of file SplitFileMeshGenerator.h.

Member Typedef Documentation

◆ CellPIDGID

typedef std::pair<int, uint64_t> chi_mesh::SplitFileMeshGenerator::CellPIDGID
protected

Definition at line 31 of file SplitFileMeshGenerator.h.

Constructor & Destructor Documentation

◆ SplitFileMeshGenerator()

chi_mesh::SplitFileMeshGenerator::SplitFileMeshGenerator ( const chi::InputParameters params)
explicit

Definition at line 66 of file SplitFileMeshGenerator.cc.

Member Function Documentation

◆ Execute()

void chi_mesh::SplitFileMeshGenerator::Execute ( )
overridevirtual

Final execution step.

Reimplemented from chi_mesh::MeshGenerator.

Definition at line 79 of file SplitFileMeshGenerator.cc.

◆ GetInputParameters()

chi::InputParameters chi_mesh::SplitFileMeshGenerator::GetInputParameters ( )
static

Definition at line 25 of file SplitFileMeshGenerator.cc.

◆ ReadSplitMesh()

SplitFileMeshGenerator::SplitMeshInfo chi_mesh::SplitFileMeshGenerator::ReadSplitMesh ( )
protected

Definition at line 349 of file SplitFileMeshGenerator.cc.

◆ SerializeCell()

void chi_mesh::SplitFileMeshGenerator::SerializeCell ( const UnpartitionedMesh::LightWeightCell cell,
chi_data_types::ByteArray serial_buffer 
)
staticprotected

Definition at line 327 of file SplitFileMeshGenerator.cc.

◆ SetupLocalMesh()

std::shared_ptr< MeshContinuum > chi_mesh::SplitFileMeshGenerator::SetupLocalMesh ( SplitMeshInfo mesh_info)
staticprotected

Definition at line 451 of file SplitFileMeshGenerator.cc.

◆ WriteSplitMesh()

void chi_mesh::SplitFileMeshGenerator::WriteSplitMesh ( const std::vector< int64_t > &  cell_pids,
const UnpartitionedMesh umesh,
int  num_parts 
)
protected

Definition at line 140 of file SplitFileMeshGenerator.cc.

Field Documentation

◆ num_parts_

const int chi_mesh::SplitFileMeshGenerator::num_parts_
protected

Definition at line 48 of file SplitFileMeshGenerator.h.

◆ read_only_

const bool chi_mesh::SplitFileMeshGenerator::read_only_
protected

Definition at line 51 of file SplitFileMeshGenerator.h.

◆ split_file_prefix_

const std::string chi_mesh::SplitFileMeshGenerator::split_file_prefix_
protected

Definition at line 50 of file SplitFileMeshGenerator.h.

◆ split_mesh_dir_path_

const std::string chi_mesh::SplitFileMeshGenerator::split_mesh_dir_path_
protected

Definition at line 49 of file SplitFileMeshGenerator.h.

◆ verbosity_level_

const int chi_mesh::SplitFileMeshGenerator::verbosity_level_
protected

Definition at line 52 of file SplitFileMeshGenerator.h.


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