OGS
|
Definition in file Vtu2Grid.cpp.
#include <tclap/CmdLine.h>
#include <vtkAbstractArray.h>
#include <vtkCellData.h>
#include <vtkCellLocator.h>
#include <vtkDataArray.h>
#include <vtkDoubleArray.h>
#include <vtkIntArray.h>
#include <vtkSmartPointer.h>
#include <vtkUnstructuredGrid.h>
#include <vtkXMLUnstructuredGridReader.h>
#include "InfoLib/GitInfo.h"
#include "MeshLib/IO/writeMeshToFile.h"
#include "MeshLib/Mesh.h"
#include "MeshLib/MeshEditing/RemoveMeshComponents.h"
#include "MeshLib/MeshGenerators/MeshGenerator.h"
#include "MeshLib/MeshSearch/ElementSearch.h"
Go to the source code of this file.
Functions | |
std::array< std::size_t, 3 > | getDimensions (MathLib::Point3d const &min, MathLib::Point3d const &max, std::array< double, 3 > const &cellsize) |
std::vector< int > | assignCellIds (vtkSmartPointer< vtkUnstructuredGrid > const &mesh, MathLib::Point3d const &min, std::array< std::size_t, 3 > const &dims, std::array< double, 3 > const &cellsize) |
bool | removeUnusedGridCells (vtkSmartPointer< vtkUnstructuredGrid > const &mesh, std::unique_ptr< MeshLib::Mesh > &grid) |
template<typename T , typename VTK_TYPE > | |
void | mapArray (MeshLib::Mesh &grid, VTK_TYPE vtk_arr, std::string const &name) |
void | mapMeshArraysOntoGrid (vtkSmartPointer< vtkUnstructuredGrid > const &mesh, std::unique_ptr< MeshLib::Mesh > &grid) |
int | main (int argc, char *argv[]) |
Variables | |
std::string const | cell_id_name = "CellIds" |
std::vector<int> assignCellIds | ( | vtkSmartPointer< vtkUnstructuredGrid > const & | mesh, |
MathLib::Point3d const & | min, | ||
std::array< std::size_t, 3 > const & | dims, | ||
std::array< double, 3 > const & | cellsize | ||
) |
std::array<std::size_t, 3> getDimensions | ( | MathLib::Point3d const & | min, |
MathLib::Point3d const & | max, | ||
std::array< double, 3 > const & | cellsize | ||
) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 133 of file Vtu2Grid.cpp.
References assignCellIds(), MeshLib::Cell, cell_id_name, MathLib::LinAlg::copy(), ERR(), MeshLib::MeshGenerator::generateRegularHexMesh(), getDimensions(), mapMeshArraysOntoGrid(), GitInfoLib::GitInfo::ogs_version, removeUnusedGridCells(), and MeshLib::IO::writeMeshToFile().
void mapArray | ( | MeshLib::Mesh & | grid, |
VTK_TYPE | vtk_arr, | ||
std::string const & | name | ||
) |
Definition at line 94 of file Vtu2Grid.cpp.
References MeshLib::Cell, cell_id_name, MeshLib::Properties::createNewPropertyVector(), MeshLib::Mesh::getProperties(), MeshLib::Properties::getPropertyVector(), MaterialPropertyLib::name, and MeshLib::PropertyVector< PROP_VAL_TYPE >::size().
void mapMeshArraysOntoGrid | ( | vtkSmartPointer< vtkUnstructuredGrid > const & | mesh, |
std::unique_ptr< MeshLib::Mesh > & | grid | ||
) |
Definition at line 107 of file Vtu2Grid.cpp.
References MaterialPropertyLib::name, and WARN().
Referenced by main().
bool removeUnusedGridCells | ( | vtkSmartPointer< vtkUnstructuredGrid > const & | mesh, |
std::unique_ptr< MeshLib::Mesh > & | grid | ||
) |
Definition at line 72 of file Vtu2Grid.cpp.
References cell_id_name, ERR(), MeshLib::ElementSearch::getSearchedElementIDs(), MeshLib::removeElements(), and MeshLib::ElementSearch::searchByPropertyValueRange().
Referenced by main().
std::string const cell_id_name = "CellIds" |
Definition at line 28 of file Vtu2Grid.cpp.
Referenced by main(), mapArray(), and removeUnusedGridCells().