diff src/feval.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/feval.cc	Tue Aug 12 15:42:50 2014 +0200
+++ b/src/feval.cc	Thu Aug 14 12:26:55 2014 +0200
@@ -39,7 +39,7 @@
 
   int nargin = args.length ();
   octave_value_list retval;
-  
+
   if (! function_type_loaded)
     {
       function::register_type ();
@@ -50,16 +50,16 @@
   if (args(0).type_id () == function::static_type_id ())
     {
       const function & fspo =
-        static_cast<const function&> (args(0).get_rep ());
+        static_cast<const function &> (args(0).get_rep ());
 
       if (!error_state)
         {
-          const SHARED_PTR <const dolfin::Function> 
+          const SHARED_PTR <const dolfin::Function>
             & f = fspo.get_pfun ();
 
           octave_idx_type pdim = f->geometric_dimension ();
           if (nargin != pdim + 1)
-            print_usage ();
+            { print_usage (); }
           else
             {
               std::vector <Matrix> coordinates;
@@ -68,12 +68,12 @@
               for (octave_idx_type in = 1; in <= pdim; ++in)
                 {
                   if (! args(in).is_real_type ())
-                    error ("invalid argument");
+                    { error ("invalid argument"); }
                   else
                     {
                       Matrix aux = args(in).matrix_value ();
                       if (in == 1)
-                        dims = aux.dims ();
+                        { dims = aux.dims (); }
                       else
                         {
                           dim_vector newdims = aux.dims ();
@@ -93,23 +93,23 @@
                 {
                   octave_idx_type vdim = f->value_dimension (0);
                   if (nargout != vdim)
-                    error ("wrong number of output arguments");
+                    { error ("wrong number of output arguments"); }
                   else
                     {
                       std::vector <Matrix> evaluations;
                       for (octave_idx_type out = 0; out < vdim; ++out)
-                        evaluations.push_back (Matrix (dims));
+                        { evaluations.push_back (Matrix (dims)); }
 
                       for (octave_idx_type k = 0; k < dims.numel (); ++k)
                         {
                           Array<double> point (dim_vector (pdim, 1));
                           for (octave_idx_type el = 0; el < pdim; ++el)
-                            point (el) = coordinates[el] (k);
-                          dolfin::Array<double> 
+                            { point (el) = coordinates[el] (k); }
+                          dolfin::Array<double>
                             x (point.length (), point.fortran_vec ());
 
                           Array<double> res (dim_vector (vdim, 1));
-                          dolfin::Array<double> 
+                          dolfin::Array<double>
                             values (res.length (), res.fortran_vec ());
                           try
                             {
@@ -124,15 +124,15 @@
                             }
 
                           for (octave_idx_type el = 0; el < vdim; ++el)
-                            evaluations[el] (k) = res (el);
+                            { evaluations[el] (k) = res (el); }
                         }
 
                       if (! error_state)
                         {
                           for (std::vector<Matrix>::iterator it =
-                               evaluations.begin ();
+                                 evaluations.begin ();
                                it != evaluations.end (); ++it)
-                            retval.append (octave_value (*it));
+                            { retval.append (octave_value (*it)); }
                         }
                     }
                 }