hp2FEM
0.1
|
00001 #ifndef _SHAPEFUNCTIONS_H_ 00002 #define _SHAPEFUNCTIONS_H_ 00003 // --------------------------------------------- 00004 // company : 00005 // user : 00006 // date : 22 Mar 2015 17:24 00007 // file : ShapeFunctions.h 00008 // markers : Full 00009 // language : C++ 00010 // generator : Metamill 6.0 00011 // --------------------------------------------- 00012 00013 //#UBLK-BEG-HEADERH 00014 //============================================================== 00015 // Description : 00016 //-------------------------------------------------------------- 00017 // Author : Gilberto Luis 00018 // Created : 12 Abr 2011 00019 //-------------------------------------------------------------- 00020 // Change history : 00021 // 12 Abr 2011 (Gilberto Luis) Initial version generated 00022 // 00023 //============================================================== 00024 //#UBLK-END-HEADERH 00025 00026 /*================================================================================================= 00027 = = 00028 = Copyright 2010-2015 Marco Lucio Bittencourt / Fabiano Fernandes Bargos = 00029 = Gilberto Luis Valente / Jorge Luis Suzuki / Allan Patrick Cordeiro Dias = 00030 = = 00031 = Licensed under the Apache License, Version 2.0 (the "License"); = 00032 = you may not use this file except in compliance with the License. = 00033 = You may obtain a copy of the License at = 00034 = = 00035 = http://www.apache.org/licenses/LICENSE-2.0 = 00036 = = 00037 = Unless required by applicable law or agreed to in writing, software = 00038 = distributed under the License is distributed on an "AS IS" BASIS, = 00039 = WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. = 00040 = See the License for the specific language governing permissions and = 00041 = limitations under the License. = 00042 = = 00043 =================================================================================================*/ 00044 00045 00046 #include "ds/Vector.h" 00047 #include "ds/Matrix.h" 00048 #include "enumerations/QuadCollocType_E.h" 00049 #include "enumerations/ElementShape_E.h" 00050 #include "enumerations/pMesh_E.h" 00051 #include "enumerations/PolynomialType_E.h" 00052 #include "enumerations/SchemeType_E.h" 00053 #include "enumerations/BasisType_E.h" 00054 #include "enumerations/HierarchicalType_E.h" 00055 #include "enumerations/IPCP_E.h" 00056 #include "interpolation/collocationpoints/collocationPoints.h" 00057 #include "interpolation/numericalintegration/NumericalIntegration.h" 00058 #include "interpolation/collocationpoints/collocationPointsAttributes_S.h" 00059 #include "interpolation/numericalintegration/NumericalIntegrationAttributes_S.h" 00060 #include "interpolation/shapefunctions/ShapeFunctionsAttributes_S.h" 00061 #include "interpolation/shapefunctions/HexaShapeFunctions.h" 00062 #include "interpolation/shapefunctions/LineShapeFunctions.h" 00063 #include "interpolation/shapefunctions/SquareShapeFunctions.h" 00064 #include "interpolation/shapefunctions/TetraShapeFunctions.h" 00065 #include "interpolation/shapefunctions/TriangleShapeFunctions.h" 00066 00067 00068 using namespace std; 00069 00070 00080 class ShapeFunctions 00081 { 00082 //#UBLK-BEG-CLASSDEF mm:32aadde5-1e99-11e0-9165-9fcf68b76eb1 00083 //#UBLK-END-CLASSDEF 00084 00085 public: 00086 00087 // METHOD=mm:615587f3-f3f3-11df-9959-9236c3ff6ea9 00088 double*const GetdShapeFunctions(ElementShape_E ElementShape, ElementShape_E EntityShape, unsigned long PolyOrder, unsigned long IntegrandOrder, IPCP_E IPCPFlag, unsigned long& NumberSFValues, unsigned long& NumberIntegPoints, unsigned long LiDirection = 1); 00089 00090 // METHOD=mm:61558754-f3f3-11df-9959-9236c3ff6ea9 00091 unsigned long*const GetIndices(ElementShape_E ElementShape, ElementShape_E EntityShape, unsigned long PolyOrder, unsigned long& NumberIndices); 00092 00093 // METHOD=mm:f3d74518-a28b-4601-95a5-e3b7582fb26f 00094 OneIndexTable<unsigned long>& GetIndices(ElementShape_E ElementShape); 00095 00096 // METHOD=mm:cf3a54b7-cdc7-11e0-993d-c2f620367c46 00097 LineShapeFunctions& GetLineShapeFunctions(ElementShape_E ElemShape, unsigned long LiDirection = 1); 00098 00099 // METHOD=mm:615587f1-f3f3-11df-9959-9236c3ff6ea9 00100 unsigned long GetMaxPolyOrder(ElementShape_E ElementShape); 00101 00102 // METHOD=mm:ce4c72d2-059b-4e3c-a193-287ad83b1844 00103 BuiltInArray<unsigned long>& GetNumberIntegrationPoints(); 00104 00105 // METHOD=mm:705808f0-2296-45b0-bcdb-99c37181b59f 00106 unsigned long GetNumberShapeFunctions(ElementShape_E ElementShape, unsigned long Order); 00107 00108 // METHOD=mm:6d38b065-1bf2-4a5d-bf90-3942ce7eb235 00109 ShapeFunctionsAttributes_S& GetShapeFunctionsAttributes(); 00110 00111 // METHOD=mm:782c57b9-9e37-4cc6-b539-6e712ceaee16 00112 void GetShapeFunctions(ElementShape_E ElementShape, unsigned long PolyOrder, unsigned long IntegrandOrder, IPCP_E IPCPFlag, double* ShapeFunctions); 00113 00114 // METHOD=mm:615587f2-f3f3-11df-9959-9236c3ff6ea9 00115 double*const GetShapeFunctions(ElementShape_E ElementShape, ElementShape_E EntityShape, unsigned long PolyOrder, unsigned long IntegrandOrder, IPCP_E IPCPFlag, unsigned long& NumberSFValues, unsigned long LiDirection = 1); 00116 00117 // METHOD=mm:cdb1e5d6-36e3-4340-8f4b-9f450b72f54b 00118 double*const GetShapeFunctions(ElementShape_E ElementShape, ElementShape_E EntityShape, unsigned long PolyOrder, unsigned long IntegrandOrder, IPCP_E IPCPFlag, unsigned long& TotalNumberSFValues, unsigned long& NumberSFValues, unsigned long& NumberPoints, unsigned long LiDirection = 1); 00119 00120 // METHOD=mm:abe5993d-071c-4123-9038-7f09d93d41b1 00121 long GetShapeFunctionSetNumber(ElementShape_E ElemShape, unsigned long PolyOrder); 00122 00123 // METHOD=mm:92d5ef81-4370-11e0-8507-c0021234afab 00124 operator collocationPoints &(); 00125 00126 // METHOD=mm:8c95289b-4373-11e0-8507-c0021234afab 00127 operator HexaShapeFunctions &(); 00128 00129 // METHOD=mm:7a1af015-4373-11e0-8507-c0021234afab 00130 operator LineShapeFunctions &(); 00131 00132 // METHOD=mm:805ba431-4370-11e0-8507-c0021234afab 00133 operator NumericalIntegration &(); 00134 00135 // METHOD=mm:fc61f331-4e48-11e0-9cbe-f8f96213c768 00136 operator ShapeFunctionsAttributes_S &(); 00137 00138 // METHOD=mm:843d01e1-4373-11e0-8507-c0021234afab 00139 operator SquareShapeFunctions &(); 00140 00141 // METHOD=mm:93bc39b1-4373-11e0-8507-c0021234afab 00142 operator TetraShapeFunctions &(); 00143 00144 // METHOD=mm:9c1471eb-4373-11e0-8507-c0021234afab 00145 operator TriangleShapeFunctions &(); 00146 00147 // METHOD=mm:4c818b01-4372-11e0-8507-c0021234afab 00148 ShapeFunctions& operator=(ShapeFunctions& Instance); 00149 00150 // METHOD=mm:615587f7-f3f3-11df-9959-9236c3ff6ea9 00151 void Print(FILE* File, ElementShape_E ElementShape, ElementShape_E EntityShape, BuiltInArray<unsigned long>& PolyOrder); 00152 00153 // METHOD=mm:615587f6-f3f3-11df-9959-9236c3ff6ea9 00154 void Read(FILE* DEFFile, unsigned long GroupNumber, ElementShape_E ElementShape, unsigned long MaxOrder, pMesh_E pMesh); 00155 00156 // METHOD=mm:5d1911db-4340-11e0-8507-c0021234afab 00157 void RunShapeFunctions(ElementShape_E ElementShape, ElementShape_E EntityShape, BuiltInArray<unsigned long>& PolyOrder); 00158 00159 // METHOD=mm:615587f0-f3f3-11df-9959-9236c3ff6ea9 00160 void SetMaxPolyOrder(ElementShape_E ElementShape, unsigned long MaxOrder); 00161 00162 // METHOD=mm:41f5bb64-4337-11e0-8507-c0021234afab 00163 void SetShapeFunctionsAttributes(unsigned long MaxPolyOrder, ElementShape_E ElementShape, SchemeType_E SchemeType, BasisType_E BasisType, HierarchicalType_E HierarchicalType, pMesh_E pMeshDistribution, PolynomialType_E PolynomialType, unsigned long Alpha, unsigned long Beta, QuadCollocType_E QuadratureType, unsigned long AlphaNI, unsigned long BetaNI, QuadCollocType_E CollocationType, unsigned long AlphaCP, unsigned long BetaCP); 00164 00165 // METHOD=mm:3ecb137a-4370-11e0-8507-c0021234afab 00166 void SetShapeFunctionsAttributes(ShapeFunctionsAttributes_S& ShapeFunctionsAttributes, NumericalIntegrationAttributes_S& NumericalIntegrationAttributes, collocationPointsAttributes_S& CollocationPointsAttributes); 00167 00168 // METHOD=mm:231192e3-f3fe-11df-9959-9236c3ff6ea9 00169 ShapeFunctions(); 00170 00171 // METHOD=mm:0404661c-4052-11e0-9dd5-8e5be057fed3 00172 ShapeFunctions(unsigned long MaxOrder, ElementShape_E ElementShape, SchemeType_E SchemeType, BasisType_E BasisType, HierarchicalType_E HierarchicalType, pMesh_E pMesh, PolynomialType_E PolynomialType, unsigned long Alpha, unsigned long Beta, QuadCollocType_E QuadratureType, unsigned long AlphaNI, unsigned long BetaNI, QuadCollocType_E CollocationType, unsigned long AlphaCP, unsigned long BetaCP); 00173 00174 // METHOD=mm:332f01f2-4377-11e0-8507-c0021234afab 00175 ShapeFunctions(ShapeFunctionsAttributes_S& ShapeFunctionsAttributes, NumericalIntegrationAttributes_S& NumericalIntegrationAttributes, collocationPointsAttributes_S& CollocationPointsAttributes); 00176 00177 // METHOD=mm:2096d6c6-433b-11e0-8507-c0021234afab 00178 ShapeFunctions(ShapeFunctions& Instance); 00179 00180 // METHOD=mm:12c9f671-1e9e-11e0-9165-9fcf68b76eb1 00181 ~ShapeFunctions(); 00182 00183 00184 protected: 00185 00186 // METHOD=mm:dce0b6ac-8155-44bc-9b31-66f67cb1e482 00187 void BuildIndices(ElementShape_E ElementShape, BuiltInArray<unsigned long>& PolyOrder); 00188 00189 00190 // attr=mm:43f3f852-1e99-11e0-9165-9fcf68b76eb1 00191 collocationPoints CP; 00192 // attr=mm:43f3f8eb-1e99-11e0-9165-9fcf68b76eb1 00193 HexaShapeFunctions* HexaSF; 00194 // attr=mm:43f3f854-1e99-11e0-9165-9fcf68b76eb1 00195 LineShapeFunctions* LineSF; 00196 // attr=mm:43f3f853-1e99-11e0-9165-9fcf68b76eb1 00197 NumericalIntegration NI; 00198 // attr=mm:d1f5053f-4055-11e0-9dd5-8e5be057fed3 00199 ShapeFunctionsAttributes_S SFAttributes; 00200 // attr=mm:43f3f8ea-1e99-11e0-9165-9fcf68b76eb1 00201 SquareShapeFunctions* SquareSF; 00202 // attr=mm:43f3f8ed-1e99-11e0-9165-9fcf68b76eb1 00203 TetraShapeFunctions* TetraSF; 00204 // attr=mm:43f3f8ec-1e99-11e0-9165-9fcf68b76eb1 00205 TriangleShapeFunctions* TriangleSF; 00206 00207 00208 private: 00209 00210 //#UBLK-BEG-CLASSMEMB mm:32aadde5-1e99-11e0-9165-9fcf68b76eb1 00211 //#UBLK-END-CLASSMEMB 00212 }; 00213 00214 //#UBLK-BEG-GLOBALH 00215 //#UBLK-END-GLOBALH 00216 00217 00218 #endif // _SHAPEFUNCTIONS_H_