hp2FEM  0.1
include/model/Nodes.h
00001 #ifndef _NODES_H_
00002 #define _NODES_H_
00003 // ---------------------------------------------
00004 // company   : 
00005 // user      : 
00006 // date      : 22 Mar 2015 17:25
00007 // file      : Nodes.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     : 23 May 2011
00019 //--------------------------------------------------------------
00020 // Change history : 
00021 //   23 May 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 "ds/BuiltInArray.h"
00048 #include "ds/OneIndexTable.h"
00049 
00050 
00058 class Nodes
00059 {
00060 //#UBLK-BEG-CLASSDEF mm:4527a732-f997-11df-9ddc-963be5e4332b
00061 //#UBLK-END-CLASSDEF
00062 
00063  public:
00064 
00065    // METHOD=mm:c85993c6-017c-11e0-9503-bdd33c3b382f
00066    Nodes();
00067 
00068    // METHOD=mm:d6a7bc96-017c-11e0-9503-bdd33c3b382f
00069    Nodes(unsigned int Dimension, unsigned long NumberNodes, BuiltInArray<double>& NodalCoordinates);
00070 
00071    // METHOD=mm:bd7e5a17-0305-11e0-843e-b9717acb62a7
00072    Nodes(Nodes& Instance);
00073 
00074    // METHOD=mm:be16cf81-0305-11e0-843e-b9717acb62a7
00075    ~Nodes();
00076 
00077    // METHOD=mm:75ceb32a-6a9d-11e0-97a7-e035795630c1
00078    Nodes& operator=(Nodes& Instance);
00079 
00080    // METHOD=mm:3c36c70c-f997-11df-9ddc-963be5e4332b
00081    unsigned long GetDimension();
00082 
00083    // METHOD=mm:3c36c70d-f997-11df-9ddc-963be5e4332b
00084    unsigned long GetNumberNodes();
00085 
00086    // METHOD=mm:3c36c7a0-f997-11df-9ddc-963be5e4332b
00087    double* GetNodeCoordinates(unsigned long NodesNumber);
00088 
00089    // METHOD=mm:934f4793-0180-11e0-9503-bdd33c3b382f
00090    double* GetAllCoordinates(unsigned long& TotalNumberNodes);
00091 
00092    // METHOD=mm:3c36c710-f997-11df-9ddc-963be5e4332b
00093    void SetNodeCoordinates(unsigned long NodeNumber, double* Coordinates);
00094 
00095    // METHOD=mm:3c36c79f-f997-11df-9ddc-963be5e4332b
00096    void SetCoordinates(BuiltInArray<double>& NodeCoordinates);
00097 
00098    // METHOD=mm:112b8c35-c1ff-11e0-9e64-beb172d6823b
00099    void SetElementCoords(OneIndexTable<unsigned long>& ElementIncidence, OneIndexTable<double>& ElementCoords);
00100 
00101    // METHOD=mm:6a940711-8647-11e0-8ec3-b2f84894090d
00102    void SetAllAttributes(unsigned long Dimension, unsigned long NumberNodes, double* Coordinates = 0);
00103 
00104    // METHOD=mm:3c36c708-f997-11df-9ddc-963be5e4332b
00105    void SetZero();
00106 
00107    // METHOD=mm:3c36c66f-f997-11df-9ddc-963be5e4332b
00108    void Read(FILE* FEMFile);
00109 
00110    // METHOD=mm:3c36c66c-f997-11df-9ddc-963be5e4332b
00111    void Save(char* TabName, int Version, char* Filename);
00112 
00113    // METHOD=mm:3c36c66b-f997-11df-9ddc-963be5e4332b
00114    void Save(FILE* File);
00115 
00116    // METHOD=mm:3c36c66e-f997-11df-9ddc-963be5e4332b
00117    void Restore(char* TabName, int Version, char* FileName);
00118 
00119    // METHOD=mm:3c36c66d-f997-11df-9ddc-963be5e4332b
00120    void Restore(FILE* File);
00121 
00122    // METHOD=mm:3c36c670-f997-11df-9ddc-963be5e4332b
00123    void Print(FILE* File, char* Message = "");
00124 
00125    // METHOD=mm:3c36c672-f997-11df-9ddc-963be5e4332b
00126    void Free();
00127 
00128 
00129  protected:
00130 
00131    // METHOD=mm:3c36c669-f997-11df-9ddc-963be5e4332b
00132    void ReadNodes(FILE* File);
00133 
00134 
00139    // attr=mm:3c36c5cf-f997-11df-9ddc-963be5e4332b
00140    unsigned long Dim;
00141 
00145    // attr=mm:3c36c5d0-f997-11df-9ddc-963be5e4332b
00146    unsigned long NumNodes;
00147 
00151    // attr=mm:3c36c5d1-f997-11df-9ddc-963be5e4332b
00152    BuiltInArray<double> Coords;
00153 
00154 
00155  private:
00156 
00157 //#UBLK-BEG-CLASSMEMB mm:4527a732-f997-11df-9ddc-963be5e4332b
00158 //#UBLK-END-CLASSMEMB
00159 };
00160 
00161 //#UBLK-BEG-GLOBALH
00162 //*** Removed methods: 23 May 2011 15:35
00163 //---
00164 //uuid=mm:3c36c66a-f997-11df-9ddc-963be5e4332b
00165 //   Nodes(unsigned int Dimension, unsigned long NumberPhysicalNodes, unsigned long NumberNodes);
00166 //---
00167 //uuid=mm:3c36c671-f997-11df-9ddc-963be5e4332b
00168 //   void PrintTit(FILE* File);
00169 //---
00170 //uuid=mm:3c36c70b-f997-11df-9ddc-963be5e4332b
00171 //   void SetNumberCopyNodes(unsigned long NumberNodes);
00172 //---
00173 //uuid=mm:a52ffa59-017e-11e0-9503-bdd33c3b382f
00174 //   void SetCopyCoordinates(unsigned long NodeNumber, double* Coordinates);
00175 //---
00176 //uuid=mm:3c36c70e-f997-11df-9ddc-963be5e4332b
00177 //   void SetAll(unsigned int Dimension, unsigned long NumberNodes);
00178 //---
00179 //uuid=mm:e7594331-017e-11e0-9503-bdd33c3b382f
00180 //   void SetCopyNodesCoordinates(std::vector<long>& Incidence, std::vector<double>& Coordinates);
00181 //---
00182 //uuid=mm:2e472a9f-017f-11e0-9503-bdd33c3b382f
00183 //   unsigned long GetNumberCopyNodes();
00184 //---
00185 //uuid=mm:3c36c712-f997-11df-9ddc-963be5e4332b
00186 //   double* GetCoordinates(unsigned long NodeNumber);
00187 //---
00188 //uuid=mm:56cf1de9-017f-11e0-9503-bdd33c3b382f
00189 //   double* GetCopyCoordinates(unsigned long NodeNumber);
00190 //---
00191 //uuid=mm:7adf234e-0180-11e0-9503-bdd33c3b382f
00192 //   unsigned long GetCopyNodesCoordinates(std::vector<unsigned long>& Incidence);
00193 //---
00194 //uuid=mm:3c36c70f-f997-11df-9ddc-963be5e4332b
00195 //   void GetAll(unsigned int& Dimension, unsigned long& NumberNodes);
00196 //---
00197 //uuid=mm:ab26c6b1-0180-11e0-9503-bdd33c3b382f
00198 //   void GetAllCopy(unsigned int& Dimension, unsigned long& NumberNodes);
00199 //---
00200 //uuid=mm:0193fe81-0181-11e0-9503-bdd33c3b382f
00201 //   unsigned long GetAllCopyCoordinates();
00202 //---
00203 //uuid=mm:3c36c711-f997-11df-9ddc-963be5e4332b
00204 //   void SetCoordinates_1(Node& Instance, long NodeNumber);
00205 //---
00206 //uuid=mm:3c36c79e-f997-11df-9ddc-963be5e4332b
00207 //   void GetCoordinates_1(Node& Instance, long NodeNumber);
00208 
00209 //*** Removed methods: 24 May 2011 17:57
00210 //---
00211 //uuid=mm:3c36c709-f997-11df-9ddc-963be5e4332b
00212 //   void SetDimension(unsigned short Dimension);
00213 //---
00214 //uuid=mm:3c36c70a-f997-11df-9ddc-963be5e4332b
00215 //   void SetNumberNodes(unsigned long NumberNodes);
00216 //---
00217 //uuid=mm:71209669-8643-11e0-8ec3-b2f84894090d
00218 //   void SetAllAttributes(unsigned short Dimension, unsigned long NumberNodes);
00219 
00220 //#UBLK-END-GLOBALH
00221 
00222 
00223 #endif // _NODES_H_
 All Classes Files Functions Variables Typedefs Friends Defines