SheafSystem  0.0.0.0
chart_point_1d.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_1D_H
22 #define CHART_POINT_1D_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_1d : public chart_point
41 {
42  // ===========================================================
44  // ===========================================================
46 
47 public:
48 
53 
58  chart_point_1d(const chart_point_1d& xother);
59 
63  virtual ~chart_point_1d();
64 
69 
73  chart_point_1d(const scoped_index& xchart_id, coord_type xu);
74 
80  const coord_type* xlocal_coords,
81  size_type xlocal_coords_ub);
82 
87  chart_point_1d(const scoped_index& xchart_id,
88  const coord_type* xlocal_coords,
89  size_type xlocal_coords_ub);
90 
94  virtual int db() const;
95 
99  virtual coord_type local_coord(int xi) const;
100 
104  virtual void put_local_coord(int xi, coord_type xvalue);
105 
109  coord_type* local_coords();
110 
114  const coord_type* local_coords() const;
115 
119  coord_type& u();
120 
124  const coord_type& u() const;
125 
129  void put(pod_index_type xchart_id, coord_type xu);
130 
134  void put(const scoped_index& xchart_id, coord_type xu);
135 
136 protected:
137 
141  coord_type _local_coords[1];
142 
143 private:
144 
146 
147 
148  // ===========================================================
150  // ===========================================================
152 
153 public:
154 
155 protected:
156 
157 private:
158 
160 
161 
162  // ===========================================================
164  // ===========================================================
165 
166 public:
167 
172  virtual chart_point_1d* clone() const;
173 
177  virtual bool invariant() const;
178 
182  virtual bool is_ancestor_of(const any* other) const;
183 
188  {
189  return reinterpret_cast<chart_point_1d&>(chart_point::operator=(xother));
190  };
191 
195  chart_point_1d& operator=(const chart_point_1d& xother);
196 
197 protected:
198 
199 private:
200 
202 };
203 
204 // =============================================================================
205 // NON-MEMBER FUNCTIONS
206 // =============================================================================
207 
212 SHEAF_DLL_SPEC
213 size_t deep_size(const chart_point_1d& xp, bool xinclude_shallow = true);
214 
215 
216 } // namespace fiber_bundle
217 
218 #endif // ifndef CHART_POINT_1D_H
chart_point_1d & 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
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.
A point in a 1D chart space.
Namespace for the fiber_bundles component of the sheaf system.