Mercurial > fem-fenics-eugenio
diff src/interpolate.cc @ 268:61830a4f9ab9
Improve formatting
author | Eugenio Gianniti <eugenio.gianniti@mail.polimi.it> |
---|---|
date | Thu, 14 Aug 2014 12:26:55 +0200 |
parents | 5e9b5bbdc56b |
children |
line wrap: on
line diff
--- a/src/interpolate.cc Tue Aug 12 15:42:50 2014 +0200 +++ b/src/interpolate.cc Thu Aug 14 12:26:55 2014 +0200 @@ -37,9 +37,9 @@ int nargin = args.length (); octave_value retval; - + if (nargin < 2 || nargin > 3 || nargout > 1) - print_usage (); + { print_usage (); } else { if (! function_type_loaded) @@ -71,20 +71,20 @@ offset = 1; } - if (args(1+offset).type_id () == functionspace::static_type_id ()) + if (args(1 + offset).type_id () == functionspace::static_type_id ()) { const functionspace & u1 = - static_cast<const functionspace&> (args(1+offset).get_rep ()); + static_cast<const functionspace &> (args(1 + offset).get_rep ()); if (! error_state) { SHARED_PTR <dolfin::Function> output (new dolfin::Function (u1.get_pfsp ())); - if (args(0+offset).type_id () == function::static_type_id ()) + if (args(0 + offset).type_id () == function::static_type_id ()) { const function & u0 = - static_cast<const function&> (args(0+offset).get_rep ()); + static_cast<const function &> (args(0 + offset).get_rep ()); if (! error_state) { @@ -96,16 +96,16 @@ if (! error_state) { if (name.empty ()) - name = u0.get_str (); + { name = u0.get_str (); } retval = new function (name, output); } } } - else if (args(0+offset).type_id () == + else if (args(0 + offset).type_id () == coefficient::static_type_id ()) { const coefficient & u0 = - static_cast<const coefficient&> (args(0+offset).get_rep ()); + static_cast<const coefficient &> (args(0 + offset).get_rep ()); if (! error_state) { @@ -117,29 +117,29 @@ if (! error_state) { if (name.empty ()) - name = u0.get_str (); + { name = u0.get_str (); } retval = new function (name, output); } } } else - error ("interpolate: invalid arguments"); + { error ("interpolate: invalid arguments"); } } } - else if (args(1+offset).type_id () == function::static_type_id ()) + else if (args(1 + offset).type_id () == function::static_type_id ()) { const function & u0 = - static_cast<const function&> (args(1+offset).get_rep ()); + static_cast<const function &> (args(1 + offset).get_rep ()); if (! error_state) { SHARED_PTR <dolfin::Function> output (new dolfin::Function (u0.get_fun ())); - if (args(0+offset).type_id () == function::static_type_id ()) + if (args(0 + offset).type_id () == function::static_type_id ()) { const function & u1 = - static_cast<const function&> (args(0+offset).get_rep ()); + static_cast<const function &> (args(0 + offset).get_rep ()); if (! error_state) { @@ -151,16 +151,16 @@ if (! error_state) { if (name.empty ()) - name = u1.get_str (); + { name = u1.get_str (); } retval = new function (name, output); } } } - else if (args(0+offset).type_id () == + else if (args(0 + offset).type_id () == coefficient::static_type_id ()) { const coefficient & u1 = - static_cast<const coefficient&> (args(0+offset).get_rep ()); + static_cast<const coefficient &> (args(0 + offset).get_rep ()); if (! error_state) { @@ -172,17 +172,17 @@ if (! error_state) { if (name.empty ()) - name = u1.get_str (); + { name = u1.get_str (); } retval = new function (name, output); } } } else - error ("interpolate: invalid arguments"); + { error ("interpolate: invalid arguments"); } } } else - error ("interpolate: invalid arguments"); + { error ("interpolate: invalid arguments"); } } return retval; }