SheafSystem  0.0.0.0
tp_space.h
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 
18 // Interface for class tp_space.
19 
20 #ifndef TP_SPACE_H
21 #define TP_SPACE_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef VD_SPACE_H
28 #include "SheafSystem/vd_space.h"
29 #endif
30 
31 #ifndef TP_TABLE_DOFS_TYPE_H
32 #include "SheafSystem/tp_table_dofs_type.h"
33 #endif
34 
35 namespace fiber_bundle
36 {
37 
38  using namespace sheaf;
39  class at1_space;
40  class tensor_variance;
41  class tp;
42 
43 
47 class SHEAF_DLL_SPEC tp_space : public vd_space
48 {
49  friend class fiber_bundles_namespace;
50 
51 public:
52 
53 
54 
55  // ===========================================================
57  // ===========================================================
59 
60 public:
61 
65  typedef tp member_type;
66 
71 
75  static const std::string& standard_schema_poset_name();
76 
80  static const poset_path& standard_schema_path();
81 
86 
87  using vd_space::d;
88 
92  static int d(const namespace_poset& xns, const poset_path& xschema_path, bool xauto_access);
93 
98  static int d(const namespace_poset& xns, int xp, const poset_path& xvector_space_path, bool xauto_access);
99 
106  static tp_space& new_table(namespace_type& xhost,
107  const poset_path& xpath,
108  const poset_path& xschema_path,
109  int xp,
110  const poset_path& xvector_space_path,
111  bool xauto_access);
112 
113  //============================================================================
114  // TABLE DOFS
115  //============================================================================
116 
120  virtual int d(int xp, int xdd) const;
121 
125  int p(int xd, int xdd) const;
126 
130  int p() const;
131 
135  int p(bool xauto_access) const;
136 
140  int dd() const;
141 
145  int dd(bool xauto_access) const;
146 
150  poset_path vector_space_path() const;
151 
155  poset_path vector_space_path(bool xauto_access) const;
156 
160  virtual tensor_variance variance(pod_index_type xmbr_id, bool xauto_access) const;
161 
165  tensor_variance variance(const scoped_index& xmbr_id, bool xauto_access) const;
166 
171  virtual bool variance(pod_index_type xmbr_id, int xi, bool xauto_access) const;
172 
177  bool variance(const scoped_index& xmbr_id, int xi, bool xauto_access) const;
178 
182  void put_variance(pod_index_type xmbr_id, const tensor_variance& xvariance, bool xauto_access);
183 
187  void put_variance(const scoped_index& xmbr_id, const tensor_variance& xvariance, bool xauto_access);
188 
192  void put_variance(pod_index_type xmbr_id, int xi, bool xvariance, bool xauto_access);
193 
197  void put_variance(const scoped_index& xmbr_id, int xi, bool xvariance, bool xauto_access);
198 
205  virtual tensor_variance round_variance(const tensor_variance& xvariance) const;
206 
210  virtual bool is_covariant(pod_index_type xmbr_id, bool xauto_access) const;
211 
215  bool is_covariant(const scoped_index& xmbr_id, bool xauto_access) const;
216 
220  virtual bool is_covariant(pod_index_type xmbr_id, int xi, bool xauto_access) const;
221 
225  bool is_covariant(const scoped_index& xmbr_id, int xi, bool xauto_access) const;
226 
230  virtual void put_is_covariant(pod_index_type xmbr_id, bool xauto_access);
231 
235  void put_is_covariant(const scoped_index& xmbr_id, bool xauto_access);
236 
240  void put_is_covariant(pod_index_type xmbr_id, int xi, bool xauto_access);
241 
245  void put_is_covariant(const scoped_index& xmbr_id, int xi, bool xauto_access);
246 
250  virtual bool is_contravariant(pod_index_type xmbr_id, bool xauto_access) const;
251 
255  bool is_contravariant(const scoped_index& xmbr_id, bool xauto_access) const;
256 
260  virtual bool is_contravariant(pod_index_type xmbr_id, int xi, bool xauto_access) const;
261 
265  bool is_contravariant(const scoped_index& xmbr_id, int xi, bool xauto_access) const;
266 
270  virtual void put_is_contravariant(pod_index_type xmbr_id, bool xauto_access);
271 
275  void put_is_contravariant(const scoped_index& xmbr_id, bool xauto_access);
276 
280  void put_is_contravariant(pod_index_type xmbr_id, int xi, bool xauto_access);
281 
285  void put_is_contravariant(const scoped_index& xmbr_id, int xi, bool xauto_access);
286 
287 protected:
288 
293  tp_space();
294 
298  tp_space(const tp_space& xother) { };
299 
303  virtual ~tp_space();
304 
308  tp_space(tp* xtop, tp* xbottom);
309 
313  virtual size_type covariant_subposet_ct() const;
314 
315 private:
316 
318 
319  // ===========================================================
321  // ===========================================================
323 
324 public:
325 
326 protected:
327 
328 private:
329 
333  static bool make_prototype();
334 
336 
337  // ===========================================================
339  // ===========================================================
341 
342 public:
343 
347  virtual poset_type type_id() const;
348 
352  virtual const char* class_name() const;
353 
357  virtual pod_index_type prereq_id(int xi) const;
358 
359 protected:
360 
364  tp_space& operator=(const poset_state_handle& xother);
365 
366 private:
367 
369 
370  // ===========================================================
372  // ===========================================================
374 
375 public:
376 
377 protected:
378 
379 private:
380 
382 
383 
384  // ===========================================================
386  // ===========================================================
388 
389 public:
390 
394  virtual bool is_ancestor_of(const any* xother) const;
395 
400  virtual tp_space* clone() const;
401 
405  virtual bool invariant() const;
406 
407 protected:
408 private:
409 
411 
412 };
413 
414 
415 } // namespace fiber_bundle
416 
417 
418 #endif // TP_SPACE_H
tp_space(const tp_space &xother)
Copy constructor; disabled.
Definition: tp_space.h:298
The "type" of a tensor; specifies the degree and the co- or contra-variance for each index of a tenso...
tp member_type
The type of member associated with this space.
Definition: tp_space.h:65
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...
poset_type
Identifiers for poset types.
Definition: poset_type.h:41
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 ('/'). For example: "cell_definitions/triangle".
Definition: poset_path.h:48
at1_space vector_space_type
The type of domain vector space.
Definition: tp_space.h:70
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 objects.
Definition: any.h:39
tp_table_dofs_type table_dofs_type
The table dofs type defined by the standard schema.
Definition: tp_space.h:85
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 d() const
The dimension.
Definition: vd_space.cc:174
An abstract vector space viewed as an antisymmetric tensor space of degree 1.
Definition: at1_space.h:42
An abstract vector space of dimension d.
Definition: vd_space.h:47
Table dofs type for class tp.
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.
An abstract tensor space of degree p.
Definition: tp_space.h:47
Namespace for the fiber_bundles component of the sheaf system.