20 #include "SheafSystem/constant_fcn_space.h" 22 #include "SheafSystem/assert_contract.h" 23 #include "SheafSystem/error_message.h" 24 #include "SheafSystem/std_limits.h" 40 _basis_values = _basis_value_buffer;
58 _basis_values = _basis_value_buffer;
102 require(xlocal_coord != 0);
103 require(xlocal_coord_ub >= db());
109 _basis_values[0] = 1.0;
124 require(xlocal_coords != 0);
125 require(xlocal_coords_ub >= db());
142 for(
int i=0; i< lct; i++)
144 _basis_deriv_values[i] = 0.0;
175 require(xcoord_dofs != 0);
176 require(xcoord_dofs_ub >= 0);
177 require(xintegrands != 0);
178 require(xintegrands_ub >= 0);
179 require(xresult_integrals != 0);
180 require(xresult_integrals_ub > 0);
184 value_type lvolume = volume(xcoord_dofs, xcoord_dofs_ub, xdf);
186 for(
size_type i=0; i<xintegrands_ub; ++i)
188 xresult_integrals[i] = xintegrands[i]*lvolume;
209 require((0 <= xindex) && (xindex < dof_ct()));
210 require(xresult_ub >= db());
222 ensure(in_standard_domain(xresult, xresult_ub));
245 require(xlocal_coord_index < db());
246 require(xsource_dofs != 0);
247 require(xsource_dofs_ub >= dl());
248 require((xsource_dofs_ub % dl()) == 0);
249 require(xresult_dofs != 0);
250 require(xresult_dofs_ub >= xsource_dofs_ub);
256 for(
size_type l=0; l<xsource_dofs_ub; ++l)
258 xresult_dofs[l] = 0.0;
279 require(xcoord_dofs != 0);
280 require(xcoord_dofs_ub >= 0);
281 require(xlocal_coords != 0);
282 require(xlocal_coords_ub >= db());
283 require(jacobian_values() != 0);
288 for(
int i=0; i<ldj; ++i)
290 _jacobian_values[i] = 0.0;
313 require(xcoord_dofs != 0);
314 require(xcoord_dofs_ub >= 0);
315 require(xlocal_coords != 0);
316 require(xlocal_coords_ub >= db());
317 require(jacobian_values() != 0);
353 require(xdofs_ub >= dl()*xresult_ub);
354 require(unexecutable(xdofs must be interleaved));
355 require(xlocal_coords != 0);
356 require(xlocal_coords_ub >= db());
357 require(xresult != 0);
358 require(xresult_ub > 0);
359 require(basis_values() != 0);
366 xresult[i] = xdofs[i];
388 require(xdofs_ub >= dl()*db());
389 require(xglobal_coords != 0);
390 require(xglobal_coord_ub >= db());
391 require(xlocal_coords != 0);
392 require(xlocal_coords_ub >= db());
400 center(xlocal_coords, xlocal_coords_ub);
434 ensure(is_same_type(result));
447 require(is_ancestor_of(&xother));
466 require(is_ancestor_of(&xother));
513 if(invariant_check())
517 disable_invariant_check();
519 invariance(basis_values() != 0);
523 enable_invariant_check();
539 require(xother != 0);
virtual void value_at_coord(const dof_type xdofs[], size_type xdofs_ub, const dof_type xlocal_coords[], size_type xlocal_coords_ub, dof_type xresult[], size_type xresult_ub) const
Computes the value of the function at local coordinates xlocal_coords using the degrees of freedom xd...
virtual void gauss_point(pod_index_type xindex, coord_type xresult[], size_type xresult_ub)
The local coordinates of the gauss point with index xindex.
virtual constant_fcn_space * clone() const =0
Virtual constructor, creates a new instance of the same type as this.
virtual bool is_ancestor_of(const any *xother) const
Conformance test; true if other conforms to this.
virtual ~constant_fcn_space()
Destructor.
virtual void basis_at_coord(const dof_type xlocal_coord[], size_type xlocal_coord_ub)
Computes the value of each basis function at local coordinates xlocal_coord.
virtual void dxi_local(size_type xlocal_coord_index, const dof_type xsource_dofs[], size_type xsource_dofs_ub, dof_type xresult_dofs[], size_type xresult_dofs_ub) const
First partial derivative of this with respect to local coordinate xlocal_coord_index.
virtual bool invariant() const
Class invariant.
sec_vd_dof_type dof_type
The type of degree of freedom.
virtual bool invariant() const
Class invariant.
Abstract base class with useful features for all objects.
virtual void basis_derivs_at_coord(const dof_type xlocal_coords[], size_type xlocal_coords_ub)
Computes the value of the derivatives of each basis function at local coordinates xlocal_coords...
virtual void coord_at_value(const dof_type xdofs[], size_type xdofs_ub, const dof_type xglobal_coords[], size_type xglobal_coord_ub, dof_type xlocal_coords[], size_type xlocal_coords_ub) const
The local coordinates of a point at which the field has the value xvalue.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
virtual constant_fcn_space & operator=(const section_evaluator &xother)
Assignment operator.
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.
virtual void jacobian(const dof_type xcoord_dofs[], size_type xcoord_dofs_ub, size_type xdf, const dof_type xlocal_coords[], size_type xlocal_coords_ub)
Computes the the jacobian matrix at local coordinates xlocal_coords with coordinate dofs xcoord_dofs...
An abstract local section evaluator; a map from {local coordinates x dofs} to section value...
virtual value_type jacobian_determinant(const dof_type xcoord_dofs[], size_type xcoord_dofs_ub, size_type xdf, const coord_type xlocal_coords[], size_type xlocal_coords_ub)
Computes the the determinant of the jacobian matrix at local coordinates xlocal_coords with coordinat...
virtual int dl() const
The dimension of this function space.
int_type pod_index_type
The plain old data index type.
constant_fcn_space()
Default constructor.
An section evaluator with a constant value over an abstract domain.
Namespace for the fiber_bundles component of the sheaf system.
virtual void integrate(const dof_type xcoord_dofs[], size_type xcoord_dofs_ub, size_type xdf, const dof_type xintegrands[], size_type xintegrands_ub, value_type xresult_integrals[], size_type xresult_integrals_ub)
Computes the value of the integral of the integrand array...