SheafSystem  0.0.0.0
st3.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 ST3_H
22 #define ST3_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef STP_H
29 #include "SheafSystem/stp.h"
30 #endif
31 
32 namespace fiber_bundle
33 {
34 
35 //==============================================================================
36 // CLASS ST3_LITE
37 //==============================================================================
38 
43 class SHEAF_DLL_SPEC st3_lite : public stp_lite
44 {
45  //===========================================================================
47  //===========================================================================
49 
50 public:
51 
55  st3_lite();
56 
60  st3_lite(const st3_lite& xother);
61 
65  st3_lite& operator=(const st3_lite& xother);
66 
70  virtual ~st3_lite();
71 
75  st3_lite(const row_dofs_type& xrow_dofs);
76 
80  st3_lite& operator=(const row_dofs_type& xrow_dofs);
81 
82 
83  using stp_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 st3_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 ST3
224 //==============================================================================
225 
230 class SHEAF_DLL_SPEC st3 : public stp
231 {
232 
233  // ===========================================================
235  // ===========================================================
237 
238 public:
239 
243  static const poset_path& standard_schema_path();
244 
248  static void make_standard_schema(namespace_poset& xns);
249 
255  static host_type& new_host(namespace_type& xns,
256  const poset_path& xhost_path,
257  const poset_path& xschema_path,
258  const poset_path& xvector_space_path,
259  bool xauto_access);
260 
261 protected:
262 
263 private:
264 
266 
267 
268  //============================================================================
270  //============================================================================
272 
273 public:
274 
279 
283  st3();
284 
289  st3(const poset_state_handle* xhost, pod_index_type xhub_id);
290 
295  st3(const poset_state_handle* xhost, const scoped_index& xid);
296 
301  st3(const poset_state_handle* xhost, const std::string& xname);
302 
306  explicit st3(abstract_poset_member* xother);
307 
311  st3(poset_state_handle* xhost, bool xauto_access = true);
312 
316  virtual st3& operator=(const abstract_poset_member& xother);
317 
321  st3& operator=(const st3& xother);
322 
326  ~st3();
327 
331  virtual const volatile_type& lite_prototype() const;
332 
336  virtual volatile_type* lite_type() const;
337 
338 
339 protected:
340 private:
341 
343 
344 
345  //============================================================================
347  //============================================================================
349 
350 public:
351 protected:
352 private:
353 
355 
356 
357 
358  //============================================================================
360  //============================================================================
362 
363 public:
364 
370  enum static_const_int {P = 3};
371 
372 protected:
373 private:
374 
376 
377 
378 
379  //============================================================================
381  //============================================================================
383 
384 public:
385 
386  using stp::component;
387  using stp::put_component;
388 
392  virtual value_type component(int xi, int xj, int xk) const;
393 
397  value_type component(int xi, int xj, int xk, bool xauto_access) const;
398 
402  virtual void put_component(int xi, int xj, int xk, value_type xvalue);
403 
407  void put_component(int xi, int xj, int xk, value_type xvalue,
408  bool xauto_access);
409 
414  virtual int index_for_ijk(int xi, int xj, int xk) const;
415 
416 protected:
417 private:
418 
420 
421 
422  //============================================================================
424  //============================================================================
426 
427 public:
428 
429 protected:
430 
431 private:
432 
434 
435 
436  //============================================================================
438  //============================================================================
440 
441 public:
442 
446  virtual const std::string& class_name() const;
447 
451  static const std::string& static_class_name();
452 
456  virtual st3* clone() const;
457 
463  inline st3* clone(bool xnew_state, bool xauto_access = true) const
464  {
465  return static_cast<st3*>(stp::clone(xnew_state, xauto_access));
466  }
467 
468 protected:
469 private:
470 
472 
473 
474  //============================================================================
476  //============================================================================
478 
479 public:
480 
484  bool is_ancestor_of(const any* xother) const;
485 
489  bool invariant() const;
490 
491 protected:
492 private:
493 
495 };
496 
497 //==============================================================================
498 // NON-MEMBER FUNCTIONS
499 //==============================================================================
500 
501 } // namespace fiber_bundle
502 
503 #endif // ifndef ST3_H
A symmetric tensor of degree p over an abstract vector space.
Definition: stp.h:190
vd_value_type value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: vd.h:129
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
st3 * 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: st3.h:463
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
static_const_int
The tensor degree (static version)
Definition: st3.h:370
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
st3_lite volatile_type
The associated volatile type.
Definition: st3.h:278
A symmetric rank 3 tensor over an abstract vector space (persistent version).
Definition: st3.h:230
virtual stp * clone() const
Make a new handle, no state instance of current.
Definition: stp.cc:823
virtual value_type component(int xindex) const
The value of the xi-th component.
Definition: vd.cc:1115
A symmetric rank 3 tensor over an abstract vector space. (volatile version).
Definition: st3.h:43
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
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
A symmetric tensor of degree p over an abstract vector space (volatile version).
Definition: stp.h:44
An abstract symmetric tensor space of degree p.
Definition: stp_space.h:42
Namespace for the fiber_bundles component of the sheaf system.
Row dofs type for class vd.
Definition: vd.h:61
static_const_int
The tensor degree (static version)
Definition: st3.h:133