v0.13.1
FaceElementForcesAndSourcesCoreOnSide.hpp
Go to the documentation of this file.
1/** \file FaceElementForcesAndSourcesCoreOnSide.hpp
2 \brief Implementation of face element.
3
4*/
5
6
7
8#ifndef __FACEELEMENTFORCESANDSOURCESCORE_ONSIDE__HPP__
9#define __FACEELEMENTFORCESANDSOURCESCORE_ONSIDE__HPP__
10
11using namespace boost::numeric;
12
13namespace MoFEM {
14
15/**
16 * \brief Base face element used to integrate on skeleton
17 * \ingroup mofem_forces_and_sources_volume_element
18 */
21
24
25 int getRule(int order);
26
27 /**
28 * @brief Get the face nodes mapped on volume element
29 *
30 * \todo That this is not general, e.g., for quad number of nodes is 4.
31 *
32 * @return const std::array<int, 3>&
33 */
34 inline const std::array<int, 2> &getEdgeConnMap() const;
35
36 /**
37 * @brief Get face nodes maped on volume
38 *
39 * @return const sdt::array<int, 4>&
40 */
41 inline const std::array<int, 4> &getFaceConnMap() const;
42
43 /**
44 * @brief Get node on volume opposite to skeleton element
45 *
46 * @return int
47 */
48 inline int getOppositeNode() const;
49
50 /**
51 * @brief Sense face on volume
52 * @deprecated use getSkeletonSense()
53 *
54 * @return int
55 */
56 DEPRECATED inline int getEdgeSense() const;
57
58 /* @brief Get the skeleton sense
59 *
60 * calls getFaceSense()
61 *
62 * @return int
63 */
64 inline int getSkeletonSense() const;
65
66 /**
67 * @brief Face number on the volume
68 *
69 * @return int
70 */
71 inline int getEdgeSideNumber() const;
72
73 /** \brief default operator for Face element
74 * \ingroup mofem_forces_and_sources_volume_element
75 */
76 struct UserDataOperator;
77
78protected:
80
81private:
82 int edgeSense; ///< Sense of edge, could be 1 or -1
83 int edgeSideNumber; ///< Edge side number
84 std::array<int, 2> edgeConnMap;
85 std::array<int, 4> faceConnMap;
87};
88
89/** \brief default operator for Face element
90 * \ingroup mofem_forces_and_sources_volume_element
91 */
94
96
97 /** \brief return pointer to Generic Volume Finite Element object
98 */
100
101 /**
102 * @brief Get the edge side finite element
103 *
104 * @return EdgeElementForcesAndSourcesCore*
105 */
107
108 /**
109 * @brief get face sense in respect to volume
110 * @deprecated use getSkeletonSense()
111 * @return edge sense
112 */
113 DEPRECATED inline int getEdgeSense() const;
114
115 /* @brief Get the skeleton sense
116 *
117 * calls getEdgeSense()
118 *
119 * @return int
120 */
121 inline int getSkeletonSense() const;
122
123 /**
124 * \brief get face side number in respect to volume
125 * @return edge side number
126 */
127 inline int getEdgeSideNumber() const;
128
129 /**
130 * get face normal on side which is this element
131 * @return face normal
132 */
133 inline VectorDouble &getDirection();
134
135 /** \brief get normal as tensor
136 */
137 inline auto getFTensor1Direction();
138
139 /** \brief get face coordinates at Gauss pts.
140
141 \note Coordinates should be the same what function getCoordsAtGaussPts
142 on face is returning. If both coordinates are different it is error, or you
143 do something very unusual.
144
145 */
147
148protected:
150};
151
152const std::array<int, 2> &
154 return edgeConnMap;
155}
156
157const std::array<int, 4> &
159 return faceConnMap;
160}
161
163 return oppositeNode;
164}
165
167 return getSkeletonSense();
168}
169
171 return edgeSense;
172}
173
175 return edgeSideNumber;
176}
177
180 return static_cast<FaceElementForcesAndSourcesCoreOnSide *>(ptrFE);
181}
182
185 return static_cast<EdgeElementForcesAndSourcesCore *>(ptrFE->sidePtrFE);
186}
187
189 const {
190 return getSkeletonSense();
191}
192
194 const {
195 return getFaceFE()->edgeSense;
196}
197
199 getEdgeSideNumber() const {
200 return getFaceFE()->edgeSideNumber;
201}
202
205 return getEdgeFE()->dIrection;
206}
207
210 double *ptr = &*getDirection().data().begin();
211 return FTensor::Tensor1<double *, 3>(ptr, &ptr[1], &ptr[2]);
212}
213
216 return getEdgeFE()->coordsAtGaussPts;
217}
218
219/**
220 * @deprecated do not use needed for back compatibility
221 */
222template <int SWITCH>
229};
230
231} // namespace MoFEM
232
233#endif //__FACEELEMENTFORCESANDSOURCESCORE_ONSIDE___HPP__
#define DEPRECATED
Definition: definitions.h:17
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
implementation of Data Operators for Forces and Sources
Definition: MoFEM.hpp:24
DEPRECATED int getEdgeSense() const
get face sense in respect to volume
EdgeElementForcesAndSourcesCore * getEdgeFE() const
Get the edge side finite element.
const FaceElementForcesAndSourcesCoreOnSide * getFaceFE() const
return pointer to Generic Volume Finite Element object
Base face element used to integrate on skeleton.
int getOppositeNode() const
Get node on volume opposite to skeleton element.
const std::array< int, 4 > & getFaceConnMap() const
Get face nodes maped on volume.
const std::array< int, 2 > & getEdgeConnMap() const
Get the face nodes mapped on volume element.
UserDataOperator(const FieldSpace space, const char type=OPSPACE, const bool symm=true)
structure to get information form mofem into EntitiesFieldData