Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MeshGraph1D.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: $Source: /usr/sci/projects/Nektar/cvs/Nektar++/library/SpatialDomains/MeshGraph1D.h,v $
4 //
5 // For more information, please see: http://www.nektar.info/
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description:
33 //
34 //
35 ///////////////////////////////////////////////////////////////////////////////
36 #ifndef NEKTAR_SPATIALDOMAINS_MESHGRAPH1D_H
37 #define NEKTAR_SPATIALDOMAINS_MESHGRAPH1D_H
38 
40 #include <SpatialDomains/SegGeom.h>
41 
43 namespace Nektar
44 {
45  namespace SpatialDomains
46  {
47  class MeshGraph1D: public MeshGraph
48  {
49  public:
50 
54 
55  SPATIAL_DOMAINS_EXPORT void ReadGeometry(const std::string &infilename);
56  SPATIAL_DOMAINS_EXPORT void ReadGeometry(TiXmlDocument &doc);
57  SPATIAL_DOMAINS_EXPORT void ReadElements(TiXmlDocument &doc);
58  SPATIAL_DOMAINS_EXPORT void ReadComposites(TiXmlDocument &doc);
59  SPATIAL_DOMAINS_EXPORT void ResolveGeomRef(const std::string
60  &prevToken, const std::string &token, Composite& composite);
61 
62  inline int GetCoordim(void)
63  {
64  return GetSpaceDimension();
65  }
66 
67  inline const SegGeomMap &GetSeggeoms(void) const
68  {
69  return m_segGeoms;
70  }
71 
72  inline int GetVidFromElmt(const int vert, const int elmt) const
73  {
74  ASSERTL2((elmt >=0)&&(elmt < m_segGeoms.size()),
75  "eid is out of range");
76 
77  //return m_segGeoms[elmt]->GetVid(vert);
78  return m_segGeoms.find(elmt)->second->GetVid(vert);
79  }
80 
81  protected:
82 
83  private:
84  };
85 
86  typedef boost::shared_ptr<MeshGraph1D> MeshGraph1DSharedPtr;
87 
88  }; //end of namespace
89 }; //end of namespace
90 
91 #endif //NEKTAR_SPATIALDOMAINS_MESHGRAPH1D_H
92 
93 //
94 // $Log: MeshGraph1D.h,v $
95 // Revision 1.10 2008/06/09 21:33:04 jfrazier
96 // Moved segment vector to base MeshGraph class since it is used by all derived types.
97 //
98 // Revision 1.9 2008/05/29 19:07:39 delisi
99 // Removed the Write(..) methods, so it is only in the base MeshGraph class. Also, added a line to set the global ID of the geometry object for every element read in.
100 //
101 // Revision 1.8 2007/09/20 22:25:06 jfrazier
102 // Added expansion information to meshgraph class.
103 //
104 // Revision 1.7 2007/06/07 23:55:24 jfrazier
105 // Intermediate revisions to add parsing for boundary conditions file.
106 //
107 // Revision 1.6 2007/05/28 16:15:01 sherwin
108 // Updated files in MultiRegions to make 1D demos work
109 //
110 // Revision 1.5 2007/03/14 21:24:08 sherwin
111 // Update for working version of MultiRegions up to ExpList1D
112 //
113 // Revision 1.4 2006/07/02 17:16:17 sherwin
114 //
115 // Modifications to make MultiRegions work for a connected domain in 2D (Tris)
116 //
117 // Revision 1.3 2006/06/01 14:15:30 sherwin
118 // Added typdef of boost wrappers and made GeoFac a boost shared pointer.
119 //
120 // Revision 1.2 2006/05/30 14:00:04 sherwin
121 // Updates to make MultiRegions and its Demos work
122 //
123 // Revision 1.1 2006/05/04 18:59:01 kirby
124 // *** empty log message ***
125 //
126 // Revision 1.15 2006/05/02 21:21:11 sherwin
127 // Corrected libraries to compile new version of spatialdomains and demo Graph1D
128 //
129 // Revision 1.14 2006/04/04 23:12:37 jfrazier
130 // More updates to readers. Still work to do on MeshGraph2D to store tris and quads.
131 //
132 // Revision 1.13 2006/03/25 00:58:29 jfrazier
133 // Many changes dealing with fundamental structure and reading/writing.
134 //
135 // Revision 1.12 2006/03/12 14:20:43 sherwin
136 //
137 // First compiling version of SpatialDomains and associated modifications
138 //
139 // Revision 1.11 2006/03/12 07:42:03 sherwin
140 //
141 // Updated member names and StdRegions call. Still has not been compiled
142 //
143 // Revision 1.10 2006/03/04 20:26:04 bnelson
144 // Added comments after #endif.
145 //
146 // Revision 1.9 2006/02/19 01:37:33 jfrazier
147 // Initial attempt at bringing into conformance with the coding standard. Still more work to be done. Has not been compiled.
148 //
149 //