SheafSystem  0.0.0.0
linear_1d.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_1d
19 
20 #ifndef LINEAR_1D_H
21 #define LINEAR_1D_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 
37 class SHEAF_DLL_SPEC linear_1d : public linear_fcn_space
38 {
39 
40  // ===========================================================
42  // ===========================================================
44 
45 public:
46 
50  linear_1d();
51 
55  linear_1d(const linear_1d& xother);
56 
60  virtual ~linear_1d();
61 
65  double inverse_jacobian(const double xjacobian[],
66  double xinverse_jacobian[]);
67 
68 protected:
69 
70 private:
71 
77  enum static_const_int {DL = 2};
78 
82  value_type _basis_value_buffer[DL];
83 
87  value_type _basis_deriv_value_buffer[DL];
88 
92  //value_type _jacobian_value_buffer[4];
93  value_type _jacobian_value_buffer[128];
94 
96 
97  // ===========================================================
99  // ===========================================================
101 
102 public:
103 
107  virtual int dl() const;
108 
112  virtual void basis_at_coord(const dof_type xlocal_coord[],
113  size_type xlocal_coord_ub);
114 
118  void basis_derivs_at_coord(const dof_type xlocal_coords[],
119  size_type xlocal_coords_ub);
120 
121 protected:
122 
123 private:
124 
126 
127  // ===========================================================
129  // ===========================================================
131 
132 public:
133 
137  value_type jacobian_determinant(const dof_type xcoord_dofs[],
138  size_type xcoord_dofs_ub,
139  size_type xdf,
140  const coord_type xlocal_coords[],
141  size_type xlocal_coords_ub);
142 
146  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  virtual 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 
204  void jacobian(const dof_type xcoord_dofs[],
205  size_type xcoord_dofs_ub,
206  size_type xdf,
207  const dof_type xlocal_coords[],
208  size_type xlocal_coords_ub);
209 
210 protected:
211 
212 private:
213 
215 
216  // ===========================================================
218  // ===========================================================
220 
221 public:
222 
227  virtual int db() const;
228 
232  virtual void local_coordinates(pod_index_type xindex,
233  coord_type xresult[],
234  size_type xresult_ub) const;
239  virtual bool in_standard_domain(const dof_type xlocal_coords[],
240  size_type xlocal_coords_ub) const;
241 
242 protected:
243 
244 private:
245 
247 
248  // ===========================================================
250  // ===========================================================
252 
253 public:
254 
259  virtual void coord_at_value(const dof_type xdofs[],
260  size_type xdofs_ub,
261  const dof_type xglobal_coords[],
262  size_type xglobal_coord_ub,
263  dof_type xlocal_coords[],
264  size_type xlocal_coords_ub) const;
265 
266  // virtual dof_type min(const dof_type xdofs[], size_type xdofs_ub);
267 
268  // virtual dof_type max(const dof_type xdofs[], size_type xdofs_ub);
269 
270 protected:
271 
272 private:
273 
275 
276  // ===========================================================
278  // ===========================================================
280 
281 public:
282 
286  virtual linear_1d* clone() const;
287 
291  virtual linear_1d& operator=(const section_evaluator& xother);
292 
296  linear_1d& operator=(const linear_1d& xother);
297 
301  virtual bool invariant() const;
302 
306  virtual bool is_ancestor_of(const any* xother) const;
307 
308 protected:
309 
310 private:
311 
313 
314 };
315 
316 } // namespace fiber_bundle
317 
318 #endif // ifndef LINEAR_1D_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...
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
A section evaluator using linear interpolation over a 1D domain.
Definition: linear_1d.h:37
Namespace for the fiber_bundles component of the sheaf system.