Mercurial > fem-fenics-eugenio
changeset 129:d003a8d6ac58
Fix error made in the previous commit.
author | gedeone-octave <marcovass89@hotmail.it> |
---|---|
date | Thu, 05 Sep 2013 21:18:58 +0200 |
parents | d3c29e38e5d2 |
children | cea41875feb9 |
files | src/Makefile.in src/plot_mesh.cc |
diffstat | 2 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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 <const dolfin::FunctionSpace> 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 <const dolfin::FunctionSpace> Vt (new Plot_2d::FunctionSpace (mshd)); + V = Vt; + } + + else if(D == 3) + { + boost::shared_ptr <const dolfin::FunctionSpace> 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