help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fem-fenics questions


From: Daniel Kraft
Subject: Re: fem-fenics questions
Date: Mon, 03 Mar 2014 12:50:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Hi!

On 2014-03-03 11:39, Marco Vassallo wrote:
> On Mon, Mar 3, 2014 at 8:53 AM, Daniel Kraft <address@hidden
> <mailto:address@hidden>> wrote:
> 
>     Is it also possible to invoke it for lots of points at all?  (I think I
>     read somewhere that this is planned but not yet implemented ... just
>     checking what the current state is.)  This is a very important feature,
>     IMHO, for everyone working seriously with the result afterwards (and not
>     just plotting it).
> 
> You are right, I planned to do it. The function feval() is only a
> wrapper to the dolfin::eval()
> function. At the moment I don't know any dolfin function which could
> evaluate lots of points
> at the same time. An easy solution would be to add a for cycle in the
> feval.cc function
> which evaluate the function for all the points given from the user.
> I think that we can do either a function with a different signature:
>  
>   feval ( function function_name, Array<double> x_coordinates,
>              Array<double> y_coordinates, Array<double> z_coordinates)
> 
> or a function with a similar signature as the one we are using now but
> receiving a matrix
> of points and not an array. What do you think?
> If you want to implement it or you have any better idea it would be great.

I would probably go for this signature anyway -- it seems more intuitive
to do "feval(func, x, y)" instead of "feval(func, [x, y])" since the
former is closer to "func(x, y)".

If it isn't a problem to make the old convention obsolete, I can work on
a patch to change the feval semantics that way (and also to handle
multiple points in a loop).  If we want to keep supporting the old call
(not sure how many users there are already out there), it should be easy
enough to handle that in case feval has only two arguments, and I can
also do that.

What do you think?

Yours,
Daniel

-- 
http://www.domob.eu/
OpenPGP: 901C 5216 0537 1D2A F071  5A0E 4D94 6EED 04F7 CF52
Namecoin: id/domob -> https://nameid.org/?name=domob
--
Done:  Arc-Bar-Cav-Hea-Kni-Ran-Rog-Sam-Tou-Val-Wiz
To go: Mon-Pri


reply via email to

[Prev in Thread] Current Thread [Next in Thread]