|
From: | marco Vassallo |
Subject: | RE: Expression.cc |
Date: | Thu, 12 Sep 2013 17:12:28 +0200 |
> > Hi Marco, > > Don't be surprised I'm sending you so many complaints today, > it's just because the end of the project is getting closer > that I am finally reviewing in more detail your code and I find all the rough spots. > No problem, Thanks for your help! > So here is yet one more, > in _expression_.cc you have: > > octave_value_list b (3, 1); > octave_value_list tmp = feval (fh->function_value (), b); > > this is dangerous as the point with all coordinates equal > to 1 does not necessarily belong to the domain, and the function handle > passed on input could make no sense or even fail if evaluated outside > the intended domain. I know that it is quite stupid but even if I get Nan as result I don' really care because I only need to know the "size" of the function_handle. I mean: @(x, y) 1 -> I want to get 1 @(x,y) [1, 1] -> I need to get 2 and so on.. I don't know if I can do it in a better way. For example octave:4> a = _expression_ ('f', @(x,y) 1/(x-1)) Creating _expression_... warning: division by zero a = Coefficient f : <DOLFIN object u (a function)> Marco > > c. > |
[Prev in Thread] | Current Thread | [Next in Thread] |