# HG changeset patch # User gedeone-octave # Date 1378408738 -7200 # Node ID d003a8d6ac58a02ec24d658d36392c7632b56399 # Parent d3c29e38e5d298a0fdc6c8285b096093dfafcc3e Fix error made in the previous commit. diff -r d3c29e38e5d2 -r d003a8d6ac58 src/Makefile.in --- a/src/Makefile.in Thu Sep 05 20:49:36 2013 +0200 +++ b/src/Makefile.in Thu Sep 05 21:18:58 2013 +0200 @@ -68,10 +68,10 @@ assemble_system.o: assemble_system.cc form.h boundarycondition.h $(MKOCTFILE) $(CPPFLAGS) -c assemble_system.cc $(LDFLAGS) -o $@ -I. -save.oct: fem_save.o +save.oct: save.o $(MKOCTFILE) $(CPPFLAGS) -s save.o -o $@ $(LDFLAGS) $(LIBS) -save.o: fem_save.cc +save.o: save.cc $(MKOCTFILE) $(CPPFLAGS) -c save.cc $(LDFLAGS) -o $@ -I. plot_mesh.oct: plot_mesh.cc Plot_2d.h mesh.h Plot_3d.h @@ -83,7 +83,7 @@ Plot_3d.h: Plot_3d.ufl $(FFC) -l dolfin Plot_3d.ufl -plot_func.oct: plot_func.h function.h +plot_func.oct: plot_func.cc function.h $(MKOCTFILE) $(CPPFLAGS) -I. plot_func.cc $(LDFLAGS) $(LIBS) SubSpace.oct: SubSpace.cc functionspace.h diff -r d3c29e38e5d2 -r d003a8d6ac58 src/plot_mesh.cc --- a/src/plot_mesh.cc Thu Sep 05 20:49:36 2013 +0200 +++ b/src/plot_mesh.cc Thu Sep 05 21:18:58 2013 +0200 @@ -64,15 +64,25 @@ if (!error_state) { - const dolfin::Mesh & mshd = msh.get_msh (); + const dolfin::Mesh & mshd = msho.get_msh (); boost::shared_ptr V; - if (mshd.topology ().dim () == 2) - *V = new Plot_2d::FunctionSpace (mshd); - else if (mshd.topology ().dim () () == 3) - *V = new Plot_3d::FunctionSpace (mshd); + uint D = mshd.topology ().dim (); + if (D == 2) + { + boost::shared_ptr Vt (new Plot_2d::FunctionSpace (mshd)); + V = Vt; + } + + else if(D == 3) + { + boost::shared_ptr Vt (new Plot_3d::FunctionSpace (mshd)); + V = Vt; + } + else error ("Plot: The size of the mesh must be 2 or 3"); + if (V->dim () != myu.length ()) error ("Plot: The size of the functional space and of the vector must agree"); else