SheafSystem  0.0.0.0
quadratic_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 quadratic_2d
19 
20 #ifndef QUADRATIC_2D_H
21 #define QUADRATIC_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 
37 class SHEAF_DLL_SPEC quadratic_2d : public linear_fcn_space
38 {
39 
40  // ===========================================================
42  // ===========================================================
44 
45 public:
46 
50  quadratic_2d();
51 
55  quadratic_2d(const quadratic_2d& xother);
56 
60  virtual ~quadratic_2d();
61 
62 protected:
63 
64 private:
65 
71  enum static_const_int {DL = 6};
72 
76  value_type _basis_value_buffer[DL];
77 
81  value_type _basis_deriv_value_buffer[2*DL];
82 
86  value_type _jacobian_value_buffer[128];
87 
89 
90  // ===========================================================
92  // ===========================================================
94 
95 public:
96 
100  virtual int dl() const;
101 
106  virtual void basis_at_coord(const dof_type xlocal_coord[],
107  size_type xlocal_coord_ub);
112  virtual void basis_derivs_at_coord(const dof_type xlocal_coords[],
113  size_type xlocal_coords_ub);
114 
115 protected:
116 
117 private:
118 
120 
121  // ===========================================================
123  // ===========================================================
125 
126 public:
127 
132  virtual value_type jacobian_determinant(const dof_type xcoord_dofs[],
133  size_type xcoord_dofs_ub,
134  size_type xdf,
135  const coord_type xlocal_coords[],
136  size_type xlocal_coords_ub);
137 
142  virtual value_type volume(const dof_type xcoord_dofs[],
143  size_type xcoord_dofs_ub,
144  size_type xdf);
145 
149  virtual void integrate(const dof_type xcoord_dofs[],
150  size_type xcoord_dofs_ub,
151  size_type xdf,
152  const dof_type xintegrands[],
153  size_type xintegrands_ub,
154  value_type xresult_integrals[],
155  size_type xresult_integrals_ub);
156 
160  virtual void integrate(const dof_type xcoord_dofs[],
161  size_type xcoord_dofs_ub,
162  size_type xdf,
163  const dof_type xintegrand,
164  value_type xresult_integrals[],
165  size_type xresult_integrals_ub);
166 
170  virtual void gauss_point(pod_index_type xindex,
171  coord_type xresult[],
172  size_type xresult_ub);
173 
174 protected:
175 
176 private:
177 
179 
180  // ===========================================================
182  // ===========================================================
184 
185 public:
186 
191  virtual void dxi_local(size_type xlocal_coord_index,
192  const dof_type xsource_dofs[],
193  size_type xsource_dofs_ub,
194  dof_type xresult_dofs[],
195  size_type xresult_dofs_ub) const;
196 
201  virtual void jacobian(const dof_type xcoord_dofs[],
202  size_type xcoord_dofs_ub,
203  size_type xdf,
204  const dof_type xlocal_coords[],
205  size_type xlocal_coords_ub);
206 
207 protected:
208 
209 private:
210 
212 
213  // ===========================================================
215  // ===========================================================
217 
218 public:
219 
224  virtual int db() const;
225 
229  virtual void local_coordinates(pod_index_type xindex,
230  coord_type xresult[],
231  size_type xresult_ub) const;
232 
237  virtual bool in_standard_domain(const dof_type xlocal_coords[], size_type xlocal_coords_ub) const;
238 
239 protected:
240 
241 private:
242 
244 
245  // ===========================================================
247  // ===========================================================
249 
250 public:
251 
257  virtual void coord_at_value(const dof_type xdofs[],
258  size_type xdofs_ub,
259  const dof_type xglobal_coords[],
260  size_type xglobal_coord_ub,
261  dof_type xlocal_coords[],
262  size_type xlocal_coords_ub) const;
263 
264 protected:
265 
266 private:
267 
269 
270  // ===========================================================
272  // ===========================================================
274 
275 public:
276 
280  virtual quadratic_2d* clone() const;
281 
285  virtual quadratic_2d& operator=(const section_evaluator& xother);
286 
290  quadratic_2d& operator=(const quadratic_2d& xother);
291 
295  virtual bool invariant() const;
296 
300  virtual bool is_ancestor_of(const any* xother) const;
301 
302 protected:
303 
304 private:
305 
307 
308 };
309 
310 } // namespace fiber_bundle
311 
312 #endif // ifndef QUADRARIC_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.
A section evaluator using quadratic interpolation over a triangular 2D domain.
Definition: quadratic_2d.h:37
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.