SheafSystem  0.0.0.0
linear_3d.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 linear_3d
19 
20 #ifndef LINEAR_3D_H
21 #define LINEAR_3D_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 
38 class SHEAF_DLL_SPEC linear_3d : public linear_fcn_space
39 {
40 
41  // ===========================================================
43  // ===========================================================
45 
46 public:
47 
51  linear_3d();
52 
56  linear_3d(const linear_3d& xother);
57 
61  virtual ~linear_3d();
62 
63 
64  // ///
66  // ///
67  // double inverse_jacobian(const double xjacobian[3][3],
68  // double xinverse_jacobian[3][3]);
69 
70  // ///
72  // ///
73  // double determinant(const dof_type xcoord_dofs[],
74  // size_type xcoord_dofs_ub,
75  // const coord_type xlocal_coords[],
76  // size_type xlocal_coords_ub);
77 
78 protected:
79 
80  double determinant_3x3(double a00, double a01, double a02,
81  double a10, double a11, double a12,
82  double a20, double a21, double a22);
83 
84 private:
85 
91  enum static_const_int {DL = 4};
92 
96  value_type _basis_value_buffer[DL];
97 
101  value_type _basis_deriv_value_buffer[3*DL];
102 
106  //value_type _jacobian_value_buffer[4];
107  value_type _jacobian_value_buffer[128];
108 
109  //block<int[2]> _jacobian_value_block;
110  //vector<int[2]> _jacobian_value_vector;
111 
113 
114  // ===========================================================
116  // ===========================================================
118 
119 public:
120 
121 protected:
122 
123 private:
124 
126 
127  // ===========================================================
129  // ===========================================================
131 
132 public:
133 
137  virtual int dl() const;
138 
142  virtual void basis_at_coord(const dof_type xlocal_coord[], size_type xlocal_coord_ub);
143 
147  void basis_derivs_at_coord(const dof_type xlocal_coords[],
148  size_type xlocal_coords_ub);
149 
150 protected:
151 
152 private:
153 
155 
156  // ===========================================================
158  // ===========================================================
160 
161 public:
162 
166  value_type jacobian_determinant(const dof_type xcoord_dofs[],
167  size_type xcoord_dofs_ub,
168  size_type xdf,
169  const coord_type xlocal_coords[],
170  size_type xlocal_coords_ub);
171 
172  value_type volume(const dof_type xcoord_dofs[],
173  size_type xcoord_dofs_ub, size_type xdf);
174 
178  virtual void integrate(const dof_type xcoord_dofs[],
179  size_type xcoord_dofs_ub,
180  size_type xdf,
181  const dof_type xintegrands[],
182  size_type xintegrands_ub,
183  value_type xresult_integrals[],
184  size_type xresult_integrals_ub);
185 
189  virtual void integrate(const dof_type xcoord_dofs[],
190  size_type xcoord_dofs_ub,
191  size_type xdf,
192  const dof_type xintegrand,
193  value_type xresult_integrals[],
194  size_type xresult_integrals_ub);
195 
196 protected:
197 
198  void gauss_point(pod_index_type xindex,
199  coord_type xresult[],
200  size_type xresult_ub);
201 
202 private:
203 
205 
206  // ===========================================================
208  // ===========================================================
210 
211 public:
212 
216  virtual void dxi_local(size_type xcrd,
217  const dof_type xsource_dofs[],
218  size_type xsource_dofs_ub,
219  dof_type xresult_dofs[],
220  size_type xresult_dofs_ub) const;
221 
225  void jacobian(const dof_type xcoord_dofs[],
226  size_type xcoord_dofs_ub,
227  size_type xdf,
228  const dof_type xlocal_coords[],
229  size_type xlocal_coords_ub);
230 
231  // ///
233  // ///
234  // double jacobian(const dof_type xcoord_dofs[],
235  // size_type xcoord_dofs_ub,
236  // const coord_type xlocal_coords[],
237  // size_type xlocal_coords_ub,
238  // double xjacobian[3][3] = NULL);
239 
240 protected:
241 
242 private:
243 
245 
246  // ===========================================================
248  // ===========================================================
250 
251 public:
252 
257  virtual int db() const;
258 
262  virtual void local_coordinates(pod_index_type xindex,
263  coord_type xresult[],
264  size_type xresult_ub) const;
268  virtual void center(coord_type xresult[], size_type xresult_ub) const;
269 
274  virtual bool in_standard_domain(const dof_type xlocal_coords[],
275  size_type xlocal_coords_ub) const;
276 
277 protected:
278 
279 private:
280 
282 
283  // ===========================================================
285  // ===========================================================
287 
288 public:
289 
295  virtual void coord_at_value(const dof_type xdofs[],
296  size_type xdofs_ub,
297  const dof_type xglobal_coords[],
298  size_type xglobal_coord_ub,
299  dof_type xlocal_coords[],
300  size_type xlocal_coords_ub) const;
301 
302 protected:
303 
304 private:
305 
307 
308  // ===========================================================
310  // ===========================================================
312 
313 public:
314 
318  virtual linear_3d* clone() const;
319 
323  virtual linear_3d& operator=(const section_evaluator& xother);
324 
328  linear_3d& operator=(const linear_3d& xother);
329 
333  virtual bool invariant() const;
334 
338  virtual bool is_ancestor_of(const any* xother) const;
339 
340 protected:
341 
342 private:
343 
345 
346 };
347 
348 } // namespace fiber_bundle
349 
350 #endif // ifndef LINEAR_3D_H
sec_vd_dof_type dof_type
The type of degree of freedom.
A section evaluator using linear interpolation over a tetrahedral 3D domain.
Definition: linear_3d.h:38
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...
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.