SheafSystem  0.0.0.0
local_field_refiner.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 LOCAL_FIELD_REFINER_H
22 #define LOCAL_FIELD_REFINER_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef ANY_H
29 #include "SheafSystem/any.h"
30 #endif
31 
32 #ifndef BLOCK_H
33 #include "SheafSystem/block.h"
34 #endif
35 
36 #ifndef FIELDS_H
37 #include "SheafSystem/fields.h"
38 #endif
39 
40 namespace fiber_bundle
41 {
42 class base_space_poset;
43 }
44 
45 namespace fields
46 {
47 
48 using namespace sheaf;
49 using namespace fiber_bundle;
50 
51 class field_refinement_buffer;
52 class field_refinement_policy;
53 
58 class SHEAF_DLL_SPEC local_field_refiner : public any
59 {
60 
61  // ===========================================================
63  // ===========================================================
65 
66 public:
67 
71  virtual ~local_field_refiner();
72 
77  virtual int db() const = 0;
78 
82  virtual const std::string& zone_type_name() const = 0;
83 
87  virtual const std::string& vertex_type_name() const;
88 
92  const field_refinement_policy& policy() const;
93 
98  void refine(field_refinement_buffer& xbuffer);
99 
103  virtual size_type refined_zone_ct() const = 0;
104 
109  const block<scoped_index>& refined_zone_ids() const;
110 
117  virtual const chart_point_coord_type* local_coordinates_map(size_type xi) const = 0;
118 
119 protected:
120 
126 
132 
137 
142 
147 
152 
158 
162  void initialize_buffers();
163 
167  virtual void refine_base_space(field_refinement_buffer& xbuffer) = 0;
168 
172  virtual void refine_coordinates(field_refinement_buffer& xbuffer) = 0;
173 
177  pod_index_type create_vertex(base_space_poset& xbase, int xdepth);
178 
182  pod_index_type create_zone(base_space_poset& xbase, int xdepth);
183 
185 
186 
187  // ===========================================================
189  // ===========================================================
191 
192 public:
193 
198  virtual local_field_refiner* clone() const = 0;
199 
204  virtual local_field_refiner& operator=(const local_field_refiner& xother);
205 
209  virtual bool invariant() const;
210 
214  virtual bool is_ancestor_of(const any* other) const;
215 
217 
218 };
219 
220 } // namespace fields
221 
222 #endif // ifndef LOCAL_FIELD_REFINER_H
double chart_point_coord_type
The type of local coordinate in the base space; the scalar type for the local coordinate vector space...
Definition: fiber_bundle.h:57
A buffer for data which is used by both a local_field_refiner object and its associated field_refinem...
Namespace for fields component of sheaf system.
Abstract base class with useful features for all objects.
Definition: any.h:39
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
An abstract policy that determines the conditions under which a zone should be refined.
const field_refinement_policy & _policy
The refinement policy.
An abstract refiner for a field over a local region (primitive cell) in the base space.
block< scoped_index > _zone_dof_tuple_ids
The dof tuple index for quadrangle cells at various depths.
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.
Namespace for the fiber_bundles component of the sheaf system.
block< scoped_index > _refined_zone_ids
The member ids of the zones created by the most recent execution of refine().
block< scoped_index > _point_dof_tuple_ids
The dof tuple index for point cells at various depths.