SheafSystem  0.0.0.0
base_space_map.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 BASE_SPACE_MAP_H
22 #define BASE_SPACE_MAP_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 #ifndef SEC_REP_SPACE_H
45 #include "SheafSystem/sec_rep_space.h"
46 #endif
47 
48 #ifndef STD_SET_H
49 #include "SheafSystem/std_set.h"
50 #endif
51 
52 #ifndef STL_SCOPED_INDEX_H
53 #include "SheafSystem/stl_scoped_index.h"
54 #endif
55 
56 namespace fiber_bundle
57 {
58 class base_space_poset;
59 class discretization_context;
60 class eval_iterator;
61 }
62 
63 namespace fields
64 {
65 
66 using namespace sheaf;
67 using namespace fiber_bundle;
68 
69 class base_space_map_push_action;
70 class field_vd;
71 
75 class SHEAF_DLL_SPEC base_space_map : public any
76 {
77 
78  // =============================================================================
80  // =============================================================================
82 
83 public:
84 
88  base_space_map(const base_space_map& xother);
89 
93  base_space_map(const sec_ed& xdomain_coord, const sec_ed& xrange_coord,
94  bool xauto_access);
95 
99  virtual ~base_space_map();
100 
104  const base_space_poset& domain() const;
105 
109  const geometry::sec_ed_invertible& domain_coords() const;
110 
114  const base_space_poset& range() const;
115 
119  const sec_ed& range_coords() const;
120 
124  void push(const sec_vd& xinput, sec_vd& xoutput, bool xauto_access);
125 
130  void push(const block<sec_vd*>& xinputs, block<sec_vd*>& xoutputs, bool xauto_access);
131 
135  bool same_base(const sec_vd& xsec1, const sec_vd& xsec2, bool xauto_access) const;
136 
140  bool same_rep(const sec_vd& xsec1, const sec_vd& xsec2, bool xauto_access) const;
141 
145  bool same_fiber(const sec_vd& xsec1, const sec_vd& xsec2, bool xauto_access) const;
146 
150  base_space_map_push_action& overlap_action() const;
151 
155  base_space_map_push_action& default_overlap_action() const;
156 
160  base_space_map_push_action& extension_action() const;
161 
165  base_space_map_push_action& default_extension_action() const;
166 
170  void put_overlap_action(base_space_map_push_action& xoverlap_action);
171 
175  void put_extension_action(base_space_map_push_action& xextension_action);
176 
177 protected:
178 
182  base_space_map();
183 
184 private:
185 
189  base_space_poset* _domain;
190 
194  base_space_poset* _range;
195 
199  geometry::sec_ed_invertible _domain_coords;
200 
204  sec_ed _range_coords;
205 
210 
215 
219  typedef section_pusher_pullback_action::pb_map_itr_type pb_map_itr_type;
220 
224  typedef section_pusher_pullback_action::pb_map_range_type pb_map_range_type;
225 
229  block<pb_map_type*> _pb_maps;
230 
234  typedef void (base_space_map::*pull_back_function_type)(discretization_context&);
235 
239  void pull_back_output_disc(const sec_vd& xinput0,
240  section_space_schema_member& xoutput_schema);
241 
246  void pull_back_output_disc_mono_mono(const discretization_context& xcontext, pb_type& xpb);
247 
252  void pull_back_output_disc_mono_multi(const discretization_context& xcontext,
253  pb_type& xpb,
254  std::set< stl_scoped_index<> >& xbranches);
255 
260  void pull_back_output_disc_multi_mono(const discretization_context& xcontext, pb_type& xpb);
261 
266  void pull_back_output_disc_multi_multi(const discretization_context& xcontext, pb_type& xpb);
267 
271  typedef hash_multimap<pod_index_type, scoped_index> chart_to_branch_map_type;
272 
276  chart_to_branch_map_type _chart_to_branch_map;
277 
282  int _control_section;
283 
288  void set_control_section(const block<sec_vd*>& xinputs);
289 
293  scoped_index _first_branch;
294 
298  index_space_handle* _coord_branch_id_space;
299 
303  block<index_space_handle*> _prop_branch_id_spaces;
304 
308  index_space_handle* _control_branch_id_space;
309 
313  void set_branch_id_spaces(const block<sec_vd*>& xinputs);
314 
319  void make_maps(sec_vd& xinput);
320 
325  void clear_maps();
326 
330  int _prop_df;
331 
335  int _domain_db;
336 
340  block<chart_point_3d> _chart_pts;
341 
345  block<branch_point_pair> _branch_pts;
346 
350  block< block<sec_vd_dof_type>* > _in_dofs;
351 
355  block< block<sec_vd_dof_type>* > _out_dofs;
356 
360  void make_dof_buffers(const block<sec_vd*>& xinputs, block<sec_vd*>& xoutputs);
361 
365  void clear_dof_buffers();
366 
371  void define_overlap(const block<sec_vd*>& xinputs, block<sec_vd*>& xoutputs);
372 
376  void push_eval_mbr(const eval_iterator& xeval_itr,
377  const block<sec_vd*>& xinputs,
378  block<sec_vd*>& xoutputs);
379 
383  void define_extension(block<sec_vd*>& xoutputs);
384 
388  base_space_map_push_action* _overlap_action;
389 
393  base_space_map_push_action* _default_overlap_action;
394 
398  base_space_map_push_action* _extension_action;
399 
403  base_space_map_push_action* _default_extension_action;
404 
408  void initialize();
409 
411 
412 
413  // =============================================================================
415  // =============================================================================
417 
418 public:
419 
423  virtual bool invariant() const;
424 
426 
427 };
428 
429 
430 // ===========================================================
431 // NONMEMBER FUNCTIONS
432 // ===========================================================
433 
434 } // namespace fields
435 
436 #endif // ifndef BASE_SPACE_MAP_H
pb_map_type::iterator pb_map_itr_type
The type of iterator for the pullback map.
A context for discretization members. Intended for implementing various iterators, especially concurrent iterations over multiple sections.
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
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
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
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
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
An entry in a discretization map.
Definition: pullback_map.h:44
A section of a fiber bundle with a d-dimensional vector space fiber.
Definition: sec_vd.h:54
Abstract functor to compute the dofs at a destination discretization point.
Namespace for the sheaves component of the sheaf system.
A client handle for a poset member which has been prepared for use as a schema for a section space...
A map from members of a discretization subposet to points in a base space.
Definition: pullback_map.h:130
A map from one base space to another generated by coordinate sections.
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.