SheafSystem  0.0.0.0
chart_point_2d.h
Go to the documentation of this file.
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
20 
21 #ifndef CHART_POINT_2D_H
22 #define CHART_POINT_2D_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef CHART_POINT_H
29 #include "SheafSystem/chart_point.h"
30 #endif
31 
32 namespace fiber_bundle
33 {
34 
35  using namespace sheaf;
36 
40 class SHEAF_DLL_SPEC chart_point_2d : public chart_point
41 {
42  // ===========================================================
44  // ===========================================================
46 
47 public:
48 
53 
58  chart_point_2d(const chart_point_2d& xother);
59 
63  virtual ~chart_point_2d();
64 
69 
74  chart_point_2d(const scoped_index& xchart_id, coord_type xu, coord_type xv);
75 
81  const coord_type* xlocal_coords,
82  size_type xlocal_coords_ub);
83 
88  chart_point_2d(const scoped_index& xchart_id,
89  const coord_type* xlocal_coords,
90  size_type xlocal_coords_ub);
91 
95  virtual int db() const;
96 
100  virtual coord_type local_coord(int xi) const;
101 
105  virtual void put_local_coord(int xi, coord_type xvalue);
106 
110  coord_type* local_coords();
111 
115  const coord_type* local_coords() const;
116 
120  const coord_type& u() const;
121 
125  const coord_type& v() const;
126 
130  void put(pod_index_type xchart, coord_type xu, coord_type xv);
131 
135  void put(const scoped_index& xchart_id, coord_type xu, coord_type xv);
136 
137 protected:
138 
142  coord_type _local_coords[2];
143 
144 private:
145 
147 
148 
149  // ===========================================================
151  // ===========================================================
153 
154 public:
155 
156 protected:
157 
158 private:
159 
161 
162 
163  // ===========================================================
165  // ===========================================================
166 
167 public:
168 
173  virtual chart_point_2d* clone() const;
174 
178  virtual bool invariant() const;
179 
183  virtual bool is_ancestor_of(const any* other) const;
184 
190  {
191  return reinterpret_cast<chart_point_2d&>(chart_point::operator=(xother));
192  };
193 
198  chart_point_2d& operator=(const chart_point_2d& xother);
199 
200 protected:
201 
202 private:
203 
205 };
206 
207 // =============================================================================
208 // NON-MEMBER FUNCTIONS
209 // =============================================================================
210 
215 SHEAF_DLL_SPEC
216 size_t deep_size(const chart_point_2d& xp, bool xinclude_shallow = true);
217 
218 } // namespace fiber_bundle
219 
220 
221 #endif // ifndef CHART_POINT_2D_H
chart_point_2d & operator=(const chart_point &xother)
Assignment operator.
chart_point_coord_type coord_type
The type of local coordinate; the scalar type for the local coordinate vector space.
Definition: chart_point.h:65
A point in chart space.
Definition: chart_point.h:52
chart_point & operator=(const chart_point &xother)
Assignment operator.
Definition: chart_point.cc:449
Abstract base class with useful features for all objects.
Definition: any.h:39
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
A point in a 2D chart space.
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
Namespace for the sheaves component of the sheaf system.
Namespace for the fiber_bundles component of the sheaf system.