QUGaR 0.0.4
Loading...
Searching...
No Matches
impl_reparam_mesh.hpp
Go to the documentation of this file.
1// --------------------------------------------------------------------------
2//
3// Copyright (C) 2025-present by Pablo Antolin
4//
5// This file is part of the QUGaR library.
6//
7// SPDX-License-Identifier: MIT
8//
9// --------------------------------------------------------------------------
10
11#ifndef QUGAR_IMPL_REPARAM_MESH_HPP
12#define QUGAR_IMPL_REPARAM_MESH_HPP
13
20
21#include <qugar/bbox.hpp>
24#include <qugar/point.hpp>
27#include <qugar/tolerance.hpp>
28
29#include <cstddef>
30#include <functional>
31#include <span>
32#include <string>
33#include <vector>
34
35
36namespace qugar::impl {
37
49template<int dim, int range> class ImplReparamMesh : public ReparamMesh<dim, range>
50{
51public:
55 explicit ImplReparamMesh(int order);
56
57
63 void generate_wirebasket(const std::vector<std::reference_wrapper<const ImplicitFunc<range>>> &impl_funcs,
64 const BoundBox<range> &domain,
65 const Tolerance &tol);
66
73 void generate_wirebasket(const std::vector<std::reference_wrapper<const ImplicitFunc<range>>> &impl_funcs,
74 const std::vector<int> &cell_ids,
75 const BoundBox<range> &domain,
76 const Tolerance &tol);
77
78private:
88 void generate_wirebasket(const std::vector<int> &cell_ids,
89 const BoundBox<range> &domain,
90 const Tolerance &tol,
91 const std::function<bool(const Point<range> &)> &check_face,
92 const std::function<bool(const Point<range> &)> &check_internal);
93
94public:
108 template<int dim_aux = dim>
109 requires(dim_aux == dim && range == dim)
111
127 template<int dim_aux = dim>
128 requires(dim_aux == dim && range == dim)
129 void orient_cells_positively(const std::vector<int> &cell_ids);
130
131private:
149 template<int dim_aux = dim>
150 requires(dim_aux == dim && range == (dim + 1))
151 void orient_levelset_cells_positively(const std::vector<int> &cell_ids,
152 const std::function<Point<range>(const Point<range> &)> &outer_normal_computer);
153
154public:
174 template<int dim_aux = dim>
175 requires(dim_aux == dim && range == (dim + 1))
177 const std::vector<std::reference_wrapper<const ImplicitFunc<range>>> &impl_funcs);
178
200 template<int dim_aux = dim>
201 requires(dim_aux == dim && range == (dim + 1))
203 const std::vector<std::reference_wrapper<const ImplicitFunc<range>>> &impl_funcs,
204 const std::vector<int> &cell_ids);
205
213 template<int dim_aux = dim>
214 requires(dim_aux == dim && range == (dim + 1))
215 void orient_facet_cells_positively(int local_facet_id);
216
225 template<int dim_aux = dim>
226 requires(dim_aux == dim && range == (dim + 1))
227 void orient_facet_cells_positively(int local_facet_id, const std::vector<int> &cell_ids);
228};
229
230
231}// namespace qugar::impl
232
233#endif// QUGAR_IMPL_REPARAM_MESH_HPP
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 for tolerance related computations.
Definition tolerance.hpp:33
Domain functions.
Definition domain_function.hpp:41
ImplReparamMesh(int order)
Constructor.
void generate_wirebasket(const std::vector< std::reference_wrapper< const ImplicitFunc< range > > > &impl_funcs, const BoundBox< range > &domain, const Tolerance &tol)
Generates the wirebasket for all the cells of the current reparameterization.
void generate_wirebasket(const std::vector< std::reference_wrapper< const ImplicitFunc< range > > > &impl_funcs, const std::vector< int > &cell_ids, const BoundBox< range > &domain, const Tolerance &tol)
Generates the wirebasket for the given cell_ids of the current reparameterization.
void orient_cells_positively()
Reorients the cells in the mesh to ensure they are oriented positively.
void orient_levelset_cells_positively(const std::vector< std::reference_wrapper< const ImplicitFunc< range > > > &impl_funcs)
Reorients the levelset cells in the mesh to ensure their normal is an outer normal.
void orient_cells_positively(const std::vector< int > &cell_ids)
Reorients the cells in the mesh to ensure they are oriented positively.
void generate_wirebasket(const std::vector< int > &cell_ids, const BoundBox< range > &domain, const Tolerance &tol, const std::function< bool(const Point< range > &)> &check_face, const std::function< bool(const Point< range > &)> &check_internal)
Generates the wirebasket for the current reparameterization.
void orient_facet_cells_positively(int local_facet_id)
Orients the cells reparameterization a domain facet positively.
void orient_levelset_cells_positively(const std::vector< std::reference_wrapper< const ImplicitFunc< range > > > &impl_funcs, const std::vector< int > &cell_ids)
Reorients the levelset cells in the mesh to ensure their normal is an outer normal.
void orient_levelset_cells_positively(const std::vector< int > &cell_ids, const std::function< Point< range >(const Point< range > &)> &outer_normal_computer)
Reorients the levelset cells in the mesh to ensure their normal is an outer normal.
void orient_facet_cells_positively(int local_facet_id, const std::vector< int > &cell_ids)
Orients the cells reparameterization a domain facet positively.
Declaration of a few implicit functions template class ready to be consumed by Algoim.
Definition affine_transf.hpp:28
Vector< T, dim > Point
Class representing a dim-dimensional Point.
Definition point.hpp:34
Definition and implementation of Point class.
Declaration of reparameterization class.
Declaration of tensor-product index and size related classes.
Definition of tolerance related functionalities.