SheafSystem  0.0.0.0
sec_e2.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_E2_H
22 #define SEC_E2_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 E2_H
33 #include "SheafSystem/e2.h"
34 #endif
35 
36 namespace fiber_bundle
37 {
38  class fiber_bundles_namespace;
39 
40 //==============================================================================
41 // CLASS SEC_E2
42 //==============================================================================
43 
48 class SHEAF_DLL_SPEC sec_e2 : public sec_ed
49 {
50 
51  // ===========================================================
53  // ===========================================================
55 
56 public:
57 
58  // Typedefs:
59 
63  typedef e2 fiber_type;
64 
69 
75  static host_type& new_host(namespace_type& xns,
76  const poset_path& xhost_path,
77  const poset_path& xschema_path,
78  const poset_path& xscalar_space_path,
79  bool xauto_access);
80 
87  static host_type& standard_host(namespace_type& xns,
88  const poset_path& xbase_path,
89  const poset_path& xrep_path,
90  const std::string& xsection_suffix,
91  const std::string& xfiber_suffix,
92  bool xauto_access);
93 
94 protected:
95 
96 private:
97 
99 
100 
101  //============================================================================
103  //============================================================================
105 
106 public:
107 
111  sec_e2();
112 
117  sec_e2(const sec_rep_space* xhost, pod_index_type xhub_id);
118 
123  sec_e2(const sec_rep_space* xhost, const scoped_index& xid);
124 
129  sec_e2(const sec_rep_space* xhost, const std::string& xname);
130 
135  sec_e2(const namespace_poset* xnamespace,
136  const poset_path& xpath,
137  bool xauto_access = true);
138 
142  explicit sec_e2(const sec_rep_space_member* xother);
143 
149  sec_e2(sec_rep_space* xhost,
150  section_dof_map* xdof_map = 0,
151  bool xauto_access = true);
152 
158  sec_e2(sec_rep_space* xhost,
159  abstract_poset_member& xbase_mbr,
160  int xbase_version = CURRENT_HOST_VERSION,
161  bool xauto_access = true);
162 
168  sec_e2(sec_rep_space* xhost, const subposet& xbase_parts, bool xauto_access);
169 
173  virtual sec_e2& operator=(const abstract_poset_member& xother);
174 
178  sec_e2& operator=(const sec_e2& xother);
179 
183  sec_e2& operator=(const e2& xfiber);
184 
188  sec_e2& operator=(const e2_lite& xfiber);
189 
193  ~sec_e2();
194 
198  virtual const fiber_type& fiber_prototype() const;
199 
200 protected:
201 
202 private:
203 
205 
206 
207  //============================================================================
209  //============================================================================
211 
212 public:
213 
214 protected:
215 
216 private:
217 
219 
220 
221  //============================================================================
223  //============================================================================
225 
226 public:
227 
228 protected:
229 
230 private:
231 
233 
234 
235  //============================================================================
237  //============================================================================
239 
240 public:
241 
242 protected:
243 
244 private:
245 
247 
248 
249  //============================================================================
251  //============================================================================
253 
254 public:
255 
256 protected:
257 
258 private:
259 
261 
262 
263  //============================================================================
265  //============================================================================
267 
268 public:
269 
270 protected:
271 
272 private:
273 
275 
276 
277  //============================================================================
279  //============================================================================
281 
282 public:
283 
284 protected:
285 
286 private:
287 
289 
290 
291  //============================================================================
293  //============================================================================
295 
296 public:
297 
301  virtual const std::string& class_name() const;
302 
306  static const std::string& static_class_name();
307 
311  virtual sec_e2* clone() const;
312 
318  inline sec_e2* clone(bool xnew_state, bool xauto_access = true) const
319  {
320  return static_cast<sec_e2*>(sec_ed::clone(xnew_state, xauto_access));
321  }
322 
323 protected:
324 
325 private:
326 
328 
329 
330  //============================================================================
332  //============================================================================
334 
335 public:
336 
340  bool fiber_is_ancestor_of(const any* xother) const;
341 
345  bool is_ancestor_of(const any* xother) const;
346 
350  bool invariant() const;
351 
352 protected:
353 
354 private:
355 
357 
358 };
359 
360 //==============================================================================
361 // NON-MEMBER FUNCTIONS
362 //==============================================================================
363 
364 //==============================================================================
365 // TP FACET
366 //==============================================================================
367 
368 // Forward declarations needed for specialization:
369 
370 class sec_at0;
371 class sec_at2_e2;
372 class sec_st2_e2;
373 class sec_t2_e2;
374 // class sec_at3_e2;
375 // class sec_st3_e2;
376 // class sec_t3_e2;
377 
381 template<> class tensor_section_traits<0, sec_e2>
382 {
383 public:
387  typedef sec_at0 tp_type;
388 
392  typedef sec_at0 atp_type;
393 
397  typedef sec_at0 stp_type;
398 };
399 
403 template<> class tensor_section_traits<1, sec_e2>
404 {
405 public:
409  typedef sec_e2 tp_type;
410 
414  typedef sec_e2 atp_type;
415 
419  typedef sec_e2 stp_type;
420 };
421 
425 template<> class tensor_section_traits<2, sec_e2>
426 {
427 public:
432 
437 
442 };
443 
444 // ///
445 // /// Specialization for degree 3 tensors over sec_e2.
446 // ///
447 // template<> class tensor_section_traits<3, sec_e2>
448 // {
449 // public:
450 // ///
451 // /// Type of general tensor of degree 3 over sec_e2.
452 // ///
453 // typedef sec_t3_e2 tp_type;
454 
455 // ///
456 // /// Type of antisymmetric tensor of degree 3 over sec_e2.
457 // ///
458 // typedef sec_at3_e2 atp_type;
459 
460 // ///
461 // /// Type of symmetric tensor of degree 3 over sec_e2.
462 // ///
463 // typedef sec_st3_e2 stp_type;
464 // };
465 
466 
467 } // namespace fiber_bundle
468 
469 #endif // ifndef SEC_E2_H
470 
471 
sec_st2_e2 stp_type
Type of symmetric tensor of degree 2 over sec_e2.
Definition: sec_e2.h:441
A client handle for a subposet.
Definition: subposet.h:86
sec_e2 vector_space_type
Type of underlying vector space.
Definition: sec_e2.h:68
The abstract map from section dof ids to section dof values of heterogeneous type.
Euclidean vector space of dimension 2 (persistent version).
Definition: e2.h:405
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...
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.
A section of a bundle with fiber type st2_e2.
Definition: sec_st2_e2.h:48
sec_at0 stp_type
Type of symmetric tensor of degree 0 over sec_e2.
Definition: sec_e2.h:397
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
A section of a bundle with fiber type at2_e2.
Definition: sec_at2_e2.h:48
Euclidean vector space of dimension 2 (volatile version).
Definition: e2.h:112
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_at2_e2 atp_type
Type of antisymmetric tensor of degree 2 over sec_e2.
Definition: sec_e2.h:436
sec_at0 atp_type
Type of antisymmetric tensor of degree 0 over sec_e2.
Definition: sec_e2.h:392
sec_t2_e2 tp_type
Type of general tensor of degree 2 over sec_e2.
Definition: sec_e2.h:431
sec_e2 tp_type
Type of general tensor of degree 1 over sec_e2.
Definition: sec_e2.h:409
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
A section of a bundle with fiber type t2_e2.
Definition: sec_t2_e2.h:48
sec_e2 stp_type
Type of symmetric tensor of degree 1 over sec_e2.
Definition: sec_e2.h:419
e2 fiber_type
The fiber type.
Definition: sec_e2.h:63
sec_e2 atp_type
Type of antisymmetric tensor of degree 1 over sec_e2.
Definition: sec_e2.h:414
sec_e2 * 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_e2.h:318
An abstract client handle for a member of a poset.
sec_at0 tp_type
Type of general tensor of degree 0 over sec_e2.
Definition: sec_e2.h:387
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
A section of a fiber bundle with a 2-dimensional Euclidean vector space fiber.
Definition: sec_e2.h:48
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61