SheafSystem  0.0.0.0
sec_e3.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_E3_H
22 #define SEC_E3_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef SEC_ED_H
29 #include "SheafSystem/sec_ed.h"
30 #endif
31 
32 #ifndef E3_H
33 #include "SheafSystem/e3.h"
34 #endif
35 
36 namespace fiber_bundle
37 {
38 
39 //==============================================================================
40 // CLASS SEC_E3
41 //==============================================================================
42 
47 class SHEAF_DLL_SPEC sec_e3 : public sec_ed
48 {
49 
50  // ===========================================================
52  // ===========================================================
54 
55 public:
56 
57  // Typedefs:
58 
62  typedef e3 fiber_type;
63 
68 
74  static host_type& new_host(namespace_type& xns,
75  const poset_path& xhost_path,
76  const poset_path& xschema_path,
77  const poset_path& xscalar_space_path,
78  bool xauto_access);
79 
86  static host_type& standard_host(namespace_type& xns,
87  const poset_path& xbase_path,
88  const poset_path& xrep_path,
89  const std::string& xsection_suffix,
90  const std::string& xfiber_suffix,
91  bool xauto_access);
92 
93 protected:
94 
95 private:
96 
98 
99 
100  //============================================================================
102  //============================================================================
104 
105 public:
106 
110  sec_e3();
111 
116  sec_e3(const sec_rep_space* xhost, pod_index_type xhub_id);
117 
122  sec_e3(const sec_rep_space* xhost, const scoped_index& xid);
123 
128  sec_e3(const sec_rep_space* xhost, const std::string& xname);
129 
134  sec_e3(const namespace_poset* xnamespace,
135  const poset_path& xpath,
136  bool xauto_access = true);
137 
141  explicit sec_e3(const sec_rep_space_member* xother);
142 
147  sec_e3(sec_rep_space* xhost,
148  section_dof_map* xdof_map = 0,
149  bool xauto_access = true);
150 
156  sec_e3(sec_rep_space* xhost,
157  abstract_poset_member& xbase_mbr,
158  int xbase_version = CURRENT_HOST_VERSION,
159  bool xauto_access = true);
160 
166  sec_e3(sec_rep_space* xhost, const subposet& xbase_parts, bool xauto_sccess);
167 
171  virtual sec_e3& operator=(const abstract_poset_member& xother);
172 
176  sec_e3& operator=(const sec_e3& xother);
177 
181  sec_e3& operator=(const e3& xfiber);
182 
186  sec_e3& operator=(const e3_lite& xfiber);
187 
191  ~sec_e3();
192 
196  virtual const fiber_type& fiber_prototype() const;
197 
198 protected:
199 
200 private:
201 
203 
204 
205  //============================================================================
207  //============================================================================
209 
210 public:
211 
212 protected:
213 
214 private:
215 
217 
218 
219  //============================================================================
221  //============================================================================
223 
224 public:
225 
226 protected:
227 
228 private:
229 
231 
232 
233  //============================================================================
235  //============================================================================
237 
238 public:
239 
240 protected:
241 
242 private:
243 
245 
246 
247  //============================================================================
249  //============================================================================
251 
252 public:
253 
254 protected:
255 
256 private:
257 
259 
260 
261  //============================================================================
263  //============================================================================
265 
266 public:
267 
268 protected:
269 
270 private:
271 
273 
274 
275  //============================================================================
277  //============================================================================
279 
280 public:
281 
282 protected:
283 
284 private:
285 
287 
288 
289  //============================================================================
291  //============================================================================
293 
294 public:
295 
299  virtual const std::string& class_name() const;
300 
304  static const std::string& static_class_name();
305 
309  virtual sec_e3* clone() const;
310 
316  inline sec_e3* clone(bool xnew_state, bool xauto_access = true) const
317  {
318  return static_cast<sec_e3*>(sec_ed::clone(xnew_state, xauto_access));
319  }
320 
321 protected:
322 
323 private:
324 
326 
327 
328  //============================================================================
330  //============================================================================
332 
333 public:
334 
338  bool fiber_is_ancestor_of(const any* xother) const;
339 
343  bool is_ancestor_of(const any* other) const;
344 
348  bool invariant() const;
349 
350 protected:
351 
352 private:
353 
355 
356 
357 };
358 
359 //==============================================================================
360 // NON-MEMBER FUNCTIONS
361 //==============================================================================
362 
363 #ifndef DOXYGEN_1_5_4_SKIP_UNKNOWN
364 
368 SHEAF_DLL_SPEC std::ostream& operator << (std::ostream& xos, const sec_e3& xv);
369 
370 #endif // ifndef DOXYGEN_1_5_4_SKIP_UNKNOWN
371 
372 //==============================================================================
373 // NON-MEMBER FUNCTIONS
374 //==============================================================================
375 
376 //==============================================================================
377 // TP FACET
378 //==============================================================================
379 
380 // Forward declarations needed for specialization:
381 
382 class sec_at0;
383 class sec_t2_e3;
384 class sec_t3_e3;
385 class sec_at2_e3;
386 class sec_at3_e3;
387 class sec_st2_e3;
388 class sec_st3_e3;
389 
393 template<> class tensor_section_traits<0, sec_e3>
394 {
395 public:
399  typedef sec_at0 tp_type;
400 
404  typedef sec_at0 atp_type;
405 
409  typedef sec_at0 stp_type;
410 };
411 
415 template<> class tensor_section_traits<1, sec_e3>
416 {
417 public:
421  typedef sec_e3 tp_type;
422 
426  typedef sec_e3 atp_type;
427 
431  typedef sec_e3 stp_type;
432 };
433 
437 template<> class tensor_section_traits<2, sec_e3>
438 {
439 public:
444 
449 
454 };
455 
459 template<> class tensor_section_traits<3, sec_e3>
460 {
461 public:
466 
471 
476 };
477 
478 //==============================================================================
479 // NON-MEMBER FUNCTIONS
480 //==============================================================================
481 
486 namespace sec_e3_algebra
487 {
488 
493 SHEAF_DLL_SPEC void cross(const sec_e3& x0, const sec_e3& x1, sec_e3& xresult,
494  bool xauto_access);
495 
500 SHEAF_DLL_SPEC void cross_equal(sec_e3& xresult, const sec_e3& xother,
501  bool xauto_access);
502 
503 } // namespace sec_e3_algebra
504 
505 } // namespace fiber_bundle
506 
507 #endif // ifndef SEC_E3_H
508 
509 
A client handle for a subposet.
Definition: subposet.h:86
SHEAF_DLL_SPEC void cross_equal(sec_e3 &xresult, const sec_e3 &xother, bool xauto_access)
The 3D Euclidean vector "cross" product of xresult with xother; synonym for cross(xresult, xother, xresult, xauto_access).
Definition: sec_e3.cc:821
sec_st2_e3 stp_type
Type of symmetric tensor of degree 2 over sec_e3.
Definition: sec_e3.h:453
A section of a bundle with fiber type st3_e3.
Definition: sec_st3_e3.h:48
A section of a bundle with fiber type at2_e3.
Definition: sec_at2_e3.h:48
Euclidean vector space of dimension 3 (volatile version).
Definition: e3.h:116
The abstract map from section dof ids to section dof values of heterogeneous type.
A section of a bundle with fiber type at3_e3.
Definition: sec_at3_e3.h:48
A space of scalars viewed as an antisymmetric tensor section space of degree 1.
Definition: sec_at1_space.h:48
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...
sec_e3 vector_space_type
Type of underlying vector space.
Definition: sec_e3.h:67
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 member of a sec_rep_space; a section.
Euclidean vector space of dimension 3 (persistent version).
Definition: e3.h:467
sec_e3 tp_type
Type of general tensor of degree 1 over sec_e3.
Definition: sec_e3.h:421
A section of a bundle with fiber type t3_e3.
Definition: sec_t3_e3.h:48
A section of a fiber bundle with a d-dimensional Euclidean vector space fiber.
Definition: sec_ed.h:47
Abstract base class with useful features for all objects.
Definition: any.h:39
virtual sec_ed * clone() const
Make a new handle, no state instance of current.
Definition: sec_ed.cc:502
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
Tensor types of degree P over VECTOR_TYPE. Must be specialized for every supported combination of VEC...
Definition: sec_vd.h:519
sec_at0 stp_type
Type of symmetric tensor of degree 0 over sec_e3.
Definition: sec_e3.h:409
A section of a fiber bundle with a 3-dimensional Euclidean vector space fiber.
Definition: sec_e3.h:47
sec_at0 tp_type
Type of general tensor of degree 0 over sec_e3.
Definition: sec_e3.h:399
sec_at2_e3 atp_type
Type of antisymmetric tensor of degree 2 over sec_e3.
Definition: sec_e3.h:448
sec_e3 stp_type
Type of symmetric tensor of degree 1 over sec_e3.
Definition: sec_e3.h:431
sec_t2_e3 tp_type
Type of general tensor of degree 2 over sec_e3.
Definition: sec_e3.h:443
e3 fiber_type
The fiber type.
Definition: sec_e3.h:62
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
sec_e3 * 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: sec_e3.h:316
sec_at3_e3 atp_type
Type of antisymmetric tensor of degree 3 over sec_e3.
Definition: sec_e3.h:470
A section of a bundle with fiber type t2_e3.
Definition: sec_t2_e3.h:48
An abstract client handle for a member of a poset.
sec_t3_e3 tp_type
Type of general tensor of degree 3 over sec_e3.
Definition: sec_e3.h:465
sec_e3 atp_type
Type of antisymmetric tensor of degree 1 over sec_e3.
Definition: sec_e3.h:426
sec_at0 atp_type
Type of antisymmetric tensor of degree 0 over sec_e3.
Definition: sec_e3.h:404
Namespace for the fiber_bundles component of the sheaf system.
Antisymetric tensor of degree 0. As the degree is 0 there is nothing to be symmetric or antisymmetric...
Definition: sec_at0.h:51
SHEAF_DLL_SPEC void cross(const sec_e3 &x0, const sec_e3 &x1, sec_e3 &xresult, bool xauto_access)
The 3D Euclidean vector "cross" product of x0 with x1 (pre-allocated version).
Definition: sec_e3.cc:790
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const binary_index &xbi)
Insert binary_index& xbi into ostream& os.
Definition: binary_index.cc:35
sec_st3_e3 stp_type
Type of symmetric tensor of degree 3 over sec_e3.
Definition: sec_e3.h:475
A section of a bundle with fiber type st2_e3.
Definition: sec_st2_e3.h:48
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61