FEMTIC
Forward2DQuadrilateralElement.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
25 #define DBLDEF_FORWARD_2D_QUAD_ELEMENT
26 
27 #include "Forward2D.h"
29 #include <utility>
30 #include <map>
31 
32 // Class of 2D forward calculation by using quadrilateral element
34 
35 public:
36 
37  // Constructer
38  explicit Forward2DQuadrilateralElement( const int planeID, const int iPol );
39 
40  // Destructer
42 
43  // Calculate EM fields of boundary planes by 2D forward calculcation with 1st order nodal element
44  virtual void calcEMFieldsOfBoundaryPlanes( const double freq, const MeshDataNonConformingHexaElement* const pMeshData ) = 0;
45 
46 protected:
47 
48  // Total node number of equation
50 
51  // Total node number of equation after degenerated
53 
54  // Total node number of 2D mesh
56 
57  // Array converting global node IDs of 3D mesh to the ones of 2D mesh
58  std::map<int,int> m_nodeIDs3DTo2D;
59 
60  // Output EM field and responses of boundary planes obtained by 2D analysis
61  void output2DResult( const double freq, const MeshDataNonConformingHexaElement* const pMeshData ) const;
62 
63 private:
64 
65  // Defailt constructer
67 
68  // Copy constructer
70 
71  // Copy assignment operator
73 
74  // Calculate Ex
75  virtual std::complex<double> calcEx( const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const = 0;
76 
77  // Calculate Ey
78  virtual std::complex<double> calcEy( const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const = 0;
79 
80  // Calculate Ez
81  virtual std::complex<double> calcEz( const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const = 0;
82 
83  // Calculate Hx
84  virtual std::complex<double> calcHx( const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const = 0;
85 
86  // Calculate Hy
87  virtual std::complex<double> calcHy( const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const = 0;
88 
89  // Calculate Hz
90  virtual std::complex<double> calcHz( const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement* const pMeshData ) const = 0;
91 
92 };
93 
94 #endif
Definition: Forward2DQuadrilateralElement.h:33
std::map< int, int > m_nodeIDs3DTo2D
Definition: Forward2DQuadrilateralElement.h:58
~Forward2DQuadrilateralElement()
Definition: Forward2DQuadrilateralElement.cpp:40
Forward2DQuadrilateralElement & operator=(const Forward2DQuadrilateralElement &rhs)
virtual std::complex< double > calcEy(const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const =0
virtual std::complex< double > calcEx(const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const =0
virtual std::complex< double > calcHy(const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const =0
virtual void calcEMFieldsOfBoundaryPlanes(const double freq, const MeshDataNonConformingHexaElement *const pMeshData)=0
int m_numEquationsDegenerated
Definition: Forward2DQuadrilateralElement.h:52
Forward2DQuadrilateralElement(const Forward2DQuadrilateralElement &rhs)
virtual std::complex< double > calcHz(const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const =0
virtual std::complex< double > calcEz(const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const =0
int m_numNodeTotal2D
Definition: Forward2DQuadrilateralElement.h:55
int m_numEquations
Definition: Forward2DQuadrilateralElement.h:49
virtual std::complex< double > calcHx(const double freq, const int iElem, const double uCoord, const double vCoord, const MeshDataNonConformingHexaElement *const pMeshData) const =0
void output2DResult(const double freq, const MeshDataNonConformingHexaElement *const pMeshData) const
Definition: Forward2DQuadrilateralElement.cpp:45
Definition: Forward2D.h:31
Definition: MeshDataNonConformingHexaElement.h:31