v0.9.0
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 prisms Returned range of prisms
42  * @param verb Verbosity level
43  * @return Error code
44  */
45  MoFEMErrorCode createPrisms(const Range &ents, Range &prisms, int verb = -1);
46 
47  /**
48  * \brief Seed prism entities by bit level
49  * @param prisms Range of entities
50  * @param bit BitRefLevel
51  * @param verb Verbosity level
52  * @return Error code
53  */
54  MoFEMErrorCode seedPrismsEntities(Range &prisms, const BitRefLevel &bit,
55  int verb = -1);
56 
57  /**
58  * \brief Make prisms by extruding top or bottom prisms
59  * @param prisms Input prisms
60  * @param from_down Use top or down face, if true from f3
61  * @param out_prisms Returned prisms entities
62  * @param verb Verbosity level
63  * @return Error code
64  */
65  MoFEMErrorCode createPrismsFromPrisms(const Range &prisms, bool from_down,
66  Range &out_prisms, int verb = -1);
67 
68  /**
69  * Set uniform thickness
70  * @param prisms Range of prisms
71  * @param director3 Displacement of face 3
72  * @param director4 Displacement of face 4
73  * @return
74  */
75  MoFEMErrorCode setThickness(const Range &prisms, const double director3[],
76  const double director4[]);
77 
78  /**
79  * Set normal thickness
80  * @param prisms Range of prisms
81  * @param thickness normal thickness
82  * @return
83  */
84  MoFEMErrorCode setNormalThickness(const Range &prisms,
85  double thickness3, double thickness4);
86 
87  /**
88  * @brief Add quads to bockset
89  *
90  * If quad is adjacent to extruded edge, is added to given blockset
91  *
92  * @param prisms
93  * @return MoFEMErrorCode
94  */
95  MoFEMErrorCode updateMeshestByEdgeBlock(const Range &prisms);
96 
97  /**
98  * @brief Add prism to bockset
99  *
100  * If quad is adjacent to extruded triangle, is added to given blockset
101  *
102  * @param prisms
103  * @return MoFEMErrorCode
104  */
105  MoFEMErrorCode updateMeshestByTriBlock(const Range &prisms);
106 
107 };
108 
109 } // namespace MoFEM
110 
111 #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
std::bitset< BITINTERFACEUID_SIZE > BitIntefaceId
Definition: Types.hpp:56
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
MoFEMErrorCode createPrisms(const Range &ents, Range &prisms, int verb=-1)
Make prisms from triangles.
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:51
PrismsFromSurfaceInterface(const MoFEM::Core &core)