From af87cd8d166d1b71f00b62f5be29326581108af4 Mon Sep 17 00:00:00 2001 From: Nicolas Marsic <nicolas.marsic@gmail.com> Date: Wed, 5 Feb 2014 11:02:14 +0000 Subject: [PATCH] FEMSolution now takes map of Value[Dof] --- FunctionSpace/FunctionSpaceScalar.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/FunctionSpace/FunctionSpaceScalar.cpp b/FunctionSpace/FunctionSpaceScalar.cpp index 77d3d2281b..4472dc188b 100644 --- a/FunctionSpace/FunctionSpaceScalar.cpp +++ b/FunctionSpace/FunctionSpaceScalar.cpp @@ -1,8 +1,14 @@ #include "Mapper.h" +#include "Exception.h" #include "FunctionSpaceScalar.h" FunctionSpaceScalar::FunctionSpaceScalar(const GroupOfElement& goe, size_t order){ + if(order == 0) + throw Exception("%s: %s", + "FunctionSpaceScalar", + "Cannot have a order 0 scalar function space"); + this->scalar = true; this->form = 0; this->order = order; @@ -12,6 +18,10 @@ FunctionSpaceScalar::FunctionSpaceScalar(const GroupOfElement& goe, FunctionSpaceScalar::FunctionSpaceScalar(const GroupOfElement& goe, size_t order, std::string family){ + if(order == 0) + throw Exception("%s: %s", + "FunctionSpaceScalar", + "Cannot have a order 0 scalar function space"); this->scalar = true; this->form = 0; this->order = order; -- GitLab