barycenter() const;
/**
- * Compute the dim-dimensional measure of the object. For a dim-dimensional
- * cell in dim-dimensional space, this equals its volume. On the other hand,
- * for a 2d cell in 3d space, or if the current object pointed to is a 2d
- * face of a 3d cell in 3d space, then the function computes the area the
- * object occupies. For a one-dimensional object, return its length.
+ * Compute the `structdim`-dimensional measure of the object. For a
+ * `dim`-dimensional cell in `dim`-dimensional space, this equals its volume.
+ * On the other hand, for a 2d cell in 3d space, or if the current object
+ * pointed to is a 2d face of a 3d cell in 3d space, then the function
+ * computes the area the object occupies. For a one-dimensional (i.e.,
+ * `structdim = 1`) object, regardless of `dim` and `spacedim`, return its
+ * length. Similarly, the measure of any vertex (i.e., `structdim = 0`
+ * objects) is 1.
*
* The function only computes the measure of cells, faces or edges assumed
* to be represented by (bi-/tri-)linear mappings. In other words, it only
const bool interpolate_from_surrounding = false) const;
/**
- * Compute the dim-dimensional measure of the object. For a dim-dimensional
- * cell in dim-dimensional space, this equals its volume. On the other hand,
- * for a 2d cell in 3d space, or if the current object pointed to is a 2d
- * face of a 3d cell in 3d space, then the function computes the area the
- * object occupies. For a one-dimensional object, return its length. For a
- * zero-dimensional object, return zero.
+ * Compute the `structdim`-dimensional measure of the present object. Since,
+ * in this context, `structdim = 0`, this function always returns 1.
+ *
+ * @note This is consistent with what ReferenceCells::Vertex::volume()
+ * returns.
*/
double
measure() const;
* @}
*/
+ /**
+ * @name Geometric information about an object
+ */
+ /**
+ * @{
+ */
+
+ /**
+ * Return 1.
+ *
+ * @note This is consistent with what ReferenceCells::Vertex::volume()
+ * returns.
+ */
+ static double
+ measure();
+
+ /**
+ * @}
+ */
/**
* Return whether this point is at the boundary of the one-dimensional
inline double
TriaAccessor<0, dim, spacedim>::measure() const
{
- return 0.;
+ return 1.0;
}
}
+
+template <int spacedim>
+inline double
+TriaAccessor<0, 1, spacedim>::measure()
+{
+ return 1.0;
+}
+
+
+
template <int spacedim>
inline bool
TriaAccessor<0, 1, spacedim>::at_boundary() const