SheafSystem  0.0.0.0
discretization_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 discretization_iterator
19 
20 
21 #ifndef DISCRETIZATION_ITERATOR_H
22 #define DISCRETIZATION_ITERATOR_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef DEPTH_FIRST_ITERATOR_H
29 #include "SheafSystem/depth_first_iterator.h"
30 #endif
31 
32 #ifndef SINGLY_LINKED_LIST_H
33 #include "SheafSystem/singly_linked_list.h"
34 #endif
35 
36 namespace fiber_bundle
37 {
38 
39 using namespace sheaf;
40 
41 
42 class section_space_schema_member;
43 class sec_rep_descriptor;
44 
49 class SHEAF_DLL_SPEC discretization_iterator : public depth_first_iterator
50 {
51 
52  friend class section_dof_iterator;
53 
54 public:
55 
56  // CANONICAL MEMBERS
57 
62 
67 
72 
76  virtual bool is_ancestor_of(const any* other) const;
77 
81  virtual discretization_iterator* clone() const;
82 
86  bool invariant() const;
87 
88  // OTHER CONSTRUCTORS
89 
94 
95  // ITERATOR FACET
96 
101  virtual bool is_initialized() const;
102 
106  virtual void force_is_done();
107 
111  inline void next()
112  {
113  next(false);
114  };
115 
122  virtual void next(bool xtruncate);
123 
124  // DISCRETIZATION ITERATOR FACET
125 
130  section_space_schema_member& schema_anchor();
131 
136  const section_space_schema_member& schema_anchor() const;
137 
141  void put_schema_anchor(const section_space_schema_member& xschema_anchor);
142 
146  void put_schema_anchor(pod_index_type xschema_anchor_index);
147 
151  void put_schema_anchor(const scoped_index& xschema_anchor_index);
152 
156  const scoped_index& discretization_member_index() const;
157 
161  const scoped_index& evaluation_member_index() const;
162 
166  bool is_multivalued() const;
167 
168 protected:
169 
173  void initialize_schema_anchor(const section_space_schema_member& xanchor);
174 
178  virtual void initialize_has_visited(const abstract_poset_member& xanchor);
179 
180 private:
181 
186  section_space_schema_member* _schema_anchor;
187 
191  zn_to_bool* _ascending_has_visited;
192 
196  zn_to_bool* _descending_has_visited;
197 
201  singly_linked_list<int> _up_set;
202 
206  scoped_index _discretization_member_index;
207 
211  scoped_index _evaluation_member_index;
212 };
213 
214 
215 } // namespace fiber_bundle
216 
217 #endif // ifndef DISCRETIZATION_ITERATOR_H
Iterates in postorder over dofs of a schema member anchor. Attaches an a handle of type section_space...
void next()
Makes this the next member of the subset.
Abstract base class with useful features for all objects.
Definition: any.h:39
A map from Zn (the integers mod n) to bools. A characteristic function used to represent subsets of Z...
Definition: zn_to_bool.h:52
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
Iterator over the discretization subposet associated with a section_space_schema_member anchor...
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...
An abstract client handle for a member of a poset.
Namespace for the fiber_bundles component of the sheaf system.