From af24c1fe13153cccf09a6636bb0a0b9b97949f3e Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 15 Jan 2004 22:27:16 +0000 Subject: [PATCH] Q1WedgeFunction only makes sense if dim>=2 git-svn-id: https://svn.dealii.org/trunk@8321 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/source/function_lib.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deal.II/base/source/function_lib.cc b/deal.II/base/source/function_lib.cc index b1892e52d6..c6879c4563 100644 --- a/deal.II/base/source/function_lib.cc +++ b/deal.II/base/source/function_lib.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -117,6 +117,7 @@ namespace Functions Q1WedgeFunction::value (const Point &p, const unsigned int) const { + Assert (dim>=2, ExcInternalError()); return p(0)*p(1); } @@ -128,6 +129,7 @@ namespace Functions std::vector &values, const unsigned int) const { + Assert (dim>=2, ExcInternalError()); Assert (values.size() == points.size(), ExcDimensionMismatch(values.size(), points.size())); @@ -144,6 +146,7 @@ namespace Functions Q1WedgeFunction::laplacian (const Point &, const unsigned int) const { + Assert (dim>=2, ExcInternalError()); return 0.; } @@ -154,6 +157,7 @@ namespace Functions std::vector &values, const unsigned int) const { + Assert (dim>=2, ExcInternalError()); Assert (values.size() == points.size(), ExcDimensionMismatch(values.size(), points.size())); @@ -168,6 +172,7 @@ namespace Functions Q1WedgeFunction::gradient (const Point &p, const unsigned int) const { + Assert (dim>=2, ExcInternalError()); Tensor<1,dim> erg; erg[0] = p(1); erg[1] = p(0); @@ -182,6 +187,7 @@ namespace Functions std::vector > &gradients, const unsigned int) const { + Assert (dim>=2, ExcInternalError()); Assert (gradients.size() == points.size(), ExcDimensionMismatch(gradients.size(), points.size())); -- 2.39.5