SheafSystem  0.0.0.0
trilinear_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 trilinear_3d
19 
20 #ifndef TRILINEAR_3D_H
21 #define TRILINEAR_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 trilinear_3d : public linear_fcn_space
39 {
40 
41  // ===========================================================
43  // ===========================================================
45 
46 public:
47 
51  trilinear_3d();
52 
56  trilinear_3d(const trilinear_3d& xother);
57 
61  virtual ~trilinear_3d();
62 
66  double inverse_jacobian(const double xjacobian[3][3],
67  double xinverse_jacobian[3][3]);
68 
69  // ///
71  // ///
72  // double determinant(const dof_type xcoord_dofs[],
73  // size_type xcoord_dofs_ub,
74  // const coord_type xlocal_coords[],
75  // size_type xlocal_coords_ub);
76 
77 protected:
78 
79 private:
80 
86  enum static_const_int {DL = 8};
87 
91  value_type _basis_value_buffer[DL];
92 
96  value_type _basis_deriv_value_buffer[3*DL];
97 
101  //value_type _jacobian_value_buffer[4];
102  value_type _jacobian_value_buffer[128];
103 
104  //block<int[2]> _jacobian_value_block;
105  //vector<int[2]> _jacobian_value_vector;
106 
108 
109  // ===========================================================
111  // ===========================================================
113 
114 public:
115 
119  virtual int dl() const;
120 
124  virtual void basis_at_coord(const dof_type xlocal_coord[], size_type xlocal_coord_ub);
125 
129  void basis_derivs_at_coord(const dof_type xlocal_coords[],
130  size_type xlocal_coords_ub);
131 
132 protected:
133 
134 private:
135 
137 
138  // ===========================================================
140  // ===========================================================
142 
143 public:
144 
148  value_type jacobian_determinant(const dof_type xcoord_dofs[],
149  size_type xcoord_dofs_ub,
150  size_type xdf,
151  const coord_type xlocal_coords[],
152  size_type xlocal_coords_ub);
153 
157  value_type volume(const dof_type xcoord_dofs[],
158  size_type xcoord_dofs_ub,
159  size_type xdf);
160 
164  virtual void integrate(const dof_type xcoord_dofs[],
165  size_type xcoord_dofs_ub,
166  size_type xdf,
167  const dof_type xintegrands[],
168  size_type xintegrands_ub,
169  value_type xresult_integrals[],
170  size_type xresult_integrals_ub);
171 
175  virtual void integrate(const dof_type xcoord_dofs[],
176  size_type xcoord_dofs_ub,
177  size_type xdf,
178  const dof_type xintegrand,
179  value_type xresult_integrals[],
180  size_type xresult_integrals_ub);
181 
185  virtual void gauss_point(pod_index_type xindex,
186  coord_type xresult[],
187  size_type xresult_ub);
188 
189 protected:
190 
191 private:
192 
194 
195  // ===========================================================
197  // ===========================================================
199 
200 public:
201 
206  void dxi_local(size_type xlocal_coord_index,
207  const dof_type xsource_dofs[],
208  size_type xsource_dofs_ub,
209  dof_type xresult_dofs[],
210  size_type xresult_dofs_ub) const;
211 
215  void jacobian(const dof_type xcoord_dofs[],
216  size_type xcoord_dofs_ub,
217  size_type xdf,
218  const dof_type xlocal_coords[],
219  size_type xlocal_coords_ub);
220 
221  // ///
223  // ///
224  // double jacobian(const dof_type xcoord_dofs[],
225  // size_type xcoord_dofs_ub,
226  // const coord_type xlocal_coords[],
227  // size_type xlocal_coords_ub,
228  // double xjacobian[3][3] = NULL);
229 
230 protected:
231 
232 private:
233 
235 
236  // ===========================================================
238  // ===========================================================
240 
241 public:
242 
247  virtual int db() const;
248 
252  virtual void local_coordinates(pod_index_type xindex,
253  coord_type xresult[],
254  size_type xresult_ub) const;
255 
260  virtual bool in_standard_domain(const dof_type xlocal_coords[],
261  size_type xlocal_coords_ub) const;
262 
263 protected:
264 
265 private:
266 
268 
269  // ===========================================================
271  // ===========================================================
273 
274 public:
275 
281  virtual void coord_at_value(const dof_type xdofs[],
282  size_type xdofs_ub,
283  const dof_type xglobal_coords[],
284  size_type xglobal_coord_ub,
285  dof_type xlocal_coords[],
286  size_type xlocal_coords_ub) const;
287 
288 protected:
289 
290 private:
291 
293 
294  // ===========================================================
296  // ===========================================================
298 
299 public:
300 
304  virtual trilinear_3d* clone() const;
305 
309  virtual trilinear_3d& operator=(const section_evaluator& xother);
310 
314  trilinear_3d& operator=(const trilinear_3d& xother);
315 
319  virtual bool invariant() const;
320 
324  virtual bool is_ancestor_of(const any* xother) const;
325 
326 protected:
327 
328 private:
329 
331 
332 };
333 
334 } // namespace fiber_bundle
335 
336 #endif // ifndef TRILINEAR_3D_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
A section evaluator using trilinear interpolation over a cubic 3D domain.
Definition: trilinear_3d.h:38
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.