Chi-Tech
|
#include <chi_meshcontinuum.h>
Public Member Functions | |
MeshContinuum () | |
void | SetGlobalVertexCount (const uint64_t count) |
uint64_t | GetGlobalVertexCount () const |
std::map< uint64_t, std::string > & | GetBoundaryIDMap () |
const std::map< uint64_t, std::string > & | GetBoundaryIDMap () const |
uint64_t | MakeBoundaryID (const std::string &boundary_name) const |
void | ClearCellReferences () |
void | ExportCellsToObj (const char *fileName, bool per_material=false, int options=0) const |
void | ExportCellsToVTK (const std::string &file_base_name) const |
void | ExportCellsToExodus (const std::string &file_base_name, bool suppress_node_sets=false, bool suppress_side_sets=false) const |
std::shared_ptr< GridFaceHistogram > | MakeGridFaceHistogram (double master_tolerance=100.0, double slave_tolerance=1.1) const |
bool | IsCellLocal (uint64_t cell_global_index) const |
void | FindAssociatedVertices (const chi_mesh::CellFace &cur_face, std::vector< short > &dof_mapping) const |
void | FindAssociatedCellVertices (const chi_mesh::CellFace &cur_face, std::vector< short > &dof_mapping) const |
size_t | MapCellGlobalID2LocalID (uint64_t global_id) const |
chi_mesh::Vector3 | ComputeCentroidFromListOfNodes (const std::vector< uint64_t > &list) const |
MPILocalCommSetPtr | MakeMPILocalCommunicatorSet () const |
size_t | GetGlobalNumberOfCells () const |
std::vector< uint64_t > | GetDomainUniqueBoundaryIDs () const |
size_t | CountCellsInLogicalVolume (const chi_mesh::LogicalVolume &log_vol) const |
bool | CheckPointInsideCell (const chi_mesh::Cell &cell, const chi_mesh::Vector3 &point) const |
MeshAttributes | Attributes () const |
std::array< size_t, 3 > | GetIJKInfo () const |
chi_data_types::NDArray< uint64_t > | MakeIJKToGlobalIDMapping () const |
std::vector< chi_mesh::Vector3 > | MakeCellOrthoSizes () const |
std::pair< chi_mesh::Vector3, chi_mesh::Vector3 > | GetLocalBoundingBox () const |
Static Public Member Functions | |
static std::shared_ptr< MeshContinuum > | New () |
static int | GetCellDimension (const chi_mesh::Cell &cell) |
static size_t | MapCellFace (const chi_mesh::Cell &cur_cell, const chi_mesh::Cell &adj_cell, unsigned int f) |
Data Fields | |
VertexHandler | vertices |
LocalCellHandler | local_cells |
GlobalCellHandler | cells |
size_t | Nx = 0 |
size_t | Ny = 0 |
size_t | Nz = 0 |
Private Types | |
typedef std::shared_ptr< chi::ChiMPICommunicatorSet > | MPILocalCommSetPtr |
Private Member Functions | |
void | SetAttributes (MeshAttributes new_attribs, std::array< size_t, 3 > ortho_Nis={0, 0, 0}) |
Private Attributes | |
std::vector< std::unique_ptr< chi_mesh::Cell > > | local_cells_ |
Actual local cells. More... | |
std::vector< std::unique_ptr< chi_mesh::Cell > > | ghost_cells_ |
Locally stored ghosts. More... | |
std::map< uint64_t, uint64_t > | global_cell_id_to_local_id_map_ |
std::map< uint64_t, uint64_t > | global_cell_id_to_nonlocal_id_map_ |
uint64_t | global_vertex_count_ = 0 |
MeshAttributes | attributes = NONE |
struct { | |
size_t Nx = 0 | |
size_t Ny = 0 | |
size_t Nz = 0 | |
} | ortho_attributes |
std::map< uint64_t, std::string > | boundary_id_map_ |
Friends | |
class | chi_mesh::VolumeMesher |
class | chi_mesh::MeshGenerator |
Stores the relevant information for completely defining a computational domain.
Definition at line 34 of file chi_meshcontinuum.h.
|
private |
Definition at line 37 of file chi_meshcontinuum.h.
|
inline |
Definition at line 68 of file chi_meshcontinuum.h.
|
inline |
Definition at line 156 of file chi_meshcontinuum.h.
bool chi_mesh::MeshContinuum::CheckPointInsideCell | ( | const chi_mesh::Cell & | cell, |
const chi_mesh::Vector3 & | point | ||
) | const |
Checks whether a point is within a cell.
Definition at line 338 of file chi_meshcontinuum_utilities.cc.
|
inline |
Method to be called if cells and nodes have been transferred to another grid.
Definition at line 102 of file chi_meshcontinuum.h.
chi_mesh::Vector3 chi_mesh::MeshContinuum::ComputeCentroidFromListOfNodes | ( | const std::vector< uint64_t > & | list | ) | const |
Computes the centroid from nodes specified by the given list.
Definition at line 299 of file chi_meshcontinuum_utilities.cc.
size_t chi_mesh::MeshContinuum::CountCellsInLogicalVolume | ( | const chi_mesh::LogicalVolume & | log_vol | ) | const |
Counts the number of cells within a logical volume across all partitions.
Definition at line 317 of file chi_meshcontinuum_utilities.cc.
void chi_mesh::MeshContinuum::ExportCellsToExodus | ( | const std::string & | file_base_name, |
bool | suppress_node_sets = false , |
||
bool | suppress_side_sets = false |
||
) | const |
Exports just the portion of the mesh to ExodusII format.
Definition at line 25 of file chi_meshcontinuum_exportexodus.cc.
void chi_mesh::MeshContinuum::ExportCellsToObj | ( | const char * | fileName, |
bool | per_material = false , |
||
int | options = 0 |
||
) | const |
Export cells to python.
Definition at line 16 of file chi_meshcontinuum_exportobj.cc.
void chi_mesh::MeshContinuum::ExportCellsToVTK | ( | const std::string & | file_base_name | ) | const |
Exports just the mesh to VTK format.
Definition at line 14 of file chi_meshcontinuum_exportvtk.cc.
void chi_mesh::MeshContinuum::FindAssociatedCellVertices | ( | const chi_mesh::CellFace & | cur_face, |
std::vector< short > & | dof_mapping | ||
) | const |
Creates a mapping of the current face local-ids to the adjacent cell's local ids.
General map vertices
Definition at line 209 of file chi_meshcontinuum_utilities.cc.
void chi_mesh::MeshContinuum::FindAssociatedVertices | ( | const chi_mesh::CellFace & | cur_face, |
std::vector< short > & | dof_mapping | ||
) | const |
Creates a mapping of the current face local-ids to the adjacent face's local ids.
General map vertices
Definition at line 164 of file chi_meshcontinuum_utilities.cc.
|
inline |
Definition at line 83 of file chi_meshcontinuum.h.
|
inline |
Definition at line 88 of file chi_meshcontinuum.h.
|
static |
Check whether a cell is a boundary by checking if the key is found in the native or foreign cell maps.
Definition at line 136 of file chi_meshcontinuum_utilities.cc.
std::vector< uint64_t > chi_mesh::MeshContinuum::GetDomainUniqueBoundaryIDs | ( | ) | const |
Builds and returns a vector of unique boundary id's present in the mesh.
Definition at line 12 of file chi_meshcontinuum_uniquebndryIDs.cc.
size_t chi_mesh::MeshContinuum::GetGlobalNumberOfCells | ( | ) | const |
Returns the total number of global cells.
Definition at line 85 of file chi_meshcontinuum_globalcellhandler.cc.
|
inline |
Definition at line 81 of file chi_meshcontinuum.h.
std::array< size_t, 3 > chi_mesh::MeshContinuum::GetIJKInfo | ( | ) | const |
Gets and orthogonal mesh interface object.
Definition at line 443 of file chi_meshcontinuum_utilities.cc.
std::pair< chi_mesh::Vector3, chi_mesh::Vector3 > chi_mesh::MeshContinuum::GetLocalBoundingBox | ( | ) | const |
Definition at line 526 of file chi_meshcontinuum_utilities.cc.
bool chi_mesh::MeshContinuum::IsCellLocal | ( | uint64_t | cell_global_index | ) | const |
Check whether a cell is local by attempting to find the key in the native index map.
Definition at line 124 of file chi_meshcontinuum_utilities.cc.
uint64_t chi_mesh::MeshContinuum::MakeBoundaryID | ( | const std::string & | boundary_name | ) | const |
Makes a bndry id given a name. If the bndry name already exists, the associated bndry id will be returned. Other the id will be set to one more than the maximum boundary id.
Definition at line 511 of file chi_meshcontinuum_utilities.cc.
std::vector< chi_mesh::Vector3 > chi_mesh::MeshContinuum::MakeCellOrthoSizes | ( | ) | const |
Determines the bounding box size of each cell and returns it as a list of 3-component vectors, one Vec3 for each cell.
Definition at line 480 of file chi_meshcontinuum_utilities.cc.
std::shared_ptr< chi_mesh::GridFaceHistogram > chi_mesh::MeshContinuum::MakeGridFaceHistogram | ( | double | master_tolerance = 100.0 , |
double | slave_tolerance = 1.1 |
||
) | const |
Populates a face histogram.
master_tolerance | Multiple histograms will only be attempted if the ratio of the maximum dofs-per-face to the average dofs-per-face is greater than this value. Default 1.2. |
slave_tolerance | While traversing a sorted list of dofs-per-face, a new bin will only be generated when the ratio of the listed dofs-per-face to a running bin average exceeds this value. Defualt 1.1. |
The function populates face_categories which is a structure containing pairs. Pair.first is the max dofs-per-face for the category and Pair.second is the number of faces in this category.
Definition at line 33 of file chi_meshcontinuum_utilities.cc.
chi_data_types::NDArray< uint64_t > chi_mesh::MeshContinuum::MakeIJKToGlobalIDMapping | ( | ) | const |
Provides a mapping from cell ijk indices to global ids.
Definition at line 455 of file chi_meshcontinuum_utilities.cc.
std::shared_ptr< chi::ChiMPICommunicatorSet > chi_mesh::MeshContinuum::MakeMPILocalCommunicatorSet | ( | ) | const |
Gets the communicator-set for interprocess communication, associated with this mesh. If not created yet, it will create it.
Definition at line 12 of file chi_meshcontinuum_communicator.cc.
|
static |
Given the current cell, cell A, and its adjacent cell, cell B, with cell B adjacent to A at the f
-th face of cell A. Will determine the af
-th index of the face on cell B that interface with the f
-th face of cell A.
Definition at line 254 of file chi_meshcontinuum_utilities.cc.
size_t chi_mesh::MeshContinuum::MapCellGlobalID2LocalID | ( | uint64_t | global_id | ) | const |
Given a global-id of a cell, will return the local-id if the cell is local, otherwise will throw out_of_range.
Given a global-id of a cell, will return the local-id if the cell is local, otherwise will throw logic_error.
Definition at line 292 of file chi_meshcontinuum_utilities.cc.
|
inlinestatic |
Definition at line 95 of file chi_meshcontinuum.h.
|
inlineprivate |
Definition at line 167 of file chi_meshcontinuum.h.
|
inline |
Definition at line 77 of file chi_meshcontinuum.h.
|
friend |
Definition at line 166 of file chi_meshcontinuum.h.
|
friend |
Definition at line 165 of file chi_meshcontinuum.h.
|
private |
Definition at line 56 of file chi_meshcontinuum.h.
|
private |
Definition at line 65 of file chi_meshcontinuum.h.
GlobalCellHandler chi_mesh::MeshContinuum::cells |
Definition at line 53 of file chi_meshcontinuum.h.
|
private |
Locally stored ghosts.
Definition at line 43 of file chi_meshcontinuum.h.
|
private |
Definition at line 45 of file chi_meshcontinuum.h.
|
private |
Definition at line 46 of file chi_meshcontinuum.h.
|
private |
Definition at line 48 of file chi_meshcontinuum.h.
LocalCellHandler chi_mesh::MeshContinuum::local_cells |
Definition at line 52 of file chi_meshcontinuum.h.
|
private |
Actual local cells.
Definition at line 41 of file chi_meshcontinuum.h.
size_t chi_mesh::MeshContinuum::Nx = 0 |
Definition at line 60 of file chi_meshcontinuum.h.
size_t chi_mesh::MeshContinuum::Ny = 0 |
Definition at line 61 of file chi_meshcontinuum.h.
size_t chi_mesh::MeshContinuum::Nz = 0 |
Definition at line 62 of file chi_meshcontinuum.h.
struct { ... } chi_mesh::MeshContinuum::ortho_attributes |
VertexHandler chi_mesh::MeshContinuum::vertices |
Definition at line 51 of file chi_meshcontinuum.h.