|
From: | Eugenio Gianniti |
Subject: | [fem-fenics] interpolate |
Date: | Sat, 17 May 2014 07:30:56 +0000 |
Dear Marco,
I am writing the post on the blog as you asked me, but meanwhile I have some doubts I would like to discuss. With the first draft I just focused on obtaining something that compiled and could be used without crashing Octave, but now
I am thinking of its meaning from the user’s point of view.
In the first place, having forced a method thought for an object oriented language into Octave, now the interface that interpolate offers is quite counter-intuitive. To address the issue I would make it similar to the interpolate function
of the Python version, which gets as input a Function and a FunctionSpace. For the future I believe this to be the best approach, do you agree?
As a second point, dolfin takes as argument the dolfin::GenericFunction class, which is the base class dolfin::Function and dolfin::_expression_ derive
from. Is there a way to check if an Octave value is in this hierarchy other than performing each check by hand? My first idea would be to create a small C++ function to do so, with calls such as
args(0).type_id () == function::static_type_id ()
and the one for coefficient, then it returns true if it finds one of the two. Anyway I would think that in Octave there is already something doing this job, may you tell me more about it?
Thank you and have a nice weekend,
Eugenio
|
[Prev in Thread] | Current Thread | [Next in Thread] |