SheafSystem  0.0.0.0
ed.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 ED_H
22 #define ED_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef AT1_H
29 #include "SheafSystem/at1.h"
30 #include "SheafSystem/tp_space.h"
31 #endif
32 
33 namespace fiber_bundle
34 {
35 
36 //==============================================================================
37 // CLASS ED_LITE
38 //==============================================================================
39 
44 class SHEAF_DLL_SPEC ed_lite : public at1_lite
45 {
46  //============================================================================
48  //============================================================================
50 
51 public:
52 
56  ed_lite();
57 
61  ed_lite(const ed_lite& xother);
62 
66  ed_lite& operator=(const ed_lite& xother);
67 
71  virtual ~ed_lite();
72 
76  ed_lite(const row_dofs_type& xrow_dofs);
77 
81  ed_lite& operator=(const row_dofs_type& xrow_dofs);
82 
83 protected:
84 private:
85 
87 
88 
89  //============================================================================
91  //============================================================================
93 
94 public:
95 protected:
96 private:
97 
99 
100 
101  //============================================================================
103  //============================================================================
105 
106 public:
107 protected:
108 private:
109 
111 
112 
113  //============================================================================
115  //============================================================================
117 
118 public:
119 protected:
120 private:
121 
123 
124 
125  //============================================================================
127  //============================================================================
129 
130 public:
131 protected:
132 private:
133 
135 
136 
137  //============================================================================
139  //============================================================================
141 
142 public:
143 protected:
144 private:
145 
147 
148 
149  //============================================================================
151  //============================================================================
153 
154 public:
155 
159  virtual const std::string& class_name() const;
160 
164  static const std::string& static_class_name();
165 
169  virtual ed_lite* clone() const;
170 
171 protected:
172 private:
173 
174 
176 
177 
178  //============================================================================
180  //============================================================================
182 
183 public:
184 
188  virtual bool is_ancestor_of(const any_lite& xother) const;
189 
193  bool invariant() const;
194 
195 protected:
196 private:
197 
199 };
200 
201 
202 //==============================================================================
203 // CLASS ED
204 //==============================================================================
205 
210 class SHEAF_DLL_SPEC ed : public at1
211 {
212  // ===========================================================
214  // ===========================================================
216 
217 public:
218 
222  static const poset_path& standard_schema_path();
223 
227  static void make_standard_schema(namespace_poset& xns);
228 
234  static host_type& new_host(namespace_type& xns,
235  const poset_path& xhost_path,
236  const poset_path& xschema_path,
237  const poset_path& xscalar_space_path,
238  bool xauto_access);
239 
240 protected:
241 
242 private:
243 
245 
246 
247  //============================================================================
249  //============================================================================
251 
252 public:
253 
258 
262  ed();
263 
268  ed(const poset_state_handle* xhost, pod_index_type xhub_id);
269 
274  ed(const poset_state_handle* xhost, const scoped_index& xid);
275 
280  ed(const poset_state_handle* xhost, const std::string& xname);
281 
285  explicit ed(abstract_poset_member* xother);
286 
290  ed(poset_state_handle* xhost, bool xauto_access = true);
291 
295  virtual ed& operator=(const abstract_poset_member& xother);
296 
300  ed& operator=(const ed& xother);
301 
305  ~ed();
306 
310  virtual const volatile_type& lite_prototype() const;
311 
315  virtual volatile_type* lite_type() const;
316 
317 protected:
318 private:
319 
321 
322 
323  //===========================================================================
325  //===========================================================================
327 
328 public:
329 protected:
330 private:
331 
333 
334 
335  //===========================================================================
337  //===========================================================================
339 
340 public:
341 protected:
342 private:
343 
345 
346 
347  //===========================================================================
349  //===========================================================================
351 
352 public:
353 protected:
354 private:
355 
357 
358 
359  //===========================================================================
361  //===========================================================================
363 
364 public:
365 
366 protected:
367 
368 private:
369 
371 
372 
373  //============================================================================
375  //============================================================================
377 
378 public:
379 
383  virtual const std::string& class_name() const;
384 
388  static const std::string& static_class_name();
389 
393  virtual ed* clone() const;
394 
400  inline ed* clone(bool xnew_state, bool xauto_access = true) const
401  {
402  return static_cast<ed*>(at1::clone(xnew_state, xauto_access));
403  }
404 
405 protected:
406 private:
407 
409 
410 
411  //============================================================================
413  //============================================================================
415 
416 public:
417 
421  bool is_ancestor_of(const any* xother) const;
422 
426  bool invariant() const;
427 
428 protected:
429 private:
430 
432 };
433 
434 //==============================================================================
435 // NON-MEMBER FUNCTIONS
436 //==============================================================================
437 
442 namespace ed_algebra
443 {
444 
449 SHEAF_DLL_SPEC vd_value_type dot(const ed& x0, const ed& x1, bool xauto_access);
450 
455 SHEAF_DLL_SPEC vd_value_type length(const ed& x0, bool xauto_access);
456 
461 SHEAF_DLL_SPEC void put_length(ed& x0, const vd_value_type& xlength, bool xauto_access);
462 
467 SHEAF_DLL_SPEC void normalize(const ed& x0, ed& xresult, bool xauto_access);
468 
472 template <typename T>
473 void normalize(T& x0, bool xauto_access);
474 
479 SHEAF_DLL_SPEC vd_value_type dot(const ed_lite& x0, const ed_lite& x1);
480 
485 SHEAF_DLL_SPEC vd_value_type length(const ed_lite& x0);
486 
491 SHEAF_DLL_SPEC void put_length(ed_lite& x0, const vd_value_type& xlength);
492 
497 SHEAF_DLL_SPEC void normalize(const ed_lite& x0, ed_lite& xresult);
498 
502 template <typename T>
503 vd_value_type operator*(const T& x0, const T& x1);
504 
508 template <typename T>
509 void normalize(T& x0);
510 
511 } // namespace ed_algebra
512 
513 } // namespace fiber_bundle
514 
515 #endif // ifndef ED_H
void length(const S &x0, SR &xresult, bool xauto_access)
Definition: sec_ed.impl.h:181
The default name space; a poset which contains other posets as members.
A general antisymmetric tensor of degree 1 over an abstract vector space (persistent version)...
Definition: at1.h:211
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
void normalize(const S &x0, SR &xresult, bool xauto_access)
Definition: sec_ed.impl.h:246
A general antisymmetric tensor of degree 1 over an abstract vector space (volatile version)...
Definition: at1.h:44
A client handle for a general, abstract partially order set.
A path defined by a poset name and a member name separated by a forward slash (&#39;/&#39;). For example: "cell_definitions/triangle".
Definition: poset_path.h:48
Abstract base class with useful features for all volatile objects.
Definition: any_lite.h:48
Abstract base class with useful features for all objects.
Definition: any.h:39
Euclidean vector space of dimension d (volatile version).
Definition: ed.h:44
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
vd_value_type operator*(const T &x0, const T &x1)
The Euclidean "dot" product of x0 with x1 (for volatile types).
Definition: ed.impl.h:39
An abstract vector space viewed as an antisymmetric tensor space of degree 1.
Definition: at1_space.h:42
virtual at1 * clone() const
Make a new handle, no state instance of current.
Definition: at1.cc:812
Euclidean vector space of dimension d (peresistent version).
Definition: ed.h:210
ed_lite volatile_type
The associated volatile type.
Definition: ed.h:257
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
void dot(const S &x0, const S &x1, SR &xresult, bool xauto_access)
Definition: sec_ed.impl.h:144
void put_length(S &x0, const vd_value_type &xlength, bool xauto_access)
Definition: sec_ed.impl.h:213
An abstract client handle for a member of a poset.
Namespace for the fiber_bundles component of the sheaf system.
Row dofs type for class vd.
Definition: vd.h:61
ed * clone(bool xnew_state, bool xauto_access=true) const
Make a new handle instance of current. Attach the new instance to a new state if xnew_state is true...
Definition: ed.h:400
double vd_value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: fiber_bundle.h:63