SheafSystem  0.0.0.0
quadratic_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 quadratic_1d
19 
20 #ifndef QUADRATIC_1D_H
21 #define QUADRATIC_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 
38 class SHEAF_DLL_SPEC quadratic_1d : public linear_fcn_space
39 {
40 
41  // ===========================================================
43  // ===========================================================
45 
46 public:
47 
51  quadratic_1d();
52 
56  quadratic_1d(const quadratic_1d& xother);
57 
61  virtual ~quadratic_1d();
62 
63 protected:
64 
65 private:
66 
72  enum static_const_int {DL = 3};
73 
77  value_type _basis_value_buffer[DL];
78 
82  value_type _basis_deriv_value_buffer[DL];
83 
87  value_type _jacobian_value_buffer[128];
88 
90 
91  // ===========================================================
93  // ===========================================================
95 
96 public:
97 
101  virtual int dl() const;
102 
107  virtual void basis_at_coord(const dof_type xlocal_coord[],
108  size_type xlocal_coord_ub);
109 
114  virtual void basis_derivs_at_coord(const dof_type xlocal_coords[],
115  size_type xlocal_coords_ub);
116 
117 protected:
118 
119 private:
120 
122 
123  // ===========================================================
125  // ===========================================================
127 
128 public:
129 
134  virtual value_type jacobian_determinant(const dof_type xcoord_dofs[],
135  size_type xcoord_dofs_ub,
136  size_type xdf,
137  const coord_type xlocal_coords[],
138  size_type xlocal_coords_ub);
139 
144  virtual value_type volume(const dof_type xcoord_dofs[],
145  size_type xcoord_dofs_ub,
146  size_type xdf);
147 
151  virtual void integrate(const dof_type xcoord_dofs[],
152  size_type xcoord_dofs_ub,
153  size_type xdf,
154  const dof_type xintegrands[],
155  size_type xintegrands_ub,
156  value_type xresult_integrals[],
157  size_type xresult_integrals_ub);
158 
162  virtual void integrate(const dof_type xcoord_dofs[],
163  size_type xcoord_dofs_ub,
164  size_type xdf,
165  const dof_type xintegrand,
166  value_type xresult_integrals[],
167  size_type xresult_integrals_ub);
168 
172  virtual void gauss_point(pod_index_type xindex,
173  coord_type xresult[],
174  size_type xresult_ub);
175 
176 protected:
177 
178 private:
179 
181 
182  // ===========================================================
184  // ===========================================================
186 
187 public:
188 
193  virtual void dxi_local(size_type xlocal_coord_index,
194  const dof_type xsource_dofs[],
195  size_type xsource_dofs_ub,
196  dof_type xresult_dofs[],
197  size_type xresult_dofs_ub) const;
198 
203  virtual void jacobian(const dof_type xcoord_dofs[],
204  size_type xcoord_dofs_ub,
205  size_type xdf,
206  const dof_type xlocal_coords[],
207  size_type xlocal_coords_ub);
208 
209 protected:
210 
211 private:
212 
214 
215  // ===========================================================
217  // ===========================================================
219 
220 public:
221 
226  virtual int db() const;
227 
231  virtual void local_coordinates(pod_index_type xindex,
232  coord_type xresult[],
233  size_type xresult_ub) const;
238  virtual bool in_standard_domain(const dof_type xlocal_coords[],
239  size_type xlocal_coords_ub) const;
240 
241 protected:
242 
243 private:
244 
246 
247  // ===========================================================
249  // ===========================================================
251 
252 public:
253 
258  virtual void coord_at_value(const dof_type xdofs[],
259  size_type xdofs_ub,
260  const dof_type xglobal_coords[],
261  size_type xglobal_coord_ub,
262  dof_type xlocal_coords[],
263  size_type xlocal_coords_ub) const;
264 
265 protected:
266 
267 private:
268 
270 
271  // ===========================================================
273  // ===========================================================
275 
276 public:
277 
281  virtual quadratic_1d* clone() const;
282 
286  virtual quadratic_1d& operator=(const section_evaluator& xother);
287 
291  quadratic_1d& operator=(const quadratic_1d& xother);
292 
296  virtual bool invariant() const;
297 
301  virtual bool is_ancestor_of(const any* xother) const;
302 
303 protected:
304 
305 private:
306 
308 
309 };
310 
311 } // namespace fiber_bundle
312 
313 #endif // ifndef QUADRATIC_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.
vd_value_type value_type
The type of component in the value; the scalar type in the range vector space.
A section evaluator using quadratic interpolation over a 1D domain.
Definition: quadratic_1d.h:38
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.