SheafSystem  0.0.0.0
section_iteration_state.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_iteration_state
19 
20 #ifndef SECTION_ITERATION_STATE_H
21 #define SECTION_ITERATION_STATE_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef BASE_SPACE_POSET_H
28 #include "SheafSystem/base_space_poset.h"
29 #endif
30 
31 #ifndef BLOCK_H
32 #include "SheafSystem/block.h"
33 #endif
34 
35 #ifndef DISCRETIZATION_CONTEXT_H
36 #include "SheafSystem/discretization_context.h"
37 #endif
38 
39 #ifndef STD_UNORDERED_MAP_H
40 #include "SheafSystem/std_unordered_map.h"
41 #endif
42 
43 #ifndef STD_SET_H
44 #include "SheafSystem/std_set.h"
45 #endif
46 
47 #ifndef SUBPOSET_H
48 #include "SheafSystem/subposet.h"
49 #endif
50 
51 #ifndef ZN_TO_BOOL_H
52 #include "SheafSystem/zn_to_bool.h"
53 #endif
54 
55 namespace fiber_bundle
56 {
57 
58 using namespace sheaf;
59 
60 
61 class structured_block;
62 class eval_family;
63 class section_evaluator;
64 class section_space_schema_member;
65 class sec_vd;
66 
72 class SHEAF_DLL_SPEC section_iteration_state
73 {
74 public:
79 
83  int df;
84 
89 
94 
99 
104 
109 
112 
117 
122 
127 
132 
137 
142 
147 
152 
156  unordered::unordered_map<pod_index_type, pod_index_type>* disc_to_seq_map;
157 
162 
167  int local_id;
168 
173 
179 
184 
189  std::set<pod_index_type> correction_set;
190 
196 
199 
204 
209 
213  void initialize(const section_space_schema_member& xschema);
214 
218  void initialize(const base_space_poset& xbase_space_host);
219 
224  void initialize_correction_set();
225 
229  void ensure_discretization_order(const scoped_index& xgreater_index);
230 
234  void initialize_order_correction();
235 
239  void set_and_attach_evaluation_member(const scoped_index& xindex);
240 
244  void set_evaluation_member(const scoped_index& xindex);
245 
250  void gather_discretization_member(const scoped_index& xindex,
251  const scoped_index& xgreater_index);
252 
256  void gather_discretization_member(const scoped_index& xindex);
257 
261  void gather_dofs(const sec_vd& xsec);
262 
266  void gather_dofs(const sec_vd& xsec, const block<discretization_context>& xother_pts);
267 };
268 
269 
270 // =============================================================================
271 // NON-MEMBER FUNCTIONS
272 // =============================================================================
273 
274 
275 } // namespace fiber_bundle
276 
277 #endif // ifndef SECTION_ITERATION_STATE_H
A client handle for a subposet.
Definition: subposet.h:86
pod_index_type eval_type_id
The type id of the current eval member.
unordered::unordered_map< pod_index_type, pod_index_type > * disc_to_seq_map
The map from discretization to sequence ids.
const base_space_poset * base_space_host
The host of the base space of the section.
int local_id
The local index of the current disc member with respect to the current eval member.
pod_index_type next_seq_id
The next sequence id.
block< sec_vd_dof_type > dofs
Buffer for dofs of gathered disc members.
section_evaluator * eval
The current evaluator.
subposet eval_sp
The evaluation subposet associated with schema.
scoped_index eval_id
The index of the current evaluation member.
block< structured_block * > eval_mbrs
A family of evaluation member handles.
A client handle for a base space member which represents a homgeneous collection of local cells...
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
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
block< discretization_context > discretization_members
The discretization members in the downset of the current evaluation member.
std::set< pod_index_type > correction_set
The set of evaluation member prototypes for which connectivity order correction is applied...
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
A family of compatible section evaluators, one for each member of some family of cell types; a map fr...
Definition: eval_family.h:67
block< scoped_index > down_set
The strict down set of the evalaution member.
eval_family * evaluators
The evaluator family associated with schema.
bool correction_enabled
True if discretization member order correction is enabled for the current evaluation member...
bool vertex_discretization
True if discretization is vertices.
Descriptor for iteration state of individual section. Intended for implementing various iterators...
bool is_uniform
True if evaluator family is uniform evaluator family.
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
const section_space_schema_member * schema
The schema of the section.
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...
structured_block * eval_mbr
The current evaluation member handle.
Namespace for the fiber_bundles component of the sheaf system.
subposet disc_sp
The discretization subposet associated with schema.
zn_to_bool visited
Markers for this section.