<h3>General</h3>
<ol>
+ <li> Improved: The method Triangulation::create_triangulation will now throw an
+ exception if any cells have negative measure. This check is not run if the
+ triangulation keeps track of distorted cells or if the codimension is not zero.
+ This check was previously only run in 3D.
+ <br>
+ (David Wells, 2016/05/07)
+ </li>
+
<li> New: Add a collection of classes to manage user's quadrature point data:
CellDataStorage, TransferableQuadraturePointData and
parallel::distributed::ContinuousQuadratureDataTransfer.
triangulation.vertices = v;
triangulation.vertices_used = std::vector<bool> (v.size(), true);
+ // Check that all cells have positive volume. This check is not run in
+ // the codimension one or two cases since cell_measure is not
+ // implemented for those.
+#ifndef _MSC_VER
+ //TODO: The following code does not compile with MSVC. Find a way around it
+ if (dim == spacedim)
+ {
+ for (unsigned int cell_no = 0; cell_no<cells.size(); ++cell_no)
+ {
+ const double cell_measure = GridTools::cell_measure<1, spacedim>
+ (triangulation.vertices, cells[cell_no].vertices);
+ AssertThrow(cell_measure > 0, ExcGridHasInvalidCell(cell_no));
+ }
+ }
+#endif
+
+
// store the indices of the lines
// which are adjacent to a given
// vertex
triangulation.vertices = v;
triangulation.vertices_used = std::vector<bool> (v.size(), true);
+ // Check that all cells have positive volume. This check is not run in
+ // the codimension one or two cases since cell_measure is not
+ // implemented for those.
+#ifndef _MSC_VER
+ //TODO: The following code does not compile with MSVC. Find a way around it
+ if (dim == spacedim)
+ {
+ for (unsigned int cell_no = 0; cell_no<cells.size(); ++cell_no)
+ {
+ const double cell_measure = GridTools::cell_measure<2, spacedim>
+ (triangulation.vertices, cells[cell_no].vertices);
+ AssertThrow(cell_measure > 0, ExcGridHasInvalidCell(cell_no));
+ }
+ }
+#endif
+
// make up a list of the needed
// lines each line is a pair of
// vertices. The list is kept
#ifndef _MSC_VER
//TODO: The following code does not compile with MSVC. Find a way around it
for (unsigned int cell_no = 0; cell_no<cells.size(); ++cell_no)
- AssertThrow(dealii::GridTools::cell_measure(triangulation.vertices,
- cells[cell_no].vertices) >= 0,
- ExcGridHasInvalidCell(cell_no));
+ {
+ const double cell_measure = GridTools::cell_measure<3, spacedim>
+ (triangulation.vertices, cells[cell_no].vertices);
+ AssertThrow(cell_measure > 0, ExcGridHasInvalidCell(cell_no));
+ }
#endif
///////////////////////////////////////