SheafSystem  0.0.0.0
sec_met.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_MET_H
22 #define SEC_MET_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef SEC_ST2_H
29 #include "SheafSystem/sec_st2.h"
30 #endif
31 
32 #ifndef MET_H
33 #include "SheafSystem/met.h"
34 #endif
35 
36 namespace fiber_bundle
37 {
38 
39 //==============================================================================
40 // CLASS SEC_MET
41 //==============================================================================
42 
46 class SHEAF_DLL_SPEC sec_met : public sec_st2
47 {
48  // ===========================================================
50  // ===========================================================
52 
53 public:
54 
58  typedef met fiber_type;
59 
65  static host_type& new_host(namespace_type& xns,
66  const poset_path& xhost_path,
67  const poset_path& xschema_path,
68  const poset_path& xscalar_space_path,
69  bool xauto_access);
70 
71 protected:
72 
73 private:
74 
76 
77 
78  //============================================================================
80  //============================================================================
82 
83 public:
84 
88  sec_met();
89 
94  sec_met(const sec_rep_space* xhost, pod_index_type xhub_id);
95 
100  sec_met(const sec_rep_space* xhost, const scoped_index& xid);
101 
106  sec_met(const sec_rep_space* xhost, const std::string& xname);
107 
112  sec_met(const namespace_poset* xnamespace,
113  const poset_path& xpath,
114  bool xauto_access = true);
115 
119  explicit sec_met(const sec_rep_space_member* xother);
120 
124  sec_met(sec_rep_space* xhost,
125  section_dof_map* xdof_map = 0,
126  bool xauto_access = true);
127 
131  virtual sec_met& operator=(const abstract_poset_member& xother);
132 
136  sec_met& operator=(const sec_met& xother);
137 
141  sec_met& operator=(const met& xfiber);
142 
146  sec_met& operator=(const met_lite& xfiber);
147 
151  ~sec_met();
152 
156  virtual const fiber_type& fiber_prototype() const;
157 
158 protected:
159 
160 private:
161 
163 
164 
165  //============================================================================
167  //============================================================================
168 
169 public:
170 protected:
171 private:
172 
173  //============================================================================
175  //============================================================================
177 
178 public:
179 
180 protected:
181 
182 private:
183 
185 
186 
187  //============================================================================
189  //============================================================================
191 
192 public:
193 
194 protected:
195 
196 private:
197 
199 
200 
201  //============================================================================
203  //============================================================================
205 
206 public:
207 
208 protected:
209 
210 private:
211 
213 
214 
215  //============================================================================
217  //============================================================================
219 
220 public:
221 
222 protected:
223 
224 private:
225 
227 
228 
229  //============================================================================
231  //============================================================================
233 
234 public:
235 
239  virtual const std::string& class_name() const;
240 
244  static const std::string& static_class_name();
245 
249  virtual sec_met* clone() const;
250 
256  inline sec_met* clone(bool xnew_state, bool xauto_access = true) const
257  {
258  return static_cast<sec_met*>(sec_st2::clone(xnew_state, xauto_access));
259  }
260 
261 protected:
262 
263 private:
264 
266 
267 
268  //============================================================================
270  //============================================================================
272 
273 public:
274 
278  bool fiber_is_ancestor_of(const any* xother) const;
279 
283  bool is_ancestor_of(const any* xother) const;
284 
288  bool invariant() const;
289 
290 protected:
291 
292 private:
293 
295 
296 
297  //############################################################################
298 
299 public:
300 
301 // ///
302 // /// component indexed by row and col
303 // ///
304 // scalar_type* comp2(int row, int col);
305 
306 // ///
307 // /// set component indexed by row and col
308 // ///
309 // void set_comp2(int row, int col, scalar_type* new_comp);
310 
311 
312 };
313 
314 
315 //==============================================================================
316 // NON-MEMBER FUNCTIONS
317 //==============================================================================
318 
319 class sec_ed;
320 
325 namespace sec_met_algebra
326 {
327 
331 SHEAF_DLL_SPEC void lower(const sec_met& xmetric, const sec_ed& xvector, sec_ed& xresult,
332  bool xauto_access);
333 
337 SHEAF_DLL_SPEC void raise(const sec_met& xmetric, const sec_ed& xcovector, sec_ed& xresult,
338  bool xauto_access);
339 
340 } // namespace sec_met_algebra
341 
342 } // namespace fiber_bundle
343 
344 #endif // ifndef SEC_MET_H
345 
346 
SHEAF_DLL_SPEC tensor_variance lower(const tensor_variance &x0, int xi)
The variance of the lower of a tensor with variance x0 on index xi.
An abstract symmetric tensor section space of degree p.
Definition: sec_stp_space.h:47
virtual sec_st2 * clone() const
Make a new handle, no state instance of current.
Definition: sec_st2.cc:491
The abstract map from section dof ids to section dof values of heterogeneous type.
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_met * 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_met.h:256
met fiber_type
The fiber type.
Definition: sec_met.h:58
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 metric tensor over an abstract vector space (volatile version).
Definition: met.h:43
A metric tensor over an abstract vector space (persistent version).
Definition: met.h:208
A section of a bundle with fiber type met.
Definition: sec_met.h:46
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
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
A section of a bundle with fiber type st2.
Definition: sec_st2.h:46
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.
Namespace for the fiber_bundles component of the sheaf system.
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61