v0.13.1
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 */
37 enum SwapType {
41 };
42
43 /**
44 * \brief Make prisms from triangles
45 * @param ents Range of triangles
46 * @param swap_type Defines how the nodes of the created prism are swapped
47 * (required for canonical ordering if the surface normal is pointing inwards)
48 * @param prisms Returned range of prisms
49 * @param verb Verbosity level
50 * @return Error code
51 */
52 MoFEMErrorCode createPrisms(const Range &ents, const SwapType swap_type,
53 Range &prisms, int verb = -1);
54
55 /// \deprecated Use the function with the same name and a parameter
56 /// *swap_type*, permitting to swap the order of each triangle's nodes or
57 /// alternatively swap nodes between top and bottom triangles, which is
58 /// required for the canonical ordering if surface normal is pointing inwards
60 int verb = -1);
61 /**
62 * \brief Seed prism entities by bit level
63 * @param prisms Range of entities
64 * @param bit BitRefLevel
65 * @param verb Verbosity level
66 * @return Error code
67 */
69 int verb = -1);
70
71 /**
72 * \brief Make prisms by extruding top or bottom prisms
73 * @param prisms Input prisms
74 * @param from_down Use top or down face, if true from f3
75 * @param out_prisms Returned prisms entities
76 * @param verb Verbosity level
77 * @return Error code
78 */
79 MoFEMErrorCode createPrismsFromPrisms(const Range &prisms, bool from_down,
80 Range &out_prisms, int verb = -1);
81
82 /**
83 * Set uniform thickness
84 * @param prisms Range of prisms
85 * @param director3 Displacement of face 3
86 * @param director4 Displacement of face 4
87 * @return
88 */
89 MoFEMErrorCode setThickness(const Range &prisms, const double director3[],
90 const double director4[]);
91
92 /**
93 * Set normal thickness
94 * @param prisms Range of prisms
95 * @param thickness normal thickness
96 * @return
97 */
98 MoFEMErrorCode setNormalThickness(const Range &prisms, double thickness3,
99 double thickness4);
100
101 /**
102 * @brief Add quads to bockset
103 *
104 * If quad is adjacent to extruded edge, is added to given blockset
105 *
106 * @param prisms
107 * @return MoFEMErrorCode
108 */
110
111 /**
112 * @brief Add prism to bockset
113 *
114 * If prism is adjacent to extruded triangle, is added to given blockset
115 *
116 * @param prisms
117 * @return MoFEMErrorCode
118 */
120};
121
122} // namespace MoFEM
123
124#endif //__PRISMS_FORM_SURFACE_HPP__
#define DEPRECATED
Definition: definitions.h:17
auto bit
set bit
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
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:82
std::map< EntityHandle, EntityHandle > createdVertices
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[])
PrismsFromSurfaceInterface(const MoFEM::Core &core)
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