Mercurial > fem-fenics-eugenio
diff src/Function.cc @ 173:9e944b0d0fc8
Some Formatting improvements (?)
author | gedeone-octave <marcovass89@hotmail.it> |
---|---|
date | Sat, 12 Oct 2013 16:06:00 +0100 |
parents | 67944f307560 |
children | b40f22aad4af |
line wrap: on
line diff
--- a/src/Function.cc Mon Oct 07 21:52:17 2013 +0200 +++ b/src/Function.cc Sat Oct 12 16:06:00 2013 +0100 @@ -77,18 +77,23 @@ if (!error_state) { - const boost::shared_ptr<const dolfin::FunctionSpace> & V = fspo.get_pfsp (); + const boost::shared_ptr<const dolfin::FunctionSpace> + & V = fspo.get_pfsp (); if (V->dim () != myu.length ()) - error ("The size of the functional space and of the vector must agree"); + error("The size of the functional space \ + and 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)); retval = new function (str, u); } @@ -103,17 +108,21 @@ if (!error_state) { - const boost::shared_ptr<const dolfin::Function> & f = fspo.get_pfun (); + const boost::shared_ptr<const dolfin::Function> + & f = fspo.get_pfun (); if (f->value_rank () < 1) - error ("Function: The function you provided isn't a vecotr field"); + error ("Function: The function you provided\ + isn't a vecotr field"); else { if (idx < 1 || idx > f->value_dimension (0)) error ("Function: index out of bounds"); else { - boost::shared_ptr <const dolfin::Function> u (new dolfin::Function((*f)[idx - 1])); + boost::shared_ptr <const dolfin::Function> + u (new dolfin::Function((*f)[idx - 1])); + retval = new function (str, u); } }