Reference documentation for deal.II version 9.4.1
|
#include <deal.II/grid/grid_tools.h>
Public Types | |
using | value_type = typename VectorType::value_type |
Public Member Functions | |
MarchingCubeAlgorithm (const Mapping< dim, dim > &mapping, const FiniteElement< dim, dim > &fe, const unsigned int n_subdivisions=1, const double tolerance=1e-10) | |
void | process (const DoFHandler< dim > &background_dof_handler, const VectorType &ls_vector, const double iso_level, std::vector< Point< dim > > &vertices, std::vector< CellData< dim - 1 > > &cells) const |
void | process_cell (const typename DoFHandler< dim >::active_cell_iterator &cell, const VectorType &ls_vector, const double iso_level, std::vector< Point< dim > > &vertices, std::vector< CellData< dim - 1 > > &cells) const |
Private Member Functions | |
void | process_cell (std::vector< value_type > &ls_values, const std::vector< Point< dim > > &points, const double iso_level, std::vector< Point< dim > > &vertices, std::vector< CellData< dim - 1 > > &cells) const |
void | process_sub_cell (const std::vector< value_type > &ls_values, const std::vector< Point< 2 > > &points, const std::vector< unsigned int > mask, const double iso_level, std::vector< Point< 2 > > &vertices, std::vector< CellData< 1 > > &cells) const |
void | process_sub_cell (const std::vector< value_type > &ls_values, const std::vector< Point< 3 > > &points, const std::vector< unsigned int > mask, const double iso_level, std::vector< Point< 3 > > &vertices, std::vector< CellData< 2 > > &cells) const |
Static Private Member Functions | |
static Quadrature< dim > | create_quadrature_rule (const unsigned int n_subdivisions) |
Private Attributes | |
const unsigned int | n_subdivisions |
const double | tolerance |
FEValues< dim > | fe_values |
An implementation of the marching-square (2D) and marching-cube algorithm for creating data structures (vectors of Point and CellData) to create a linear/bilinear surface mesh on the iso line/contour of a scalar field.
To improve the approximation of the iso line/contour and the resulting linear surface mesh, one increases the number of subdivision so that the algorithm is not run on a cell but on subcells with vertex values having been interpolated from the cell values.
Definition at line 3408 of file grid_tools.h.
using GridTools::MarchingCubeAlgorithm< dim, VectorType >::value_type = typename VectorType::value_type |
Value type of vector.
Definition at line 3414 of file grid_tools.h.
GridTools::MarchingCubeAlgorithm< dim, VectorType >::MarchingCubeAlgorithm | ( | const Mapping< dim, dim > & | mapping, |
const FiniteElement< dim, dim > & | fe, | ||
const unsigned int | n_subdivisions = 1 , |
||
const double | tolerance = 1e-10 |
||
) |
Constructor.
Definition at line 6579 of file grid_tools.cc.
void GridTools::MarchingCubeAlgorithm< dim, VectorType >::process | ( | const DoFHandler< dim > & | background_dof_handler, |
const VectorType & | ls_vector, | ||
const double | iso_level, | ||
std::vector< Point< dim > > & | vertices, | ||
std::vector< CellData< dim - 1 > > & | cells | ||
) | const |
Process all locally-owned cells and fill vertices
and cells
for all cells that are cut.
Definition at line 6626 of file grid_tools.cc.
void GridTools::MarchingCubeAlgorithm< dim, VectorType >::process_cell | ( | const typename DoFHandler< dim >::active_cell_iterator & | cell, |
const VectorType & | ls_vector, | ||
const double | iso_level, | ||
std::vector< Point< dim > > & | vertices, | ||
std::vector< CellData< dim - 1 > > & | cells | ||
) | const |
Process the provided cell and fill vertices
and cells
for all cells that are cut.
Definition at line 6642 of file grid_tools.cc.
|
staticprivate |
Internal function to create a quadrature rule with n_subdivisions+1 equally-positioned quadrature points.
Definition at line 6596 of file grid_tools.cc.
|
private |
Process a cell.
Definition at line 6662 of file grid_tools.cc.
|
private |
Process a sub-cell (2D).
Definition at line 6807 of file grid_tools.cc.
|
private |
Process a sub-cell (3D).
Definition at line 6888 of file grid_tools.cc.
|
private |
Number of subdivisions each cell is subdivided into in each direction to improve the approximation.
Definition at line 3495 of file grid_tools.h.
|
private |
Absolute tolerance specifying the minimum distance between a vertex and the cut point so that a line is considered cut.
Definition at line 3501 of file grid_tools.h.
|
mutableprivate |
FEValues used internally and set up with a quadrature rule with the correct number of subdivisions.
Definition at line 3507 of file grid_tools.h.