SheafSystem  0.0.0.0
vd_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 vd_space.
19 
20 #ifndef VD_SPACE_H
21 #define VD_SPACE_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef TUPLE_SPACE_H
28 #include "SheafSystem/tuple_space.h"
29 #endif
30 
31 #ifndef VD_TABLE_DOFS_TYPE_H
32 #include "SheafSystem/vd_table_dofs_type.h"
33 #endif
34 
35 namespace fiber_bundle
36 {
37 
38  using namespace sheaf;
39 
40  class vd;
41  class at0_space;
42 
43 
47 class SHEAF_DLL_SPEC vd_space : public tuple_space
48 {
49  friend class fiber_bundles_namespace;
50 
51 public:
52 
53  // ===========================================================
55  // ===========================================================
57 
58 public:
59 
63  typedef vd member_type;
64 
69 
73  static const std::string& standard_schema_poset_name();
74 
78  static const poset_path& standard_schema_path();
79 
84 
90  static vd_space& new_table(namespace_type& xhost,
91  const poset_path& xpath,
92  const poset_path& xschema_path,
93  const poset_path& xscalar_space_path,
94  bool xauto_access);
95 
96  //============================================================================
97  // TABLE DOFS
98  //============================================================================
99 
101 
105  static int factor_ct(int xd);
106 
110  int d() const;
111 
115  int d(bool xauto_access) const;
116 
121  static int d(const namespace_poset& xns,
122  const poset_path& xvector_space_path,
123  bool xauto_access);
124 
128  poset_path scalar_space_path() const;
129 
133  poset_path scalar_space_path(bool xauto_access) const;
134 
140  static poset_path scalar_space_path(const namespace_poset& xns,
141  const poset_path& xvector_space_path,
142  bool xauto_access);
143 
147  bool contains_variance_subposets(bool xauto_access) const;
148 
152  virtual bool is_vector(pod_index_type xmbr_id, bool xauto_access) const;
153 
157  bool is_vector(const scoped_index& xmbr_id, bool xauto_access) const;
158 
162  virtual void put_is_vector(pod_index_type xmbr_id, bool xauto_access);
163 
167  void put_is_vector(const scoped_index& xmbr_id, bool xauto_access);
168 
172  virtual bool is_covector(pod_index_type xmbr_id, bool xauto_access) const;;
173 
177  bool is_covector(const scoped_index& xmbr_id, bool xauto_access) const;;
178 
182  virtual void put_is_covector(pod_index_type xmbr_id, bool xauto_access);
183 
187  void put_is_covector(const scoped_index& xmbr_id, bool xauto_access);
188 
189 protected:
190 
195  vd_space();
196 
200  vd_space(const vd_space& xother) { };
201 
205  virtual ~vd_space();
206 
210  vd_space(vd* xtop, vd* xbottom);
211 
215  static std::string covariant_subposet_name(int xi);
216 
220  void create_variance_subposets();
221 
225  virtual size_type covariant_subposet_ct() const;
226 
227 private:
228 
230 
231  // ===========================================================
233  // ===========================================================
235 
236 public:
237 
238 protected:
239 
240 private:
241 
245  static bool make_prototype();
246 
248 
249  // ===========================================================
251  // ===========================================================
253 
254 public:
255 
259  virtual poset_type type_id() const;
260 
264  virtual const char* class_name() const;
265 
269  virtual pod_index_type prereq_id(int xi) const;
270 
271 protected:
272 
277  {
278  return const_cast<vd_space&>(*this);
279  };
280 
284  virtual void initialize_standard_subposets(const std::string& xname);
285 
286 private:
287 
289 
290  // ===========================================================
292  // ===========================================================
294 
295 public:
296 
300  virtual bool is_ancestor_of(const any* xother) const;
301 
306  virtual vd_space* clone() const;
307 
311  virtual bool invariant() const;
312 
313 protected:
314 private:
315 
317 
318 };
319 
320 
321 // ===========================================================
322 // NON-MEMBER FUNCTIONS
323 // ===========================================================
324 
329  SHEAF_DLL_SPEC void print_prereq_paths(std::ostream &xos,
330  const vd_space& xspace,
331  const std::string& xheading,
332  const std::string& xindent,
333  bool xauto_access = true);
334 
335 } // namespace fiber_bundle
336 
337 
338 #endif // VD_SPACE_H
vd member_type
The type of member associated with this space.
Definition: vd_space.h:63
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
A Cartesian product space.
Definition: tuple_space.h:52
vd_table_dofs_type table_dofs_type
The table dofs type defined by the standard schema.
Definition: vd_space.h:83
at0_space scalar_space_type
The type of scalar space associated with this space.
Definition: vd_space.h:68
Abstract base class with useful features for all objects.
Definition: any.h:39
A space of scalars viewed as an antisymmetric tensor space of degree 0.
Definition: at0_space.h:42
vd_space(const vd_space &xother)
Copy constructor; disabled.
Definition: vd_space.h:200
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
Table dofs type for class vd_table_dofs_type.
An abstract vector space of dimension d.
Definition: vd_space.h:47
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.
vd_space & operator=(const poset_state_handle &xother)
Assignment operator; disabled.
Definition: vd_space.h:276
SHEAF_DLL_SPEC void print_prereq_paths(std::ostream &xos, const vd_space &xspace, const std::string &xheading, const std::string &xindent, bool xauto_access=true)
Print the paths for xspace and its prerequisites: schema, scalar space, etc.
Definition: vd_space.cc:962
Namespace for the fiber_bundles component of the sheaf system.
Abstract vector space over dof_type.
Definition: vd.h:350
int factor_ct() const
The number of factors in this product.
Definition: tuple_space.cc:152