11#ifndef QUGAR_REPARAM_MESH_HPP
12#define QUGAR_REPARAM_MESH_HPP
90 template<
int aux_dim = dim>
91 requires(aux_dim == dim && dim == range)
102 template<
int aux_dim = dim>
103 requires(aux_dim == dim && dim == range)
163 [[nodiscard]]
const std::vector<Point<range>> &
get_points()
const;
251 template<
int sub_dim>
270 template<
int aux_dim = dim>
271 requires(aux_dim == dim && 1 < dim)
272 [[nodiscard]] std::vector<std::size_t>
get_edge_points(
int cell_id,
int edge_id)
const;
288template<
int dim,
bool levelset>
289std::shared_ptr<
const ReparamMesh<levelset ? dim - 1 : dim, dim>>
292template<
int dim,
bool levelset>
293std::shared_ptr<
const ReparamMesh<levelset ? dim - 1 : dim, dim>>
Definition of Cartesian bounding box class.
Definition of Cartesian grid class.
Class representing a dim-dimensional Cartesian product bounding box.
Definition bbox.hpp:38
Class representing a dim-dimensional Cartesian tensor-product grid.
Definition cart_grid_tp.hpp:40
Class for storing an implicit domain reparameterization using Lagrange cells.
Definition reparam_mesh.hpp:48
void permute_cell_directions(std::size_t cell_id)
Permutes the directions of the given cell.
void add_full_cell(const BoundBox< dim > &domain, bool wirebasket)
Adds a full cell to the mesh corresponding to the given domain.
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.
std::size_t get_num_points_per_cell() const
Retrieves the number of points per cell, that depends on the reparameterization order.
std::size_t get_num_cells() const
Retrieves the number of reparameterization cells.
const std::vector< Point< range > > & get_points() const
Retrieves the points the reparameterization points.
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.
void purge_duplicate_wirebasket_edges()
std::vector< std::size_t > wires_connectivity_
Cells wires' connectivity.
Definition reparam_mesh.hpp:71
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).
static bool use_Chebyshev(int order)
Determines whether the Chebyshev nodes are used, or equally spaced nodes.
virtual ~ReparamMesh()=default
Default virtual destructor.
std::vector< std::size_t > connectivity_
Cells' connectivity.
Definition reparam_mesh.hpp:69
std::size_t get_num_points() const
Retrieves the number of points.
void reserve_cells(std::size_t n_new_cells)
Reserves memory for a specified number of cells.
void sort_edge_points(std::span< std::size_t > edge_points_ids) const
Sorts the given edge points by their IDs.
void merge(const ReparamMesh< dim, range > &mesh)
Merges the given mesh into the current mesh.
void merge_coincident_points(const Tolerance &tol)
Merges coincident points in the reparameterization up to tolerance.
bool use_Chebyshev() const
Determines whether the Chebyshev nodes are used, or equally spaced nodes.
int order_
Reparameterization order (number of points per direction).
Definition reparam_mesh.hpp:65
int allocate_cells(std::size_t n_new_cells)
Allocates memory for a specified number of cells.
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 write_VTK_file(const std::string &filename) const
Writes the reparameterization data to a VTK file.
void scale_points(const BoundBox< range > &old_domain, const BoundBox< range > &new_domain)
Scales points from an old domain to a new domain.
int get_order() const
Retrieves the reparameterization's order.
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.
const std::vector< std::size_t > & get_connectivity() const
Retrieves the reparameterization connectivity.
ReparamMesh(int order)
Constructor.
static const int chebyshev_order
Definition reparam_mesh.hpp:53
std::vector< Point< range > > points_
Vector of points.
Definition reparam_mesh.hpp:67
const std::vector< std::size_t > & get_wires_connectivity() const
Retrieves the wirebasket reparameterization connectivity.
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 sort_wirebasket_edges()
Class for tolerance related computations.
Definition tolerance.hpp:33
Definition unfitted_domain.hpp:49
QUGaR's main namespace.
Definition affine_transf.hpp:28
std::shared_ptr< const ReparamMesh< levelset ? dim - 1 :dim, dim > > create_reparameterization(const UnfittedDomain< dim > &unf_domain, int n_pts_dir)
Vector< T, dim > Point
Class representing a dim-dimensional Point.
Definition point.hpp:34
Definition and implementation of Point class.
Definition of tolerance related functionalities.
Declaration of of UnfittedDomain class.