Mercurial > fem-fenics-eugenio
diff src/assemble_system.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 | f4d6ae912a08 |
line wrap: on
line diff
--- a/src/assemble_system.cc Tue Aug 12 15:42:50 2014 +0200 +++ b/src/assemble_system.cc Thu Aug 14 12:26:55 2014 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Marco Vassallo <gedeone-octave@users.sourceforge.net> + Copyright (C) 2013 Marco Vassallo <gedeone-octave@users.sourceforge.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -60,7 +60,7 @@ if (nargout == 2) { if (nargin < 2) - print_usage (); + { print_usage (); } else { @@ -68,9 +68,9 @@ && args(1).type_id () == form::static_type_id ()) { const form & frm1 = - static_cast<const form&> (args(0).get_rep ()); + static_cast<const form &> (args(0).get_rep ()); const form & frm2 = - static_cast<const form&> (args(1).get_rep ()); + static_cast<const form &> (args(1).get_rep ()); if (! error_state) { @@ -94,18 +94,18 @@ boundarycondition::static_type_id ()) { const boundarycondition & bc - = static_cast<const boundarycondition&> - (args(i).get_rep ()); + = static_cast<const boundarycondition &> + (args(i).get_rep ()); - const std::vector<SHARED_PTR - <const dolfin::DirichletBC> > - & pbc = bc.get_bc (); + const std::vector<SHARED_PTR + <const dolfin::DirichletBC> > + & pbc = bc.get_bc (); for (std::size_t j = 0; j < pbc.size (); ++j) - pbc[j]->apply(A, B); + { pbc[j]->apply (A, B); } } else - error ("assemble_system: unknown argument type"); + { error ("assemble_system: unknown argument type"); } } retval(0) = factory.matrix (A); @@ -113,23 +113,23 @@ } } else - error ("assemble_system: unknown size"); + { error ("assemble_system: unknown size"); } } } } else if (nargout == 3) { if (nargin < 3) - print_usage (); + { print_usage (); } else { if (args(0).type_id () == form::static_type_id () && args(1).type_id () == form::static_type_id ()) { const form & frm1 = - static_cast<const form&> (args(0).get_rep ()); + static_cast<const form &> (args(0).get_rep ()); const form & frm2 = - static_cast<const form&> (args(1).get_rep ()); + static_cast<const form &> (args(1).get_rep ()); const Array<double> myx = args(2).array_value (); if (! error_state) @@ -154,28 +154,28 @@ #endif for (std::size_t i = 0; i < myx.length (); ++i) - x.setitem (i, myx.xelem (i)); + { x.setitem (i, myx.xelem (i)); } for (std::size_t i = 3; i < nargin; ++i) { - if (args(i).type_id () == + if (args(i).type_id () == boundarycondition::static_type_id ()) { const boundarycondition & bc - = static_cast<const boundarycondition&> + = static_cast<const boundarycondition &> (args(i).get_rep ()); - const std::vector<SHARED_PTR - <const dolfin::DirichletBC> > - & pbc = bc.get_bc (); + const std::vector<SHARED_PTR + <const dolfin::DirichletBC> > + & pbc = bc.get_bc (); for (std::size_t j = 0; j < pbc.size (); ++j) - pbc[j]->apply(A, B, x); + { pbc[j]->apply (A, B, x); } } else - error ("assemble_system: unknown argument type"); + { error ("assemble_system: unknown argument type"); } } retval(0) = factory.matrix (A); @@ -184,7 +184,7 @@ } } else - error ("assemble_system: unknown size"); + { error ("assemble_system: unknown size"); } } } }