TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Refine_Mesh.h
1/****************************************************************************
2* Copyright (c) 2024, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef Refine_Mesh_included
17#define Refine_Mesh_included
18
19#include <Interprete_geometrique_base.h>
20#include <TRUSTTabs.h>
21#include <Static_Int_Lists.h>
22
23/*! @brief : class Refine_Mesh
24 *
25 */
26class Refine_Mesh : public Interprete_geometrique_base
27{
28
29 Declare_instanciable(Refine_Mesh) ;
30
31public :
32 Entree& interpreter_(Entree& is) override;
33
34protected :
35 void apply();
36
37 void check_dimension() const;
38 void check_cell_type() const;
39
40 void apply_2D();
41 void apply_3D();
42
43 void build_edges_2D(IntTab& nodes_of_edges, IntTab& edges_of_cells) const;
44 void build_edges_3D(IntTab& nodes_of_edges, IntTab& edges_of_cells) const;
45
46 void build_edges(IntTab& nodes_of_edges,
47 IntTab& edges_of_cells,
48 int nb_edges_per_cell,
49 int nb_nodes_per_edge,
50 const IntTab& local_nodes_of_edges) const;
51
52 void build_new_nodes(DoubleTab& new_nodes, const IntTab& nodes_of_edges) const;
53
54 void build_new_cells_2D(IntTab& new_cells, const IntTab& edges_of_cells) const;
55 void build_new_cells_3D(IntTab& new_cells, const IntTab& edges_of_cells) const;
56
57 void build_new_sub_domaines_descriptions(Noms& new_sub_domaines_descriptions) const;
58
59 void build_incidence_from_node_to_edges(int nb_nodes,
60 const IntTab& nodes_of_edges,
61 Static_Int_Lists& incidence) const;
62
63 void build_new_boundary_faces_2D(IntTabs& new_nodes_of_boundary_faces,
64 IntTabs& new_cells_of_boundary_faces,
65 const Static_Int_Lists& incidence_from_node_to_edges) const;
66
67 void build_new_boundary_faces_3D(IntTabs& new_nodes_of_boundary_faces,
68 IntTabs& new_cells_of_boundary_faces,
69 const Static_Int_Lists& incidence_from_node_to_edges) const;
70
71 void build_new_connector_faces_2D(IntTabs& new_nodes_of_connector_faces,
72 IntTabs& new_cells_of_connector_faces,
73 const Static_Int_Lists& incidence_from_node_to_edges) const;
74
75 void build_new_connector_faces_3D(IntTabs& new_nodes_of_connector_faces,
76 IntTabs& new_cells_of_connector_faces,
77 const Static_Int_Lists& incidence_from_node_to_edges) const;
78
79 void build_new_internal_frontier_faces_2D(IntTabs& new_nodes_of_internal_frontier_faces,
80 IntTabs& new_cells_of_internal_frontier_faces,
81 const Static_Int_Lists& incidence_from_node_to_edges) const;
82
83 void build_new_internal_frontier_faces_3D(IntTabs& new_nodes_of_internal_frontier_faces,
84 IntTabs& new_cells_of_internal_frontier_faces,
85 const Static_Int_Lists& incidence_from_node_to_edges) const;
86
87 void build_new_frontier_faces_2D(IntTab& new_nodes_of_frontier_faces,
88 IntTab& new_cells_of_frontier_faces,
89 const Static_Int_Lists& incidence_from_node_to_edges,
90 const Faces& old_frontier_faces) const;
91
92 void build_new_frontier_faces_3D(IntTab& new_nodes_of_frontier_faces,
93 IntTab& new_cells_of_frontier_faces,
94 const Static_Int_Lists& incidence_from_node_to_edges,
95 const Faces& old_frontier_faces) const;
96
97 int find_edge(const Static_Int_Lists& incidence_from_node_to_edges, int node0, int node1) const;
98
99 void update_domain(const Nom& cell_type,
100 const Type_Face& face_type,
101 const DoubleTab& new_nodes,
102 const IntTab& new_cells,
103 const Noms& new_sub_domaines_descriptions,
104 const IntTabs& new_nodes_of_boundary_faces,
105 const IntTabs& new_cells_of_boundary_faces,
106 const IntTabs& new_nodes_of_connector_faces,
107 const IntTabs& new_cells_of_connector_faces,
108 const IntTabs& new_nodes_of_internal_frontier_faces,
109 const IntTabs& new_cells_of_internal_frontier_faces);
110
111 void update_nodes(const DoubleTab& new_nodes);
112
113 void update_cells(const IntTab& new_cells);
114
115 void update_octree(const Nom& cell_type);
116
117 void update_sub_domaines(const Noms& new_sub_domaines_descriptions);
118
119 void update_boundary_faces(const Type_Face& face_type,
120 const IntTabs& new_nodes_of_boundary_faces,
121 const IntTabs& new_cells_of_boundary_faces);
122
123 void update_connector_faces(const Type_Face& face_type,
124 const IntTabs& new_nodes_of_connector_faces,
125 const IntTabs& new_cells_of_connector_faces);
126
127 void update_internal_frontier_faces(const Type_Face& face_type,
128 const IntTabs& new_nodes_of_internal_frontier_faces,
129 const IntTabs& new_cells_of_internal_frontier_faces);
130
131};
132
133#endif /* Refine_Mesh_included */
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
friend class Entree
Definition Objet_U.h:76
: class Refine_Mesh
Definition Refine_Mesh.h:27
void update_cells(const IntTab &new_cells)
void check_cell_type() const
void build_new_internal_frontier_faces_2D(IntTabs &new_nodes_of_internal_frontier_faces, IntTabs &new_cells_of_internal_frontier_faces, const Static_Int_Lists &incidence_from_node_to_edges) const
Entree & interpreter_(Entree &is) override
void build_new_connector_faces_3D(IntTabs &new_nodes_of_connector_faces, IntTabs &new_cells_of_connector_faces, const Static_Int_Lists &incidence_from_node_to_edges) const
void update_internal_frontier_faces(const Type_Face &face_type, const IntTabs &new_nodes_of_internal_frontier_faces, const IntTabs &new_cells_of_internal_frontier_faces)
void build_incidence_from_node_to_edges(int nb_nodes, const IntTab &nodes_of_edges, Static_Int_Lists &incidence) const
void update_octree(const Nom &cell_type)
void update_domain(const Nom &cell_type, const Type_Face &face_type, const DoubleTab &new_nodes, const IntTab &new_cells, const Noms &new_sub_domaines_descriptions, const IntTabs &new_nodes_of_boundary_faces, const IntTabs &new_cells_of_boundary_faces, const IntTabs &new_nodes_of_connector_faces, const IntTabs &new_cells_of_connector_faces, const IntTabs &new_nodes_of_internal_frontier_faces, const IntTabs &new_cells_of_internal_frontier_faces)
void build_new_boundary_faces_3D(IntTabs &new_nodes_of_boundary_faces, IntTabs &new_cells_of_boundary_faces, const Static_Int_Lists &incidence_from_node_to_edges) const
void update_sub_domaines(const Noms &new_sub_domaines_descriptions)
void build_new_internal_frontier_faces_3D(IntTabs &new_nodes_of_internal_frontier_faces, IntTabs &new_cells_of_internal_frontier_faces, const Static_Int_Lists &incidence_from_node_to_edges) const
void build_new_cells_2D(IntTab &new_cells, const IntTab &edges_of_cells) const
void update_nodes(const DoubleTab &new_nodes)
void build_edges_3D(IntTab &nodes_of_edges, IntTab &edges_of_cells) const
void check_dimension() const
void build_new_connector_faces_2D(IntTabs &new_nodes_of_connector_faces, IntTabs &new_cells_of_connector_faces, const Static_Int_Lists &incidence_from_node_to_edges) const
void build_new_cells_3D(IntTab &new_cells, const IntTab &edges_of_cells) const
int find_edge(const Static_Int_Lists &incidence_from_node_to_edges, int node0, int node1) const
void update_boundary_faces(const Type_Face &face_type, const IntTabs &new_nodes_of_boundary_faces, const IntTabs &new_cells_of_boundary_faces)
void update_connector_faces(const Type_Face &face_type, const IntTabs &new_nodes_of_connector_faces, const IntTabs &new_cells_of_connector_faces)
void build_new_nodes(DoubleTab &new_nodes, const IntTab &nodes_of_edges) const
void build_edges_2D(IntTab &nodes_of_edges, IntTab &edges_of_cells) const
void build_new_frontier_faces_3D(IntTab &new_nodes_of_frontier_faces, IntTab &new_cells_of_frontier_faces, const Static_Int_Lists &incidence_from_node_to_edges, const Faces &old_frontier_faces) const
void build_new_sub_domaines_descriptions(Noms &new_sub_domaines_descriptions) const
void build_new_frontier_faces_2D(IntTab &new_nodes_of_frontier_faces, IntTab &new_cells_of_frontier_faces, const Static_Int_Lists &incidence_from_node_to_edges, const Faces &old_frontier_faces) const
void build_new_boundary_faces_2D(IntTabs &new_nodes_of_boundary_faces, IntTabs &new_cells_of_boundary_faces, const Static_Int_Lists &incidence_from_node_to_edges) const
void apply_2D()
void build_edges(IntTab &nodes_of_edges, IntTab &edges_of_cells, int nb_edges_per_cell, int nb_nodes_per_edge, const IntTab &local_nodes_of_edges) const