20 #include "SheafSystem/uniform_2d.h" 21 #include "SheafSystem/assert_contract.h" 22 #include "SheafSystem/std_limits.h" 39 _basis_values = _basis_value_buffer;
40 _basis_deriv_values = _basis_deriv_value_buffer;
41 _jacobian_values = _jacobian_value_buffer;
59 _basis_values = _basis_value_buffer;
60 _basis_deriv_values = _basis_deriv_value_buffer;
61 _jacobian_values = _jacobian_value_buffer;
121 require(xlocal_coord != 0);
122 require(xlocal_coord_ub >= db());
131 _basis_values[0] = 0.25*(1.0 - u)*(1.0 - v);
132 _basis_values[1] = 0.25*(1.0 + u)*(1.0 - v);
133 _basis_values[2] = 0.25*(1.0 + u)*(1.0 + v);
134 _basis_values[3] = 0.25*(1.0 - u)*(1.0 + v);
149 require(xlocal_coord != 0);
150 require(xlocal_coord_ub >= db());
151 require(basis_deriv_values() != 0);
155 double r = xlocal_coord[0];
156 double s = xlocal_coord[1];
158 double quartr = 0.25 * r;
159 double quarts = 0.25 * s;
161 double rp = 0.25 + quartr;
162 double rm = 0.25 - quartr;
163 double sp = 0.25 + quarts;
164 double sm = 0.25 - quarts;
168 _basis_deriv_value_buffer[0] = -sm;
169 _basis_deriv_value_buffer[2] = sm;
170 _basis_deriv_value_buffer[4] = sp;
171 _basis_deriv_value_buffer[6] = -sp;
175 _basis_deriv_value_buffer[1] = -rm;
176 _basis_deriv_value_buffer[3] = -rp;
177 _basis_deriv_value_buffer[5] = rp;
178 _basis_deriv_value_buffer[7] = rm;
204 require(xcoord_dofs != 0);
205 require(xcoord_dofs_ub >= db()*dl());
206 require(xlocal_coords != 0);
207 require(xlocal_coords_ub >= db());
234 require(xcoord_dofs != 0);
235 require(xcoord_dofs_ub >= dl()*db());
236 require(xdf == 2 || xdf == 2 || xdf == 3);
270 require(xcoord_dofs != 0);
271 require(xcoord_dofs_ub >= dl()*db());
272 require(xintegrands != 0);
273 require(xintegrands_ub >= dl());
274 require(xresult_integrals != 0);
275 require(xresult_integrals_ub > 0);
306 require(xcoord_dofs != 0);
307 require(xcoord_dofs_ub >= dl()*db());
308 require(xresult_integrals != 0);
309 require(xresult_integrals_ub >= dl());
335 require((0 <= xindex) && (xindex < dof_ct()));
336 require(xresult_ub >= db());
346 ensure(in_standard_domain(xresult, xresult_ub));
369 require(xlocal_coord_index < db());
370 require(xsource_dofs != 0);
372 require(xresult_dofs != 0);
377 if(xlocal_coord_index == 0)
379 dof_type d_minus = 0.5 * (xsource_dofs[1] - xsource_dofs[0]);
380 dof_type d_plus = 0.5 * (xsource_dofs[2] - xsource_dofs[3]);
382 xresult_dofs[0] = d_minus;
383 xresult_dofs[1] = d_minus;
385 xresult_dofs[2] = d_plus;
386 xresult_dofs[3] = d_plus;
390 dof_type d_minus = 0.5 * (xsource_dofs[3] - xsource_dofs[0]);
391 dof_type d_plus = 0.5 * (xsource_dofs[2] - xsource_dofs[1]);
393 xresult_dofs[0] = d_minus;
394 xresult_dofs[3] = d_minus;
396 xresult_dofs[1] = d_plus;
397 xresult_dofs[2] = d_plus;
418 require(xcoord_dofs != 0);
419 require(xcoord_dofs_ub >= db()*dl());
420 require(xlocal_coords != 0);
421 require(xlocal_coords_ub >= db());
422 require(jacobian_values() != 0);
476 require((0 <= xindex) && (xindex < dof_ct()));
477 require(xresult_ub >= db());
486 , {1, -1}, {1, 1}, {-1, 1}
489 xresult[0] = lcoords[xindex][0];
490 xresult[1] = lcoords[xindex][1];
494 ensure(in_standard_domain(xresult, xresult_ub));
510 require(xlocal_coords != 0);
511 require(xlocal_coords_ub >= 2);
521 dof_type one = 1.0 + 1000.0*numeric_limits<dof_type>::epsilon();
523 bool result = (u >= -one) && (u <= one) && (v >= -one) && (v <= one);
550 require(xdofs_ub >= 8);
551 require(xglobal_coords != 0);
552 require(xglobal_coord_ub >= 2);
553 require(xlocal_coords != 0);
554 require(xlocal_coords_ub >= 2);
572 dof_type x_global = xglobal_coords[0];
573 dof_type y_global = xglobal_coords[1];
577 double xlength = x2 - x0;
579 xlocal_coords[0] = (2.0*x_global - (x0 + x2)) / xlength;
583 double ylength = y2 - y0;
585 xlocal_coords[1] = (2.0*y_global - (y0 + y2)) / ylength;
613 ensure(is_same_type(result));
628 require(is_ancestor_of(&xother));
649 require(is_ancestor_of(&xother));
678 result = result && linear_fcn_space::invariant();
680 if(invariant_check())
684 disable_invariant_check();
688 enable_invariant_check();
704 require(xother != 0);
710 bool result =
dynamic_cast<const uniform_2d*
>(xother) != 0;
sec_vd_dof_type dof_type
The type of degree of freedom.
Abstract base class with useful features for all objects.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
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.
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.
Namespace for the fiber_bundles component of the sheaf system.