hp2FEM  0.1
include/nurbs/NURBSSurface.h
00001 #ifndef _NURBSSURFACE_H_
00002 #define _NURBSSURFACE_H_
00003 // ---------------------------------------------
00004 // company   : 
00005 // user      : 
00006 // date      : 22 Mar 2015 17:25
00007 // file      : NURBSSurface.h
00008 // markers   : Full
00009 // language  : C++
00010 // generator : Metamill 6.0
00011 // ---------------------------------------------
00012 
00013 //#UBLK-BEG-HEADERH
00014 //#UBLK-END-HEADERH
00015 
00016 /*=================================================================================================
00017 =                                                                                                 =
00018 =       Copyright 2010-2015  Marco Lucio Bittencourt / Fabiano Fernandes Bargos                       =
00019 =                        Gilberto Luis Valente / Jorge Luis Suzuki / Allan Patrick Cordeiro Dias  =
00020 =                                                                                                 =
00021 =       Licensed under the Apache License, Version 2.0 (the "License");                               =
00022 =       you may not use this file except in compliance with the License.                              =
00023 =       You may obtain a copy of the License at                                                       =
00024 =                                                                                                 =
00025 =               http://www.apache.org/licenses/LICENSE-2.0                                                =
00026 =                                                                                                 =
00027 =       Unless required by applicable law or agreed to in writing, software                           =
00028 =       distributed under the License is distributed on an "AS IS" BASIS,                             =
00029 =       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.                      =
00030 =       See the License for the specific language governing permissions and                           =
00031 =       limitations under the License.                                                                =
00032 =                                                                                                 =
00033 =================================================================================================*/
00034 
00035 
00036 #include "ds/Matrix.h"
00037 #include "ds/BuiltInArray.h"
00038 #include "model/Nodes.h"
00039 #include "BSpline.h"
00040 #include "enumerations/Variable_Defs_E.h"
00041 
00042 
00046 class NURBSSurface
00047 {
00048 //#UBLK-BEG-CLASSDEF mm:c05e2670-1d90-4ef3-93e2-f3911011ee20
00049 //#UBLK-END-CLASSDEF
00050 
00051  public:
00052 
00053    // METHOD=mm:1025351c-db54-41c2-b05c-70b4f92abff0
00054    NURBSSurface();
00055 
00056    // METHOD=mm:b40c69bf-1cb2-44c7-b5c7-0cf6842cf27b
00057    ~NURBSSurface();
00058 
00059    // METHOD=mm:f9982fd0-33ab-462b-9d58-654c870d5ce6
00060    void Save(FILE* File);
00061 
00062    // METHOD=mm:9dacfbff-be3a-4ec9-8262-5b2f1dadfb7c
00063    void Restore(FILE* File);
00064 
00065    // METHOD=mm:8b8ada9a-6a68-491b-9b47-d433ee7068be
00066    void Read(FILE* File);
00067 
00068    // METHOD=mm:3d75da2d-bde3-4ce3-ba7a-4928151907d8
00069    void Print(FILE* File = stdout);
00070 
00071    // METHOD=mm:1fde2cfc-914f-40e5-9c6a-b8028829338d
00072    void Free();
00073 
00074    // METHOD=mm:f41edcba-33dc-4340-ade8-c16102d745ab
00075    void SetNumber(long number);
00076 
00077    // METHOD=mm:1173a730-e05a-46ad-8782-1ced6817cb29
00078    long GetNumber();
00079 
00080    // METHOD=mm:626c92e0-753e-43e2-9ff1-70dfd3b41861
00081    void SetOrders(long orderu, long orderv);
00082 
00083    // METHOD=mm:68a4e3dc-10f9-4f94-a6e8-a8139f652181
00084    void GetOrder(long& orderu, long& orderv);
00085 
00086    // METHOD=mm:a5014ec0-b945-4641-9047-b3cb798e852f
00087    void SetNumberOfCPs(long NCPu, long NCPv);
00088 
00089    // METHOD=mm:550d60de-0cb5-4ddf-814b-45058ca4aa84
00090    void GetNumberOfCPs(unsigned long& NCPu, unsigned long& NCPv);
00091 
00092    // METHOD=mm:35649f87-925e-444d-be29-49e210a8191e
00093    void SetKnotVectors(BuiltInArray<double>& KnotU, BuiltInArray<double>& KnotV);
00094 
00095    // METHOD=mm:8dc1e03b-9d9f-4b06-b6c5-2404687ba541
00096    void SetOpenUniformKnotVectors();
00097 
00098    // METHOD=mm:48c073c5-8e91-41bf-b635-925dd3614129
00099    double* GetCPCoords(long CpU, long CpV);
00100 
00101    // METHOD=mm:f6795da9-0c01-4bb1-b27a-82d12693980b
00102    double GetWeight(long CpU, long CpV);
00103 
00104    // METHOD=mm:8f921c26-b401-4197-a165-ba02866555c7
00105    void SetCPData(Matrix& X, Matrix& Y, Matrix& Z, Matrix& W);
00106 
00107    // METHOD=mm:8c947087-73b4-466c-bc06-e11077800980
00108    void GetCPData(Matrix& X, Matrix& Y, Matrix& Z, Matrix& W);
00109 
00110    // METHOD=mm:0fd6e67b-1cc5-4bd5-a0eb-ae2e15ffe0ef
00111    void SetCPData(long CpU, long CpV, Variable_Defs_E VarType, double Value);
00112 
00113    // METHOD=mm:ceb8d440-25e4-4364-afeb-6435c9aa817b
00114    double EvalRBSplineBasisFunction(long CpU, long CpV, double u, double v);
00115 
00116    // METHOD=mm:f10e0446-22d4-45a5-81e4-6ead5f1ec3a4
00117    void SetParametricCoordinates(double* ParametricCoordinates, long*const BoundaryNodes, long NumNodes, Nodes& NN);
00118 
00119    // METHOD=mm:467242c2-b023-4b6a-9819-7f722395e4d9
00120    void SetParametricCoordinates(double& u, double& v, double* pCoordsi);
00121 
00122 
00123  protected:
00124 
00125    // METHOD=mm:01932267-6279-4161-b60f-0e7568d284ad
00126    void EvalRBSplineBasisFunctions(double u, double v);
00127 
00128 
00138    // attr=mm:ea6166f0-732d-4064-9638-7cf32e3bb2bb
00139    long OrderU;
00140 
00150    // attr=mm:32364785-9206-468b-b552-dd329ea580d9
00151    long OrderV;
00152 
00158    // attr=mm:a6444dc3-01aa-426b-8113-2e8cdce7e79c
00159    BuiltInArray<double> KnotVectU;
00160 
00166    // attr=mm:34682400-1c8c-49dc-b794-280edfd5d724
00167    BuiltInArray<double> KnotVectV;
00168 
00174    // attr=mm:88b9ae2a-d951-4609-ba56-67302fd4f2c3
00175    Matrix Weights;
00176 
00182    // attr=mm:7cce64dd-db7a-4911-ab54-00f97817625b
00183    Matrix CoordsX;
00184 
00190    // attr=mm:a7e4cd6a-e6b9-4ac6-b96e-7d4abc4807b3
00191    Matrix CoordsY;
00192 
00198    // attr=mm:9478889d-961b-4641-bb38-046c2537e894
00199    Matrix CoordsZ;
00200 
00201 
00202  private:
00203 
00204 
00214    // attr=mm:5aa1756f-773c-4880-9c8a-67f4938a7dbe
00215    BuiltInArray<double> N;
00216 
00226    // attr=mm:0be92d16-4a6c-429d-af4b-773d7b24be9d
00227    BuiltInArray<double> M;
00228 
00238    // attr=mm:bddb8fc7-450a-42c3-baea-3efea2cf785b
00239    BuiltInArray<double> Nl;
00240 
00250    // attr=mm:79f0bb2e-8589-4709-852e-b59d39eaee96
00251    BuiltInArray<double> Ml;
00252 
00259    // attr=mm:20635b27-fa4e-424d-8922-8b2794ace499
00260    Matrix S;
00261 
00270    // attr=mm:09b3a198-dfe2-4f49-9233-de4b25b6d76b
00271    Matrix DSu;
00272 
00281    // attr=mm:cf6b9ec6-b809-47fa-bab0-32c56d2df24b
00282    Matrix DSv;
00283 
00290    // attr=mm:de7dc088-74ab-4231-8490-7f8a6a4973d5
00291    BuiltInArray<double> Coordsi;
00292 
00299    // attr=mm:8244348e-31e7-4512-af84-5e022ff244a6
00300    long Number;
00301 
00302 
00303 //#UBLK-BEG-CLASSMEMB mm:c05e2670-1d90-4ef3-93e2-f3911011ee20
00304 //#UBLK-END-CLASSMEMB
00305 };
00306 
00307 //#UBLK-BEG-GLOBALH
00308 //#UBLK-END-GLOBALH
00309 
00310 
00311 #endif // _NURBSSURFACE_H_
 All Classes Files Functions Variables Typedefs Friends Defines