SheafSystem  0.0.0.0
section_pusher.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 SECTION_PUSHER_H
22 #define SECTION_PUSHER_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef ANY_H
29 #include "SheafSystem/any.h"
30 #endif
31 
32 #ifndef FIELDS_H
33 #include "SheafSystem/fields.h"
34 #endif
35 
36 #ifndef SECTION_PUSHER_PULLBACK_ACTION_H
37 #include "SheafSystem/section_pusher_pullback_action.h"
38 #endif
39 
40 #ifndef SEC_ED_INVERTIBLE_H
41 #include "SheafSystem/sec_ed_invertible.h"
42 #endif
43 
44 namespace fiber_bundle
45 {
46 class eval_iterator;
47 class sec_rep_space;
48 }
49 
50 namespace fields
51 {
52 
53 using namespace sheaf;
54 using namespace fiber_bundle;
55 
56 class field_vd;
57 class field_vd;
58 class section_pusher_push_action;
59 
65 class SHEAF_DLL_SPEC section_pusher : public any
66 {
67 
68  // =============================================================================
70  // =============================================================================
72 
73 public:
74 
75  //@todo: Delete the field_vd versions of the next 2 constructors when
76  // field_vd is removed from the build (remove the implementations also).
77 
82  section_pusher(const field_vd& xsrc, const field_vd& xdst, bool xauto_access);
83 
86 
87 // ///
88 // /// Creates the push-forward from the property space of
89 // /// xsrc to a property space with the same fiber on the
90 // /// base space of xdst_coords. Creates the range space
91 // /// if it doesn't already exist.
92 // ///
93 // section_pusher(const field_vd& xsrc, const sec_ed& xdst_coords,
94 // bool xauto_access);
95 
100  section_pusher(const sec_rep_space& xdomain,
101  const sec_rep_space& xrange,
102  const sec_ed& xdomain_coord,
103  const sec_ed& xrange_coord,
104  bool xauto_access);
105 
109  const sec_rep_space& domain() const;
110 
114  const geometry::sec_ed_invertible& domain_coords() const;
115 
119  const sec_rep_space& range() const;
120 
124  const sec_ed& range_coords() const;
125 
130  sec_vd* push(const sec_vd& xinput, bool xauto_access);
131 
136  void push_pa(const sec_vd& xinput, sec_vd& result, bool xauto_access);
137 
141  bool same_base(const sec_ed& xcoord, const sec_rep_space& xspace) const;
142 
146  bool same_discretization(const sec_ed& xcoord, const sec_rep_space& xspace) const;
147 
151  bool same_fiber(const sec_rep_space& xspace1, const sec_rep_space& xspace2) const;
152 
156  section_pusher_push_action& overlap_action() const;
157 
161  section_pusher_push_action& default_overlap_action() const;
162 
166  section_pusher_push_action& extension_action() const;
167 
171  section_pusher_push_action& default_extension_action() const;
172 
176  void put_overlap_action(section_pusher_push_action& xoverlap_action);
177 
181  void put_extension_action(section_pusher_push_action& xextension_cction);
182 
183 protected:
184 
188  section_pusher();
189 
190 private:
191 
195  sec_rep_space* _domain;
196 
200  sec_rep_space* _range;
201 
205  geometry::sec_ed_invertible _domain_coords;
206 
210  sec_ed _range_coords;
211 
216 
221 
225  typedef section_pusher_pullback_action::pb_map_itr_type pb_map_itr_type;
226 
230  typedef section_pusher_pullback_action::pb_map_range_type pb_map_range_type;
231 
235  block<pb_map_type*> _pb_maps;
236 
244  virtual void make_range_monovalent_subposet(bool xis_ext);
245 
250  void pull_back_range_disc_mono_mono();
251 
256  void pull_back_range_disc_mono_multi();
257 
262  void pull_back_range_disc_multi_mono();
263 
267  typedef unordered::unordered_multimap<pod_index_type, scoped_index> chart_to_branch_map_type;
268 
272  chart_to_branch_map_type _chart_to_branch_map;
273 
277  scoped_index _first_branch;
278 
283  void make_maps(const sec_vd& xinput);
284 
289  void clear_maps();
290 
294  int _prop_df;
295 
299  int _src_db;
300 
304  block<sec_vd_dof_type> _src_dofs;
305 
309  block<sec_vd_dof_type> _src_value;
310 
314  block<sec_vd_dof_type> _dst_dofs;
315 
320  void define_overlap(const sec_vd& xinput, sec_vd& xresult);
321 
325  void push_eval_mbr(const eval_iterator& xeval_itr, const sec_vd& xinput,
326  sec_vd& xresult);
327 
331  void define_extension(sec_vd& xresult);
332 
336  section_pusher_push_action* _overlap_action;
337 
341  section_pusher_push_action* _default_overlap_action;
342 
346  section_pusher_push_action* _extension_action;
347 
351  section_pusher_push_action* _default_extension_action;
352 
356  void initialize();
357 
359 
360 
361  // =============================================================================
363  // =============================================================================
365 
366 public:
367 
371  section_pusher(const section_pusher& xother);
372 
376  virtual ~section_pusher();
377 
381  virtual bool invariant() const;
382 
384 
385 };
386 
387 
388 // ===========================================================
389 // NONMEMBER FUNCTIONS
390 // ===========================================================
391 
392 } // namespace fields
393 
394 #endif // ifndef SECTION_PUSHER_H
pb_map_type::iterator pb_map_itr_type
The type of iterator for the pullback map.
Abstract functor to compute the dofs at a destination discretization point.
Namespace for fields component of sheaf system.
An iterator over the members of the evaluation subposet contained in the downset of the base space of...
Definition: eval_iterator.h:66
void push(const SJCB &xjcb, const SVECTOR &xvector, SR &xresult, bool xauto_access)
Definition: sec_jcb.impl.h:143
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 abstract invertible section of a fiber bundle with a d-dimensional base space and a d-dimensional ...
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
A vd-valued property as a function of global coordinates.
Definition: field_vd.h:69
An entry in a discretization map.
Definition: pullback_map.h:44
The general section push-forward operator; moves sections from one sec_rep_space to another using ext...
A section of a fiber bundle with a d-dimensional vector space fiber.
Definition: sec_vd.h:54
Namespace for the sheaves component of the sheaf system.
A map from members of a discretization subposet to points in a base space.
Definition: pullback_map.h:130
An auto_block with a no-initialization initialization policy.
Namespace for the fiber_bundles component of the sheaf system.
std::pair< pb_map_itr_type, pb_map_itr_type > pb_map_range_type
The type of iterator range for the pullback map.
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61