SheafSystem  0.0.0.0
uniform_2d.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 uniform_2d
19 
20 #ifndef UNIFORM_2D_H
21 #define UNIFORM_2D_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef LINEAR_FCN_SPACE_H
28 #include "SheafSystem/linear_fcn_space.h"
29 #endif
30 
31 namespace fiber_bundle
32 {
33 
39 class SHEAF_DLL_SPEC uniform_2d : public linear_fcn_space
40 {
41 
42  // ===========================================================
44  // ===========================================================
46 
47 public:
48 
52  uniform_2d();
53 
57  uniform_2d(const uniform_2d& xother);
58 
62  virtual ~uniform_2d();
63 
64 protected:
65 
66 private:
67 
73  enum static_const_int {DL = 4};
74 
78  value_type _basis_value_buffer[DL];
79 
83  value_type _basis_deriv_value_buffer[2*DL];
84 
88  value_type _jacobian_value_buffer[128];
89 
91 
92 
93  // ===========================================================
95  // ===========================================================
97 
98 public:
99 
103  virtual int dl() const;
104 
109  virtual void basis_at_coord(const dof_type xlocal_coord[],
110  size_type xlocal_coord_ub);
111 
116  virtual void basis_derivs_at_coord(const dof_type xlocal_coords[],
117  size_type xlocal_coords_ub);
118 
119 protected:
120 
121 private:
122 
124 
125  // ===========================================================
127  // ===========================================================
129 
130 public:
131 
136  virtual value_type jacobian_determinant(const dof_type xcoord_dofs[],
137  size_type xcoord_dofs_ub,
138  size_type xdf,
139  const coord_type xlocal_coords[],
140  size_type xlocal_coords_ub);
141 
146  virtual value_type volume(const dof_type xcoord_dofs[],
147  size_type xcoord_dofs_ub,
148  size_type xdf);
149 
153  virtual void integrate(const dof_type xcoord_dofs[],
154  size_type xcoord_dofs_ub,
155  size_type xdf,
156  const dof_type xintegrands[],
157  size_type xintegrands_ub,
158  value_type xresult_integrals[],
159  size_type xresult_integrals_ub);
160 
164  virtual void integrate(const dof_type xcoord_dofs[],
165  size_type xcoord_dofs_ub,
166  size_type xdf,
167  const dof_type xintegrand,
168  value_type xresult_integrals[],
169  size_type xresult_integrals_ub);
170 
174  virtual void gauss_point(pod_index_type xindex,
175  coord_type xresult[],
176  size_type xresult_ub);
177 
178 protected:
179 
180 private:
181 
183 
184  // ===========================================================
186  // ===========================================================
188 
189 public:
190 
195  void dxi_local(size_type xlocal_coord_index,
196  const dof_type xsource_dofs[],
197  size_type xsource_dofs_ub,
198  dof_type xresult_dofs[],
199  size_type xresult_dofs_ub) const;
200 
205  virtual void jacobian(const dof_type xcoord_dofs[],
206  size_type xcoord_dofs_ub,
207  size_type xdf,
208  const dof_type xlocal_coords[],
209  size_type xlocal_coords_ub);
210 
211 protected:
212 
213 private:
214 
216 
217  // ===========================================================
219  // ===========================================================
221 
222 public:
223 
228  virtual int db() const;
229 
233  virtual void local_coordinates(pod_index_type xindex,
234  coord_type xresult[],
235  size_type xresult_ub) const;
236 
241  virtual bool in_standard_domain(const dof_type xlocal_coords[],
242  size_type xlocal_coords_ub) const;
243 
244 protected:
245 
246 private:
247 
249 
250  // ===========================================================
252  // ===========================================================
254 
255 public:
256 
262  virtual void coord_at_value(const dof_type xdofs[],
263  size_type xdofs_ub,
264  const dof_type xglobal_coords[],
265  size_type xglobal_coord_ub,
266  dof_type xlocal_coords[],
267  size_type xlocal_coords_ub) const;
268 
269 protected:
270 
271 private:
272 
274 
275  // ===========================================================
277  // ===========================================================
279 
280 public:
281 
285  virtual uniform_2d* clone() const;
286 
290  virtual uniform_2d& operator=(const section_evaluator& xother);
291 
295  uniform_2d& operator=(const uniform_2d& xother);
296 
300  virtual bool invariant() const;
301 
305  virtual bool is_ancestor_of(const any* xother) const;
306 
307 protected:
308 
309 private:
310 
312 
313 };
314 
315 } // namespace fiber_bundle
316 
317 #endif // ifndef UNIFORM_2D_H
sec_vd_dof_type dof_type
The type of degree of freedom.
Abstract base class with useful features for all objects.
Definition: any.h:39
An abstract integrable section evaluator which is a member of a linear function space.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
chart_point_coord_type coord_type
The type of local coordinate; the scalar type for the local coordinate vector space.
An abstract local section evaluator; a map from {local coordinates x dofs} to section value...
A section evaluator using bilinear interpolation over a square 2D domain. Intended for use with unifo...
Definition: uniform_2d.h:39
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
Namespace for the fiber_bundles component of the sheaf system.