Class for storing an implicit domain reparameterization using Lagrange cells.
More...
|
| ReparamMesh (int order) |
| Constructor.
|
|
virtual | ~ReparamMesh ()=default |
| Default virtual destructor.
|
|
void | merge (const ReparamMesh< dim, range > &mesh) |
| Merges the given mesh into the current mesh.
|
|
template<int aux_dim = dim>
requires (aux_dim == dim && dim == range) |
void | add_full_cell (const BoundBox< dim > &domain, bool wirebasket) |
| Adds a full cell to the mesh corresponding to the given domain.
|
|
template<int aux_dim = dim>
requires (aux_dim == dim && dim == range) |
void | add_full_cells (const CartGridTP< dim > &grid, const std::vector< int > &cell_ids, bool wirebasket) |
| Adds full cells to the mesh corresponding to the grid.
|
|
bool | use_Chebyshev () const |
| Determines whether the Chebyshev nodes are used, or equally spaced nodes.
|
|
void | insert_cell_point (const Point< range > &point, int cell_id, int pt_id) |
| This method sets the given point point , with index pt_id , to the cell designed by cell_id .
|
|
void | merge_coincident_points (const Tolerance &tol) |
| Merges coincident points in the reparameterization up to tolerance.
|
|
void | scale_points (const std::vector< int > &point_ids, const BoundBox< range > &old_domain, const BoundBox< range > &new_domain) |
| Scales points from an old domain to a new domain.
|
|
void | scale_points (const BoundBox< range > &old_domain, const BoundBox< range > &new_domain) |
| Scales points from an old domain to a new domain.
|
|
const std::vector< Point< range > > & | get_points () const |
| Retrieves the points the reparameterization points.
|
|
const std::vector< std::size_t > & | get_connectivity () const |
| Retrieves the reparameterization connectivity.
|
|
const std::vector< std::size_t > & | get_wires_connectivity () const |
| Retrieves the wirebasket reparameterization connectivity.
|
|
int | get_order () const |
| Retrieves the reparameterization's order.
|
|
std::size_t | get_num_cells () const |
| Retrieves the number of reparameterization cells.
|
|
std::size_t | get_num_points () const |
| Retrieves the number of points.
|
|
std::size_t | get_num_points_per_cell () const |
| Retrieves the number of points per cell, that depends on the reparameterization order.
|
|
void | write_VTK_file (const std::string &filename) const |
| Writes the reparameterization data to a VTK file.
|
|
void | permute_cell_directions (std::size_t cell_id) |
| Permutes the directions of the given cell.
|
|
void | reserve_cells (std::size_t n_new_cells) |
| Reserves memory for a specified number of cells.
|
|
int | allocate_cells (std::size_t n_new_cells) |
| Allocates memory for a specified number of cells.
|
|
|
template<int sub_dim> |
bool | check_edge_in_subdomain (const std::vector< std::size_t > &edge_points_ids, const BoundBox< range > &domain, const Tolerance &tol) const |
| Checks if a reparameterization cell's edge belongs to a subentity of a domain .
|
|
bool | check_subentity_degenerate (const std::vector< std::size_t > &points_ids, const Tolerance &tol) const |
| Checks if a reparameterization cell's sub-entity is degenerate (it has zero length).
|
|
template<int aux_dim = dim>
requires (aux_dim == dim && 1 < dim) |
std::vector< std::size_t > | get_edge_points (int cell_id, int edge_id) const |
| Gets the ids of the points of an edge of a reparameterization cell.
|
|
void | sort_edge_points (std::span< std::size_t > edge_points_ids) const |
| Sorts the given edge points by their IDs.
|
|
void | sort_wirebasket_edges () |
|
void | purge_duplicate_wirebasket_edges () |
|
template<int dim, int range>
class qugar::ReparamMesh< dim, range >
Class for storing an implicit domain reparameterization using Lagrange cells.
This reparameterization is non-conforming (it may contain hanging nodes), but is intended to be used for visualization purposes.
It stores the cells as a list of point and the connectivity. It also stores the connectivity for the wirebasket of the reparameterization.
- Template Parameters
-
dim | Parametric dimension of the reparameterization. |
range | Range (or physical dimension) of the reparameterization. |
template<int dim, int range>
Allocates memory for a specified number of cells.
For the points, it just reserves memory for the new points. Thus, new points should be pushed back.
However, for the cells connectivity, it resizes the array, ready to insert new indices at the corresponding positions.
- Parameters
-
n_new_cells | The number of cells to allocate memory for. |
- Returns
- Id of the first allocated cell.
template<int dim, int range>
Merges the given mesh into the current mesh.
This function takes another mesh as input and merges it with the current mesh. The points, connectivity, and wires connectivity are appended, shifting the indices by the number of points in the current mesh.
- Note
- Coincident points are not merged and duplicated wires are not purged.
- Warning
- Both meshes must have the same order.
- Parameters
-
mesh | The mesh to be merged with the current mesh. |
template<int dim, int range>
Permutes the directions of the given cell.
If dimension is greater or equal than 2, the first two direction are permuted. Otherwise, if the dimension is 1, the first direction is reversed.
- Parameters
-
cell_id | The identifier of the cell whose directions are to be permuted. |
template<int dim, int range>
void qugar::ReparamMesh< dim, range >::write_VTK_file |
( |
const std::string & | filename | ) |
const |
Writes the reparameterization data to a VTK file.
This function takes a reparameterization object and writes its data to a file in VTK format, which can be used for visualization in tools like ParaView.
If the repameterization contains a wirebasket mesh, the generated VTK files is composed of three files: a file with extension .vtmb that calls two .vtu files (one for the internal reparameterization), and one for the wirebasket.
If no wirebasket mesh is present, the generated VTK file is a single .vtu file for the internal reparameterization.
The reparameterizations of both the internal and wirebasket meshes is written as high-order Lagrange VTK cells.
- Parameters
-
filename | The name of the file to which the data will be written, without extension. |