deal.II version GIT relicensing-2165-gc91f007519 2024-11-20 01:40:00+00:00
|
#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 ? 1 :dim - 1 > > &cells) const |
void | process (const DoFHandler< dim > &background_dof_handler, const VectorType &ls_vector, const double iso_level, std::vector< Point< dim > > &vertices) 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 ? 1 :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) 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 ? 1 :dim - 1 > > &cells, const bool write_back_cell_data=true) const |
void | process_sub_cell (const std::vector< value_type > &, const std::vector< Point< 1 > > &, const std::vector< unsigned int > &, const double, std::vector< Point< 1 > > &, std::vector< CellData< 1 > > &, const bool) 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 bool write_back_cell_data) 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 bool write_back_cell_data) 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 2871 of file grid_tools.h.
using GridTools::MarchingCubeAlgorithm< dim, VectorType >::value_type = typename VectorType::value_type |
Value type of vector.
Definition at line 2877 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 5002 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 ? 1 :dim - 1 > > & | cells | ||
) | const |
Process all locally-owned cells and fill vertices
and cells
for all cells that are cut.
Definition at line 5054 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 | ||
) | const |
Process all locally-owned cells and fill vertices
for all cells that are cut.
Definition at line 5074 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 ? 1 :dim - 1 > > & | cells | ||
) | const |
Process the provided cell and fill vertices
and cells
for all cells that are cut.
Definition at line 5090 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 | ||
) | const |
Process the provided cell and fill vertices
for all cells that are cut.
Definition at line 5114 of file grid_tools.cc.
|
staticprivate |
Internal function to create a quadrature rule with n_subdivisions+1 equally-positioned quadrature points.
Definition at line 5019 of file grid_tools.cc.
|
private |
Process a cell.
Definition at line 5140 of file grid_tools.cc.
|
inlineprivate |
Dummy function for 1d processing a sub-cell.
Definition at line 2963 of file grid_tools.h.
|
private |
Process a sub-cell (2d).
Definition at line 5230 of file grid_tools.cc.
|
private |
Process a sub-cell (3d).
Definition at line 5313 of file grid_tools.cc.
|
private |
Number of subdivisions each cell is subdivided into in each direction to improve the approximation.
Definition at line 3005 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 3011 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 3017 of file grid_tools.h.