Mercurial > fem-fenics-eugenio
comparison src/plot_func.cc @ 253:5e9b5bbdc56b
Support both DOLFIN 1.3.0 and 1.4.0
* src/dolfin_compat.h: use a macro to set the correct shared_ptr (std or boost)
author | Eugenio Gianniti <eugenio.gianniti@mail.polimi.it> |
---|---|
date | Tue, 29 Jul 2014 18:05:56 +0200 |
parents | 66071811eef8 |
children |
comparison
equal
deleted
inserted
replaced
252:7f33554e439a | 253:5e9b5bbdc56b |
---|---|
14 You should have received a copy of the GNU General Public License along with | 14 You should have received a copy of the GNU General Public License along with |
15 this program; if not, see <http://www.gnu.org/licenses/>. | 15 this program; if not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 #include "function.h" | 18 #include "function.h" |
19 #include "dolfin_compat.h" | |
19 | 20 |
20 DEFUN_DLD (plot, args, , "-*- texinfo -*-\n\ | 21 DEFUN_DLD (plot, args, , "-*- texinfo -*-\n\ |
21 @deftypefn {Function File} \ | 22 @deftypefn {Function File} \ |
22 plot (@var{Function})\n\ | 23 plot (@var{Function})\n\ |
23 Plot a Function. \n\ | 24 Plot a Function. \n\ |
44 const function & uo = | 45 const function & uo = |
45 static_cast<const function&> (args(0).get_rep ()); | 46 static_cast<const function&> (args(0).get_rep ()); |
46 | 47 |
47 if (!error_state) | 48 if (!error_state) |
48 { | 49 { |
49 const boost::shared_ptr<const dolfin::Function> | 50 const SHARED_PTR <const dolfin::Function> |
50 & u = uo.get_pfun (); | 51 & u = uo.get_pfun (); |
51 | 52 |
52 dolfin::plot (*u); | 53 dolfin::plot (*u); |
53 dolfin::interactive (); | 54 dolfin::interactive (); |
54 | 55 |