SheafSystem  0.0.0.0
sec_tp_space.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 SEC_TP_SPACE_H
22 #define SEC_TP_SPACE_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef SEC_VD_SPACE_H
29 #include "SheafSystem/sec_vd_space.h"
30 #endif
31 
32 #ifndef TP_TABLE_DOFS_TYPE_H
33 #include "SheafSystem/tp_table_dofs_type.h"
34 #endif
35 
36 namespace sheaf
37 {
38 class namespace_poset;
39 }
40 
41 namespace fiber_bundle
42 {
43 using namespace sheaf;
44 
45 class sec_at1;
46 class sec_tp;
47 class tensor_variance;
48 class tp;
49 
53 class SHEAF_DLL_SPEC sec_tp_space : public sec_vd_space
54 {
55  friend class fiber_bundles_namespace;
56 
57  // ===========================================================
59  // ===========================================================
61 
62 public:
63 
68 
72  typedef tp fiber_type;
73 
78 
83 
90  static bool same_vector_fiber_space(const namespace_poset& xns,
91  const poset_path& xschema_path,
92  const poset_path& xvector_space_path,
93  bool xauto_access);
94 
100  static sec_tp_space& new_table(namespace_type& xhost,
101  const poset_path& xpath,
102  const poset_path& xschema_path,
103  const poset_path& xvector_space_path,
104  bool xauto_access);
105 
106  //============================================================================
107  // TABLE DOFS
108  //============================================================================
109 
110  using sec_vd_space::d;
111 
115  virtual int d(int xp, int xdd) const;
116 
120  int p() const;
121 
125  int p(bool xauto_access) const;
126 
130  int dd() const;
131 
135  int dd(bool xauto_access) const;
136 
140  poset_path vector_space_path() const;
141 
145  poset_path vector_space_path(bool xauto_access) const;
146 
150  virtual tensor_variance variance(pod_index_type xmbr_id, bool xauto_access) const;
151 
155  tensor_variance variance(const scoped_index& xmbr_id, bool xauto_access) const;
156 
161  virtual bool variance(pod_index_type xmbr_id, int xi, bool xauto_access) const;
162 
167  bool variance(const scoped_index& xmbr_id, int xi, bool xauto_access) const;
168 
172  void put_variance(pod_index_type xmbr_id, const tensor_variance& xvariance, bool xauto_access);
173 
177  void put_variance(const scoped_index& xmbr_id, const tensor_variance& xvariance, bool xauto_access);
178 
182  void put_variance(pod_index_type xmbr_id, int xi, bool xvariance, bool xauto_access);
183 
187  void put_variance(const scoped_index& xmbr_id, int xi, bool xvariance, bool xauto_access);
188 
195  virtual tensor_variance round_variance(const tensor_variance& xvariance) const;
196 
200  virtual bool is_covariant(pod_index_type xmbr_id, bool xauto_access) const;
201 
205  bool is_covariant(const scoped_index& xmbr_id, bool xauto_access) const;
206 
210  virtual bool is_covariant(pod_index_type xmbr_id, int xi, bool xauto_access) const;
211 
215  bool is_covariant(const scoped_index& xmbr_id, int xi, bool xauto_access) const;
216 
220  virtual void put_is_covariant(pod_index_type xmbr_id, bool xauto_access);
221 
225  void put_is_covariant(const scoped_index& xmbr_id, bool xauto_access);
226 
230  void put_is_covariant(pod_index_type xmbr_id, int xi, bool xauto_access);
231 
235  void put_is_covariant(const scoped_index& xmbr_id, int xi, bool xauto_access);
236 
240  virtual bool is_contravariant(pod_index_type xmbr_id, bool xauto_access) const;
241 
245  bool is_contravariant(const scoped_index& xmbr_id, bool xauto_access) const;
246 
250  virtual bool is_contravariant(pod_index_type xmbr_id, int xi, bool xauto_access) const;
251 
255  bool is_contravariant(const scoped_index& xmbr_id, int xi, bool xauto_access) const;
256 
260  virtual void put_is_contravariant(pod_index_type xmbr_id, bool xauto_access);
261 
265  void put_is_contravariant(const scoped_index& xmbr_id, bool xauto_access);
266 
270  void put_is_contravariant(pod_index_type xmbr_id, int xi, bool xauto_access);
271 
275  void put_is_contravariant(const scoped_index& xmbr_id, int xi, bool xauto_access);
276 
277 protected:
278 
283  sec_tp_space();
284 
288  sec_tp_space(const sec_tp_space& xother) { };
289 
293  virtual ~sec_tp_space();
294 
298  sec_tp_space(sec_tp* xtop, sec_tp* xbottom);
299 
300 private:
301 
303 
304 
305  // ===========================================================
307  // ===========================================================
309 
310 public:
311 
312 protected:
313 
317  virtual size_type covariant_subposet_ct() const;
318 
319 private:
320 
322 
323 
324  // ===========================================================
326  // ===========================================================
328 
329 public:
330 
331 protected:
332 
333 private:
334 
336 
337 
338  // ===========================================================
340  // ===========================================================
342 
343 public:
344 
345 protected:
346 
347 private:
348 
352  static bool make_prototype();
353 
355 
356 
357  // ===========================================================
359  // ===========================================================
361 
362 public:
363 
367  virtual poset_type type_id() const;
368 
372  virtual const char* class_name() const;
373 
377  virtual pod_index_type prereq_id(int xi) const;
378 
379 protected:
380 
385  {
386  return const_cast<sec_tp_space&>(*this);
387  };
388 
389 private:
390 
392 
393 
394  // ===========================================================
396  // ===========================================================
398 
399 public:
400 
401 protected:
402 
403 private:
404 
406 
407 
408  // ===========================================================
410  // ===========================================================
412 
413 public:
414 
418  virtual bool is_ancestor_of(const any* xother) const;
419 
424  virtual sec_tp_space* clone() const;
425 
429  virtual bool invariant() const;
430 
431 protected:
432 
433 private:
434 
436 
437 };
438 
439 
440 } // namespace fiber_bundle
441 
442 
443 #endif // SEC_TP_SPACE_H
The "type" of a tensor; specifies the degree and the co- or contra-variance for each index of a tenso...
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 (&#39;/&#39;). For example: "cell_definitions/triangle".
Definition: poset_path.h:48
An abstract vector section space of dimension d.
Definition: sec_vd_space.h:52
sec_tp_space & operator=(const poset_state_handle &xother)
Assignment operator; disabled.
Definition: sec_tp_space.h:384
A section of a bundle with fiber type at1.
Definition: sec_at1.h:48
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
An abstract tensor section space of degree p.
Definition: sec_tp_space.h:53
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
tp_table_dofs_type table_dofs_type
The table dofs type defined by the standard schema.
Definition: sec_tp_space.h:82
sec_at1 vector_space_type
The type of vector sections that form the domain of tensor sections of this type. ...
Definition: sec_tp_space.h:77
Table dofs type for class tp.
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
sec_tp member_type
The type of member associated with this space.
Definition: sec_tp_space.h:67
Namespace for the sheaves component of the sheaf system.
tp fiber_type
The fiber type.
Definition: sec_tp_space.h:72
sec_tp_space(const sec_tp_space &xother)
Copy constructor; disabled.
Definition: sec_tp_space.h:288
Namespace for the fiber_bundles component of the sheaf system.
A section of a bundle with fiber type tp.
Definition: sec_tp.h:49