SheafSystem  0.0.0.0
t4.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 
22 #ifndef T4_H
23 #define T4_H
24 
25 #ifndef SHEAF_DLL_SPEC_H
26 #include "SheafSystem/sheaf_dll_spec.h"
27 #endif
28 
29 #ifndef TP_H
30 #include "SheafSystem/tp.h"
31 #endif
32 
33 namespace fiber_bundle
34 {
35 
36 //==============================================================================
37 // CLASS T4_LITE
38 //==============================================================================
39 
43 class SHEAF_DLL_SPEC t4_lite : public tp_lite
44 {
45 
46  //============================================================================
48  //============================================================================
50 
51 public:
52 
56  t4_lite();
57 
61  t4_lite(const t4_lite& xother);
62 
66  t4_lite& operator=(const t4_lite& xother);
67 
71  virtual ~t4_lite();
72 
76  t4_lite(const row_dofs_type& xrow_dofs);
77 
81  t4_lite& operator=(const row_dofs_type& xrow_dofs);
82 
83 protected:
84 private:
85 
87 
88 
89  //============================================================================
91  //============================================================================
93 
94 public:
95 
101  enum static_const_int {P = 4};
102 
106  virtual int p() const;
107 
108 protected:
109 private:
110 
112 
113 
114  //============================================================================
116  //============================================================================
118 
119 public:
120 
124  virtual int d() const;
125 
126  using tp_lite::component;
128 
132  virtual value_type component(int xi, int xj, int xk, int xl) const;
133 
137  virtual void put_component(int xi, int xj, int xk, int xl,
138  value_type xvalue);
139 
144  virtual int index_for_ijkl(int xi, int xj, int xk, int xl) const;
145 
146 
147 protected:
148 private:
149 
151 
152 
153  //============================================================================
155  //============================================================================
157 
158 public:
159 protected:
160 private:
161 
163 
164 
165  //============================================================================
167  //============================================================================
169 
170 public:
171 
175  virtual const std::string& class_name() const;
176 
180  static const std::string& static_class_name();
181 
185  virtual t4_lite* clone() const;
186 
187 protected:
188 private:
189 
191 
192 
193  //============================================================================
195  //============================================================================
197 
198 public:
199 
203  virtual bool is_ancestor_of(const any_lite& xother) const;
204 
208  bool invariant() const;
209 
210 protected:
211 private:
212 
214 };
215 
216 //==============================================================================
217 // CLASS T4
218 //==============================================================================
219 
223 class SHEAF_DLL_SPEC t4 : public tp
224 {
225 
226  // ===========================================================
228  // ===========================================================
230 
231 public:
232 
236  static const poset_path& standard_schema_path();
237 
241  static void make_standard_schema(namespace_poset& xns);
242 
248  static host_type& new_host(namespace_type& xns,
249  const poset_path& xhost_path,
250  const poset_path& xschema_path,
251  const poset_path& xvector_space_path,
252  bool xauto_access);
253 
254 protected:
255 
256 private:
257 
259 
260 
261  //============================================================================
263  //============================================================================
265 
266 public:
267 
272 
276  t4();
277 
281  t4(const t4& xother);
282 
286  virtual t4& operator=(const abstract_poset_member& xother);
287 
291  t4& operator=(const t4& xother);
292 
296  virtual ~t4();
297 
301  virtual const volatile_type& lite_prototype() const;
302 
306  virtual volatile_type* lite_type() const;
307 
311  t4(poset* xhost, bool xauto_access = true);
312 
317  t4(const poset* xhost, pod_index_type xhub_id);
318 
323  t4(const poset* xhost, const scoped_index& xid);
324 
329  t4(const poset* xhost, const std::string& xname);
330 
331 protected:
332 private:
333 
335 
336 
337  //============================================================================
339  //============================================================================
341 
342 public:
343 
349  enum static_const_int {P = 4};
350 
351 protected:
352 
353 private:
354 
356 
357 
358  //============================================================================
360  //============================================================================
362 
363 public:
364 
365  using tp::component;
366  using tp::put_component;
367 
371  virtual value_type component(int xi, int xj, int xk, int xl) const;
372 
376  value_type component(int xi, int xj, int xk, int xl, bool xauto_access) const;
377 
381  virtual void put_component(int xi, int xj, int xk, int xl, value_type xvalue);
382 
386  void put_component(int xi, int xj, int xk, int xl, value_type xvalue, bool xauto_access);
387 
392  virtual int index_for_ijkl(int xi, int xj, int xk, int xl) const;
393 
394 protected:
395 private:
396 
398 
399 
400  //============================================================================
402  //============================================================================
404 
405 public:
406 
407 protected:
408 
409 private:
410 
412 
413 
414  //============================================================================
416  //============================================================================
418 
419 public:
420 
424  virtual const std::string& class_name() const;
425 
429  static const std::string& static_class_name();
430 
434  virtual t4* clone() const;
435 
441  inline t4* clone(bool xnew_state, bool xauto_access = true) const
442  {
443  return static_cast<t4*>(tp::clone(xnew_state, xauto_access));
444  }
445 
446 protected:
447 private:
448 
450 
451 
452  //============================================================================
454  //============================================================================
456 
457 public:
458 
462  virtual bool invariant() const;
463 
467  virtual bool is_ancestor_of(const any* other) const;
468 
469 protected:
470 private:
471 
473 };
474 
475 } // namespace fiber_bundle
476 
477 //==============================================================================
478 // NON-MEMBER FUNCTIONS
479 //==============================================================================
480 
481 
482 #endif // ifndef T4_H
vd_value_type value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: vd.h:129
static_const_int
The tensor degree (static version)
Definition: t4.h:101
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 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
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 volatile objects.
Definition: any_lite.h:48
Abstract base class with useful features for all objects.
Definition: any.h:39
A client handle for a mutable partially ordered set.
Definition: poset.h:40
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
t4_lite volatile_type
The associated volatile type.
Definition: t4.h:271
virtual value_type component(int xindex) const
The value of the xi-th component.
Definition: vd.cc:1115
A general tensor of degree p over an abstract vector space (volatile version). Volatile version does ...
Definition: tp.h:59
A tensor of degree 4 over an abstract vector space (volatile version).
Definition: t4.h:43
void put_component(int xindex, value_type xcomp)
Set the xindex-th component to xcomp.
Definition: vd.cc:230
static_const_int
The tensor degree (static version)
Definition: t4.h:349
virtual tp * clone() const
Make a new handle, no state instance of current.
Definition: tp.cc:1363
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
An abstract tensor space of degree p.
Definition: tp_space.h:47
t4 * 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: t4.h:441
Namespace for the fiber_bundles component of the sheaf system.
Row dofs type for class vd.
Definition: vd.h:61
A tensor of degree 4 over an abstract vector space (persistent version).
Definition: t4.h:223