v0.16.0
Loading...
Searching...
No Matches
PrismsFromSurfaceInterface.hpp
Go to the documentation of this file.
1/** \file PrismsFromSurface.hpp
2 * \brief PrismsFromSurface interface
3 *
4 * Create prisms from surface triangle elements
5 */
6
7#ifndef __PRISMS_FORM_SURFACE_HPP__
8#define __PRISMS_FORM_SURFACE_HPP__
9
10namespace MoFEM {
11
12/** \brief merge node from two bit levels
13 * \ingroup mofem
14 */
16
17 MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
18 UnknownInterface **iface) const;
19
22 : cOre(const_cast<MoFEM::Core &>(core)) {}
23
24 std::map<EntityHandle, EntityHandle> createdVertices;
25
26 /**
27 * \brief List of types of node swapping performed on a created prism
28 * Node swapping is required to satisfy the canonical ordering for the prism
29 * in case the surface normal is pointing inwards rather than outwards
30 * Currently supported options (assuming canonical ordering of nodes 0-5):
31 * NO_SWAP : node swapping is not performed
32 * SWAP_TRI_NODE_ORDER : swap the order of nodes on prism's triangle faces
33 * (1 <-> 2, 4 <-> 5)
34 * SWAP_TOP_AND_BOT_TRI : swap nodes between the top and the bottom triangles
35 * (0 <-> 3, 1 <-> 4, 2 <-> 5)
36 */
42
43 /**
44 * \brief Create a prism from two triangle node triplets
45 * @param tri3_nodes Nodes of prism face 3
46 * @param tri4_nodes Nodes of prism face 4
47 * @param swap_type Optional canonical-ordering swap
48 * @param prism Returned prism entity
49 * @return Error code
50 */
51 MoFEMErrorCode createPrism(const EntityHandle tri3_nodes[3],
52 const EntityHandle tri4_nodes[3],
53 const SwapType swap_type, EntityHandle &prism);
54
55 /**
56 * \brief Make prisms from triangles
57 * @param ents Range of triangles
58 * @param swap_type Defines how the nodes of the created prism are swapped
59 * (required for canonical ordering if the surface normal is pointing inwards)
60 * @param prisms Returned range of prisms
61 * @param verb Verbosity level
62 * @return Error code
63 */
64 MoFEMErrorCode createPrisms(const Range &ents, const SwapType swap_type,
65 Range &prisms, int verb = -1);
66
67 /// \deprecated Use the function with the same name and a parameter
68 /// *swap_type*, permitting to swap the order of each triangle's nodes or
69 /// alternatively swap nodes between top and bottom triangles, which is
70 /// required for the canonical ordering if surface normal is pointing inwards
72 int verb = -1);
73 /**
74 * \brief Seed prism entities by bit level
75 * @param prisms Range of entities
76 * @param bit BitRefLevel
77 * @param verb Verbosity level
78 * @return Error code
79 */
81 int verb = -1);
82
83 /**
84 * \brief Make prisms by extruding top or bottom prisms
85 * @param prisms Input prisms
86 * @param from_down Use top or down face, if true from f3
87 * @param out_prisms Returned prisms entities
88 * @param verb Verbosity level
89 * @return Error code
90 */
91 MoFEMErrorCode createPrismsFromPrisms(const Range &prisms, bool from_down,
92 Range &out_prisms, int verb = -1);
93
94 /**
95 * Set uniform thickness
96 * @param prisms Range of prisms
97 * @param director3 Displacement of face 3
98 * @param director4 Displacement of face 4
99 * @return
100 */
101 MoFEMErrorCode setThickness(const Range &prisms, const double director3[],
102 const double director4[]);
103
104 /**
105 * Set normal thickness
106 * @param prisms Range of prisms
107 * @param thickness normal thickness
108 * @return
109 */
110 MoFEMErrorCode setNormalThickness(const Range &prisms, double thickness3,
111 double thickness4);
112
113 /**
114 * @brief Add quads to bockset
115 *
116 * If quad is adjacent to extruded edge, is added to given blockset
117 *
118 * @param prisms
119 * @return MoFEMErrorCode
120 */
122
123 /**
124 * @brief Add prism to bockset
125 *
126 * If prism is adjacent to extruded triangle, is added to given blockset
127 *
128 * @param prisms
129 * @return MoFEMErrorCode
130 */
132};
133
134} // namespace MoFEM
135
136#endif //__PRISMS_FORM_SURFACE_HPP__
#define DEPRECATED
Definition definitions.h:17
auto bit
set bit
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition Types.hpp:40
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
Core (interface) class.
Definition Core.hpp:83
std::map< EntityHandle, EntityHandle > createdVertices
MoFEMErrorCode createPrism(const EntityHandle tri3_nodes[3], const EntityHandle tri4_nodes[3], const SwapType swap_type, EntityHandle &prism)
Create a prism from two triangle node triplets.
MoFEMErrorCode setNormalThickness(const Range &prisms, double thickness3, double thickness4)
MoFEMErrorCode createPrisms(const Range &ents, const SwapType swap_type, Range &prisms, int verb=-1)
Make prisms from triangles.
MoFEMErrorCode updateMeshestByEdgeBlock(const Range &prisms)
Add quads to bockset.
MoFEMErrorCode setThickness(const Range &prisms, const double director3[], const double director4[])
SwapType
List of types of node swapping performed on a created prism Node swapping is required to satisfy the ...
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
MoFEMErrorCode seedPrismsEntities(Range &prisms, const BitRefLevel &bit, int verb=-1)
Seed prism entities by bit level.
MoFEMErrorCode createPrismsFromPrisms(const Range &prisms, bool from_down, Range &out_prisms, int verb=-1)
Make prisms by extruding top or bottom prisms.
MoFEMErrorCode updateMeshestByTriBlock(const Range &prisms)
Add prism to bockset.
base class for all interface classes