FEMTIC
Forward2DQuadrilateralElementEdgeBased.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_QUAD_ELEMENT_EDGE_BASED
25 #define DBLDEF_FORWARD_2D_QUAD_ELEMENT_EDGE_BASED
26 
28 
29 // Class of 2D forward calculation by using edge based element with quadrilateral shape
31 
32 public:
33 
34  // Constructer
35  explicit Forward2DQuadrilateralElementEdgeBased( 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 MeshDataNonConformingHexaElement* const pMeshData ) = 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 
61  // Array edge IDs of 2D mesh to non-zero electric field values specified
62  std::map< int, std::complex<double> > m_edgesIDGlobal2NonZeroValues;
63 
64  // Calculate Ex
65  virtual std::complex<double> calcEx( const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const;
66 
67  // Calculate Ey
68  virtual std::complex<double> calcEy( const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const;
69 
70  // Calculate Ez
71  virtual std::complex<double> calcEz( const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const;
72 
73  // Calculate Hx
74  virtual std::complex<double> calcHx( const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const;
75 
76  // Calculate Hy
77  virtual std::complex<double> calcHy( const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const;
78 
79  // Calculate Hz
80  virtual std::complex<double> calcHz( const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const;
81 
82 private:
83 
84  // Calculate horizontal electric field
85  virtual std::complex<double> calcValueElectricFieldHorizontal( const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const = 0;
86 
87  // Calculate vertical electric field
88  virtual std::complex<double> calcValueElectricFieldVertical( const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const = 0;
89 
90  // Calculate magnetic field perpendicular to the boundary plane
91  virtual std::complex<double> calcValueMagneticFieldPerpendicular( const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const = 0;
92 
93  // Defailt constructer
95 
96  // Copy constructer
98 
99  // Copy assignment operator
101 
102 };
103 
104 #endif
Definition: Forward2DQuadrilateralElementEdgeBased.h:30
Forward2DQuadrilateralElementEdgeBased(const Forward2DQuadrilateralElementEdgeBased &rhs)
virtual std::complex< double > calcValueElectricFieldHorizontal(const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const =0
virtual std::complex< double > calcHz(const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const
Definition: Forward2DQuadrilateralElementEdgeBased.cpp:90
virtual void calcEMFieldsOfBoundaryPlanes(const double freq, const MeshDataNonConformingHexaElement *const pMeshData)=0
virtual std::complex< double > calcHx(const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const
Definition: Forward2DQuadrilateralElementEdgeBased.cpp:69
virtual std::complex< double > calcEy(const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const
Definition: Forward2DQuadrilateralElementEdgeBased.cpp:51
virtual std::complex< double > calcValueElectricFieldVertical(const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const =0
virtual std::complex< double > calcValueMagneticFieldPerpendicular(const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const =0
~Forward2DQuadrilateralElementEdgeBased()
Definition: Forward2DQuadrilateralElementEdgeBased.cpp:36
Forward2DQuadrilateralElementEdgeBased & operator=(const Forward2DQuadrilateralElementEdgeBased &rhs)
virtual std::complex< double > calcHy(const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const
Definition: Forward2DQuadrilateralElementEdgeBased.cpp:79
std::map< int, std::complex< double > > m_edgesIDGlobal2NonZeroValues
Definition: Forward2DQuadrilateralElementEdgeBased.h:62
virtual std::complex< double > calcEz(const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const
Definition: Forward2DQuadrilateralElementEdgeBased.cpp:62
TypeOfOuterEdge
Definition: Forward2DQuadrilateralElementEdgeBased.h:53
@ LEFT_EDGE
Definition: Forward2DQuadrilateralElementEdgeBased.h:57
@ LOWER_EDGE
Definition: Forward2DQuadrilateralElementEdgeBased.h:55
@ INNER_EDGE
Definition: Forward2DQuadrilateralElementEdgeBased.h:54
@ UPPER_EDGE
Definition: Forward2DQuadrilateralElementEdgeBased.h:56
@ RIGHT_EDGE
Definition: Forward2DQuadrilateralElementEdgeBased.h:58
virtual std::complex< double > calcEx(const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const
Definition: Forward2DQuadrilateralElementEdgeBased.cpp:40
Definition: Forward2DQuadrilateralElement.h:33
Definition: MeshDataNonConformingHexaElement.h:31
Definition: Forward2DQuadrilateralElementEdgeBased.h:45
double jacob11
Definition: Forward2DQuadrilateralElementEdgeBased.h:46
double jacob12
Definition: Forward2DQuadrilateralElementEdgeBased.h:47
double jacob21
Definition: Forward2DQuadrilateralElementEdgeBased.h:48
double jacob22
Definition: Forward2DQuadrilateralElementEdgeBased.h:49