1#ifndef CHITECH_CHI_GRID_VTK_UTILS_H
2#define CHITECH_CHI_GRID_VTK_UTILS_H
12class vtkUnstructuredGrid;
25 int64_t& node_counter,
29 const std::vector<uint64_t>& vertex_map,
32 const std::vector<uint64_t>& vertex_map,
43 const std::string& block_id_array_name =
"BlockID");
45 std::vector<vtkUGridPtrAndName>
47 int desired_dimension);
51 int desired_dimension);
57 const std::string& field_name,
58 const std::string& file_name);
63 bool discontinuous =
true);
66 const std::string &file_base_name);
vtkNew< vtkUnstructuredGrid > PrepareVtkUnstructuredGrid(const chi_mesh::MeshContinuum &grid, bool discontinuous=true)
std::vector< int > BuildCellMaterialIDsFromField(vtkUGridPtr &ugrid, const std::string &field_name, const std::string &file_name)
std::vector< uint64_t > BuildBlockCellExtents(std::vector< vtkUGridPtrAndName > &ugrid_blocks, int desired_dimension)
void UploadFaceGeometry(const chi_mesh::CellFace &cell_face, const std::vector< uint64_t > &vertex_map, vtkNew< vtkUnstructuredGrid > &ugrid)
void UploadCellGeometryContinuous(const chi_mesh::Cell &cell, const std::vector< uint64_t > &vertex_map, vtkNew< vtkUnstructuredGrid > &ugrid)
void WritePVTUFiles(vtkNew< vtkUnstructuredGrid > &ugrid, const std::string &file_base_name)
vtkSmartPointer< vtkUnstructuredGrid > vtkUGridPtr
std::pair< vtkUGridPtr, std::string > vtkUGridPtrAndName
void UploadCellGeometryDiscontinuous(const chi_mesh::MeshContinuum &grid, const chi_mesh::Cell &cell, int64_t &node_counter, vtkNew< vtkPoints > &points, vtkNew< vtkUnstructuredGrid > &ugrid)
vtkUGridPtr ConsolidateGridBlocks(std::vector< vtkUGridPtrAndName > &ugrid_blocks, const std::string &block_id_array_name="BlockID")
void SetBlockIDArrays(std::vector< vtkUGridPtrAndName > &ugrid_blocks)
int FindHighestDimension(std::vector< vtkUGridPtrAndName > &ugrid_blocks)
std::vector< vtkUGridPtrAndName > GetBlocksOfDesiredDimension(std::vector< vtkUGridPtrAndName > &ugrid_blocks, int desired_dimension)