SheafSystem  0.0.0.0
field_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 // $$SCRIBBLE: remove this class from build.
19 
20 // Interface for class field_dof_map;
21 // A specialized section_dof_map that knows
22 // the dofs are all type double
23 
24 #ifndef FIELD_DOF_MAP_H
25 #define FIELD_DOF_MAP_H
26 
27 #ifndef SHEAF_DLL_SPEC_H
28 #include "SheafSystem/sheaf_dll_spec.h"
29 #endif
30 
31 #ifndef SECTION_DOF_MAP_H
32 #include "SheafSystem/section_dof_map.h"
33 #endif
34 
35 namespace sheaf
36 {
37 class poset_state_handle;
38 }
39 
40 namespace fiber_bundle
41 {
42 
48 class SHEAF_DLL_SPEC field_dof_map : public section_dof_map
49 {
50  friend class sec_rep_space_member;
51 
52 public:
53 
57  virtual const std::string& class_name() const;
58 
62  static const std::string& static_class_name();
63 
64  // CANONICAL MEMBERS
65 
69  field_dof_map& operator=(const field_dof_map& xother);
70 
74  virtual ~field_dof_map();
75 
79  virtual bool invariant() const;
80 
81  // MAP INTERFACE
82 
83  using section_dof_map::get_dofs;
84  using section_dof_map::put_dofs;
85 
89 
90  virtual void get_dofs(const client_index* xclient_ids, int xclient_id_ct,
91  void* xbuf, size_t xbuf_len) const
92  {
93  not_implemented();
94  };
95 
96  virtual void put_dofs(const client_index* xclient_ids, int xclient_id_ct,
97  const void* xbuf, size_t xbuf_len)
98  {
99  not_implemented();
100  };
101 
105  inline void get_dofs(const client_index* xclient_base_ids, int xclient_base_id_ct,
106  const client_index* xclient_fiber_ids, int xclient_fiber_id_ct,
107  double* xbuf, int xbuf_len) const
108  {
109  get_dofs(xclient_base_ids, xclient_base_id_ct,
110  xclient_fiber_ids, xclient_fiber_id_ct,
111  static_cast<void*>(xbuf), xbuf_len*sizeof(double));
112  };
113 
117  inline void put_dofs(const client_index* xclient_base_ids, int xclient_base_id_ct,
118  const client_index* xclient_fiber_ids, int xclient_fiber_id_ct,
119  const double* xbuf, int xbuf_len)
120  {
121  put_dofs(xclient_base_ids, xclient_base_id_ct,
122  xclient_fiber_ids, xclient_fiber_id_ct,
123  static_cast<const void*>(xbuf), xbuf_len*sizeof(double));
124  };
125 
126 
127 protected:
128 
132  field_dof_map();
133 
137  field_dof_map(const field_dof_map& xother);
138 
142  field_dof_map(const sec_rep_space* xhost);
143 
144 };
145 
146 } // namespace fiber_bundle
147 
148 #endif // ifndef FIELD_DOF_MAP_H
The abstract map from section dof ids to section dof values of heterogeneous type.
void get_dofs(const client_index *xclient_base_ids, int xclient_base_id_ct, const client_index *xclient_fiber_ids, int xclient_fiber_id_ct, double *xbuf, int xbuf_len) const
Double version of get_dofs.
OBSOLETE: Use array_sec_vd_dof_map or sparse_section_dof_map. The abstract map from section_space_sch...
Definition: field_dof_map.h:48
A member of a sec_rep_space; a section.
void put_dofs(const client_index *xclient_base_ids, int xclient_base_id_ct, const client_index *xclient_fiber_ids, int xclient_fiber_id_ct, const double *xbuf, int xbuf_len)
Double version of put_dofs.
virtual void get_dofs(const client_index *xclient_ids, int xclient_id_ct, void *xbuf, size_t xbuf_len) const
Definition: field_dof_map.h:90
virtual void put_dofs(const client_index *xclient_ids, int xclient_id_ct, const void *xbuf, size_t xbuf_len)
Definition: field_dof_map.h:96
Namespace for the sheaves component of the sheaf system.
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