Mercurial > fem-fenics-eugenio
diff inst/private/generate_lhs.m @ 268:61830a4f9ab9
Improve formatting
author | Eugenio Gianniti <eugenio.gianniti@mail.polimi.it> |
---|---|
date | Thu, 14 Aug 2014 12:26:55 +0200 |
parents | a61fc34334ca |
children |
line wrap: on
line diff
--- a/inst/private/generate_lhs.m Tue Aug 12 15:42:50 2014 +0200 +++ b/inst/private/generate_lhs.m Thu Aug 14 12:26:55 2014 +0200 @@ -17,6 +17,7 @@ ## -*- texinfo -*- ## function for internal usage only ## @end deftypefn + function output = generate_lhs (ufl_name) STRING ="\n\ @@ -28,7 +29,8 @@ #include <fem-fenics/meshfunction.h>\n\ #include <fem-fenics/dolfin_compat.h>\n\ \n\ -DEFUN_DLD (@@UFL_NAME@@_LinearForm, args, , "" b = fem_lhs_@@UFL_NAME@@ (FUNCTIONAL SPACE, COEFF)"")\n\ +DEFUN_DLD (@@UFL_NAME@@_LinearForm, args, ,\ + "" b = fem_lhs_@@UFL_NAME@@ (FUNCTIONAL SPACE, COEFF)"")\n\ {\n\ int nargin = args.length ();\n\ octave_value retval;\n\ @@ -102,15 +104,16 @@ = static_cast <const function&> (args(i).get_rep ());\n\ \n\ std::size_t n = L.coefficient_number (fun.get_str ());\n\ - const SHARED_PTR <const dolfin::Function> & pfun = fun.get_pfun ();\n\ + const SHARED_PTR <const dolfin::Function> & pfun =\ + fun.get_pfun ();\n\ L.set_coefficient (n, pfun);\n\ ++nc;\n\ }\n\ \n\ if (args(i).type_id () == meshfunction::static_type_id ())\n\ {\n\ - meshfunction const & mf_arg\n\ - = static_cast <meshfunction const &> (args(i).get_rep ());\n\ + meshfunction const & mf_arg =\n\ + static_cast <meshfunction const &> (args(i).get_rep ());\n\ \n\ std::string type = mf_arg.get_str ();\n\ dolfin::MeshFunction <std::size_t> const &\n\ @@ -136,9 +139,9 @@ return retval;\n\ }"; -STRING = strrep (STRING, "@@UFL_NAME@@", ufl_name); +STRING = strrep (STRING, "@@UFL_NAME@@", ufl_name); -fid = fopen (sprintf ("%s_LinearForm.cc", ufl_name), 'w'); +fid = fopen (sprintf ("%s_LinearForm.cc", ufl_name), "w"); if (fid >= 0) fputs (fid, STRING); output = fclose (fid);