SheafSystem  0.0.0.0
section_dof_map.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 section_dof_map;
19 // map from sec_rep_space client dof id to dof value
20 
21 #ifndef SECTION_DOF_MAP_H
22 #define SECTION_DOF_MAP_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef POSET_DOF_MAP_H
29 #include "SheafSystem/poset_dof_map.h"
30 #endif
31 
32 #ifndef SEC_REP_SPACE_H
33 #include "SheafSystem/sec_rep_space.h"
34 #endif
35 
36 namespace sheaf
37 {
38 class poset_state_handle;
39 }
40 
41 namespace fiber_bundle
42 {
43 
44 using namespace sheaf;
45 
46 
51 class SHEAF_DLL_SPEC section_dof_map : public poset_dof_map
52 {
53  friend class sec_rep_space_member;
54 
55 public:
56 
60  virtual const std::string& class_name() const;
61 
65  static const std::string& static_class_name();
66 
67  // CANONICAL MEMBERS
68 
72  section_dof_map& operator=(const section_dof_map& xother);
73 
77  virtual ~section_dof_map();
78 
82  virtual bool invariant() const;
83 
84  // MAP INTERFACE
85 
89  virtual sec_rep_space* host() const;
90 
94  virtual section_space_schema_member& schema();
95 
99  virtual const section_space_schema_member& schema() const;
100 
103 
104  // ===========================================================
105  // NEW DOF ACCESS FACET
106  // ===========================================================
107 
108 
113  virtual bool dof_in_bounds(pod_index_type xdof_id, bool xis_table_dofs) const;
114 
120  virtual bool dof_in_bounds(pod_index_type xdisc_id, pod_index_type xfiber_id, bool xis_table_dofs) const;
121 
125  virtual void get_dof(pod_index_type xdisc_id,
126  pod_index_type xfiber_dof_id,
127  void* xdof,
128  size_type xdof_size) const = 0;
129 
138 
139  void get_dof(pod_index_type xdisc_id,
140  pod_index_type xfiber_dof_id,
141  void* xdof,
142  size_type xdof_size)
143  {
144  const section_dof_map* lthis = this;
145  lthis->get_dof(xdisc_id, xfiber_dof_id, xdof, xdof_size);
146  };
147 
151  void get_dof(const scoped_index& xdisc_id,
152  const scoped_index& xfiber_dof_id,
153  void* xdof,
154  size_type xdof_size) const;
155 
164 
165  void get_dof(const scoped_index& xdisc_id,
166  const scoped_index& xfiber_dof_id,
167  void* xdof,
168  size_type xdof_size)
169  {
170  const section_dof_map* lthis = this;
171  lthis->get_dof(xdisc_id, xfiber_dof_id, xdof, xdof_size);
172  };
173 
177  virtual void put_dof(pod_index_type xdisc_id,
178  pod_index_type xfiber_dof_id,
179  const void* xdof,
180  size_type xdof_size) = 0;
181 
185  void put_dof(const scoped_index& xdisc_id,
186  const scoped_index& xfiber_dof_id,
187  const void* xdof,
188  size_type xdof_size);
189 
194  virtual bool fiber_in_bounds(pod_index_type xdisc_id, bool xis_table_dofs) const;
195 
199  virtual void get_fiber(pod_index_type xdisc_id, void* xfiber, size_type xfiber_size) const;
200 
204  void get_fiber(const scoped_index& xdisc_id, void* xfiber, size_type xfiber_size) const;
205 
209  virtual void put_fiber(pod_index_type xdisc_id, const void* xfiber, size_type xfiber_size) = 0;
210 
214  void put_fiber(const scoped_index& xdisc_id, const void* xfiber, size_type xfiber_size);
215 
220  virtual void force_fiber(pod_index_type xdisc_id, const void* xfiber, size_type xfiber_size);
221 
226  void force_fiber(const scoped_index& xdisc_id, const void* xfiber, size_type xfiber_size);
227 
231  virtual void get_component(pod_index_type xfiber_dof_id, void* xcomponent, size_type xcomponent_size) const = 0;
232 
236  void get_component(const scoped_index& xfiber_dof_id, void* xcomponent, size_type xcomponent_size) const;
237 
241  virtual void put_component(pod_index_type xfiber_dof_id, const void* xcomponent, size_type xcomponent_size) = 0;
242 
246  void put_component(const scoped_index& xfiber_dof_id, const void* xcomponent, size_type xcomponent_size);
247 
248 
249 
250  // ===========================================================
251  // END NEW DOF ACCESS FACET
252  // ===========================================================
253 
254  // ===========================================================
255  // I/O SUPPORT FACET
256  // ===========================================================
257 
262  virtual bool supports_xfr_opt() const;
263 
264 protected:
265 
266  // CANONICAL MEMBERS
267 
271  section_dof_map();
272 
276  section_dof_map(const section_dof_map& xother);
277 
278  // MAP INTERFACE
279 
285  pod_index_type xbase_id,
286  int xversion);
287 
288 private:
289 
290 
291 };
292 
293 } // namespace fiber_bundle
294 
295 #endif // ifndef SECTION_DOF_MAP_H
void get_dof(pod_index_type xdisc_id, pod_index_type xfiber_dof_id, void *xdof, size_type xdof_size)
The abstract map from section dof ids to section dof values of heterogeneous type.
virtual void get_dof(pod_index_type xdisc_id, pod_index_type xfiber_dof_id, void *xdof, size_type xdof_size) const =0
Copies the dof referred to by xdisc_id, xfiber_dof_id into xdof.
virtual void get_dof(pod_index_type xdof_id, void *xdof, size_type xdof_size) const
Copies the dof referred to by xdof_id into xdof.
A member of a sec_rep_space; a section.
The general, abstract map from dof ids to dof values.
Definition: poset_dof_map.h:59
void get_dof(const scoped_index &xdisc_id, const scoped_index &xfiber_dof_id, void *xdof, size_type xdof_size)
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
void put_dof(pod_index_type xdof_id, const primitive_value &xdof)
Sets the dof referred to by xdof_id to xdof.
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.
A client handle for a poset member which has been prepared for use as a schema for a section space...
Namespace for the fiber_bundles component of the sheaf system.
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61