FEMTIC
Forward2DTriangleElementEdgeBased.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_EDGE_BASED
25 #define DBLDEF_FORWARD_2D_TRIANGLE_ELEMENT_EDGE_BASED
26 
28 
29 // Class of 2D forward calculation by using edge based element with triangle shape
31 
32 public:
33 
34  // Constructer
35  explicit Forward2DTriangleElementEdgeBased( const int planeID, const int iPol );
36 
37  // Destructer
39 
40  // Calculate EM fields of boundary planes by 2D forward calculcation
41  virtual void calcEMFieldsOfBoundaryPlanes( const double freq, const MeshDataTetraElement* const pMeshDataTetraElement ) = 0;
42 
43 protected:
44 
46  double jacob11;
47  double jacob12;
48  double jacob21;
49  double jacob22;
50  };
51 
52  // Type of outer edge
54  INNER_EDGE = -1,
59  };
60 
62  //EdgeIDsOfTriangleElement* m_elemID2EdgeIDGlobal;
63 
64  // Array converting local IDs to the flag specifing whether direction of local vector basis function
66 
67  // Array edge IDs of 2D mesh to non-zero electric field values specified
68  std::map< int, std::complex<double> > m_edgesIDGlobal2NonZeroValues;
69 
70  // Calculate Ex
71  virtual std::complex<double> calcEx( const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement* const pMeshDataTetraElement ) const;
72 
73  // Calculate Ey
74  virtual std::complex<double> calcEy( const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement* const pMeshDataTetraElement ) const;
75 
76  // Calculate Ez
77  virtual std::complex<double> calcEz( const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement* const pMeshDataTetraElement ) const;
78 
79  // Calculate Hx
80  virtual std::complex<double> calcHx( const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement* const pMeshDataTetraElement ) const;
81 
82  // Calculate Hy
83  virtual std::complex<double> calcHy( const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement* const pMeshDataTetraElement ) const;
84 
85  // Calculate Hz
86  virtual std::complex<double> calcHz( const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement* const pMeshDataTetraElement ) const;
87 
88 private:
89 
90  // Calculate horizontal electric field
91  virtual std::complex<double> calcValueElectricFieldHorizontal( const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement* const pMeshDataTetraElement ) const = 0;
92 
93  // Calculate vertical electric field
94  virtual std::complex<double> calcValueElectricFieldVertical( const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement* const pMeshDataTetraElement ) const = 0;
95 
96  // Calculate magnetic field perpendicular to the boundary plane
97  virtual std::complex<double> calcValueMagneticFieldPerpendicular( const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement* const pMeshDataTetraElement ) const = 0;
98 
99  // Defailt constructer
101 
102  // Copy constructer
104 
105  // Copy assignment operator
107 
108 };
109 
110 #endif
Definition: Forward2DTriangleElementEdgeBased.h:30
Forward2DTriangleElementEdgeBased & operator=(const Forward2DTriangleElementEdgeBased &rhs)
std::map< int, std::complex< double > > m_edgesIDGlobal2NonZeroValues
Definition: Forward2DTriangleElementEdgeBased.h:68
virtual std::complex< double > calcHy(const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement *const pMeshDataTetraElement) const
Definition: Forward2DTriangleElementEdgeBased.cpp:102
virtual void calcEMFieldsOfBoundaryPlanes(const double freq, const MeshDataTetraElement *const pMeshDataTetraElement)=0
TypeOfOuterEdge
Definition: Forward2DTriangleElementEdgeBased.h:53
@ LOWER_EDGE
Definition: Forward2DTriangleElementEdgeBased.h:55
@ LEFT_EDGE
Definition: Forward2DTriangleElementEdgeBased.h:57
@ RIGHT_EDGE
Definition: Forward2DTriangleElementEdgeBased.h:58
@ UPPER_EDGE
Definition: Forward2DTriangleElementEdgeBased.h:56
@ INNER_EDGE
Definition: Forward2DTriangleElementEdgeBased.h:54
virtual std::complex< double > calcValueElectricFieldHorizontal(const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement *const pMeshDataTetraElement) const =0
virtual std::complex< double > calcHx(const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement *const pMeshDataTetraElement) const
Definition: Forward2DTriangleElementEdgeBased.cpp:88
virtual std::complex< double > calcEz(const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement *const pMeshDataTetraElement) const
Definition: Forward2DTriangleElementEdgeBased.cpp:81
bool ** m_signInversion
Definition: Forward2DTriangleElementEdgeBased.h:65
~Forward2DTriangleElementEdgeBased()
Definition: Forward2DTriangleElementEdgeBased.cpp:37
virtual std::complex< double > calcValueElectricFieldVertical(const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement *const pMeshDataTetraElement) const =0
virtual std::complex< double > calcEy(const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement *const pMeshDataTetraElement) const
Definition: Forward2DTriangleElementEdgeBased.cpp:66
Forward2DTriangleElementEdgeBased(const Forward2DTriangleElementEdgeBased &rhs)
virtual std::complex< double > calcHz(const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement *const pMeshDataTetraElement) const
Definition: Forward2DTriangleElementEdgeBased.cpp:117
virtual std::complex< double > calcEx(const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement *const pMeshDataTetraElement) const
Definition: Forward2DTriangleElementEdgeBased.cpp:51
virtual std::complex< double > calcValueMagneticFieldPerpendicular(const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataTetraElement *const pMeshDataTetraElement) const =0
Definition: Forward2DTriangleElement.h:33
Definition: MeshDataTetraElement.h:32
Definition: Forward2DTriangleElementEdgeBased.h:45
double jacob11
Definition: Forward2DTriangleElementEdgeBased.h:46
double jacob21
Definition: Forward2DTriangleElementEdgeBased.h:48
double jacob22
Definition: Forward2DTriangleElementEdgeBased.h:49
double jacob12
Definition: Forward2DTriangleElementEdgeBased.h:47