- Copyright
- Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org) Distributed under a Modified BSD License. See accompanying file LICENSE.txt or http://www.opengeosys.org/project/license
Definition in file RemoveGhostData.cpp.
#include <tclap/CmdLine.h>
#include <vtkCleanUnstructuredGrid.h>
#include <vtkRemoveGhosts.h>
#include <vtkSmartPointer.h>
#include <vtkUnstructuredGrid.h>
#include <vtkXMLPUnstructuredGridReader.h>
#include <vtkXMLUnstructuredGridWriter.h>
#include "InfoLib/GitInfo.h"
#include "MeshLib/IO/writeMeshToFile.h"
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 21 of file RemoveGhostData.cpp.
24 "Reads a VTK partitioned unstructured grid (*.pvtu), cleans the ghost "
25 "information and saves the data as as a regular, connected mesh file."
26 "\n\nOpenGeoSys-6 software, version " +
29 "Copyright (c) 2012-2021, OpenGeoSys Community "
30 "(http://www.opengeosys.org)",
33 TCLAP::ValueArg<std::string> output_arg(
34 "o",
"output",
"the output mesh (*.vtu)",
true,
"",
"output.vtu");
37 TCLAP::ValueArg<std::string> input_arg(
38 "i",
"input",
"the partitioned input mesh (*.pvtu)",
true,
"",
41 cmd.parse(argc, argv);
43 vtkSmartPointer<vtkXMLPUnstructuredGridReader> reader =
44 vtkSmartPointer<vtkXMLPUnstructuredGridReader>::New();
45 reader->SetFileName(input_arg.getValue().c_str());
47 vtkSmartPointer<vtkRemoveGhosts> ghosts =
48 vtkSmartPointer<vtkRemoveGhosts>::New();
49 ghosts->SetInputConnection(reader->GetOutputPort());
51 vtkSmartPointer<vtkCleanUnstructuredGrid> clean =
52 vtkSmartPointer<vtkCleanUnstructuredGrid>::New();
53 clean->SetInputConnection(ghosts->GetOutputPort());
55 vtkSmartPointer<vtkXMLUnstructuredGridWriter> writer =
56 vtkSmartPointer<vtkXMLUnstructuredGridWriter>::New();
57 writer->SetInputConnection(clean->GetOutputPort());
58 writer->SetFileName(output_arg.getValue().c_str());
GITINFOLIB_EXPORT const std::string ogs_version
References GitInfoLib::GitInfo::ogs_version.