SheafSystem  0.0.0.0
section_eval_iterator.h
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 
18 // Interface for class section_eval_iterator
19 
20 #ifndef SECTION_EVAL_ITERATOR_H
21 #define SECTION_EVAL_ITERATOR_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef EVAL_ITERATOR_H
28 #include "SheafSystem/eval_iterator.h"
29 #endif
30 
31 #ifndef POSET_DOF_ITERATOR_H
32 #include "SheafSystem/poset_dof_iterator.h"
33 #endif
34 
35 #ifndef SEC_VD_H
36 #include "SheafSystem/sec_vd.h" // just to get typedefs
37 #endif
38 
39 namespace sheaf
40 {
41 template <typename T>
42 class block;
43 }
44 
45 namespace fiber_bundle
46 {
47 
48 using namespace sheaf;
49 
50 
51 class section_evaluator;
52 class section_space_schema_member;
53 
58 class SHEAF_DLL_SPEC section_eval_iterator : public any
59 {
60 
61 public:
62 
63  // CANONICAL MEMBERS
64 
69 
73  virtual section_eval_iterator&
74  operator=(const section_eval_iterator& xother);
75 
80 
85 
89  virtual ~section_eval_iterator();
90 
94  virtual bool is_ancestor_of(const any* xother) const;
95 
99  virtual section_eval_iterator* clone() const;
100 
104  bool invariant() const;
105 
106  // ITERATOR FACET
107 
112  bool is_initialized() const;
113 
114  // Anchor is not virtual; descendant redefinitions
115  // with covariant signature hide this version.
116 
121  section_space_schema_member& anchor();
122 
127  const section_space_schema_member& anchor() const;
128 
132  virtual bool anchor_is_ancestor_of(const section_space_schema_member& xmbr) const;
133 
138  virtual void reset(bool xreset_markers = RESET);
139 
144  virtual void reset(pod_index_type xhub_id, bool xreset_markers = RESET);
145 
150  void reset(const scoped_index& xid, bool xreset_markers = RESET);
151 
155  virtual void reset(const section_space_schema_member& xanchor);
156 
160  virtual void reset_components();
161 
166  virtual int ct(bool xreset = false);
167 
171  virtual bool has_visited(pod_index_type xhub_id) const;
172 
176  bool has_visited(const scoped_index& xid) const;
177 
181  virtual bool has_visited(const section_space_schema_member& xmbr) const;
182 
188  virtual void put_has_visited(pod_index_type xhub_id, bool xvalue);
189 
195  void put_has_visited(const scoped_index& xid, bool xvalue);
196 
197  // SECTION_EVAL_ITERATOR FACET
198 
202  const scoped_index& evaluator_id() const;
203 
208  section_evaluator& evaluator();
209 
214  const section_evaluator& evaluator() const;
215 
219  bool evaluators_done() const;
220 
225  virtual void next_evaluator();
226 
230  bool components_done() const;
231 
236  virtual void next_component();
237 
242  block<scoped_index>& discretization_members();
243 
248  const block<scoped_index>& discretization_members() const;
249 
253  const scoped_index& fiber_id() const;
254 
259  void gather_dofs(const sec_vd& xsec, block<sec_vd::dof_type>& xdofs);
260 
265  void scatter_dofs(sec_vd& xsec, const block<sec_vd::dof_type>& xdofs, size_type xindex);
266 
267 
268 protected:
269 
273  void reset_anchor(const section_space_schema_member& xanchor);
274 
280 
285 
290 
291  // ///
293  // ///
294  // scoped_index _fiber_id;
295 };
296 
297 } // namespace fiber_bundle
298 
299 #endif // ifndef SECTION_EVAL_ITERATOR_H
An iterator over the members of the evaluation subposet contained in the downset of the base space of...
Definition: eval_iterator.h:66
section_space_schema_member * _anchor
The schema member whose downset is being iterated over; the top member of the domain of iteration...
Dperecated. Use postorder_itr. Specialization of the filtered depth-first iterator which exposes the ...
Abstract base class with useful features for all objects.
Definition: any.h:39
const bool RESET
Iteration marker reset control.
Definition: sheaf.h:87
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
An abstract local section evaluator; a map from {local coordinates x dofs} to section value...
A section of a fiber bundle with a d-dimensional vector space fiber.
Definition: sec_vd.h:54
Iterates over the evaluation members of a section space schema anchor; gathers the dof ids for each e...
postorder_iterator _fiber_schema_itr
The iterator for the fiber schema component.
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
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...
Namespace for the fiber_bundles component of the sheaf system.
eval_iterator _evaluation_itr
The iterator for the base space component.