SheafSystem  0.0.0.0
field_refinement_buffer.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 FIELD_REFINEMENT_BUFFER_H
22 #define FIELD_REFINEMENT_BUFFER_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef BLOCK_H
29 #include "SheafSystem/block.h"
30 #endif
31 
32 #ifndef FIELDS_H
33 #include "SheafSystem/fields.h"
34 #endif
35 
36 #ifndef FIBER_BUNDLE_H
37 #include "SheafSystem/fiber_bundle.h"
38 #endif
39 
40 #ifndef FIELD_VD_H
41 #include "SheafSystem/field_vd.h"
42 #endif
43 
44 #ifndef ZN_TO_BOOL_H
45 #include "SheafSystem/zn_to_bool.h"
46 #endif
47 
48 namespace sheaf
49 {
50 class scattered_insertion_index_space_handle;
51 class subposet;
52 }
53 
54 namespace fiber_bundle
55 {
56 class base_space_poset;
57 class section_evaluator;
58 }
59 
60 namespace fields
61 {
62  // using namespace fields;
63 
64  class field_vd;
65  class local_field_refiner;
66 
71 class SHEAF_DLL_SPEC field_refinement_buffer
72 {
73 
74  // ===========================================================
76  // ===========================================================
78 
79 public:
80 
84  bool invariant() const;
85 
87 
88 
89  // ===========================================================
91  // ===========================================================
93 
94 public:
95 
99  field_refinement_buffer(const field_vd& xsource,
100  field_vd& xtarget,
101  const block<scoped_index>& xcoord_disc_ids,
102  const block<scoped_index>& xprop_disc_ids,
103  int xdepth_ub);
104 
110  const block<scoped_index>& xcoord_disc_ids,
111  const block<scoped_index>& xprop_disc_ids,
112  int xdepth_ub);
113 
118 
122  const field_vd& source;
123 
128 
134 
140 
145 
150 
155 
160 
165 
171 
176 
181 
186 
191 
196 
201 
206 
211 
216 
221 
227 
232 
236  int depth;
237 
241  int depth_ub;
242 
247 
252 
257 
262 
267 
272  void gather_coordinate_dofs();
273 
278  void gather_property_dofs();
279 
285  void push_prop_dofs();
286 
292  void refine_prop_dofs(local_field_refiner* xrefiner);
293 
298  void evaluate_at_center();
299 
305  void evaluate_source_at_disc(size_type xi);
306 
311  void save_parent();
312 
316  void reserve_coord_fiber(const scoped_index& xdisc_id);
317 
321  void reserve_prop_fiber(const scoped_index& xdisc_id);
322 
323 private:
324 
330 
336 
338 
339 };
340 
341 // ===========================================================
342 // NON-MEMBER FUNCTIONS
343 // ===========================================================
344 
345 } // namespace fields
346 
347 #endif // ifndef FIELD_REFINEMENT_BUFFER_H
A client handle for a subposet.
Definition: subposet.h:86
section_evaluator * coord_evaluator
The section evaluator for the coordinates section of the target.
section_evaluator ** parent_prop_evaluator
The property section evaluators for the parent zones.
block< sec_vd_dof_type > * parent_prop_dofs
A buffer for property dofs of the parent zones.
scattered_insertion_index_space_handle * coord_disc_seq_id_space
The discretization sequence id space of the target coordinates.
A buffer for data which is used by both a local_field_refiner object and its associated field_refinem...
subposet & coord_discretization
The discretization subposet of the coordinate section of the target.
Namespace for fields component of sheaf system.
const block< scoped_index > & prop_disc_ids
A buffer for gathering the property discretization members for the current zone.
block< sec_vd_value_type > coord_value
A buffer for computing coordinates at a point.
bool same_discretization
True if target property uses same discretization as target coordinates.
block< sec_vd_dof_type > coord_dofs
A buffer for gathering coordinate dofs.
int depth_ub
The upper bound for the refinement depth.
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...
scoped_index zone_id
The id of the current zone.
scattered_insertion_index_space_handle * elements_id_space
The sequence id space used by the elements subposet.
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
A vd-valued property as a function of global coordinates.
Definition: field_vd.h:69
subposet & prop_discretization
The discretization subposet of the property section of the target.
const block< scoped_index > & coord_disc_ids
A buffer for gathering the coordinate discretization members for the current zone.
field_vd & target
The field being refined.
block< sec_vd_value_type > prop_value
A buffer for computing target property at a point.
An abstract local section evaluator; a map from {local coordinates x dofs} to section value...
int * parent_subzone_id
The index of the current subzone of the parent zones.
scattered_insertion_index_space_handle * vertices_id_space
The sequence id space used by the vertices subposet.
block< sec_vd_value_type > source_prop_value
A buffer for computing source property at a point.
section_evaluator * prop_evaluator
The section evaluator for the property section of the target.
An abstract refiner for a field over a local region (primitive cell) in the base space.
const field_vd & source
The reference field.
A handle for a scattered_insertion_index_space_state.
Namespace for the sheaves component of the sheaf system.
subposet & evaluation
The evaluation subposet used by both the coordinates and property sections of the target...
block< chart_point_coord_type > local_coords
A buffer for the local coordinates of a point.
block< chart_point_coord_type > local_coords2
Another buffer for the local coordinates of a point.
base_space_poset * base_space
The current base space.
Namespace for the fiber_bundles component of the sheaf system.
scattered_insertion_index_space_handle * prop_disc_seq_id_space
The discretization sequence id space of the target coordinates.
block< sec_vd_dof_type > prop_dofs
A buffer for gathering property dofs.
zn_to_bool has_been_pushed
True if i-th member has been pused.
int depth
The refinement depth of the current zone.