From 770266d87b576290b59cac856303b2a60253c59a Mon Sep 17 00:00:00 2001 From: Jonathan Lambrechts <jonathan.lambrechts@uclouvain.be> Date: Thu, 30 Jun 2011 12:47:23 +0000 Subject: [PATCH] dg : raise an error when funciontSolution.getNbCol is called --- Solver/function.h | 2 +- gmshpy/gmshSolver.i | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Solver/function.h b/Solver/function.h index baf1312735..1fc7281d3d 100644 --- a/Solver/function.h +++ b/Solver/function.h @@ -68,7 +68,7 @@ class function { // get or print information inline bool isInvalitedOnElement() { return _invalidatedOnElement; } - inline int getNbCol() const { return _nbCol; } + inline int getNbCol() const {if(_nbCol ==0) Msg::Error("Cannot ask nbCol of functionSolution"); return _nbCol; } static functionConstant *getTime(); static functionConstant *getDT(); static function *getSolution(); diff --git a/gmshpy/gmshSolver.i b/gmshpy/gmshSolver.i index 8777c91886..1d350c8b66 100644 --- a/gmshpy/gmshSolver.i +++ b/gmshpy/gmshSolver.i @@ -11,6 +11,7 @@ #include "dofManager.h" #include "elasticitySolver.h" #include "function.h" + #include "functionDerivator.h" #include "functionPython.h" #include "linearSystem.h" #include "linearSystemCSR.h" @@ -28,6 +29,7 @@ namespace std { %template(dofManagerDouble) dofManager<double>; %include "elasticitySolver.h" %include "function.h" +%include "functionDerivator.h" %include "functionPython.h" %include "linearSystem.h" %template(linearSystemDouble) linearSystem<double>; -- GitLab