v0.9.1
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 /* MoFEM is distributed in the hope that it will be useful, but WITHOUT
8  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10  * License for more details.
11  *
12  * You should have received a copy of the GNU Lesser General Public
13  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
14  */
15 
16 #ifndef __PRISMS_FORM_SURFACE_HPP__
17 #define __PRISMS_FORM_SURFACE_HPP__
18 
19 namespace MoFEM {
20 
23 
24 /** \brief merge node from two bit levels
25  * \ingroup mofem
26  */
28 
30  UnknownInterface **iface) const;
31 
34  : cOre(const_cast<MoFEM::Core &>(core)) {}
35 
36  std::map<EntityHandle, EntityHandle> createdVertices;
37 
38  /**
39  * \brief Make prisms from triangles
40  * @param ents Range of triangles
41  * @param swap_nodes If set true prism's nodes are swapped to satisfy the
42  * canonical ordering (required if surface normal is pointing inwards)
43  * @param prisms Returned range of prisms
44  * @param verb Verbosity level
45  * @return Error code
46  */
47  MoFEMErrorCode createPrisms(const Range &ents, const bool swap_nodes,
48  Range &prisms, int verb = -1);
49 
50  /// \deprecated Use the function with the same name and a bool parameter
51  /// *swap_nodes*, if set true prism's nodes are swapped to satisfy the
52  /// canonical ordering (required if surface normal is pointing inwards)
53  DEPRECATED MoFEMErrorCode createPrisms(const Range &ents, Range &prisms,
54  int verb = -1);
55  /**
56  * \brief Seed prism entities by bit level
57  * @param prisms Range of entities
58  * @param bit BitRefLevel
59  * @param verb Verbosity level
60  * @return Error code
61  */
62  MoFEMErrorCode seedPrismsEntities(Range &prisms, const BitRefLevel &bit,
63  int verb = -1);
64 
65  /**
66  * \brief Make prisms by extruding top or bottom prisms
67  * @param prisms Input prisms
68  * @param from_down Use top or down face, if true from f3
69  * @param out_prisms Returned prisms entities
70  * @param verb Verbosity level
71  * @return Error code
72  */
73  MoFEMErrorCode createPrismsFromPrisms(const Range &prisms, bool from_down,
74  Range &out_prisms, int verb = -1);
75 
76  /**
77  * Set uniform thickness
78  * @param prisms Range of prisms
79  * @param director3 Displacement of face 3
80  * @param director4 Displacement of face 4
81  * @return
82  */
83  MoFEMErrorCode setThickness(const Range &prisms, const double director3[],
84  const double director4[]);
85 
86  /**
87  * Set normal thickness
88  * @param prisms Range of prisms
89  * @param thickness normal thickness
90  * @return
91  */
92  MoFEMErrorCode setNormalThickness(const Range &prisms, double thickness3,
93  double thickness4);
94 
95  /**
96  * @brief Add quads to bockset
97  *
98  * If quad is adjacent to extruded edge, is added to given blockset
99  *
100  * @param prisms
101  * @return MoFEMErrorCode
102  */
103  MoFEMErrorCode updateMeshestByEdgeBlock(const Range &prisms);
104 
105  /**
106  * @brief Add prism to bockset
107  *
108  * If quad is adjacent to extruded triangle, is added to given blockset
109  *
110  * @param prisms
111  * @return MoFEMErrorCode
112  */
113  MoFEMErrorCode updateMeshestByTriBlock(const Range &prisms);
114 };
115 
116 } // namespace MoFEM
117 
118 #endif //__PRISMS_FORM_SURFACE_HPP__
MoFEM interface unique ID.
MoFEMErrorCode setThickness(const Range &prisms, const double director3[], const double director4[])
MoFEMErrorCode seedPrismsEntities(Range &prisms, const BitRefLevel &bit, int verb=-1)
Seed prism entities by bit level.
base class for all interface classes
MoFEMErrorCode updateMeshestByTriBlock(const Range &prisms)
Add prism to bockset.
static const MOFEMuuid IDD_MOFEMPrismsFromSurface
Core (interface) class.
Definition: Core.hpp:50
MoFEMErrorCode createPrisms(const Range &ents, const bool swap_nodes, Range &prisms, int verb=-1)
Make prisms from triangles.
std::bitset< BITINTERFACEUID_SIZE > BitIntefaceId
Definition: Types.hpp:55
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:21
MoFEMErrorCode setNormalThickness(const Range &prisms, double thickness3, double thickness4)
MoFEMErrorCode updateMeshestByEdgeBlock(const Range &prisms)
Add quads to bockset.
MoFEMErrorCode query_interface(const MOFEMuuid &uuid, UnknownInterface **iface) const
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:66
std::map< EntityHandle, EntityHandle > createdVertices
MoFEMErrorCode createPrismsFromPrisms(const Range &prisms, bool from_down, Range &out_prisms, int verb=-1)
Make prisms by extruding top or bottom prisms.
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:50
#define DEPRECATED
Definition: definitions.h:29
PrismsFromSurfaceInterface(const MoFEM::Core &core)