Mercurial > fem-fenics-eugenio
diff src/plot_mesh.cc @ 173:9e944b0d0fc8
Some Formatting improvements (?)
author | gedeone-octave <marcovass89@hotmail.it> |
---|---|
date | Sat, 12 Oct 2013 16:06:00 +0100 |
parents | 5fe2a157f4eb |
children | 66071811eef8 |
line wrap: on
line diff
--- a/src/plot_mesh.cc Mon Oct 07 21:52:17 2013 +0200 +++ b/src/plot_mesh.cc Sat Oct 12 16:06:00 2013 +0100 @@ -51,7 +51,8 @@ { if (!error_state) { - const boost::shared_ptr<const dolfin::Mesh> & mshd = msho.get_pmsh (); + const boost::shared_ptr<const dolfin::Mesh> + & mshd = msho.get_pmsh (); dolfin::plot (*mshd); dolfin::interactive (); retval = 0; @@ -69,13 +70,15 @@ uint D = mshd.topology ().dim (); if (D == 2) { - boost::shared_ptr <const dolfin::FunctionSpace> Vt (new Plot_2d::FunctionSpace (mshd)); + 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)); + boost::shared_ptr <const dolfin::FunctionSpace> + Vt (new Plot_3d::FunctionSpace (mshd)); V = Vt; } @@ -84,17 +87,23 @@ if (V->dim () != myu.length ()) - error ("Plot: The size of the functional space and of the vector must agree"); + error ("Plot: The size of the functional space\ + and the size of the vector must agree"); else { dolfin::Vector du(myu.length ()); for (std::size_t i = 0; i < myu.length (); ++i) du.setitem (i, myu(i)); - boost::shared_ptr<dolfin::Vector> uu (new dolfin::Vector(du)); - boost::shared_ptr <const dolfin::Function> u (new dolfin::Function(V, uu)); + boost::shared_ptr<dolfin::Vector> + uu (new dolfin::Vector(du)); + + boost::shared_ptr <const dolfin::Function> + u (new dolfin::Function(V, uu)); + dolfin::plot (*u); dolfin::interactive (); + retval = 0; } }