SheafSystem  0.0.0.0
atp.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 ATP_H
22 #define ATP_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef TP_H
29 #include "SheafSystem/tp.h"
30 #endif
31 
32 namespace fiber_bundle
33 {
34  class atp_space;
35 
36 //==============================================================================
37 // CLASS ATP_LITE
38 //==============================================================================
39 
44 class SHEAF_DLL_SPEC atp_lite : public tp_lite
45 {
46  //============================================================================
48  //============================================================================
50 
51 public:
52 
56  atp_lite();
57 
61  atp_lite(const atp_lite& xother);
62 
66  atp_lite& operator=(const atp_lite& xother);
67 
71  virtual ~atp_lite();
72 
76  atp_lite(const row_dofs_type& xrow_dofs);
77 
81  atp_lite& operator=(const row_dofs_type& xrow_dofs);
82 
83 
84 protected:
85 private:
86 
88 
89 
90  //============================================================================
92  //============================================================================
94 
95 public:
96 protected:
97 private:
98 
100 
101 
102  //============================================================================
104  //============================================================================
106 
107 public:
108 
112  virtual int d() const;
113 
114 protected:
115 private:
116 
118 
119 
120  //============================================================================
122  //============================================================================
124 
125 public:
126 protected:
127 private:
128 
130 
131 
132  //============================================================================
134  //============================================================================
136 
137 public:
138 
142  virtual const std::string& class_name() const;
143 
147  static const std::string& static_class_name();
148 
152  virtual atp_lite* clone() const;
153 
154 protected:
155 private:
156 
158 
159 
160  //============================================================================
162  //============================================================================
164 
165 public:
166 
170  virtual bool is_ancestor_of(const any_lite& xother) const;
171 
175  bool invariant() const;
176 
177 protected:
178 private:
179 
181 };
182 
183 //==============================================================================
184 // CLASS ATP
185 //==============================================================================
186 
190 class SHEAF_DLL_SPEC atp : public tp
191 {
192  // ===========================================================
194  // ===========================================================
196 
197 public:
198 
203 
207  static const poset_path& standard_schema_path();
208 
212  static void make_standard_schema(namespace_poset& xns);
213 
219  static host_type& new_host(namespace_type& xns,
220  const poset_path& xhost_path,
221  const poset_path& xschema_path,
222  int xp,
223  const poset_path& xvector_space_path,
224  bool xauto_access);
225 
226 protected:
227 
228 private:
229 
231 
232  //============================================================================
234  //============================================================================
236 
237 public:
238 
243 
247  atp();
248 
253  atp(const poset_state_handle* xhost, pod_index_type xhub_id);
254 
259  atp(const poset_state_handle* xhost, const scoped_index& xid);
260 
265  atp(const poset_state_handle* xhost, const std::string& xname);
266 
270  explicit atp(abstract_poset_member* xother);
271 
275  atp(poset_state_handle* xhost, bool xauto_access = true);
276 
280  virtual atp& operator=(const abstract_poset_member& xother);
281 
285  atp& operator=(const atp& xother);
286 
290  virtual ~atp();
291 
295  virtual const volatile_type& lite_prototype() const;
296 
300  virtual volatile_type* lite_type() const;
301 
306  bool is_p_form(bool xauto_access) const;
307 
312  void put_is_p_form(bool xauto_access);
313 
318  bool is_p_vector(bool xauto_access) const;
319 
324  void put_is_p_vector(bool xauto_access);
325 
326 protected:
327 private:
328 
330 
331 
332  //============================================================================
334  //============================================================================
336 
337 public:
338 
339 protected:
340 
341 private:
342 
344 
345 
346  //============================================================================
348  //============================================================================
350 
351 public:
352 protected:
353 private:
354 
356 
357  //============================================================================
359  //============================================================================
361 
362 public:
363 
367  virtual const std::string& class_name() const;
368 
372  static const std::string& static_class_name();
373 
379  inline atp* clone(bool xnew_state, bool xauto_access = true) const
380  {
381  return static_cast<atp*>(tp::clone(xnew_state, xauto_access));
382  }
383 
384 protected:
385 private:
386 
388 
389  // ===========================================================
391  // ===========================================================
393 
394 public:
395 
399  host_type* host() const;
400 
404  virtual bool host_is_ancestor_of(const poset_state_handle* other) const;
405 
406 protected:
407 
408 private:
409 
411 
412 
413  //============================================================================
415  //============================================================================
417 
418 public:
419 
423  bool is_ancestor_of(const any* xother) const;
424 
428  virtual atp* clone() const;
429 
433  bool invariant() const;
434 
435 
436 protected:
437 private:
438 
440 };
441 
442 //==============================================================================
443 // NON-MEMBER FUNCTIONS
444 //==============================================================================
445 
446 //==============================================================================
447 // ATP FACET:
448 //==============================================================================
449 
454 namespace atp_algebra
455 {
456 
461 SHEAF_DLL_SPEC void hook(const atp& x0, const atp& x1, atp& xresult, bool xauto_access);
462 
467 SHEAF_DLL_SPEC void hook(const atp_lite& x0, const atp_lite& x1, atp_lite& xresult);
468 
469 #ifndef SWIG
470 
475 template <typename T0, typename T1>
476 typename tensor_traits<static_cast<int>(T0::P) - static_cast<int>(T1::P), typename T0::vector_space_type>::atp_type*
477 hook(const T0& x0, const T1& x1);
478 
483 template <typename T0, typename T1>
484 typename tensor_traits<static_cast<int>(T0::P) - static_cast<int>(T1::P), typename T0::vector_space_type>::atp_type*
485 hook(const T0& x0, const T1& x1, bool xauto_access);
486 
487 #endif
488 
493 SHEAF_DLL_SPEC void star(const atp& x0, atp& xresult, bool xauto_access);
494 
499 SHEAF_DLL_SPEC void star(const atp_lite& x0, atp_lite& xresult);
500 
505 SHEAF_DLL_SPEC atp_lite* star(const atp_lite& x0);
506 
511 SHEAF_DLL_SPEC void wedge(const atp& x0, const atp& x1, atp& xresult, bool xauto_access);
512 
517 SHEAF_DLL_SPEC void wedge(const atp_lite& x0, const atp_lite& x1, atp_lite& xresult);
518 
519 #ifndef SWIG
520 
525 template <typename T0, typename T1>
526 typename tensor_traits<static_cast<int>(T0::P) + static_cast<int>(T1::P), typename T0::vector_space_type>::atp_type*
527 wedge(const T0& x0, const T1& x1);
528 
533 template <typename T0, typename T1>
534 typename tensor_traits<static_cast<int>(T0::P) + static_cast<int>(T1::P), typename T0::vector_space_type>::atp_type*
535 wedge(const T0& x0, const T1& x1, bool xauto_access);
536 
537 #endif
538 
539 } // namespace atp_algebra
540 
541 } // namespace fiber_bundle
542 
543 
544 #endif // ifndef ATP_H
An antisymmetric tensor of degree p.
Definition: atp.h:190
atp * 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: atp.h:379
The default name space; a poset which contains other posets as members.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
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
atp_space host_type
The type of host poset.
Definition: atp.h:202
An antisymmetric tensor of degree p over an abstract vector space (volatile version).
Definition: atp.h:44
A general tensor of "degree" p and given "variance" over an abstract vector space.
Definition: tp.h:253
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
Tensor types of degree P over VECTOR_TYPE. No generic implementation defined, must be specialized for...
Definition: vd.h:714
An abstract antisymmetric tensor space of degree p.
Definition: atp_space.h:42
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
SHEAF_DLL_SPEC tensor_variance hook(const tensor_variance &x0)
The variance of the hook of a tensor with variance x0.
A general tensor of degree p over an abstract vector space (volatile version). Volatile version does ...
Definition: tp.h:59
atp_lite volatile_type
The associated volatile type.
Definition: atp.h:242
virtual tp * clone() const
Make a new handle, no state instance of current.
Definition: tp.cc:1363
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
SHEAF_DLL_SPEC tensor_variance wedge(const tensor_variance &x0, const tensor_variance &x1)
The variance of the wedge of a tensor with variance x0 with a tnesor with variance x1...
An abstract client handle for a member of a poset.
SHEAF_DLL_SPEC tensor_variance star(const tensor_variance &x0, int xdd)
The variance of the Hodge star of a tensor with variance x0 over a vector space of dimension xdd...
Namespace for the fiber_bundles component of the sheaf system.
Row dofs type for class vd.
Definition: vd.h:61