SheafSystem  0.0.0.0
at3.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 AT3_H
22 #define AT3_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef ATP_H
29 #include "SheafSystem/atp.h"
30 #endif
31 
32 namespace fiber_bundle
33 {
34 
35 //==============================================================================
36 // CLASS AT3_LITE
37 //==============================================================================
38 
43 class SHEAF_DLL_SPEC at3_lite : public atp_lite
44 {
45  //===========================================================================
47  //===========================================================================
49 
50 public:
51 
55  at3_lite();
56 
60  at3_lite(const at3_lite& xother);
61 
65  at3_lite& operator=(const at3_lite& xother);
66 
70  virtual ~at3_lite();
71 
75  at3_lite(const row_dofs_type& xrow_dofs);
76 
80  at3_lite& operator=(const row_dofs_type& xrow_dofs);
81 
82 
83  using atp_lite::component;
85 
89  virtual value_type component(int xi, int xj, int xk) const;
90 
94  virtual void put_component(int xi, int xj, int xk, value_type xvalue);
95 
100  virtual int index_for_ijk(int xi, int xj, int xk) const;
101 
102 
103 protected:
104 private:
105 
107 
108 
109  //===========================================================================
111  //===========================================================================
113 
114 public:
115 protected:
116 private:
117 
119 
120 
121  //===========================================================================
123  //===========================================================================
125 
126 public:
127 
133  enum static_const_int {P = 3};
134 
138  virtual int p() const;
139 
140 protected:
141 private:
142 
144 
145 
146  //===========================================================================
148  //===========================================================================
150 
151 public:
152 protected:
153 private:
154 
156 
157 
158  //===========================================================================
160  //===========================================================================
162 
163 public:
164 protected:
165 private:
166 
168 
169 
170  //============================================================================
172  //============================================================================
174 
175 public:
176 
180  virtual const std::string& class_name() const;
181 
185  static const std::string& static_class_name();
186 
190  virtual at3_lite* clone() const;
191 
192 protected:
193 private:
194 
196 
197 
198  //===========================================================================
200  //===========================================================================
202 
203 public:
204 
208  virtual bool is_ancestor_of(const any_lite& xother) const;
209 
213  bool invariant() const;
214 
215 
216 protected:
217 private:
218 
220 };
221 
222 //==============================================================================
223 // CLASS AT3
224 //==============================================================================
225 
230 class SHEAF_DLL_SPEC at3 : public atp
231 {
232  // ===========================================================
234  // ===========================================================
236 
237 public:
238 
242  static const poset_path& standard_schema_path();
243 
247  static void make_standard_schema(namespace_poset& xns);
248 
254  static host_type& new_host(namespace_type& xns,
255  const poset_path& xhost_path,
256  const poset_path& xschema_path,
257  const poset_path& xscalar_space_path,
258  bool xauto_access);
259 
260 protected:
261 
262 private:
263 
265 
266 
267  //============================================================================
269  //============================================================================
271 
272 public:
273 
278 
282  at3();
283 
288  at3(const poset_state_handle* xhost, pod_index_type xhub_id);
289 
294  at3(const poset_state_handle* xhost, const scoped_index& xid);
295 
300  at3(const poset_state_handle* xhost, const std::string& xname);
301 
305  explicit at3(abstract_poset_member* xother);
306 
310  at3(poset_state_handle* xhost, bool xauto_access = true);
311 
315  virtual at3& operator=(const abstract_poset_member& xother);
316 
320  at3& operator=(const at3& xother);
321 
325  ~at3();
326 
330  virtual const volatile_type& lite_prototype() const;
331 
335  virtual volatile_type* lite_type() const;
336 
337  using atp::component;
338  using atp::put_component;
339 
343  virtual value_type component(int xi, int xj, int xk) const;
344 
348  virtual value_type component(int xi, int xj, int xk, bool xauto_access) const;
349 
353  virtual void put_component(int xi, int xj, int xk, value_type xvalue);
354 
358  virtual void put_component(int xi, int xj, int xk, value_type xvalue,
359  bool xauto_access);
360 
365  virtual int index_for_ijk(int xi, int xj, int xk) const;
366 
367 protected:
368 private:
369 
371 
372 
373  //============================================================================
375  //============================================================================
377 
378 public:
379 protected:
380 private:
381 
383 
384 
385  //============================================================================
387  //============================================================================
389 
390 public:
391 
397  enum static_const_int {P = 3};
398 
399 protected:
400 private:
401 
403 
404 
405 
406  //============================================================================
408  //============================================================================
410 
411 public:
412 protected:
413 private:
414 
416 
417 
418  //============================================================================
420  //============================================================================
422 
423 public:
424 
425 protected:
426 
427 private:
428 
430 
431 
432  //============================================================================
434  //============================================================================
436 
437 public:
438 
442  virtual const std::string& class_name() const;
443 
447  static const std::string& static_class_name();
448 
452  virtual at3* clone() const;
453 
459  inline at3* clone(bool xnew_state, bool xauto_access = true) const
460  {
461  return static_cast<at3*>(atp::clone(xnew_state, xauto_access));
462  }
463 
464 protected:
465 private:
466 
468 
469 
470  //============================================================================
472  //============================================================================
474 
475 public:
476 
480  bool is_ancestor_of(const any* xother) const;
481 
485  bool invariant() const;
486 
487 protected:
488 private:
489 
491 };
492 
493 //==============================================================================
494 // NON-MEMBER FUNCTIONS
495 //==============================================================================
496 
497 } // namespace fiber_bundle
498 
499 #endif // ifndef AT3_H
at3_lite volatile_type
The associated volatile type.
Definition: at3.h:277
An antisymmetric rank 3 tensor over an abstract vector space (volatile version).
Definition: at3.h:43
static_const_int
The tensor degree (static version)
Definition: at3.h:397
vd_value_type value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: vd.h:129
An antisymmetric tensor of degree p.
Definition: atp.h:190
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
value_type component(int xindex) const
The xindex-th component.
Definition: vd.cc:209
An antisymmetric tensor of degree p over an abstract vector space (volatile version).
Definition: atp.h:44
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
at3 * 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: at3.h:459
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
static_const_int
The tensor degree (static version)
Definition: at3.h:133
virtual value_type component(int xindex) const
The value of the xi-th component.
Definition: vd.cc:1115
An antisymmetric rank 3 tensor over an abstract vector space (volatile version).
Definition: at3.h:230
void put_component(int xindex, value_type xcomp)
Set the xindex-th component to xcomp.
Definition: vd.cc:230
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
vd_value_type value_type
The POD ("plain old data") type of scalar in the vector space of this.
Definition: vd.h:423
virtual atp * clone() const
Make a new handle, no state instance of current.
Definition: atp.cc:899
An abstract client handle for a member of a poset.
virtual void put_component(int xindex, value_type xvalue)
Sets the value of the xindex-th component to xvalue.
Definition: vd.cc:1169
Namespace for the fiber_bundles component of the sheaf system.
Row dofs type for class vd.
Definition: vd.h:61