SheafSystem  0.0.0.0
edge_centered_polygon_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 EDGE_CENTERED_POLYGON_REFINER_H
22 #define EDGE_CENTERED_POLYGON_REFINER_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef LOCAL_FIELD_REFINER_H
29 #include "SheafSystem/local_field_refiner.h"
30 #endif
31 
32 #ifndef STD_LIST_H
33 #include "SheafSystem/std_list.h"
34 #endif
35 
36 namespace fields
37 {
38 
44 {
45 
46  // ===========================================================
48  // ===========================================================
50 
51 protected:
52 
58 
63 
67  virtual size_type unrefined_vertex_ct() const = 0;
68 
74  size_type refined_vertex_ct() const;
75 
79  size_type edge_ct() const;
80 
84  virtual bool is_zone_centered_refiner() const = 0;
85 
90 
95 
100 
104  typedef std::list<scoped_index> vertex_list_type;
105 
111 
115  vertex_list_type _vertex_list;
116 
121 
125  void reserve_vertex_buffers();
126 
130  virtual void refine_base_space(field_refinement_buffer& xbuffer);
131 
135  virtual void modify_crg(field_refinement_buffer& xbuffer);
136 
140  void modify_subposets(field_refinement_buffer& xbuffer);
141 
145  virtual void refine_coordinates(field_refinement_buffer& xbuffer);
146 
150  pod_index_type create_edge_center(base_space_poset& xbase,
151  const scoped_index& xzone_id,
152  int xdepth,
153  const scoped_index& xprev_mbr_id,
154  const scoped_index& xmbr_id);
155 
160  void make_new_vertices(field_refinement_buffer& xbuffer);
161 
167  virtual const block<size_type>& first_vertex_index() const = 0;
168 
172  void make_new_zones(field_refinement_buffer& xbuffer);
173 
175 
176 
177  // ===========================================================
179  // ===========================================================
181 
182 public:
183 
188  virtual int db() const;
189 
191 
192 
193  // ===========================================================
195  // ===========================================================
197 
198 public:
199 
203  virtual edge_centered_polygon_refiner* clone() const = 0;
204 
208  virtual edge_centered_polygon_refiner& operator=(const local_field_refiner& xother);
209 
214 
219 
223  virtual bool invariant() const;
224 
228  virtual bool is_ancestor_of(const any* xother) const;
229 
231 
232 };
233 
234 } // namespace fields
235 
236 #endif // ifndef EDGE_CENTERED_POLYGON_REFINER_H
block< vertex_list_type::iterator > _vertex_pos
The position in _vertex_list of ids of the vertices in the currnet refinement.
vertex_list_type _vertex_list
List for processing vertices.
std::list< scoped_index > vertex_list_type
The type of buffer used for processing vertices.
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.
An abstract field refiner that subdivides a polygon by introducing new vertices into the centers of t...
block< bool > _is_new_vertex
True if i-th member is a new vertex.
block< scoped_index > _vertex_ids
The ids of the vertices in boundary <= new refinement depth.
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...
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
An abstract policy that determines the conditions under which a zone should be refined.
An abstract refiner for a field over a local region (primitive cell) in the base space.
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
scoped_index _zone_ctr_id
The id of the new vertex in the center of the zone.