FEMTIC
Forward2DSquareElement.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_SQUARE_ELEMENT
25 #define DBLDEF_FORWARD_2D_SQUARE_ELEMENT
26 
27 #include "MeshDataBrickElement.h"
28 #include "Forward2D.h"
29 
30 // Class of 2D forward calculation by using square element
32 
33 public:
34  // Constructer
35  explicit Forward2DSquareElement( 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 MeshDataBrickElement* const pMeshDataBrickElement ) = 0;
42 
43 protected:
44 
45  // Calculate width of element
46  double calcWidth( const int iElem, const MeshDataBrickElement* const pMeshDataBrickElement ) const;
47 
48  // Calculate height of element
49  double calcHeight( const int iElem, const MeshDataBrickElement* const pMeshDataBrickElement ) const;
50 
51  // Calculate element division number of horizontal direction
52  int calcNumElemHorizontal( const MeshDataBrickElement* const pMeshDataBrickElement ) const;
53 
54  // Calculate element division number of vertical direction
55  int calcNumElemVertical( const MeshDataBrickElement* const pMeshDataBrickElement ) const;
56 
57  // Output EM field and responses of boundary planes obtained by 2D analysis
58  void output2DResult( const int type, const double freq, const int nElem, const int numElemW, const MeshDataBrickElement* const pMeshDataBrickElement ) const;
59 
60 private:
61 
62  // Defailt constructer
64 
65  // Copy constructer
67 
68  // Copy assignment operator
70 
71  // Calculate parameter V of Rodi(1976)
72  virtual std::complex<double> calcValueV( const double freq, const int iElem, const double wLocal, const double hLocal, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
73 
74  // Calculate parameter J of Rodi(1976)
75  virtual std::complex<double> calcValueJ( const double freq, const int iElem, const double wLocal, const double hLocal, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
76 
77  // Calculate parameter I of Rodi(1976)
78  virtual std::complex<double> calcValueI( const double freq, const int iElem, const double wLocal, const double hLocal, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
79 
80  // Calculate Ex
81  virtual std::complex<double> calcEx( const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
82 
83  // Calculate Ey
84  virtual std::complex<double> calcEy( const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
85 
86  // Calculate Ez
87  virtual std::complex<double> calcEz( const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
88 
89  // Calculate Hx
90  virtual std::complex<double> calcHx( const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
91 
92  // Calculate Hy
93  virtual std::complex<double> calcHy( const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
94 
95  // Calculate Hz
96  virtual std::complex<double> calcHz( const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement* const pMeshDataBrickElement ) const = 0;
97 
98 };
99 
100 #endif
Definition: Forward2DSquareElement.h:31
Forward2DSquareElement(const Forward2DSquareElement &rhs)
double calcWidth(const int iElem, const MeshDataBrickElement *const pMeshDataBrickElement) const
Definition: Forward2DSquareElement.cpp:54
virtual std::complex< double > calcEx(const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
virtual std::complex< double > calcEy(const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
virtual std::complex< double > calcValueI(const double freq, const int iElem, const double wLocal, const double hLocal, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
virtual std::complex< double > calcHz(const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
int calcNumElemVertical(const MeshDataBrickElement *const pMeshDataBrickElement) const
Definition: Forward2DSquareElement.cpp:118
double calcHeight(const int iElem, const MeshDataBrickElement *const pMeshDataBrickElement) const
Definition: Forward2DSquareElement.cpp:74
virtual std::complex< double > calcValueJ(const double freq, const int iElem, const double wLocal, const double hLocal, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
virtual std::complex< double > calcEz(const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
int calcNumElemHorizontal(const MeshDataBrickElement *const pMeshDataBrickElement) const
Definition: Forward2DSquareElement.cpp:91
~Forward2DSquareElement()
Definition: Forward2DSquareElement.cpp:48
virtual std::complex< double > calcHy(const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
virtual std::complex< double > calcValueV(const double freq, const int iElem, const double wLocal, const double hLocal, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
virtual void calcEMFieldsOfBoundaryPlanes(const double freq, const MeshDataBrickElement *const pMeshDataBrickElement)=0
Forward2DSquareElement & operator=(const Forward2DSquareElement &rhs)
void output2DResult(const int type, const double freq, const int nElem, const int numElemW, const MeshDataBrickElement *const pMeshDataBrickElement) const
Definition: Forward2DSquareElement.cpp:126
virtual std::complex< double > calcHx(const double freq, const int iElem, const double wCoord, const double hCoord, const MeshDataBrickElement *const pMeshDataBrickElement) const =0
Definition: Forward2D.h:31
Definition: MeshDataBrickElement.h:31