FEMTIC
Forward2DTriangleElement0thOrderEdgeBased.h
Go to the documentation of this file.
1 //-------------------------------------------------------------------------------------------------------
2 // The MIT License (MIT)
3 //
4 // Copyright (c) 2021 Yoshiya Usui
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to deal
8 // in the Software without restriction, including without limitation the rights
9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 // copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // The above copyright notice and this permission notice shall be included in all
14 // copies or substantial portions of the Software.
15 //
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 // SOFTWARE.
23 //-------------------------------------------------------------------------------------------------------
24 #ifndef DBLDEF_FORWARD_2D_TRIANGLE_ELEMENT_0TH_ORDER_EDGE_BASED
25 #define DBLDEF_FORWARD_2D_TRIANGLE_ELEMENT_0TH_ORDER_EDGE_BASED
26 
28 
29 // Class of 2D forward calculation by using triangle element 0th order edge based
31 
32 public:
33 
34  // Constructer
35  explicit Forward2DTriangleElement0thOrderEdgeBased( const int planeID, const int iPol );
36 
37  // Destructer
39 
40  // Calculate EM fields of boundary planes by 2D forward calculcation with 0tht order edge element
41  virtual void calcEMFieldsOfBoundaryPlanes( const double freq, const MeshDataTetraElement* const pMeshData );
42 
43 private:
44 
45  static const int DIRICHLET_BOUNDARY_NONZERO_VALUE = -1;
46  static const int DIRICHLET_BOUNDARY_ZERO_VALUE = -2;
47 
48  // Number of integral points
49  static const int m_numIntegralPoints = 3;
50 
51  // U coordinates of integral points
53 
54  // V coordinates of integral points
56 
57  // Weights of integral points
59 
60  // Defailt constructer
62 
63  // Copy constructer
65 
66  // Copy assignment operator
68 
69  // Calculate array converting local IDs to global ones
70  void calcArrayConvertLocalID2Global( const MeshDataTetraElement* const pMeshData );
71 
72  // Get type of outer edge
73  // [note] : You must confirm inputed edge is the outer edge.
74  int getTypeOfOuterEdgeOfBoundaryPlanes( const int elemIDLocal2D, const int edgeIDLocal2D,
75  const MeshDataTetraElement* const pMeshDataTetraElement ) const;
76 
77  // Get shape functions of the 1st direction with respect to the reference element coordinate system
78  inline double getShapeFuncReferenceCoordU( const double uLocal, const double vLocal, const int num ) const;
79 
80  // Get shape functions of the 2nd direction with respect to the reference element coordinate system
81  inline double getShapeFuncReferenceCoordV( const double uLocal, const double vLocal, const int num ) const;
82 
83  // Get shape functions rotated with respect to the reference element coordinate system
84  inline double getShapeFuncRotated() const;
85 
86  // Calculate horizontal electric field
87  virtual std::complex<double> calcValueElectricFieldHorizontal( const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement* const pMeshDataTetraElement ) const;
88 
89  // Calculate vertical electric field
90  virtual std::complex<double> calcValueElectricFieldVertical( const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement* const pMeshDataTetraElement ) const;
91 
92  // Calculate magnetic field perpendicular to the boundary plane
93  virtual std::complex<double> calcValueMagneticFieldPerpendicular( const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement* const pMeshDataTetraElement ) const;
94 
95  // Calculate jacobian matrix of the elements on the Z-X plane of boundary
96  void calcJacobianMatrixOnZXPlaneOfBoundary( const MeshDataTetraElement* const pMeshDataTetraElement, const int elemID2D, Forward2DTriangleElementEdgeBased::JacobianMatrix& JacobMat, double& determinant ) const;
97 
98  // Calculate jacobian matrix of the elements on the Y-Z plane of boundary
99  void calcJacobianMatrixOnYZPlaneOfBoundary( const MeshDataTetraElement* const pMeshDataTetraElement, const int elemID2D, Forward2DTriangleElementEdgeBased::JacobianMatrix& JacobMat, double& determinant ) const;
100 
101 };
102 
103 #endif
Definition: Forward2DTriangleElement0thOrderEdgeBased.h:30
double getShapeFuncReferenceCoordU(const double uLocal, const double vLocal, const int num) const
Definition: Forward2DTriangleElement0thOrderEdgeBased.cpp:916
double m_vCoord[m_numIntegralPoints]
Definition: Forward2DTriangleElement0thOrderEdgeBased.h:55
double m_weight[m_numIntegralPoints]
Definition: Forward2DTriangleElement0thOrderEdgeBased.h:58
void calcArrayConvertLocalID2Global(const MeshDataTetraElement *const pMeshData)
Definition: Forward2DTriangleElement0thOrderEdgeBased.cpp:628
virtual void calcEMFieldsOfBoundaryPlanes(const double freq, const MeshDataTetraElement *const pMeshData)
Definition: Forward2DTriangleElement0thOrderEdgeBased.cpp:58
static const int DIRICHLET_BOUNDARY_ZERO_VALUE
Definition: Forward2DTriangleElement0thOrderEdgeBased.h:46
virtual std::complex< double > calcValueMagneticFieldPerpendicular(const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement *const pMeshDataTetraElement) const
Definition: Forward2DTriangleElement0thOrderEdgeBased.cpp:1044
double getShapeFuncReferenceCoordV(const double uLocal, const double vLocal, const int num) const
Definition: Forward2DTriangleElement0thOrderEdgeBased.cpp:938
virtual std::complex< double > calcValueElectricFieldHorizontal(const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement *const pMeshDataTetraElement) const
Definition: Forward2DTriangleElement0thOrderEdgeBased.cpp:966
double m_uCoord[m_numIntegralPoints]
Definition: Forward2DTriangleElement0thOrderEdgeBased.h:52
double getShapeFuncRotated() const
Definition: Forward2DTriangleElement0thOrderEdgeBased.cpp:959
~Forward2DTriangleElement0thOrderEdgeBased()
Definition: Forward2DTriangleElement0thOrderEdgeBased.cpp:54
Forward2DTriangleElement0thOrderEdgeBased(const Forward2DTriangleElement0thOrderEdgeBased &rhs)
static const int m_numIntegralPoints
Definition: Forward2DTriangleElement0thOrderEdgeBased.h:49
static const int DIRICHLET_BOUNDARY_NONZERO_VALUE
Definition: Forward2DTriangleElement0thOrderEdgeBased.h:45
void calcJacobianMatrixOnYZPlaneOfBoundary(const MeshDataTetraElement *const pMeshDataTetraElement, const int elemID2D, Forward2DTriangleElementEdgeBased::JacobianMatrix &JacobMat, double &determinant) const
Definition: Forward2DTriangleElement0thOrderEdgeBased.cpp:1098
Forward2DTriangleElement0thOrderEdgeBased & operator=(const Forward2DTriangleElement0thOrderEdgeBased &rhs)
int getTypeOfOuterEdgeOfBoundaryPlanes(const int elemIDLocal2D, const int edgeIDLocal2D, const MeshDataTetraElement *const pMeshDataTetraElement) const
Definition: Forward2DTriangleElement0thOrderEdgeBased.cpp:832
virtual std::complex< double > calcValueElectricFieldVertical(const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement *const pMeshDataTetraElement) const
Definition: Forward2DTriangleElement0thOrderEdgeBased.cpp:1005
void calcJacobianMatrixOnZXPlaneOfBoundary(const MeshDataTetraElement *const pMeshDataTetraElement, const int elemID2D, Forward2DTriangleElementEdgeBased::JacobianMatrix &JacobMat, double &determinant) const
Definition: Forward2DTriangleElement0thOrderEdgeBased.cpp:1085
Definition: Forward2DTriangleElementEdgeBased.h:30
Definition: MeshDataTetraElement.h:32
Definition: Forward2DTriangleElementEdgeBased.h:45