Vulpes  0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
Loading...
Searching...
No Matches
vulpes::geometry::mesh2d::internal Namespace Reference

Typedefs

using CellIntersectStatusType = int8_t
using CartesianCellStatues = Eigen::Matrix<CellIntersectStatusType, -1, -1>
template<typename IndexType>
using CartCellToFineFacet = datastructure::CrsMap<IndexType, IndexType>
template<typename IndexType>
using EdgeIntersection = std::array<IndexType, 3>
template<typename IndexType>
using EdgeIntersectionTable = std::map<EdgeIntersection<IndexType>, IndexType>
template<typename IndexType>
using IntersectionPtr = typename EdgeIntersectionTable<IndexType>::iterator

Enumerations

enum  CellIntersectStatus : CellIntersectStatusType { BND = 0 , INTERNAL = 1 , EXTERNAL = 2 }

Functions

std::string getFileExtension (const std::string &filename)
std::vector< std::array< double, 3 > > readpts (const std::string &filename)
template<typename FloatType, typename IndexType>
std::pair< CartesianCellStatues, CartCellToFineFacet< IndexType > > findBoundaryCartCells (const Mesh2D< FloatType, IndexType > &mesh, const std::array< std::vector< FloatType >, 2 > &grids)
template<typename FloatType, typename IndexType>
void findInternalCartCells (const Mesh2D< FloatType, IndexType > &mesh, const std::array< std::vector< FloatType >, 2 > &grids, CartesianCellStatues &cart_cell_intersect)
template<typename FloatType, typename IndexType>
auto extractInternalVtxsAndCells (const Mesh2D< FloatType, IndexType > &cart_mesh, const CartesianCellStatues &cart_cell_intersect)
template<typename FloatType, typename IndexType>
auto intersectCartCellWithFineFacet (const Mesh2D< FloatType, IndexType > &mesh, const Mesh2D< FloatType, IndexType > &cart_mesh, const CartCellToFineFacet< IndexType > &, IndexType ccid, IndexType fvid1, IndexType fvid2, EdgeIntersectionTable< IndexType > &edges_intersections, std::vector< Point< FloatType, 2 > > &new_vtxs)
template<typename FloatType, typename IndexType>
IndexType findCartVtxOnTheRight (const Mesh2D< FloatType, IndexType > &mesh, const Mesh2D< FloatType, IndexType > &cart_mesh, IntersectionPtr< IndexType > intersection, bool right=true)
template<typename FloatType, typename IndexType>
auto splitFacetsIntoSequencesOfVtxs (const Mesh2D< FloatType, IndexType > &mesh, const CartCellToFineFacet< IndexType > &cart_cell_to_fine_facet, const std::array< std::vector< FloatType >, 2 > &grids, IndexType ccid)
template<typename FloatType, typename IndexType>
auto createNewCell (const Mesh2D< FloatType, IndexType > &mesh, const Mesh2D< FloatType, IndexType > &cart_mesh, const std::array< std::vector< FloatType >, 2 > &, const CartCellToFineFacet< IndexType > &cart_cell_to_fine_facet, const CartesianCellStatues &, const std::vector< IndexType > &old_to_new_cart_vid, const std::vector< IndexType > &fvid_seq, IndexType ccid, EdgeIntersectionTable< IndexType > &edges_intersections, std::vector< Point< FloatType, 2 > > &new_vtxs, datastructure::CrsMapUncompressed< IndexType > &new_cell_to_vtxs, Eigen::Map< Eigen::Vector4i > cvid_cnt)
template<typename FloatType, typename IndexType>
auto mergeLastCell (const Mesh2D< FloatType, IndexType > &, const Mesh2D< FloatType, IndexType > &cart_mesh, const std::array< std::vector< FloatType >, 2 > &grids, const CartCellToFineFacet< IndexType > &, const CartesianCellStatues &, const std::vector< IndexType > &old_to_new_cart_vid, const std::vector< std::vector< IndexType > > &fvid_seqs, const Eigen::Matrix4Xi &cvid_cnt, IndexType ccid, const std::vector< Point< FloatType, 2 > > &new_vtxs, datastructure::CrsMapUncompressed< IndexType > &new_cell_to_vtxs)
template<typename FloatType, typename IndexType>
auto clipBoundaryCells (const Mesh2D< FloatType, IndexType > &mesh, const Mesh2D< FloatType, IndexType > &cart_mesh, const std::array< std::vector< FloatType >, 2 > &grids, const CartCellToFineFacet< IndexType > &cart_cell_to_fine_facet, const CartesianCellStatues &cart_cell_intersect, const std::vector< IndexType > &old_to_new_cart_vid, std::vector< Point< FloatType, 2 > > &new_vtxs, datastructure::CrsMapUncompressed< IndexType > &new_cell_to_vtxs)
template<typename FloatType, typename IndexType>
std::vector< IndexType > computeAgglomerationIndicator (const Mesh2D< FloatType, IndexType > &new_mesh, FloatType standard_measure, FloatType agglomeration_threshold)
template<typename FloatType, typename IndexType>
std::array< std::vector< FloatType >, 2 > buildCartesianBbox (const Mesh2D< FloatType, IndexType > &mesh, IndexType n_cells_x, FloatType stretch)
 Builds a 2D Cartesian grid that encloses a given mesh.

Typedef Documentation

◆ CartCellToFineFacet

template<typename IndexType>
using vulpes::geometry::mesh2d::internal::CartCellToFineFacet = datastructure::CrsMap<IndexType, IndexType>

◆ CartesianCellStatues

◆ CellIntersectStatusType

◆ EdgeIntersection

template<typename IndexType>
using vulpes::geometry::mesh2d::internal::EdgeIntersection = std::array<IndexType, 3>

◆ EdgeIntersectionTable

template<typename IndexType>
using vulpes::geometry::mesh2d::internal::EdgeIntersectionTable = std::map<EdgeIntersection<IndexType>, IndexType>

◆ IntersectionPtr

template<typename IndexType>
using vulpes::geometry::mesh2d::internal::IntersectionPtr = typename EdgeIntersectionTable<IndexType>::iterator

Enumeration Type Documentation

◆ CellIntersectStatus

Function Documentation

◆ buildCartesianBbox()

template<typename FloatType, typename IndexType>
std::array< std::vector< FloatType >, 2 > vulpes::geometry::mesh2d::internal::buildCartesianBbox ( const Mesh2D< FloatType, IndexType > & mesh,
IndexType n_cells_x,
FloatType stretch )

Builds a 2D Cartesian grid that encloses a given mesh.

To avoid numerical rounding the bounding box is enlarged by a small factor

Parameters
meshThe input mesh used to determine the boundaries.
n_cells_xThe number of grid cells along the x-axis.
stretchA factor to stretch the grid cells in the y-direction relative to the x-direction.
Returns
An array of two vectors, representing the grid line coordinates for the x and y axes.

◆ clipBoundaryCells()

template<typename FloatType, typename IndexType>
auto vulpes::geometry::mesh2d::internal::clipBoundaryCells ( const Mesh2D< FloatType, IndexType > & mesh,
const Mesh2D< FloatType, IndexType > & cart_mesh,
const std::array< std::vector< FloatType >, 2 > & grids,
const CartCellToFineFacet< IndexType > & cart_cell_to_fine_facet,
const CartesianCellStatues & cart_cell_intersect,
const std::vector< IndexType > & old_to_new_cart_vid,
std::vector< Point< FloatType, 2 > > & new_vtxs,
datastructure::CrsMapUncompressed< IndexType > & new_cell_to_vtxs )

◆ computeAgglomerationIndicator()

template<typename FloatType, typename IndexType>
std::vector< IndexType > vulpes::geometry::mesh2d::internal::computeAgglomerationIndicator ( const Mesh2D< FloatType, IndexType > & new_mesh,
FloatType standard_measure,
FloatType agglomeration_threshold )

◆ createNewCell()

template<typename FloatType, typename IndexType>
auto vulpes::geometry::mesh2d::internal::createNewCell ( const Mesh2D< FloatType, IndexType > & mesh,
const Mesh2D< FloatType, IndexType > & cart_mesh,
const std::array< std::vector< FloatType >, 2 > & ,
const CartCellToFineFacet< IndexType > & cart_cell_to_fine_facet,
const CartesianCellStatues & ,
const std::vector< IndexType > & old_to_new_cart_vid,
const std::vector< IndexType > & fvid_seq,
IndexType ccid,
EdgeIntersectionTable< IndexType > & edges_intersections,
std::vector< Point< FloatType, 2 > > & new_vtxs,
datastructure::CrsMapUncompressed< IndexType > & new_cell_to_vtxs,
Eigen::Map< Eigen::Vector4i > cvid_cnt )

◆ extractInternalVtxsAndCells()

template<typename FloatType, typename IndexType>
auto vulpes::geometry::mesh2d::internal::extractInternalVtxsAndCells ( const Mesh2D< FloatType, IndexType > & cart_mesh,
const CartesianCellStatues & cart_cell_intersect )

◆ findBoundaryCartCells()

template<typename FloatType, typename IndexType>
std::pair< CartesianCellStatues, CartCellToFineFacet< IndexType > > vulpes::geometry::mesh2d::internal::findBoundaryCartCells ( const Mesh2D< FloatType, IndexType > & mesh,
const std::array< std::vector< FloatType >, 2 > & grids )

◆ findCartVtxOnTheRight()

template<typename FloatType, typename IndexType>
IndexType vulpes::geometry::mesh2d::internal::findCartVtxOnTheRight ( const Mesh2D< FloatType, IndexType > & mesh,
const Mesh2D< FloatType, IndexType > & cart_mesh,
IntersectionPtr< IndexType > intersection,
bool right = true )

◆ findInternalCartCells()

template<typename FloatType, typename IndexType>
void vulpes::geometry::mesh2d::internal::findInternalCartCells ( const Mesh2D< FloatType, IndexType > & mesh,
const std::array< std::vector< FloatType >, 2 > & grids,
CartesianCellStatues & cart_cell_intersect )

◆ getFileExtension()

std::string vulpes::geometry::mesh2d::internal::getFileExtension ( const std::string & filename)
inline

◆ intersectCartCellWithFineFacet()

template<typename FloatType, typename IndexType>
auto vulpes::geometry::mesh2d::internal::intersectCartCellWithFineFacet ( const Mesh2D< FloatType, IndexType > & mesh,
const Mesh2D< FloatType, IndexType > & cart_mesh,
const CartCellToFineFacet< IndexType > & ,
IndexType ccid,
IndexType fvid1,
IndexType fvid2,
EdgeIntersectionTable< IndexType > & edges_intersections,
std::vector< Point< FloatType, 2 > > & new_vtxs )

◆ mergeLastCell()

template<typename FloatType, typename IndexType>
auto vulpes::geometry::mesh2d::internal::mergeLastCell ( const Mesh2D< FloatType, IndexType > & ,
const Mesh2D< FloatType, IndexType > & cart_mesh,
const std::array< std::vector< FloatType >, 2 > & grids,
const CartCellToFineFacet< IndexType > & ,
const CartesianCellStatues & ,
const std::vector< IndexType > & old_to_new_cart_vid,
const std::vector< std::vector< IndexType > > & fvid_seqs,
const Eigen::Matrix4Xi & cvid_cnt,
IndexType ccid,
const std::vector< Point< FloatType, 2 > > & new_vtxs,
datastructure::CrsMapUncompressed< IndexType > & new_cell_to_vtxs )

◆ readpts()

std::vector< std::array< double, 3 > > vulpes::geometry::mesh2d::internal::readpts ( const std::string & filename)
inline

◆ splitFacetsIntoSequencesOfVtxs()

template<typename FloatType, typename IndexType>
auto vulpes::geometry::mesh2d::internal::splitFacetsIntoSequencesOfVtxs ( const Mesh2D< FloatType, IndexType > & mesh,
const CartCellToFineFacet< IndexType > & cart_cell_to_fine_facet,
const std::array< std::vector< FloatType >, 2 > & grids,
IndexType ccid )