SheafSystem  0.0.0.0
at2.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 AT2_H
22 #define AT2_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 AT2_LITE
37 //==============================================================================
38 
43 class SHEAF_DLL_SPEC at2_lite : public atp_lite
44 {
45  //===========================================================================
47  //===========================================================================
49 
50 public:
51 
57 
61  at2_lite();
62 
66  at2_lite(const at2_lite& xother);
67 
71  at2_lite& operator=(const at2_lite& xother);
72 
76  virtual ~at2_lite();
77 
81  at2_lite(const row_dofs_type& xrow_dofs);
82 
86  at2_lite& operator=(const row_dofs_type& xrow_dofs);
87 
88 
89  using atp_lite::component;
91 
95  virtual value_type component(int xrow, int xcolumn) const;
96 
100  virtual void put_component(int xrow, int xcolumn, value_type xcomp);
101 
106  virtual int index_for_row_column(int xrow, int xcolumn) const;
107 
108 protected:
109 private:
110 
112 
113 
114  //===========================================================================
116  //===========================================================================
118 
119 public:
120 protected:
121 private:
122 
124 
125 
126  //===========================================================================
128  //===========================================================================
130 
131 public:
132 
138  enum static_const_int {P = 2};
139 
143  virtual int p() const;
144 
145 protected:
146 private:
147 
148  //===========================================================================
150  //===========================================================================
152 
153 public:
154 protected:
155 private:
156 
158 
159 
160  //===========================================================================
162  //===========================================================================
164 
165 public:
166 protected:
167 private:
168 
170 
171 
172  //============================================================================
174  //============================================================================
176 
177 public:
178 
182  virtual const std::string& class_name() const;
183 
187  static const std::string& static_class_name();
188 
192  virtual at2_lite* clone() const;
193 
194 protected:
195 private:
196 
198 
199 
200  //===========================================================================
202  //===========================================================================
204 
205 public:
206 
210  virtual bool is_ancestor_of(const any_lite& xother) const;
211 
215  bool invariant() const;
216 
217 
218 protected:
219 private:
220 
222 };
223 
224 //==============================================================================
225 // CLASS AT2
226 //==============================================================================
227 
228 class tp_space;
229 
233 class SHEAF_DLL_SPEC at2 : public atp
234 {
235 
236  // ===========================================================
238  // ===========================================================
240 
241 public:
242 
246  static const poset_path& standard_schema_path();
247 
251  static void make_standard_schema(namespace_poset& xns);
252 
258  static host_type& new_host(namespace_type& xns,
259  const poset_path& xhost_path,
260  const poset_path& xschema_path,
261  const poset_path& xscalar_space_path,
262  bool xauto_access);
263 
264 protected:
265 
266 private:
267 
269 
270 
271  //============================================================================
273  //============================================================================
275 
276 public:
277 
282 
286  at2();
287 
292  at2(const poset_state_handle* xhost, pod_index_type xhub_id);
293 
298  at2(const poset_state_handle* xhost, const scoped_index& xid);
299 
304  at2(const poset_state_handle* xhost, const std::string& xname);
305 
309  explicit at2(abstract_poset_member* xother);
310 
314  at2(poset_state_handle* xhost, bool xauto_access = true);
315 
319  virtual at2& operator=(const abstract_poset_member& xother);
320 
324  at2& operator=(const at2& xother);
325 
329  ~at2();
330 
334  virtual const volatile_type& lite_prototype() const;
335 
339  virtual volatile_type* lite_type() const;
340 
341  using tp::component;
342  using tp::put_component;
343 
347  value_type component(int xrow, int xcolumn) const;
348 
352  value_type component(int xrow, int xcolumn, bool xauto_access) const;
353 
357  void put_component(int xrow, int xcolumn, value_type xvalue);
358 
362  void put_component(int xrow, int xcolumn, value_type xvalue,
363  bool xauto_access);
364 
369  virtual int index_for_row_column(int xrow, int xcolumn) const;
370 
371 // ///
372 // /// The index into linear storage of the component
373 // /// with specified xi and xj.
374 // ///
375 // virtual int index_for_ij(int xi, int xj) const;
376 
377 
378 protected:
379 private:
380 
382 
383 
384  //============================================================================
386  //============================================================================
388 
389 public:
390 protected:
391 private:
392 
393 
395 
396 
397  //============================================================================
399  //============================================================================
401 
402 public:
403 
409  enum static_const_int {P = 2};
410 
411 protected:
412 private:
413 
414 
416 
417 
418  //============================================================================
420  //============================================================================
422 
423 public:
424 protected:
425 private:
426 
428 
429 
430  //============================================================================
432  //============================================================================
434 
435 public:
436 
437 protected:
438 
439 private:
440 
442 
443 
444  //============================================================================
446  //============================================================================
448 
449 public:
450 
454  virtual const std::string& class_name() const;
455 
459  static const std::string& static_class_name();
460 
464  virtual at2* clone() const;
465 
471  inline at2* clone(bool xnew_state, bool xauto_access = true) const
472  {
473  return static_cast<at2*>(atp::clone(xnew_state, xauto_access));
474  }
475 
476 protected:
477 private:
478 
480 
481 
482  //============================================================================
484  //============================================================================
486 
487 public:
488 
492  bool is_ancestor_of(const any* xother) const;
493 
497  bool invariant() const;
498 
499 protected:
500 private:
501 
503 };
504 
505 } // namespace fiber_bundle
506 
507 #endif // ifndef AT2_H
508 
509 
at2_lite volatile_type
The associated volatile type.
Definition: at2.h:281
An antisymmetric tensor of degree p.
Definition: atp.h:190
static_const_int
The tensor degree (static version)
Definition: at2.h:138
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
at2 * 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: at2.h:471
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
virtual value_type component(int xindex) const
The value of the xi-th component.
Definition: vd.cc:1115
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
vd_value_type value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: at2.h:56
virtual atp * clone() const
Make a new handle, no state instance of current.
Definition: atp.cc:899
A general antisymmetric tensor of degree 2 over an abstract vector space (volatile version)...
Definition: at2.h:43
An abstract client handle for a member of a poset.
static_const_int
The tensor degree (static version)
Definition: at2.h:409
virtual void put_component(int xindex, value_type xvalue)
Sets the value of the xindex-th component to xvalue.
Definition: vd.cc:1169
An abstract tensor space of degree p.
Definition: tp_space.h:47
Namespace for the fiber_bundles component of the sheaf system.
Row dofs type for class vd.
Definition: vd.h:61
A general antisymmetric tensor of degree 2 over an abstract vector space.
Definition: at2.h:233
double vd_value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: fiber_bundle.h:63