Mercurial > fem-fenics-eugenio
comparison src/SubSpace.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 |
---|---|
13 | 13 |
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 #include "functionspace.h" | 17 #include "functionspace.h" |
18 #include "dolfin_compat.h" | |
18 | 19 |
19 DEFUN_DLD (SubSpace, args, , "-*- texinfo -*-\n\ | 20 DEFUN_DLD (SubSpace, args, , "-*- texinfo -*-\n\ |
20 @deftypefn {Function File} {[@var{V1}]} = \ | 21 @deftypefn {Function File} {[@var{V1}]} = \ |
21 SubSpace (@var{V}, @var{index}) \n\ | 22 SubSpace (@var{V}, @var{index}) \n\ |
22 Extract a SubSpace from an object of type FunctionSpace. \n\ | 23 Extract a SubSpace from an object of type FunctionSpace. \n\ |
57 if (idx < 1 || idx > V.dim ()) | 58 if (idx < 1 || idx > V.dim ()) |
58 error ("SubSpace: index out of bounds"); | 59 error ("SubSpace: index out of bounds"); |
59 | 60 |
60 else | 61 else |
61 { | 62 { |
62 boost::shared_ptr <const dolfin::FunctionSpace> | 63 SHARED_PTR <const dolfin::FunctionSpace> |
63 g (new dolfin::SubSpace (V, idx - 1)); | 64 g (new dolfin::SubSpace (V, idx - 1)); |
64 | 65 |
65 retval = new functionspace (g); | 66 retval = new functionspace (g); |
66 } | 67 } |
67 | 68 |