]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve two assertions 16830/head
authorMartin Kronbichler <martin.kronbichler@rub.de>
Tue, 2 Apr 2024 16:37:29 +0000 (18:37 +0200)
committerMartin Kronbichler <martin.kronbichler@rub.de>
Tue, 2 Apr 2024 16:37:29 +0000 (18:37 +0200)
source/fe/mapping_cartesian.cc

index 947e473df6d9432f1965e1dd5fcdb38c5e9a487a..07b185eddfef4ea6beca49d35221afdc023d9da4 100644 (file)
@@ -1168,8 +1168,7 @@ MappingCartesian<dim, spacedim>::transform_unit_to_real_cell(
   const Point<dim>                                           &p) const
 {
   Assert(is_cartesian(cell), ExcCellNotCartesian());
-  if (dim != spacedim)
-    DEAL_II_NOT_IMPLEMENTED();
+  Assert(dim == spacedim, ExcNotImplemented());
 
   Point<dim> unit = cell->vertex(0);
 
@@ -1189,9 +1188,8 @@ MappingCartesian<dim, spacedim>::transform_real_to_unit_cell(
   const Point<spacedim>                                      &p) const
 {
   Assert(is_cartesian(cell), ExcCellNotCartesian());
+  Assert(dim == spacedim, ExcNotImplemented());
 
-  if (dim != spacedim)
-    DEAL_II_NOT_IMPLEMENTED();
   const Point<dim> start = cell->vertex(0);
   Point<dim>       real  = p;
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.