SheafSystem  0.0.0.0
array_sec_vd_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 #ifndef ARRAY_SEC_VD_DOF_MAP_H
19 #define ARRAY_SEC_VD_DOF_MAP_H
20 
21 #ifndef SHEAF_DLL_SPEC_H
22 #include "SheafSystem/sheaf_dll_spec.h"
23 #endif
24 
25 #ifndef ARRAY_SECTION_DOF_MAP_H
26 #include "SheafSystem/array_section_dof_map.h"
27 #endif
28 
29 namespace fiber_bundle
30 {
31 
32 class sec_rep_space;
33 
39 class SHEAF_DLL_SPEC array_sec_vd_dof_map : public array_section_dof_map
40 {
41 
42 public:
43 
47  virtual const std::string& class_name();
48 
52  static const std::string& static_class_name();
53 
54  // ===========================================================
55  // CANONICAL FACET
56  // ===========================================================
57 
62 
66  virtual array_sec_vd_dof_map* clone() const;
67 
72 
76  virtual array_sec_vd_dof_map* copy() const;
77 
81  array_sec_vd_dof_map& operator=(const array_sec_vd_dof_map& xother);
82 
86  virtual ~array_sec_vd_dof_map();
87 
91  virtual bool invariant() const;
92 
93  // ===========================================================
94  // MAP FACET
95  // ===========================================================
96 
102  array_sec_vd_dof_map(sec_rep_space* xhost, void* xdofs = 0, size_t xdofs_ub = 0);
103 
111  const scoped_index& xbase_id,
112  int xversion,
113  void* xdofs = 0,
114  size_t xdofs_ub = 0);
115 
120  {
121  return ARRAY_SECTION_DOF_TUPLE_ID;
122  };
123 
126 
127  // ===========================================================
129  // ===========================================================
131 
132 public:
133 
137  virtual void get_dof(pod_index_type xdof_id, void* xdof, size_type xdof_size) const;
138 
142  virtual void put_dof(pod_index_type xdof_id, bool xis_poset_id, const void* xdof, size_type xdof_size);
143 
147 
151  virtual void get_dof(pod_index_type xdisc_id,
152  pod_index_type xfiber_dof_id,
153  void* xdof,
154  size_type xdof_size) const;
155 
159  virtual void put_dof(pod_index_type xdisc_id,
160  pod_index_type xfiber_dof_id,
161  const void* xdof,
162  size_type xdof_size);
163 
164 protected:
165 
166 private:
167 
170  //
171  sec_vd_dof_type* dof_ptr(pod_index_type xdof_id) const
172  {
173  return reinterpret_cast<sec_vd_dof_type*>(_dofs) + xdof_id;
174  }
175 
177 
178 
179 protected:
180 
181 private:
182 
187  static bool _has_prototype;
188 
192  static bool make_prototype();
193 };
194 
195 } // namespace fiber_bundle
196 
197 #endif // ifndef ARRAY_SEC_VD_DOF_MAP_H
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.
A contiguous tuple, contiguous fiber representation of the abstract map from section dof ids to secti...
A contiguous tuple, contiguous fiber representation of the abstract map from section dof ids to secti...
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
dof_tuple_type
Identifiers for dof tuple types.
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
virtual void put_dof(pod_index_type xdisc_id, pod_index_type xfiber_dof_id, const void *xdof, size_type xdof_size)=0
Sets the dof referred to by xdof_id to the value at xdof.
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.
virtual dof_tuple_type type_id()
An identifer for the type of dof tuple this is.
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61