Chi-Tech
chi_mesh::Cell Class Reference

#include <cell.h>

Public Member Functions

 Cell (const Cell &other)
 
 Cell (Cell &&other) noexcept
 
 Cell (CellType in_cell_type, CellType in_cell_sub_type)
 
Celloperator= (const Cell &other)
 
virtual ~Cell ()=default
 
CellType Type () const
 
CellType SubType () const
 
chi_data_types::ByteArray Serialize () const
 
std::string ToString () const
 
void RecomputeCentroidsAndNormals (const chi_mesh::MeshContinuum &grid)
 

Static Public Member Functions

static Cell DeSerialize (const chi_data_types::ByteArray &raw, size_t &address)
 

Data Fields

uint64_t global_id_ = 0
 
uint64_t local_id_ = 0
 
uint64_t partition_id_ = 0
 
Vertex centroid_
 
int material_id_ = -1
 
std::vector< uint64_t > vertex_ids_
 
std::vector< CellFacefaces_
 

Private Attributes

const CellType cell_type_
 Primary type, i.e. SLAB, POLYGON, POLYHEDRON. More...
 
const CellType cell_sub_type_
 Sub-type i.e. SLAB, QUADRILATERAL, HEXAHEDRON. More...
 

Detailed Description

Generic mesh cell object

Definition at line 68 of file cell.h.

Constructor & Destructor Documentation

◆ Cell() [1/3]

chi_mesh::Cell::Cell ( const Cell other)

Copy constructor

Definition at line 38 of file cell.cc.

◆ Cell() [2/3]

chi_mesh::Cell::Cell ( Cell &&  other)
noexcept

Move constructor

Definition at line 53 of file cell.cc.

◆ Cell() [3/3]

chi_mesh::Cell::Cell ( CellType  in_cell_type,
CellType  in_cell_sub_type 
)
inlineexplicit

Definition at line 87 of file cell.h.

◆ ~Cell()

virtual chi_mesh::Cell::~Cell ( )
virtualdefault

Member Function Documentation

◆ DeSerialize()

chi_mesh::Cell chi_mesh::Cell::DeSerialize ( const chi_data_types::ByteArray raw,
size_t &  address 
)
static

Deserializes a cell from a vector of bytes.

Definition at line 327 of file cell.cc.

◆ operator=()

chi_mesh::Cell & chi_mesh::Cell::operator= ( const Cell other)

Copy operator.

Definition at line 69 of file cell.cc.

◆ RecomputeCentroidsAndNormals()

void chi_mesh::Cell::RecomputeCentroidsAndNormals ( const chi_mesh::MeshContinuum grid)

Recomputes the cell centroid and all face centroids assuming the mesh vertices have been transformed.

Definition at line 396 of file cell.cc.

◆ Serialize()

chi_data_types::ByteArray chi_mesh::Cell::Serialize ( ) const

Serializes a cell into a vector of bytes.

Definition at line 301 of file cell.cc.

◆ SubType()

CellType chi_mesh::Cell::SubType ( ) const
inline

Definition at line 99 of file cell.h.

◆ ToString()

std::string chi_mesh::Cell::ToString ( ) const

Provides string information of the cell.

Definition at line 364 of file cell.cc.

◆ Type()

CellType chi_mesh::Cell::Type ( ) const
inline

Definition at line 98 of file cell.h.

Field Documentation

◆ cell_sub_type_

const CellType chi_mesh::Cell::cell_sub_type_
private

Sub-type i.e. SLAB, QUADRILATERAL, HEXAHEDRON.

Definition at line 72 of file cell.h.

◆ cell_type_

const CellType chi_mesh::Cell::cell_type_
private

Primary type, i.e. SLAB, POLYGON, POLYHEDRON.

Definition at line 71 of file cell.h.

◆ centroid_

Vertex chi_mesh::Cell::centroid_

Definition at line 78 of file cell.h.

◆ faces_

std::vector<CellFace> chi_mesh::Cell::faces_

Definition at line 82 of file cell.h.

◆ global_id_

uint64_t chi_mesh::Cell::global_id_ = 0

Definition at line 75 of file cell.h.

◆ local_id_

uint64_t chi_mesh::Cell::local_id_ = 0

Definition at line 76 of file cell.h.

◆ material_id_

int chi_mesh::Cell::material_id_ = -1

Definition at line 79 of file cell.h.

◆ partition_id_

uint64_t chi_mesh::Cell::partition_id_ = 0

Definition at line 77 of file cell.h.

◆ vertex_ids_

std::vector<uint64_t> chi_mesh::Cell::vertex_ids_

Definition at line 81 of file cell.h.


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