SheafSystem  0.0.0.0
eval_family.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 eval_family
19 
20 #ifndef EVAL_FAMILY_H
21 #define EVAL_FAMILY_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef ANY_H
28 #include "SheafSystem/any.h"
29 #endif
30 
31 #ifndef BASE_SPACE_MEMBER_H
32 #include "SheafSystem/base_space_member.h"
33 #endif
34 
35 #ifndef AUOTO_BLOCK_H
36 #include "SheafSystem/auto_block.h"
37 #endif
38 
39 #ifndef STD_MAP_H
40 #include "SheafSystem/std_map.h"
41 #endif
42 
43 #ifndef STD_STRING_H
44 #include "SheafSystem/std_string.h"
45 #endif
46 
47 namespace sheaf
48 {
49 template <class T> class factory;
50 class poset;
51 class poset_state_handle;
52 }
53 
54 namespace fiber_bundle
55 {
56 
57 using namespace sheaf;
58 
59 
60 class section_evaluator;
61 
67 class SHEAF_DLL_SPEC eval_family : public any
68 {
69 
70 public:
71 
72  // CANONICAL MEMBERS
73 
78  eval_family(const eval_family& xother);
79 
85  virtual eval_family* clone() const;
86 
90  virtual ~eval_family();
91 
95  virtual bool invariant() const;
96 
100  virtual bool is_ancestor_of(const any* xother) const;
101 
102  // EVALUATOR_FAMILY FACET
103 
107  static eval_family* new_family(const std::string& xname);
108 
113  static eval_family* new_family(const std::string& xname, const namespace_poset& xname_space);
114 
118  static void insert_family_prototype(eval_family* xprototype);
119 
123  static factory<eval_family>& family_factory();
124 
128  virtual const std::string& class_name() const = 0;
129 
134  section_evaluator* member(pod_index_type xtype_id) const;
135 
140  template <typename S>
141  S* member(pod_index_type xtype_id) const;
142 
148  section_evaluator* member(const poset_state_handle& xhost, pod_index_type xhub_id);
149 
155  section_evaluator* member(const poset_state_handle& xhost, const scoped_index& xid);
156 
162  template <typename S>
163  S* member(const poset_state_handle& xhost, pod_index_type xhub_id);
164 
170  template <typename S>
171  S* member(const poset_state_handle& xhost, const scoped_index& xd);
172 
176  size_type size() const;
177 
181  virtual void initialize(const namespace_poset& xname_space) = 0;
182 
186  bool is_initialized() const;
187 
192  virtual bool dofs_are_values() const = 0;
193 
198  virtual bool extrema_are_dofs() const = 0;
199 
200 protected:
201 
206  eval_family();
207 
211  void initialize_members(size_type xmembers_ub);
212 
217 
221  members_type _members;
222 
227 
228 private:
229 
234  static factory<eval_family>& initialize_family_factory();
235 };
236 
237 } // namespace fiber_bundle
238 
239 #endif // ifndef EVAL_FAMILY_H
240 
241 
242 
243 
244 
245 
auto_block< section_evaluator *, zero_block_initialization_policy< section_evaluator * > > members_type
Type of storage for members.
Definition: eval_family.h:216
The default name space; a poset which contains other posets as members.
members_type _members
The members of the family.
Definition: eval_family.h:221
A client handle for a general, abstract partially order set.
A contiguously allocated array of items of type T with size information and automatic resizing...
Definition: auto_block.h:122
bool _is_initialized
True if this has been populated with members.
Definition: eval_family.h:226
Abstract base class with useful features for all objects.
Definition: any.h:39
A factory for instanting descendants of an abstract type T, given the class name of the descendant...
Definition: eval_family.h:49
A client handle for a mutable partially ordered set.
Definition: poset.h:40
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
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
An abstract local section evaluator; a map from {local coordinates x dofs} to section value...
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.