![]() |
Vulpes
0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
|
Namespaces | |
| namespace | internal |
Functions | |
| template<typename FloatType, typename IndexType> | |
| Mesh2D< FloatType, IndexType > | intersectCartesianGrid (const Mesh2D< FloatType, IndexType > &mesh, const std::array< std::vector< FloatType >, 2 > &grids, FloatType agglomeration_threshold=0.25) |
| Creates a new mesh by intersecting an existing mesh with a Cartesian grid. | |
| template<typename FloatType, typename IndexType> | |
| Mesh2D< FloatType, IndexType > | mergeMeshes (const Mesh2D< FloatType, IndexType > &mesh_a, const Mesh2D< FloatType, IndexType > &mesh_b, FloatType atol=0.0, FloatType rtol=1e-4) |
| Merges two separate meshes into a single mesh. | |
| template<typename FloatType, typename IndexType> | |
| Mesh2D< FloatType, IndexType > | read (const std::string &filename, bool check_vtxs_unique=true, bool add_tags=true) |
| Reads a mesh from a .vtk or .vtu file and creates a Mesh2D object. | |
| template<typename FloatType, typename IndexType> | |
| Mesh2D< FloatType, IndexType > | rectangle (const Point< FloatType, 2 > &corner_a, const Point< FloatType, 2 > &corner_b, const Point< IndexType, 2 > &n_divisions, bool tria_elements=false) |
| Creates a simple rectangular mesh. | |
| template<typename FloatType, typename IndexType> | |
| Mesh2D< FloatType, IndexType > | collapseEdges (const Mesh2D< FloatType, IndexType > &mesh, FloatType edge_collapse_tol) |
| Remove edges smaller than a given tolerance. | |
| template Mesh2D< double, int32_t > | intersectCartesianGrid< double, int32_t > (const Mesh2D< double, int32_t > &, const std::array< std::vector< double >, 2 > &, double) |
| template Mesh2D< double, int32_t > | mergeMeshes< double, int32_t > (const Mesh2D< double, int32_t > &, const Mesh2D< double, int32_t > &, double, double) |
| template Mesh2D< double, int32_t > | collapseEdges (const Mesh2D< double, int32_t > &, double) |
| template Mesh2D< double, int32_t > | read< double, int32_t > (const std::string &, bool, bool) |
| template Mesh2D< double, uint32_t > | read< double, uint32_t > (const std::string &, bool, bool) |
| template Mesh2D< double, int64_t > | read< double, int64_t > (const std::string &, bool, bool) |
| template Mesh2D< double, uint64_t > | read< double, uint64_t > (const std::string &, bool, bool) |
| template Mesh2D< double, int32_t > | rectangle< double, int32_t > (const Point< double, 2 > &, const Point< double, 2 > &, const Point< int32_t, 2 > &, bool) |
| template Mesh2D< double, uint32_t > | rectangle< double, uint32_t > (const Point< double, 2 > &, const Point< double, 2 > &, const Point< uint32_t, 2 > &, bool) |
| template Mesh2D< double, int64_t > | rectangle< double, int64_t > (const Point< double, 2 > &, const Point< double, 2 > &, const Point< int64_t, 2 > &, bool) |
| template Mesh2D< double, uint64_t > | rectangle< double, uint64_t > (const Point< double, 2 > &, const Point< double, 2 > &, const Point< uint64_t, 2 > &, bool) |
| template<typename FloatType, typename IndexType> | |
| Mesh2D< FloatType, IndexType > | rectangle_periodic (const Point< FloatType, 2 > &corner_a, const Point< FloatType, 2 > &corner_b, const Point< IndexType, 2 > &n_divisions, bool tria_elements=false, bool x_periodic=true, bool y_periodic=true) |
| Creates a rectangular mesh and directly annotates it as periodic. | |
| template Mesh2D< double, int32_t > | rectangle_periodic< double, int32_t > (const Point< double, 2 > &, const Point< double, 2 > &, const Point< int32_t, 2 > &, bool, bool, bool) |
| template Mesh2D< double, uint32_t > | rectangle_periodic< double, uint32_t > (const Point< double, 2 > &, const Point< double, 2 > &, const Point< uint32_t, 2 > &, bool, bool, bool) |
| template Mesh2D< double, int64_t > | rectangle_periodic< double, int64_t > (const Point< double, 2 > &, const Point< double, 2 > &, const Point< int64_t, 2 > &, bool, bool, bool) |
| template Mesh2D< double, uint64_t > | rectangle_periodic< double, uint64_t > (const Point< double, 2 > &, const Point< double, 2 > &, const Point< uint64_t, 2 > &, bool, bool, bool) |
| template<typename FloatType, typename IndexType> | |
| bool | isPeriodic (const Mesh2D< FloatType, IndexType > &mesh) |
| template bool | isPeriodic< double, int32_t > (const Mesh2D< double, int32_t > &) |
| template<typename FloatType, typename IndexType> | |
| Mesh2D< FloatType, IndexType > | closePeriodicTopology (const Mesh2D< FloatType, IndexType > &mesh) |
| template Mesh2D< double, int32_t > | closePeriodicTopology< double, int32_t > (const Mesh2D< double, int32_t > &) |
| template<typename FloatType, typename IndexType> | |
| Mesh2D< FloatType, IndexType > | openPeriodicTopology (const Mesh2D< FloatType, IndexType > &mesh) |
| template Mesh2D< double, int32_t > | openPeriodicTopology< double, int32_t > (const Mesh2D< double, int32_t > &) |
| template<typename FloatType, typename IndexType> | |
| std::vector< Point< FloatType, 2 > > | getCellVertexesPeriodic (const Mesh2D< FloatType, IndexType > &mesh, IndexType cell_id) |
| template std::vector< Point< double, 2 > > | getCellVertexesPeriodic< double, int32_t > (const Mesh2D< double, int32_t > &, int32_t) |
| template<typename FloatType, typename IndexType> | |
| Mesh2D< FloatType, IndexType > | intersectCartesianGrid (const Mesh2D< FloatType, IndexType > &mesh, IndexType n_cells_x, FloatType stretch=1, FloatType agglomeration_threshold=0.25) |
| Creates a new mesh by intersecting an existing mesh with a Cartesian grid. | |
| Mesh2D< FloatType, IndexType > vulpes::geometry::mesh2d::closePeriodicTopology | ( | const Mesh2D< FloatType, IndexType > & | mesh | ) |
Remove ghost points and close the periodic topology of the mesh.
| template Mesh2D< double, int32_t > vulpes::geometry::mesh2d::closePeriodicTopology< double, int32_t > | ( | const Mesh2D< double, int32_t > & | ) |
| template Mesh2D< double, int32_t > vulpes::geometry::mesh2d::collapseEdges | ( | const Mesh2D< double, int32_t > & | , |
| double | ) |
| Mesh2D< FloatType, IndexType > vulpes::geometry::mesh2d::collapseEdges | ( | const Mesh2D< FloatType, IndexType > & | mesh, |
| FloatType | edge_collapse_tol ) |
Remove edges smaller than a given tolerance.
| mesh | The mesh. |
| edge_collapse_tol | Minimal edge length to preserve. |
| std::vector< Point< FloatType, 2 > > vulpes::geometry::mesh2d::getCellVertexesPeriodic | ( | const Mesh2D< FloatType, IndexType > & | mesh, |
| IndexType | cell_id ) |
| template std::vector< Point< double, 2 > > vulpes::geometry::mesh2d::getCellVertexesPeriodic< double, int32_t > | ( | const Mesh2D< double, int32_t > & | , |
| int32_t | ) |
| Mesh2D< FloatType, IndexType > vulpes::geometry::mesh2d::intersectCartesianGrid | ( | const Mesh2D< FloatType, IndexType > & | mesh, |
| const std::array< std::vector< FloatType >, 2 > & | grids, | ||
| FloatType | agglomeration_threshold = 0.25 ) |
Creates a new mesh by intersecting an existing mesh with a Cartesian grid.
This function "cuts" the boundary of the input mesh with the grid lines, resulting in a new, less complex mesh. Small fragments created during intersection with the boundary can be merged into larger cells based on a threshold.
| mesh | The original mesh to intersect. |
| grids | The Cartesian grid lines (x and y coordinates). |
| agglomeration_threshold | A threshold (relative to cell area) below which small cells are merged. |
| Mesh2D< FloatType, IndexType > vulpes::geometry::mesh2d::intersectCartesianGrid | ( | const Mesh2D< FloatType, IndexType > & | mesh, |
| IndexType | n_cells_x, | ||
| FloatType | stretch = 1, | ||
| FloatType | agglomeration_threshold = 0.25 ) |
Creates a new mesh by intersecting an existing mesh with a Cartesian grid.
This function "cuts" the boundary of the input mesh with the grid lines, resulting in a new, less complex mesh. Small fragments created during intersection with the boundary can be merged into larger cells based on a threshold.
| mesh | The original mesh to intersect. |
| n_cells_x | The number of grid cells to create along the x-axis. |
| stretch | A factor to stretch the grid cells in the y-direction. |
| agglomeration_threshold | A threshold (relative to cell area) below which small cells are merged. |
| template Mesh2D< double, int32_t > vulpes::geometry::mesh2d::intersectCartesianGrid< double, int32_t > | ( | const Mesh2D< double, int32_t > & | , |
| const std::array< std::vector< double >, 2 > & | , | ||
| double | ) |
| bool vulpes::geometry::mesh2d::isPeriodic | ( | const Mesh2D< FloatType, IndexType > & | mesh | ) |
Check if the mesh has the periodic metadata XPeriod and YPeriod; a period of 0 means not periodic in that direction.
| template bool vulpes::geometry::mesh2d::isPeriodic< double, int32_t > | ( | const Mesh2D< double, int32_t > & | ) |
| Mesh2D< FloatType, IndexType > vulpes::geometry::mesh2d::mergeMeshes | ( | const Mesh2D< FloatType, IndexType > & | mesh_a, |
| const Mesh2D< FloatType, IndexType > & | mesh_b, | ||
| FloatType | atol = 0.0, | ||
| FloatType | rtol = 1e-4 ) |
Merges two separate meshes into a single mesh.
This function combines the vertices and cells from two meshes. It can identify and merge vertices that are very close to each other, based on the specified tolerances.
| mesh_a | The first mesh. |
| mesh_b | The second mesh. |
| atol | Absolute tolerance for merging vertices. |
| rtol | Relative tolerance for merging vertices. |
| template Mesh2D< double, int32_t > vulpes::geometry::mesh2d::mergeMeshes< double, int32_t > | ( | const Mesh2D< double, int32_t > & | , |
| const Mesh2D< double, int32_t > & | , | ||
| double | , | ||
| double | ) |
| Mesh2D< FloatType, IndexType > vulpes::geometry::mesh2d::openPeriodicTopology | ( | const Mesh2D< FloatType, IndexType > & | mesh | ) |
Reopen periodic topology by restoring ghost vertices and original compressed connectivity from mesh tags/metadata produced by closePeriodicTopology.
| template Mesh2D< double, int32_t > vulpes::geometry::mesh2d::openPeriodicTopology< double, int32_t > | ( | const Mesh2D< double, int32_t > & | ) |
| Mesh2D< FloatType, IndexType > vulpes::geometry::mesh2d::read | ( | const std::string & | filename, |
| bool | check_vtxs_unique = true, | ||
| bool | add_tags = true ) |
Reads a mesh from a .vtk or .vtu file and creates a Mesh2D object.
| filename | The path to the mesh file. |
| check_vtxs_unique | If true, checks for duplicate vertices and raises warnings. |
| add_tags | If true, reads and attaches any tags found in the file. |
| template Mesh2D< double, int32_t > vulpes::geometry::mesh2d::read< double, int32_t > | ( | const std::string & | , |
| bool | , | ||
| bool | ) |
| template Mesh2D< double, int64_t > vulpes::geometry::mesh2d::read< double, int64_t > | ( | const std::string & | , |
| bool | , | ||
| bool | ) |
| template Mesh2D< double, uint32_t > vulpes::geometry::mesh2d::read< double, uint32_t > | ( | const std::string & | , |
| bool | , | ||
| bool | ) |
| template Mesh2D< double, uint64_t > vulpes::geometry::mesh2d::read< double, uint64_t > | ( | const std::string & | , |
| bool | , | ||
| bool | ) |
| Mesh2D< FloatType, IndexType > vulpes::geometry::mesh2d::rectangle | ( | const Point< FloatType, 2 > & | corner_a, |
| const Point< FloatType, 2 > & | corner_b, | ||
| const Point< IndexType, 2 > & | n_divisions, | ||
| bool | tria_elements = false ) |
Creates a simple rectangular mesh.
| corner_a | The coordinates of one corner of the rectangle. |
| corner_b | The coordinates of the opposite corner of the rectangle. |
| n_divisions | The number of cell divisions along the x and y axes. |
| tria_elements | If true, divides each rectangular cell into two triangles. |
| template Mesh2D< double, int32_t > vulpes::geometry::mesh2d::rectangle< double, int32_t > | ( | const Point< double, 2 > & | , |
| const Point< double, 2 > & | , | ||
| const Point< int32_t, 2 > & | , | ||
| bool | ) |
| template Mesh2D< double, int64_t > vulpes::geometry::mesh2d::rectangle< double, int64_t > | ( | const Point< double, 2 > & | , |
| const Point< double, 2 > & | , | ||
| const Point< int64_t, 2 > & | , | ||
| bool | ) |
| template Mesh2D< double, uint32_t > vulpes::geometry::mesh2d::rectangle< double, uint32_t > | ( | const Point< double, 2 > & | , |
| const Point< double, 2 > & | , | ||
| const Point< uint32_t, 2 > & | , | ||
| bool | ) |
| template Mesh2D< double, uint64_t > vulpes::geometry::mesh2d::rectangle< double, uint64_t > | ( | const Point< double, 2 > & | , |
| const Point< double, 2 > & | , | ||
| const Point< uint64_t, 2 > & | , | ||
| bool | ) |
| Mesh2D< FloatType, IndexType > vulpes::geometry::mesh2d::rectangle_periodic | ( | const Point< FloatType, 2 > & | corner_a, |
| const Point< FloatType, 2 > & | corner_b, | ||
| const Point< IndexType, 2 > & | n_divisions, | ||
| bool | tria_elements = false, | ||
| bool | x_periodic = true, | ||
| bool | y_periodic = true ) |
Creates a rectangular mesh and directly annotates it as periodic.
This is the periodic counterpart of rectangle. It generates the same Cartesian mesh, adds periodic metadata and vertex Index tags, and returns it with periodic topology already closed.
Added metadata keys:
| corner_a | The coordinates of one corner of the rectangle. |
| corner_b | The coordinates of the opposite corner of the rectangle. |
| n_divisions | The number of cell divisions along the x and y axes, at least 3 along a periodic direction. |
| tria_elements | If true, divides each rectangular cell into two triangles. |
| x_periodic | If true, the left and right sides are identified. |
| y_periodic | If true, the bottom and top sides are identified. |
| std::invalid_argument | if neither direction is periodic. |
| template Mesh2D< double, int32_t > vulpes::geometry::mesh2d::rectangle_periodic< double, int32_t > | ( | const Point< double, 2 > & | , |
| const Point< double, 2 > & | , | ||
| const Point< int32_t, 2 > & | , | ||
| bool | , | ||
| bool | , | ||
| bool | ) |
| template Mesh2D< double, int64_t > vulpes::geometry::mesh2d::rectangle_periodic< double, int64_t > | ( | const Point< double, 2 > & | , |
| const Point< double, 2 > & | , | ||
| const Point< int64_t, 2 > & | , | ||
| bool | , | ||
| bool | , | ||
| bool | ) |
| template Mesh2D< double, uint32_t > vulpes::geometry::mesh2d::rectangle_periodic< double, uint32_t > | ( | const Point< double, 2 > & | , |
| const Point< double, 2 > & | , | ||
| const Point< uint32_t, 2 > & | , | ||
| bool | , | ||
| bool | , | ||
| bool | ) |
| template Mesh2D< double, uint64_t > vulpes::geometry::mesh2d::rectangle_periodic< double, uint64_t > | ( | const Point< double, 2 > & | , |
| const Point< double, 2 > & | , | ||
| const Point< uint64_t, 2 > & | , | ||
| bool | , | ||
| bool | , | ||
| bool | ) |