SheafSystem  0.0.0.0
body_builder.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 BODY_BUILDER_H
22 #define BODY_BUILDER_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 FIELDS_H
33 #include "SheafSystem/fields.h"
34 #endif
35 
36 namespace sheaf
37 {
38 template <class T>
39 class block;
40 class subposet;
41 }
42 
43 namespace fiber_bundle
44 {
45 class base_space_poset;
46 class section_evaluator;
47 }
48 
49 namespace fields
50 {
51 
52 class field_vd;
53 
58 class SHEAF_DLL_SPEC body_builder : public any
59 {
60 
61  // ===========================================================
63  // ===========================================================
65 
66 public:
67 
73 
79 
84 
89  body_builder();
90 
91  // Copy constructor not implemented;
92  // default memberwise copy will do.
93 
97  virtual ~body_builder();
98 
103  block<scoped_index>* build(field_vd& xfield,
104  value_type xlower,
105  value_type xupper);
106 
111  void build_pa(field_vd& xfield,
112  value_type xlower,
113  value_type xupper,
114  block<scoped_index>& xresult);
115 
116 
117 private:
118 
123  void select_evaluation_members(const field_vd& xfield,
124  value_type xlower,
125  value_type xupper,
126  subposet& xselected);
127 
132  bool interval_contains_field(const section_evaluator& xeval,
133  const block<dof_type>& xdofs,
134  value_type xlower,
135  value_type xupper) const;
136 
141  void find_contiguous_neighborhood(const base_space_poset& xbase_space,
142  subposet& xselected,
143  const scoped_index& xindex,
144  block<scoped_index>& xresult);
145 
147 
148 
149  // ===========================================================
151  // ===========================================================
153 
154 public:
155 
159  virtual bool is_ancestor_of(const any* xother) const;
160 
165  virtual body_builder* clone() const;
166 
167  // Assignment operator not implemented;
168  // default memberwise assignment will do.
169 
173  virtual bool invariant() const;
174 
176 
177 };
178 
179 // ===========================================================
180 // NON-MEMBER FUNCTIONS
181 // ===========================================================
182 
183 } // namespace fields
184 
185 #endif // ifndef BODY_BUILDER_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 client handle for a subposet.
Definition: subposet.h:86
Namespace for fields component of sheaf system.
sec_vd_value_type value_type
The type of component in the value; the scalar type in the fiber space.
Definition: body_builder.h:78
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
sec_vd_dof_type dof_type
The type of degree of freedom.
Definition: body_builder.h:83
A vd-valued property as a function of global coordinates.
Definition: field_vd.h:69
An abstract local section evaluator; a map from {local coordinates x dofs} to section value...
Namespace for the sheaves component of the sheaf system.
chart_point_coord_type coord_type
The type of local coordinate; the scalar type for the local coordinate vector space.
Definition: body_builder.h:72
double sec_vd_dof_type
The type of degree of freedom in the section space.
Definition: fiber_bundle.h:78
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
A simple body builder; creates base space members equivalent to subsets defined by a field classifica...
Definition: body_builder.h:58