SheafSystem  0.0.0.0
sec_at0.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_AT0_H
22 #define SEC_AT0_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef SEC_ATP_H
29 #include "SheafSystem/sec_atp.h"
30 #endif
31 
32 #ifndef AT0_H
33 #include "SheafSystem/at0.h"
34 #endif
35 
36 namespace fiber_bundle
37 {
38 
39 class sec_at0_space;
40 
41 //==============================================================================
42 // CLASS SEC_AT0
43 //==============================================================================
44 
51 class SHEAF_DLL_SPEC sec_at0 : public sec_atp
52 {
53 
54  // ===========================================================
56  // ===========================================================
58 
59 public:
60 
61  // Typedefs:
62 
67 
71  typedef at0 fiber_type;
72 
77  static host_type& new_host(namespace_type& xns,
78  const poset_path& xhost_path,
79  const poset_path& xschema_path,
80  bool xauto_access);
81 
88  static host_type& standard_host(namespace_type& xns,
89  const poset_path& xbase_path,
90  const poset_path& xrep_path,
91  const std::string& xsection_suffix,
92  const std::string& xfiber_suffix,
93  bool xauto_access);
94 
95 protected:
96 
97 private:
98 
100 
101 
102  //============================================================================
104  //============================================================================
106 
107 public:
108 
112  sec_at0();
113 
118  sec_at0(const sec_rep_space* xhost, pod_index_type xhub_id);
119 
124  sec_at0(const sec_rep_space* xhost, const scoped_index& xid);
125 
130  sec_at0(const sec_rep_space* xhost, const std::string& xname);
131 
136  sec_at0(const namespace_poset* xnamespace,
137  const poset_path& xpath,
138  bool xauto_access = true);
139 
143  explicit sec_at0(const sec_at0* xother);
144 
149  explicit sec_at0(const sec_rep_space_member* xother,
150  abstract_poset_member* xfiber_schema_jim);
151 
155  sec_at0(sec_rep_space* xhost, section_dof_map* xdof_map = 0,
156  bool xauto_access = true);
157 
163  sec_at0(sec_rep_space* xhost,
164  const abstract_poset_member& xbase_mbr,
165  int xbase_version = CURRENT_HOST_VERSION,
166  bool xauto_access = true);
167 
173  sec_at0(sec_rep_space* xhost, const subposet& xbase_parts, bool xauto_sccess);
174 
178  virtual sec_at0& operator=(const abstract_poset_member& xother);
179 
183  sec_at0& operator=(const sec_at0& xother);
184 
188  sec_at0& operator=(const at0& xfiber);
189 
193  sec_at0& operator=(const at0_lite& xfiber);
194 
198  ~sec_at0();
199 
203  virtual const fiber_type& fiber_prototype() const;
204 
205 protected:
206 
207 private:
208 
210 
211 
212  //============================================================================
214  //============================================================================
216 
217 public:
218 
219 protected:
220 
221 private:
222 
224 
225 
226  //============================================================================
228  //============================================================================
230 
231 public:
232 
233 protected:
234 
235 private:
236 
238 
239 
240  //============================================================================
242  //============================================================================
244 
245 public:
246 
247 protected:
248 
249 private:
250 
252 
253 
254  //============================================================================
256  //============================================================================
258 
259 public:
260 
261 protected:
262 
263 private:
264 
266 
267 
268  //============================================================================
270  //============================================================================
272 
273 public:
274 
278  virtual const std::string& class_name() const;
279 
283  static const std::string& static_class_name();
284 
288  virtual sec_at0* clone() const;
289 
290 
291 
297  inline sec_at0* clone(bool xnew_state, bool xauto_access = true) const
298  {
299  return static_cast<sec_at0*>(sec_atp::clone(xnew_state, xauto_access));
300  }
301 
302 protected:
303 
304 private:
305 
307 
308 
309  // ===========================================================
311  // ===========================================================
313 
314 public:
315 
319  host_type* host() const;
320 
324  virtual bool host_is_ancestor_of(const poset_state_handle* other) const;
325 
326 protected:
327 
328 private:
329 
331 
332 
333  //============================================================================
335  //============================================================================
337 
338 public:
339 
343  bool fiber_is_ancestor_of(const any* xother) const;
344 
348  bool is_ancestor_of(const any* xother) const;
349 
353  bool invariant() const;
354 
356 
360  virtual void restrict_to(const abstract_poset_member* xschema);
361 
366  virtual void restrict_to(pod_index_type xbase_id,
367  pod_index_type xfiber_schema_id);
368 
369 
374  virtual void restrict_to(const abstract_poset_member* xbase,
375  const abstract_poset_member* xfiber_schema);
376 
381  virtual void restrict_to_same(const abstract_poset_member* xother);
382 
387  void unrestrict();
388 
389 protected:
390 
391 private:
392 
394 
395 };
396 
397 //==============================================================================
398 // NON-MEMBER FUNCTIONS
399 //==============================================================================
400 
401 #ifndef DOXYGEN_1_5_4_SKIP_UNKNOWN
402 
406 SHEAF_DLL_SPEC std::ostream& operator << (std::ostream& xos, const sec_at0& xv);
407 
408 #endif // ifndef DOXYGEN_1_5_4_SKIP_UNKNOWN
409 
410 //==============================================================================
411 
416 namespace sec_at0_algebra
417 {
418 
422  SHEAF_DLL_SPEC void acos(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
423 
427 SHEAF_DLL_SPEC void asin(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
428 
432 SHEAF_DLL_SPEC void atan(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
433 
437 SHEAF_DLL_SPEC void atan2(const sec_at0& x0, const sec_at0& x1, sec_at0& xresult,
438  bool xauto_access);
439 
443 SHEAF_DLL_SPEC void ceil(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
444 
448 SHEAF_DLL_SPEC void cos(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
449 
453 SHEAF_DLL_SPEC void cosh(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
454 
458 SHEAF_DLL_SPEC void exp(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
459 
463 SHEAF_DLL_SPEC void fabs(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
464 
468 SHEAF_DLL_SPEC void floor(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
469 
473 SHEAF_DLL_SPEC void fmod(const sec_at0& x0, const sec_at0& x1, sec_at0& xresult, bool xauto_access);
474 
478 SHEAF_DLL_SPEC void frexp(const sec_at0& x0, sec_at0& xsignificand, sec_at0& xexp,
479  bool xauto_access);
480 
484 SHEAF_DLL_SPEC void ldexp(const sec_at0& x0, int xexp, sec_at0& xresult, bool xauto_access);
485 
489 SHEAF_DLL_SPEC void log(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
490 
494 SHEAF_DLL_SPEC void log10(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
495 
499 SHEAF_DLL_SPEC void modf(const sec_at0& x0, sec_at0& xintpart, sec_at0& xfractpart,
500  bool xauto_access);
501 
505 SHEAF_DLL_SPEC void pow(const sec_at0& x0, const vd_value_type& xexponent, sec_at0& xresult,
506  bool xauto_access);
507 
511 SHEAF_DLL_SPEC void sin(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
512 
516 SHEAF_DLL_SPEC void sinh(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
517 
521 SHEAF_DLL_SPEC void sqrt(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
522 
526 SHEAF_DLL_SPEC void tan(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
527 
531 SHEAF_DLL_SPEC void tanh(const sec_at0& x0, sec_at0& xresult, bool xauto_access);
532 
533 } // namespace sec_at0_algebra
534 
535 } // namespace fiber_bundle
536 
537 #endif // ifndef SEC_AT0_H
538 
539 
SHEAF_DLL_SPEC void sqrt(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute sqrt of x0 (sqrt(x0)) (pre-allocated version).
Definition: sec_at0.cc:1556
SHEAF_DLL_SPEC void asin(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute asin of x0 (asin(x0)) (pre-allocated version).
Definition: sec_at0.cc:1181
A client handle for a subposet.
Definition: subposet.h:86
SHEAF_DLL_SPEC void frexp(const sec_at0 &x0, sec_at0 &xsignificand, sec_at0 &xexp, bool xauto_access)
Compute frexp of x0 (frexp(x0)) (pre-allocated version).
Definition: sec_at0.cc:1392
The abstract map from section dof ids to section dof values of heterogeneous type.
SHEAF_DLL_SPEC void ldexp(const sec_at0 &x0, int xexp, sec_at0 &xresult, bool xauto_access)
Compute ldexp of x0 (ldexp(x0)) (pre-allocated version).
Definition: sec_at0.cc:1413
sec_at0 * 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_at0.h:297
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
A member of a sec_rep_space; a section.
SHEAF_DLL_SPEC void log10(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute log10 of x0 (log10(x0)) (pre-allocated version).
Definition: sec_at0.cc:1454
SHEAF_DLL_SPEC void ceil(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute ceil of x0 (ceil(x0)) (pre-allocated version).
Definition: sec_at0.cc:1250
Abstract base class with useful features for all objects.
Definition: any.h:39
A space of scalars viewed as an antisymmetric tensor section space of degree 0.
Definition: sec_at0_space.h:48
SHEAF_DLL_SPEC void atan(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute atan of x0 (atan(x0)) (pre-allocated version).
Definition: sec_at0.cc:1208
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
virtual sec_atp * clone() const
Make a new handle, no state instance of current.
Definition: sec_atp.cc:563
A section of a bundle with fiber type atp.
Definition: sec_atp.h:48
A scalar viewed as an antisymmetric tensor of degree 0. As the degree is 0 there is nothing to be sym...
Definition: at0.h:424
SHEAF_DLL_SPEC void atan2(const sec_at0 &x0, const sec_at0 &x1, sec_at0 &xresult, bool xauto_access)
Compute atan2 of x0/x1 (atan2(x0, x1)) (pre-allocated version).
Definition: sec_at0.cc:1228
Antisymetric tensor of degree 0 (volatile version).
Definition: at0.h:127
SHEAF_DLL_SPEC void fabs(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute fabs of x0 (fabs(x0)) (pre-allocated version).
Definition: sec_at0.cc:1331
SHEAF_DLL_SPEC void cosh(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute cosh of x0 (cosh(x0)) (pre-allocated version).
Definition: sec_at0.cc:1290
SHEAF_DLL_SPEC void modf(const sec_at0 &x0, sec_at0 &xintpart, sec_at0 &xfractpart, bool xauto_access)
Compute modf of x0 (modf(x0)) (pre-allocated version).
Definition: sec_at0.cc:1474
SHEAF_DLL_SPEC void sinh(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute sinh of x0 (sinh(x0)) (pre-allocated version).
Definition: sec_at0.cc:1536
SHEAF_DLL_SPEC void log(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute log of x0 (log(x0)) (pre-allocated version).
Definition: sec_at0.cc:1434
SHEAF_DLL_SPEC void fmod(const sec_at0 &x0, const sec_at0 &x1, sec_at0 &xresult, bool xauto_access)
Compute xsignificand = fmod(x0, xexp) (pre-allocated version).
Definition: sec_at0.cc:1371
SHEAF_DLL_SPEC void tanh(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute tanh of x0 (tanh(x0)) (pre-allocated version).
Definition: sec_at0.cc:1596
SHEAF_DLL_SPEC void cos(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute cos of x0 (cos(x0)) (pre-allocated version).
Definition: sec_at0.cc:1270
SHEAF_DLL_SPEC void tan(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute tan of x0 (tan(x0)) (pre-allocated version).
Definition: sec_at0.cc:1576
SHEAF_DLL_SPEC void floor(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute floor of x0 (floor(x0)) (pre-allocated version).
Definition: sec_at0.cc:1351
at0 fiber_type
The fiber type.
Definition: sec_at0.h:71
SHEAF_DLL_SPEC void acos(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute acos of x0 (acos(x0)) (pre-allocated version).
Definition: sec_at0.cc:1154
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
An abstract client handle for a member of a poset.
SHEAF_DLL_SPEC void exp(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute exp of x0 (exp(x0)) (pre-allocated version).
Definition: sec_at0.cc:1310
sec_at0_space host_type
The type of host poset.
Definition: sec_at0.h:66
Namespace for the fiber_bundles component of the sheaf system.
SHEAF_DLL_SPEC void pow(const sec_at0 &x0, const vd_value_type &xexponent, sec_at0 &xresult, bool xauto_access)
Compute x0 to power xexponent (pow(x0, xexponent)) (pre-allocated version).
Definition: sec_at0.cc:1495
SHEAF_DLL_SPEC void sin(const sec_at0 &x0, sec_at0 &xresult, bool xauto_access)
Compute sin of x0 (sin(x0)) (pre-allocated version).
Definition: sec_at0.cc:1516
Antisymetric tensor of degree 0. As the degree is 0 there is nothing to be symmetric or antisymmetric...
Definition: sec_at0.h:51
double vd_value_type
The type of component in the fiber; the scalar type in the fiber vector space.
Definition: fiber_bundle.h:63
virtual void restrict_to(const abstract_poset_member *xschema)
Restricts this section and its components to schema member xschema.
Definition: sec_tuple.cc:669
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
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61