SheafSystem  0.0.0.0
variance_bound_refinement_policy.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 VARIANCE_BOUND_REFINEMENT_POLICY_H
22 #define VARIANCE_BOUND_REFINEMENT_POLICY_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef FIELD_REFINEMENT_POLICY_H
29 #include "SheafSystem/field_refinement_policy.h"
30 #endif
31 
32 namespace fields
33 {
34 
35 using namespace fiber_bundle;
36 
43 {
44 
45  // ===========================================================
47  // ===========================================================
49 
50 public:
51 
56  variance_bound_refinement_policy(size_type xrefinement_level_ub = 2,
57  sec_vd_value_type xvariance_ub = 1.0e-10);
58 
64 
69 
73  sec_vd_value_type variance_ub() const;
74 
78  void put_variance_ub(sec_vd_value_type xub);
79 
80 protected:
81 
86 
87 private:
88 
93  static bool _has_prototype;
94 
98  static bool make_prototype();
99 
101 
102 
103  // ===========================================================
105  // ===========================================================
107 
108 public:
109 
113  virtual bool should_refine(field_refinement_buffer& xbuffer,
114  size_type xrefinement_depth) const;
115 
119  virtual const std::string& class_name() const;
120 
124  static const std::string& static_class_name();
125 
127 
128 
129  // ===========================================================
131  // ===========================================================
133 
134 public:
135 
139  virtual bool is_ancestor_of(const any *other) const;
140 
145  virtual variance_bound_refinement_policy* clone() const;
146 
150  virtual variance_bound_refinement_policy& operator=(const field_refinement_policy& xother);
151 
156 
160  virtual bool invariant() const;
161 
163 
164 };
165 
166 // ===========================================================
167 // NON-MEMBER FUNCTIONS
168 // ===========================================================
169 
170 } // namespace fields
171 
172 #endif // ifndef VARIANCE_BOUND_REFINEMENT_POLICY_H
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.
A policy that determines a zone should be refined if the variance using the L1 norm of any discretiza...
Abstract base class with useful features for all objects.
Definition: any.h:39
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.
sec_vd_value_type _variance_ub
The upper bound on the variance.
Namespace for the fiber_bundles component of the sheaf system.
vd_value_type sec_vd_value_type
The type of component in the value of a section at a point.
Definition: fiber_bundle.h:73