hp2FEM
0.1
|
00001 #ifndef _MAPPING_H_ 00002 #define _MAPPING_H_ 00003 // --------------------------------------------- 00004 // company : 00005 // user : 00006 // date : 22 Mar 2015 17:22 00007 // file : Mapping.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 : 09 Jun 2011 00019 //-------------------------------------------------------------- 00020 // Change history : 00021 // 09 Jun 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 <cstdio> 00047 #include <cmath> 00048 #include "enumerations/ElementShape_E.h" 00049 #include "enumerations/Kinematics_E.h" 00050 #include "enumerations/MeshID_E.h" 00051 #include "ds/Vector.h" 00052 #include "ds/BuiltInArray.h" 00053 #include "fegroups/Mesh.h" 00054 #include "interpolation/shapefunctions/ShapeFunctions.h" 00055 00056 00057 class Mapping 00058 { 00059 //#UBLK-BEG-CLASSDEF mm:079de444-f650-11df-817b-b59fee0c7729 00060 //#UBLK-END-CLASSDEF 00061 00062 public: 00063 00064 // METHOD=mm:4f228f5d-02d7-11e0-89cb-b0660132333d 00065 Mapping(); 00066 00067 // METHOD=mm:6cdb65f1-3ad1-11e0-87c1-fb85dddc7efb 00068 Mapping(ShapeFunctions& InterpolationFunctions); 00069 00070 // METHOD=mm:7b5defbe-5f54-4cce-9585-80c55dcec382 00071 Mapping(ShapeFunctions& InterpolationFunctions, unsigned long Dimension, unsigned long MaxNumberIntegPoints, Mesh& MapMesh); 00072 00073 // METHOD=mm:606b9057-02d7-11e0-89cb-b0660132333d 00074 Mapping(Mapping& Instance); 00075 00076 // METHOD=mm:6a8d9dd7-02d7-11e0-89cb-b0660132333d 00077 ~Mapping(); 00078 00079 // METHOD=mm:34e9f0e0-5972-11e0-8e1d-d62c684a44a5 00080 Mapping& operator=(Mapping& Instance); 00081 00082 // METHOD=mm:d0b2b537-b2dd-11e0-8de7-934e0679c860 00083 operator ShapeFunctions&(); 00084 00085 // METHOD=mm:f8a21ddf-b2dd-11e0-8de7-934e0679c860 00086 operator ShapeFunctions*(); 00087 00088 // METHOD=mm:ce4dfcee-377e-4de5-b935-46ce42645fac 00089 ShapeFunctions* GetShapeFunctions(); 00090 00091 // METHOD=mm:1f8cab2d-0844-4891-8396-2d4965c26c09 00092 unsigned long GetNumberIntegPoints(); 00093 00094 // METHOD=mm:055f7f02-fc4a-4eeb-b9ab-70dd2a73f08d 00095 double* const GetJacMatrix(); 00096 00097 // METHOD=mm:02cf3354-3490-4431-91f8-b0a4443e36a4 00098 double* const GetJacobian(); 00099 00100 // METHOD=mm:68fc6d46-6859-4adf-b6d5-d315b20099b5 00101 void SetShapeFunctions(ShapeFunctions* ShFunc); 00102 00103 // METHOD=mm:b9e34462-ec23-42a5-ac3d-7c8d18df988e 00104 void SetMappingMeshPointer(Mesh& MapMesh); 00105 00106 // METHOD=mm:8881f838-5a57-4086-b1bf-00f79f17eba9 00107 void SetMaxNumberIntegPoints(unsigned long MaxNumberIntegPoints, unsigned long Dimension); 00108 00109 // METHOD=mm:f069021b-f6fc-11df-9a02-bc78c24ba4e7 00110 void GetJacobianClassic(unsigned long ElementNumber, unsigned long Dim, unsigned long IntegOrder, unsigned long ElemOrder, ElementShape_E ElemShape, ElementShape_E EntityShape, unsigned long NumberCoords, double* Coords, unsigned long& NumberIntegrationPoints, double& ElementMeasure, double** JacobianMatrices, double** DetJacobianMatrices); 00111 00112 // METHOD=mm:e907fcb7-b3d9-11e0-938a-ce5f19a7c3fe 00113 double * const GetJacobianClassic(unsigned long ElementNumber, unsigned long& NumberSF, unsigned long& NumberIntegrationPoints, double ElementMeasure, double const* JacobianMatricesUM, double const* DetJacobianMatricesUM, double const* JacobianMatricesDM, double const* DetJacobianMatricesDM); 00114 00115 // METHOD=mm:fa7f602b-8746-42f2-ac64-978088d8d3f0 00116 void GetFaceJacobian(unsigned long ElementNumber, unsigned long Dim, unsigned long IntegOrder, unsigned long ElemOrder, ElementShape_E ElemShape, ElementShape_E EntityShape, unsigned long NumberCoords, double* Coords, unsigned long& NumberIntegrationPoints, double** Js); 00117 00118 // METHOD=mm:e8ba2ee0-49a2-41b7-a68c-6183082cc56b 00119 void GetEdgeJacobian(unsigned long ElementNumber, unsigned long Dim, unsigned long IntegOrder, unsigned long ElemOrder, ElementShape_E ElemShape, ElementShape_E EntityShape, unsigned long NumberCoords, double* Coords, unsigned long& NumberIntegrationPoints, double** Jc); 00120 00121 // METHOD=mm:a8bc5279-0625-4aaf-b316-d7090dd34a29 00122 void GetFaceJacobian1DMatrices(unsigned long ElementNumber, unsigned long Dim, unsigned long IntegOrder, unsigned long ElemOrder, ElementShape_E ElemShape, ElementShape_E EntityShape, unsigned long NumberCoords, double* Coords, unsigned long& NumberIntegrationPoints, double** Js); 00123 00124 // METHOD=mm:d09fd9bf-c492-4176-9e5a-f93d7c5982f2 00125 void GetEdgeJacobian1DMatrices(unsigned long ElementNumber, unsigned long Dim, unsigned long IntegOrder, unsigned long ElemOrder, ElementShape_E ElemShape, ElementShape_E EntityShape, unsigned long NumberCoords, double* Coords, unsigned long& NumberIntegrationPoints, double** Jc); 00126 00127 // METHOD=mm:75b2c967-b3da-11e0-938a-ce5f19a7c3fe 00128 void GetJacobian1DMatrices(unsigned long ElementNumber, unsigned long Dim, unsigned long IntegOrder, unsigned long ElemOrder, ElementShape_E ElemShape, ElementShape_E EntityShape, unsigned long NumberCoords, double* Coords, unsigned long& NumberIntegrationPoints, double& ElementMeasure, double** JacobianMatrices, double** DetJacobianMatrices); 00129 00130 // METHOD=mm:3b966567-ab9e-4e2e-a7b0-8ed314f2d170 00131 void GetJacobian1DMatrices(unsigned long ElementNumber, unsigned long Dim, unsigned long IntegPoint, unsigned long IntegOrder, unsigned long ElemOrder, ElementShape_E ElemShape, ElementShape_E EntityShape, unsigned long NumberCoords, double* Coords, unsigned long& NumberIntegrationPoints, double& ElementMeasure, double** JacobianMatrices, double** DetJacobianMatrices); 00132 00133 // METHOD=mm:78150afe-b3da-11e0-938a-ce5f19a7c3fe 00134 double * const GetJacobian1DMatrices(unsigned long ElementNumber, unsigned long& NumberSF, unsigned long& NumberIntegrationPoints, double ElementMeasure, double const* JacobianMatricesUM, double const* DetJacobianMatricesUM, double const* JacobianMatricesDM, double const* DetJacobianMatricesDM); 00135 00136 // METHOD=mm:90939203-c37e-11e0-9a2f-d79375ab2f00 00137 void Print(FILE* File, unsigned long Dimension); 00138 00139 00140 protected: 00141 00145 // attr=mm:ef651461-3ad3-11e0-87c1-fb85dddc7efb 00146 Vector JacMatrix; 00147 00151 // attr=mm:ef17a6bf-b2db-11e0-8de7-934e0679c860 00152 Vector Jacobian; 00153 00157 // attr=mm:8a845884-34e3-4df3-9851-95f7dd9e5f6c 00158 Vector EdgeJacobian; 00159 00163 // attr=mm:7034903a-c859-45e5-bfa2-faf9b984adb2 00164 Vector FaceJacobian; 00165 00169 // attr=mm:677e652b-b2dc-11e0-8de7-934e0679c860 00170 ShapeFunctions* SF; 00171 00175 // attr=mm:3d32ddf4-d4e2-4bf1-982c-056a2b670f43 00176 unsigned long NumberIntegPoints; 00177 00181 // attr=mm:6d544c29-7af5-48b3-8318-2e0b2c516cf0 00182 Mesh* MappingMesh; 00183 00184 00185 private: 00186 00187 //#UBLK-BEG-CLASSMEMB mm:079de444-f650-11df-817b-b59fee0c7729 00188 //#UBLK-END-CLASSMEMB 00189 }; 00190 00191 //#UBLK-BEG-GLOBALH 00192 //*** Removed methods: 14 Jun 2011 14:40 00193 //--- 00194 //uuid=mm:49fd736b-3ad2-11e0-87c1-fb85dddc7efb 00195 // Mesh& GetDeformedMesh(); 00196 //--- 00197 //uuid=mm:e70fdeb7-3ad9-11e0-87c1-fb85dddc7efb 00198 // void RunUnderformedMesh(BuiltInArray<double>& ElementSolutionOrder, ShapeFunctions& SF); 00199 //--- 00200 //uuid=mm:e8090cd8-5977-11e0-8e1d-d62c684a44a5 00201 // void RunDerformedMesh(BuiltInArray<double>& ElementSolutionOrder, ShapeFunctions& SF); 00202 00203 //*** Removed methods: 20 Jul 2011 12:19 00204 //--- 00205 //uuid=mm:f4655401-8c83-11e0-8c5a-a1e3aa2d4422 00206 // unsigned short GetDimension(); 00207 00208 //*** Removed methods: 01 Aug 2011 20:37 00209 //--- 00210 //uuid=mm:f392350e-3ad5-11e0-87c1-fb85dddc7efb 00211 // double GetJacobianUndeformedMesh(unsigned long ElementNumber, unsigned short IntegrationPointNumber); 00212 //--- 00213 //uuid=mm:b2fab4b5-5973-11e0-8e1d-d62c684a44a5 00214 // double*const GetJacobianDeformedMesh(unsigned long ElementNumber, unsigned short& NumberIntegrationPoints); 00215 //--- 00216 //uuid=mm:ffde90a3-5973-11e0-8e1d-d62c684a44a5 00217 // double GetJacobianDeformedMesh(unsigned long ElementNumber, unsigned short IntegrationPointNumber); 00218 //--- 00219 //uuid=mm:4e2b7f3e-3ad6-11e0-87c1-fb85dddc7efb 00220 // double GetElementMeasureUndeformedMesh(unsigned long ElementNumber); 00221 //--- 00222 //uuid=mm:25b86d06-5975-11e0-8e1d-d62c684a44a5 00223 // double GetElementMeasureDeformedMesh(unsigned long ElementNumber); 00224 //--- 00225 //uuid=mm:f8a3b3be-3ad6-11e0-87c1-fb85dddc7efb 00226 // double*const GetJacobian1DMatricesUndeformedMesh(unsigned long ElementNumber, unsigned short& NumberIntegrationPoints); 00227 //--- 00228 //uuid=mm:e5a5adb9-5975-11e0-8e1d-d62c684a44a5 00229 // double*const GetJacobian1DMatricesDeformedMesh(unsigned long ElementNumber, unsigned short& NumberIntegrationPoints); 00230 //--- 00231 //uuid=mm:b7c089f4-5975-11e0-8e1d-d62c684a44a5 00232 // double*const GetJacobian1DMatricesUndeformedMesh(unsigned long ElementNumber, unsigned short IntegrationPointNumber); 00233 //--- 00234 //uuid=mm:f35b4487-5975-11e0-8e1d-d62c684a44a5 00235 // double*const GetJacobian1DMatricesDeformedMesh(unsigned long ElementNumber, unsigned short IntegrationPointNumber); 00236 //--- 00237 //uuid=mm:aca541e7-3ad7-11e0-87c1-fb85dddc7efb 00238 // double*const GetJacobianMatrixUndeformedMesh(unsigend long ElementNumber, unsigned short& NumberIntegrationPoints); 00239 //--- 00240 //uuid=mm:6adda85f-5977-11e0-8e1d-d62c684a44a5 00241 // double*const GetJacobianMatrixDeformedMesh(unsigend long ElementNumber, unsigned short& NumberIntegrationPoints); 00242 00243 //*** Removed methods: 25 Aug 2011 15:49 00244 //--- 00245 //uuid=mm:420f153a-4666-11e0-81e9-a37f76cac6d8 00246 // double*const GetJacobianTheoSolution(unsigned long ElementNumber, MeshID_E MeshID, ShapeFunctions& SF); 00247 //--- 00248 //uuid=mm:4c30f539-4666-11e0-81e9-a37f76cac6d8 00249 // double GetJacobianTheoSolution(unsigned long ElementNumber, unsigned short IntegrationPointNumber, MeshID_E MeshID, ShapeFunctions& SF); 00250 00251 //*** Removed methods: 14 Feb 2012 16:37 00252 //--- 00253 //uuid=mm:ed459113-c383-11e0-9a2f-d79375ab2f00 00254 // void Save(FILE* File); 00255 //--- 00256 //uuid=mm:d8ff8703-c37f-11e0-9a2f-d79375ab2f00 00257 // void Restore(FILE* File); 00258 00259 //*** Removed methods: 16 Mar 2012 16:45 00260 //--- 00261 //uuid=mm:394d0c57-3ad2-11e0-87c1-fb85dddc7efb 00262 // operator Mesh&(); 00263 //--- 00264 //uuid=mm:469c2a75-939a-11e0-9aa5-836670cd1ba3 00265 // operator Mesh*(); 00266 //--- 00267 //uuid=mm:95be9c6b-fd87-4903-9de4-4f39e0bbfa49 00268 // Mesh* GetMapMesh(); 00269 //--- 00270 //uuid=mm:6e573aa5-8573-4ae4-bb91-3366ef22ae21 00271 // void SetMappingMesh(Mesh* MpMsh); 00272 00273 //*** Removed methods: 13 Dec 2012 12:10 00274 //--- 00275 //uuid=mm:7c343196-0ba7-4bb9-b2d2-d36fd759356c 00276 // double*const GetJacobian1DMatrices_copy(unsigned long ElementNumber, unsigned long& NumberSF, unsigned long& NumberIntegrationPoints, double ElementMeasure, double const* JacobianMatrices, double const* DetJacobianMatrices); 00277 00278 //*** Removed methods: 17 Jul 2014 12:54 00279 //--- 00280 //uuid=mm:47a7ea42-41b6-4852-85b8-0739eec8b6a3 00281 // void GetJacobianClassic(unsigned long ElementNumber, unsigned long IntPointNumber, unsigned long Dim, unsigned long IntegOrder, unsigned long ElemOrder, ElementShape_E ElemShape, ElementShape_E EntityShape, unsigned long NumberCoords, double* Coords, unsigned long& NumberIntegrationPoints, double& ElementMeasure, double** JacobianMatrices, double** DetJacobianMatrices); 00282 00283 //#UBLK-END-GLOBALH 00284 00285 00286 #endif // _MAPPING_H_