SheafSystem  0.0.0.0
property_disc_iterator.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 
22 #ifndef PROPERTY_DISC_ITERATOR_H
23 #define PROPERTY_DISC_ITERATOR_H
24 
25 #ifndef SHEAF_DLL_SPEC_H
26 #include "SheafSystem/sheaf_dll_spec.h"
27 #endif
28 
29 #ifndef DEPTH_FIRST_ITERATOR_H
30 #include "SheafSystem/depth_first_iterator.h"
31 #endif
32 
33 #ifndef SEC_VD_H
34 #include "SheafSystem/sec_vd.h"
35 #endif
36 
37 #ifndef SECTION_ITERATION_STATE_H
38 #include "SheafSystem/section_iteration_state.h"
39 #endif
40 
41 namespace fields
42 {
43 
44 using namespace sheaf;
45 using namespace fiber_bundle;
46 
47 class field_vd;
48 
56 class SHEAF_DLL_SPEC property_disc_iterator : public depth_first_iterator
57 {
58 
59  // ===========================================================
61  // ===========================================================
63 
64 public:
65 
70  new_property_disc_iterator(const section_space_schema_member& xcoords_schema,
71  const section_space_schema_member& xprop_schema);
72 
77 
81  const section_space_schema_member& coordinates_schema() const;
82 
86  const section_space_schema_member& property_schema() const;
87 
91  const base_space_poset& base_space() const;
92 
96  const subposet& coordinates_evaluation() const;
97 
101  const subposet& property_evaluation() const;
102 
106  int db() const;
107 
111  pod_index_type type_id() const;
112 
116  std::string type_name() const;
117 
122  section_evaluator& coordinate_evaluator() const;
123 
128  section_evaluator& property_evaluator() const;
129 
134  const block<discretization_context>& coordinate_discretization_members() const;
135 
140  const block<discretization_context>& property_discretization_members() const;
141 
145  virtual void get_prop_disc_values(const sec_vd& xsec) = 0;
146 
147 
148 protected:
149 
154 
159 
163  void initialize_iteration(const field_vd& xfield, order_type xorder);
164 
169  void initialize_iteration(const section_space_schema_member& xcoordinates_schema,
170  const section_space_schema_member& xproperty_schema,
171  order_type xorder);
172 
177 
182 
186  struct SHEAF_DLL_SPEC depth_flags_type
187  {
188  bool coord_eval;
189  bool coord_disc;
190  bool prop_eval;
191  bool prop_disc;
192 
193  depth_flags_type& operator=(bool xvalue)
194  {
195  coord_eval = xvalue;
196  coord_disc = xvalue;
197  prop_eval = xvalue;
198  prop_disc = xvalue;
199 
200  return(*this);
201  };
202  };
203 
209 
215 
217 
218 
219  // ===========================================================
221  // ===========================================================
223 
224 public:
225 
229  virtual void force_is_done();
230 
232 
233 
234  // ===========================================================
236  // ===========================================================
238 
239 public:
240 
244  virtual bool is_ancestor_of(const any* xother) const;
245 
249  virtual property_disc_iterator* clone() const = 0;
250 
254  bool invariant() const;
255 
257 
258 };
259 
260 } // namespace fields
261 
262 #endif // ifndef PROPERTY_DISC_ITERATOR_H
section_iteration_state _prop_state
Descriptor for property section iteration.
property_disc_iterator(const property_disc_iterator &xother)
Copy constructor; disabled.
A client handle for a subposet.
Definition: subposet.h:86
Namespace for fields component of sheaf system.
order_type
The types of order in which the iterator will visit the members of the poset. Determines which action...
Abstract base class with useful features for all objects.
Definition: any.h:39
depth_flags_type _at
True if current iteration is a member of the subposet associated with the flag.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
A vd-valued property as a function of global coordinates.
Definition: field_vd.h:69
Descriptor for iteration state of individual section. Intended for implementing various iterators...
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
section_iteration_state _coord_state
Descriptor for coordinate section iteration.
depth_flags_type _above
True if current iteration is above the subposet associated with the flag.
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...
property_disc_iterator()
Default constructor.
An auto_block with a no-initialization initialization policy.
Namespace for the fiber_bundles component of the sheaf system.
Abstract iterator over the discretization of the property section of a field_vd. Concurrently travers...