v0.9.0
PrismInterface.hpp
Go to the documentation of this file.
1 /** \file PrismInterface.hpp
2  * \brief MoFEM interface
3  *
4  * Low level data structures not used directly by user
5 
6  * \ingroup mofem_prism_interface
7  */
8 
9 /*
10  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13  * License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
17  */
18 
19 #ifndef __PRISMINTERFACE_HPP__
20 #define __PRISMINTERFACE_HPP__
21 
22 #include "UnknownInterface.hpp"
23 
24 namespace MoFEM {
25 
28 
29 /** \brief Make interface on given faces and create flat prism in that space
30 
31  \todo FIXME Names of methods do not follow naming convention and are difficult
32  to work with.
33 
34  \ingroup mofem_prism_interface
35 
36 */
38 
40  UnknownInterface **iface) const;
41 
43  PrismInterface(const MoFEM::Core &core);
44 
45  /// destructor
47 
48  /** \brief create two children meshsets in the meshset containing tetrahedral
49  * on two sides of faces
50  *
51  * \param msId Id of meshset
52  * \param cubit_bc_type type of meshset (NODESET, SIDESET or BLOCKSET and
53  * more) \param mesh_bit_level add interface on bit level is bit_level =
54  * BitRefLevel.set() then add interface on all bit levels \param recursive if
55  * true parent meshset is searched recursively
56  */
57  MoFEMErrorCode getSides(const int msId, const CubitBCType cubit_bc_type,
58  const BitRefLevel mesh_bit_level,
59  const bool recursive, int verb = QUIET);
60 
61  /** \brief create two children meshsets in the meshset containing tetrahedral
62  * on two sides of faces
63  *
64  * Get tets adj to faces. Take skin form tets and get edges from that skin.
65  * Take skin form triangles (the face). Subtrac skin faces edges form skin
66  * edges in order to get edges on the boundary of the face which is in the
67  * volume of the body, but is not on the boundary.
68  * Each child set has a child containing nodes which can be split and skin
69  * edges. After that simply iterate under all tets on one side which are
70  * adjacent to the face are found. Side tets are stored in to children
71  * meshsets of the SIDESET meshset.
72  */
73  MoFEMErrorCode getSides(const EntityHandle sideset,
74  const BitRefLevel mesh_bit_level,
75  const bool recursive, int verb = QUIET);
76 
77  /**
78  * \brief Find if triangle has three nodes on internal surface skin
79  *
80  * Internal surface skin is a set of edges in the body on the boundary of the
81  * surface. This set of edges is called a surface front. If the surface the
82  * face has three nodes on the surface front, none of the face nodes is split
83  * and should be removed from the surface. Otherwise, such a triangle cannot
84  * be split.
85  *
86  * @param sideset meshset with surface
87  * @param mesh_bit_level bit ref level of the volume mesh
88  * @param recursive search in sub-meshsets
89  * @param faces_with_three_nodes_on_front returned faces
90  * @param verb verbosity level
91  *
92  * @return error code
93  */
95  const EntityHandle sideset, const BitRefLevel mesh_bit_level,
96  const bool recursive, Range &faces_with_three_nodes_on_front,
97  int verb = QUIET);
98 
99  /**
100  * \brief split nodes and other entities of tetrahedral in children sets and
101  *add prism elements
102  *
103  * The all new entities (prisms, tets) are added to refinement level given by
104  *bit \param meshset meshset to get entities from \param BitRefLevel new level
105  *where refinement would be stored \param msId meshset ID imported from cubit
106  * \param cubit_bc_type type of meshset (NODESET, SIDESET or BLOCKSET and
107  *more) \param add_interface_entities meshset which contain the interface
108  * \param recursive if true parent meshset is searched recursively
109  *
110  * Each inteface face has two tags,
111  * const int def_side[] = {0};
112  * rval = moab.tag_get_handle("INTERFACE_SIDE",1,MB_TYPE_INTEGER,
113  * th_interface_side,MB_TAG_CREAT|MB_TAG_SPARSE,def_side);
114  *CHKERRQ_MOAB(rval);
115  *
116  * const EntityHandle def_node[] = {0};
117  * rval = moab.tag_get_handle("SIDE_INTFACE_ELEMENT",1,MB_TYPE_HANDLE,
118  * th_side_elem,MB_TAG_CREAT|MB_TAG_SPARSE,def_node); CHKERRQ_MOAB(rval);
119  *
120  * First tag inform about inteface side, second tag inform about side adjacent
121  * inteface element.
122  *
123  */
124  MoFEMErrorCode splitSides(const EntityHandle meshset, const BitRefLevel &bit,
125  const int msId, const CubitBCType cubit_bc_type,
126  const bool add_interface_entities,
127  const bool recursive = false, int verb = QUIET);
128 
129  /**
130  * \brief split nodes and other entities of tetrahedral in children sets and
131  * add prism elements
132  *
133  * The all new entities (prisms, tets) are added to refinement level given by
134  * bit
135  */
136  MoFEMErrorCode splitSides(const EntityHandle meshset, const BitRefLevel &bit,
137  const EntityHandle,
138  const bool add_interface_entities,
139  const bool recursive = false, int verb = QUIET);
140 
141  /**
142  * \brief split nodes and other entities of tetrahedrons in children sets and
143  * add prism elements
144  *
145  * The all new entities (prisms, tets) are added to refinement level given by
146  * bit
147  *
148  * \param meshset
149  * \param Refinement bit level of new mesh
150  * \param inhered_from_bit_level inhered nodes and other entities form this
151  * bit level.
152  * \param add_interface_entities add prism elements at interface
153  * \param recursive do meshesets in the meshset
154  *
155  * \note inhered_from_bit_level is need to be specified to some meshsets
156  * with interfaces. Some nodes on some refinement levels dividing edges but
157  * not splitting faces. Inheriting those nodes will not split faces.
158  *
159  */
160  MoFEMErrorCode splitSides(const EntityHandle meshset, const BitRefLevel &bit,
161  const BitRefLevel &inhered_from_bit_level,
162  const BitRefLevel &inhered_from_bit_level_mask,
163  const EntityHandle sideset,
164  const bool add_interface_entities,
165  const bool recursive = false, int verb = QUIET);
166 };
167 
168 } // namespace MoFEM
169 
170 /**
171  * \defgroup mofem_prism_interface PrismInterface
172  * \brief Make interface between faces
173  *
174  * Make interface between faces (surface) and put in between prism element if
175  *needed.
176  *
177  * \ingroup mofem
178  */
179 
180 #endif // __PRISMINTERFACE_HPP__
MoFEM interface unique ID.
MoFEMErrorCode query_interface(const MOFEMuuid &uuid, UnknownInterface **iface) const
MoFEMErrorCode findIfTringleHasThreeNodesOnInternalSurfaceSkin(const EntityHandle sideset, const BitRefLevel mesh_bit_level, const bool recursive, Range &faces_with_three_nodes_on_front, int verb=QUIET)
Find if triangle has three nodes on internal surface skin.
base class for all interface classes
MoFEMErrorCode splitSides(const EntityHandle meshset, const BitRefLevel &bit, const int msId, const CubitBCType cubit_bc_type, const bool add_interface_entities, const bool recursive=false, int verb=QUIET)
split nodes and other entities of tetrahedral in children sets and add prism elements
Core (interface) class.
Definition: Core.hpp:50
MoFEM interface.
std::bitset< BITINTERFACEUID_SIZE > BitIntefaceId
Definition: Types.hpp:56
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:21
PrismInterface(const MoFEM::Core &core)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:66
Make interface on given faces and create flat prism in that space.
MoFEMErrorCode getSides(const int msId, const CubitBCType cubit_bc_type, const BitRefLevel mesh_bit_level, const bool recursive, int verb=QUIET)
create two children meshsets in the meshset containing tetrahedral on two sides of faces
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:51
std::bitset< 32 > CubitBCType
Definition: Types.hpp:63
static const MOFEMuuid IDD_MOFEMPrismInterface