20 #include "SheafSystem/uniform_3d.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 >= 3);
132 _basis_values[0] = 0.125*(1.0 - u)*(1.0 - v)*(1.0 - w);
133 _basis_values[1] = 0.125*(1.0 + u)*(1.0 - v)*(1.0 - w);
134 _basis_values[2] = 0.125*(1.0 + u)*(1.0 + v)*(1.0 - w);
135 _basis_values[3] = 0.125*(1.0 - u)*(1.0 + v)*(1.0 - w);
137 _basis_values[4] = 0.125*(1.0 - u)*(1.0 - v)*(1.0 + w);
138 _basis_values[5] = 0.125*(1.0 + u)*(1.0 - v)*(1.0 + w);
139 _basis_values[6] = 0.125*(1.0 + u)*(1.0 + v)*(1.0 + w);
140 _basis_values[7] = 0.125*(1.0 - u)*(1.0 + v)*(1.0 + w);
156 require(xlocal_coords != 0);
157 require(xlocal_coords_ub >= db());
158 require(basis_deriv_values() != 0);
166 double r = xlocal_coords[0];
167 double s = xlocal_coords[1];
168 double t = xlocal_coords[2];
177 double rmxsm = rm * sm;
178 double rpxsm = rp * sm;
179 double rpxsp = rp * sp;
180 double rmxsp = rm * sp;
182 double rmxtm = rm * tm;
183 double rpxtm = rp * tm;
184 double rpxtp = rp * tp;
185 double rmxtp = rm * tp;
187 double smxtm = sm * tm;
188 double spxtm = sp * tm;
189 double spxtp = sp * tp;
190 double smxtp = sm * tp;
194 _basis_deriv_value_buffer[ 0] = -smxtm;
195 _basis_deriv_value_buffer[ 3] = smxtm;
196 _basis_deriv_value_buffer[ 6] = spxtm;
197 _basis_deriv_value_buffer[ 9] = -spxtm;
198 _basis_deriv_value_buffer[12] = -smxtp;
199 _basis_deriv_value_buffer[15] = smxtp;
200 _basis_deriv_value_buffer[18] = spxtp;
201 _basis_deriv_value_buffer[21] = -spxtp;
205 _basis_deriv_value_buffer[ 1] = -rmxtm;
206 _basis_deriv_value_buffer[ 4] = -rpxtm;
207 _basis_deriv_value_buffer[ 7] = rpxtm;
208 _basis_deriv_value_buffer[10] = rmxtm;
209 _basis_deriv_value_buffer[13] = -rmxtp;
210 _basis_deriv_value_buffer[16] = -rpxtp;
211 _basis_deriv_value_buffer[19] = rpxtp;
212 _basis_deriv_value_buffer[22] = rmxtp;
216 _basis_deriv_value_buffer[ 2] = -rmxsm;
217 _basis_deriv_value_buffer[ 5] = -rpxsm;
218 _basis_deriv_value_buffer[ 8] = -rpxsp;
219 _basis_deriv_value_buffer[11] = -rmxsp;
220 _basis_deriv_value_buffer[14] = rmxsm;
221 _basis_deriv_value_buffer[17] = rpxsm;
222 _basis_deriv_value_buffer[20] = rpxsp;
223 _basis_deriv_value_buffer[23] = rmxsp;
225 for(
int i=0; i<24; i++)
227 _basis_deriv_value_buffer[i] *= 0.125;
254 require(xcoord_dofs != 0);
255 require(xcoord_dofs_ub >= db()*dl());
256 require(xlocal_coords != 0);
257 require(xlocal_coords_ub >= db());
284 require(xcoord_dofs != 0);
285 require(xcoord_dofs_ub >= dl()*db());
286 require(xdf == 2 || xdf == 2 || xdf == 3);
321 require(xcoord_dofs != 0);
322 require(xcoord_dofs_ub >= dl()*db());
323 require(xintegrands != 0);
324 require(xintegrands_ub >= dl());
325 require(xresult_integrals != 0);
326 require(xresult_integrals_ub > 0);
357 require(xcoord_dofs != 0);
358 require(xcoord_dofs_ub >= dl()*db());
359 require(xresult_integrals != 0);
360 require(xresult_integrals_ub >= dl());
386 require((0 <= xindex) && (xindex < dof_ct()));
387 require(xresult_ub >= db());
397 ensure(in_standard_domain(xresult, xresult_ub));
420 require(xlocal_coord_index < db());
421 require(xsource_dofs != 0);
422 require(xsource_dofs_ub >= 24);
423 require(xresult_dofs != 0);
485 require(xcoord_dofs != 0);
486 require(xcoord_dofs_ub >= db()*dl());
487 require(xlocal_coords != 0);
488 require(xlocal_coords_ub >= db());
489 require(jacobian_values() != 0);
543 require((0 <= xindex) && (xindex < dof_ct()));
544 require(xresult_ub >= db());
562 xresult[0] = lcoords[xindex][0];
563 xresult[1] = lcoords[xindex][1];
564 xresult[2] = lcoords[xindex][2];
568 ensure(in_standard_domain(xresult, xresult_ub));
583 require(xlocal_coords != 0);
584 require(xlocal_coords_ub >= 3);
595 dof_type one = 1.0 + 1000.0*numeric_limits<dof_type>::epsilon();
598 (u >= -one) && (u <= one) &&
599 (v >= -one) && (v <= one) &&
600 (w >= -one) && (w <= one);
627 require(xdofs_ub >= 24);
628 require(xglobal_coords != 0);
629 require(xglobal_coord_ub >= 3);
630 require(xlocal_coords != 0);
631 require(xlocal_coords_ub >= 3);
669 dof_type x_global = xglobal_coords[0];
670 dof_type y_global = xglobal_coords[1];
671 dof_type z_global = xglobal_coords[2];
675 double xlength = x6 - x0;
677 xlocal_coords[0] = (2.0*x_global - (x0 + x6)) / xlength;
681 double ylength = y6 - y0;
683 xlocal_coords[1] = (2.0*y_global - (y0 + y6)) / ylength;
687 double zlength = z6 - z0;
689 xlocal_coords[2] = (2.0*z_global - (z0 + z6)) / zlength;
717 ensure(is_same_type(result));
732 require(is_ancestor_of(&xother));
753 require(is_ancestor_of(&xother));
781 result = result && linear_fcn_space::invariant();
783 if(invariant_check())
787 disable_invariant_check();
789 invariance(basis_values() != 0);
793 enable_invariant_check();
809 require(xother != 0);
815 bool result =
dynamic_cast<const uniform_3d*
>(xother) != 0;
sec_vd_dof_type dof_type
The type of degree of freedom.
A general tensor of "degree" p and given "variance" over an abstract vector space.
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.