]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Assertion added
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 22 Mar 2010 20:23:41 +0000 (20:23 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 22 Mar 2010 20:23:41 +0000 (20:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@20882 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/exceptions.h

index 95b1c3a4f96776afc1a2e1d64358170dd56322e2..c441f31e29bd5aa1e02d0797159862d99cfb99ae 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -947,10 +947,21 @@ namespace StandardExceptions
  *
  * @ingroup Exceptions
  * @author Guido Kanschat 2007
-*/
+ */
 #define AssertDimension(dim1,dim2) Assert((dim1) == (dim2), \
   ExcDimensionMismatch((dim1),(dim2)))
 
+/**
+ * Special assertion, testing whether <tt>vec</tt> has size
+ * <tt>dim1</tt>, and each entry of the vector has the
+ * size <tt>dim2</tt>
+ *
+ * @ingroup Exceptions
+ * @author Guido Kanschat 2010
+*/
+#define AssertVectorVectorDimension(vec,dim1,dim2) AssertDimension((vec).size(), (dim1)) \
+  for (unsigned int i=0;i<dim1;++i) { AssertDimension((vec)[i].size(), (dim2)); }
+
 /**
  * Special assertion for index range of nonnegative indices.
  *

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.