v0.14.0
VolumeElementForcesAndSourcesCoreOnContactPrismSide.hpp
Go to the documentation of this file.
1 /** \file VolumeElementForcesAndSourcesCoreOnContactPrismSide.hpp
2  \brief Volume element.
3 
4  Those element are inherited by user to implement specific implementation of
5  particular problem.
6 
7 */
8 
9 
10 
11 #ifndef __VOLUMEELEMENTFORCESANDSOURCESCORE_ONVOLUMESIDE_HPP__
12 #define __VOLUMEELEMENTFORCESANDSOURCESCORE_ONVOLUMESIDE_HPP__
13 
14 using namespace boost::numeric;
15 
16 namespace MoFEM {
17 
18 /**
19  * \brief Base volume element used to integrate on contact surface (could be
20  * extended to other volume elements) \ingroup
21  * mofem_forces_and_sources_volume_element
22  */
25 
26  using VolumeElementForcesAndSourcesCore::VolumeElementForcesAndSourcesCore;
27 
28  /**
29  * @brief Get the face nodes mapped on volume element
30  *
31  * \todo That this is not general, e.g., for quad number of nodes is 4.
32  *
33  * @return const std::array<int, 4>&
34  */
35  inline const std::array<int, 4> &getFaceConnMap() const;
36 
37  /**
38  * @brief Get face nodes maped on volume
39  *
40  * \todo That this is not general, e.g., for prism or hex, size of fixed array
41  * is wrong.
42  *
43  * @return const sdt::array<int, 4>&
44  */
45  inline const std::array<int, 8> &getTetConnMap() const;
46 
47  /**
48  * @brief Get node on volume opposite to volume element
49  *
50  * \todo That this is not general, e.g., for prism or hex, opposite node is
51  * not unique.
52  *
53  * @return int
54  */
55  inline int getOppositeNode() const;
56 
57  /**
58  * @brief Sense face on volume
59  *
60  * @return int
61  */
62  inline int getFaceSense() const;
63 
64  /**
65  * @brief Face number on the volume
66  *
67  * @return int
68  */
69  inline int getFaceSideNumber() const;
70 
71  /** \brief default operator for TET element
72  * \ingroup mofem_forces_and_sources_volume_element
73  */
76 
78 
80  getVolumeFE() const;
81 
82  inline ContactPrismElementForcesAndSourcesCore *getContactFE() const;
83 
84  /** \brief get face coordinates at Gauss pts.
85 
86  \note Coordinates should be the same what function getMasterCoordsAtGaussPts
87  on tets is returning. If both coordinates are different it is error, or you
88  do something very unusual.
89 
90  */
91  inline MatrixDouble &getMasterCoordsAtGaussPts();
92 
93  /** \brief get face coordinates at Gauss pts.
94 
95  \note Coordinates should be the same what function getSlaveCoordsAtGaussPts
96  on tets is returning. If both coordinates are different it is error, or you
97  do something very unusual.
98 
99  */
100  inline MatrixDouble &getSlaveCoordsAtGaussPts();
101 
102  /**
103  * \brief get face sense in respect to volume
104  * @return error code
105  */
106  inline int getFaceSense() const;
107 
108  /**
109  * \brief get face side number in respect to volume
110  * @return error code
111  */
112  inline int getFaceSideNumber() const;
113  };
114 
115  int getRule(int order);
116  MoFEMErrorCode setGaussPts(int order);
117 
118 private:
119  int faceSense; ///< Sense of face, could be 1 or -1
120  int faceSideNumber; ///< Face side number
121  std::array<int, 4> faceConnMap;
122  std::array<int, 8> tetConnMap;
124 };
125 
126 const std::array<int, 4> &
127 VolumeElementForcesAndSourcesCoreOnContactPrismSide::getFaceConnMap() const {
128  return faceConnMap;
129 }
130 
131 const std::array<int, 8> &
132 VolumeElementForcesAndSourcesCoreOnContactPrismSide::getTetConnMap() const {
133  return tetConnMap;
134 }
135 
136 int VolumeElementForcesAndSourcesCoreOnContactPrismSide::getOppositeNode() const {
137  return oppositeNode;
138 }
139 
140 int VolumeElementForcesAndSourcesCoreOnContactPrismSide::getFaceSense() const {
141  return faceSense;
142 }
143 
144 int VolumeElementForcesAndSourcesCoreOnContactPrismSide::getFaceSideNumber()
145  const {
146  return faceSideNumber;
147 }
148 
150 VolumeElementForcesAndSourcesCoreOnContactPrismSide::UserDataOperator::
151  getVolumeFE() const {
153  ptrFE);
154 }
155 
157 VolumeElementForcesAndSourcesCoreOnContactPrismSide::UserDataOperator::
158  getContactFE() const {
159  return static_cast<ContactPrismElementForcesAndSourcesCore *>(
160  getVolumeFE()->sidePtrFE);
161 }
162 
163 MatrixDouble &VolumeElementForcesAndSourcesCoreOnContactPrismSide::
164  UserDataOperator::getMasterCoordsAtGaussPts() {
165  return getContactFE()->getGaussPtsMasterFromEleSide();
166 }
167 
168 MatrixDouble &VolumeElementForcesAndSourcesCoreOnContactPrismSide::
169  UserDataOperator::getSlaveCoordsAtGaussPts() {
170  return getContactFE()->getGaussPtsSlaveFromEleSide();
171 }
172 
173 int VolumeElementForcesAndSourcesCoreOnContactPrismSide::UserDataOperator::
174  getFaceSense() const {
175  return getVolumeFE()->faceSense;
176 }
177 
178 int VolumeElementForcesAndSourcesCoreOnContactPrismSide::UserDataOperator::
179  getFaceSideNumber() const {
180  return getVolumeFE()->faceSideNumber;
181 }
182 
183 /**
184  * @deprecated use VolumeElementForcesAndSourcesCore
185  *
186  */
189 
190 /**
191  * @deprecated do not use this template, it is obsolete
192  */
193 template <int SWITCH>
196  using VolumeElementForcesAndSourcesCoreOnContactPrismSide::
197  VolumeElementForcesAndSourcesCoreOnContactPrismSide;
198  using UserDataOperator =
200 };
201 
202 } // namespace MoFEM
203 
204 #endif //__VOLUMEELEMENTFORCESANDSOURCESCORE_ONVOLUMESIDE_HPP__
MoFEM::VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator
default operator for TET element
Definition: VolumeElementForcesAndSourcesCoreOnSide.hpp:97
MoFEM::VolumeElementForcesAndSourcesCoreOnContactPrismSide::faceSense
int faceSense
Sense of face, could be 1 or -1.
Definition: VolumeElementForcesAndSourcesCoreOnContactPrismSide.hpp:119
DEPRECATED
#define DEPRECATED
Definition: definitions.h:17
MoFEM::VolumeElementForcesAndSourcesCoreOnContactPrismSide::faceSideNumber
int faceSideNumber
Face side number.
Definition: VolumeElementForcesAndSourcesCoreOnContactPrismSide.hpp:120
MoFEM::VolumeElementForcesAndSourcesCoreOnContactPrismSide::tetConnMap
std::array< int, 8 > tetConnMap
Definition: VolumeElementForcesAndSourcesCoreOnContactPrismSide.hpp:122
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
MoFEM::ContactPrismElementForcesAndSourcesCore::getGaussPtsMasterFromEleSide
MatrixDouble & getGaussPtsMasterFromEleSide()
Definition: ContactPrismElementForcesAndSourcesCore.hpp:48
order
constexpr int order
Definition: dg_projection.cpp:18
MoFEM::ContactPrismElementForcesAndSourcesCore
ContactPrism finite element.
Definition: ContactPrismElementForcesAndSourcesCore.hpp:27
MoFEM::VolumeElementForcesAndSourcesCoreOnContactPrismSide::oppositeNode
int oppositeNode
Definition: VolumeElementForcesAndSourcesCoreOnContactPrismSide.hpp:123
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::VolumeElementForcesAndSourcesCoreOnContactPrismSide
Base volume element used to integrate on contact surface (could be extended to other volume elements)
Definition: VolumeElementForcesAndSourcesCoreOnContactPrismSide.hpp:23
MoFEM::VolumeElementForcesAndSourcesCoreOnContactPrismSideSwitch
Definition: VolumeElementForcesAndSourcesCoreOnContactPrismSide.hpp:194
MoFEM::VolumeElementForcesAndSourcesCore
Volume finite element base.
Definition: VolumeElementForcesAndSourcesCore.hpp:26
MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator
Definition: VolumeElementForcesAndSourcesCore.hpp:108
UserDataOperator
ForcesAndSourcesCore::UserDataOperator UserDataOperator
Definition: HookeElement.hpp:75
MoFEM::VolumeElementForcesAndSourcesCoreOnContactPrismSide::UserDataOperator
default operator for TET element
Definition: VolumeElementForcesAndSourcesCoreOnContactPrismSide.hpp:74
MoFEM::VolumeElementForcesAndSourcesCoreOnContactPrismSide::faceConnMap
std::array< int, 4 > faceConnMap
Definition: VolumeElementForcesAndSourcesCoreOnContactPrismSide.hpp:121
MoFEM::VolumeElementForcesAndSourcesCoreOnContactPrismSideBase
DEPRECATED typedef VolumeElementForcesAndSourcesCoreOnContactPrismSide VolumeElementForcesAndSourcesCoreOnContactPrismSideBase
Definition: VolumeElementForcesAndSourcesCoreOnContactPrismSide.hpp:188