Chi-Tech
chi_meshcontinuum_exportvtk.cc
Go to the documentation of this file.
1#include "chi_meshcontinuum.h"
2
6
7#include <vtkUnstructuredGrid.h>
8
9#include "chi_runtime.h"
10#include "chi_log.h"
11
12//###################################################################
13/**Exports just the mesh to VTK format.*/
14void chi_mesh::MeshContinuum::ExportCellsToVTK(const std::string& file_base_name) const
15{
16 Chi::log.Log() << "Exporting mesh to VTK files with base " << file_base_name;
17
18 const auto& grid = *this;
19
20 auto ugrid = chi_mesh::PrepareVtkUnstructuredGrid(grid, false);
21
22 chi_mesh::WritePVTUFiles(ugrid, file_base_name);
23
24 Chi::log.Log() << "Done exporting mesh to VTK.";
25}
static chi::ChiLog & log
Definition: chi_runtime.h:81
LogStream Log(LOG_LVL level=LOG_0)
Definition: chi_log.cc:35
void ExportCellsToVTK(const std::string &file_base_name) const
vtkNew< vtkUnstructuredGrid > PrepareVtkUnstructuredGrid(const chi_mesh::MeshContinuum &grid, bool discontinuous=true)
void WritePVTUFiles(vtkNew< vtkUnstructuredGrid > &ugrid, const std::string &file_base_name)