# HG changeset patch # User gedeone-octave # Date 1377637138 -7200 # Node ID 70322135b25f3393928ac442b99d9926962ef1f2 # Parent 77eefe47f7aba07e83541fe926c1796b002142d5 Maint: Add copyright notice diff -r 77eefe47f7ab -r 70322135b25f src/DirichletBC.cc --- a/src/DirichletBC.cc Tue Aug 27 22:32:57 2013 +0200 +++ b/src/DirichletBC.cc Tue Aug 27 22:58:58 2013 +0200 @@ -27,9 +27,10 @@ @itemize @bullet \n\ @item @var{Functional Space} is a fem-fenics functional space where\ we want to apply the BC\n\ -@item @var{Functio handle} is a function handle which contains the expression\ -that we want to apply on the BC\n\ -@item @var{Boundary} is an Array which specify the label of the \ +@item @var{Function handle} is a function handle which contains the expression\ +that we want to apply as BC. If we have a Vector field, we can just use a\n\ +vector of function handle: @var{Function handle} = [@(x, y) f1, @(x, y) f2, ...]\n\ +@item @var{Boundary} is an Array which contains the labels of the \ sides where the BC is applied\n\ @end itemize\n\ The output @var{BC} is an object which contains the boundary conditions\n\ @@ -51,6 +52,13 @@ mlock (); } + if (! boundarycondition_type_loaded) + { + boundarycondition::register_type (); + boundarycondition_type_loaded = true; + mlock (); + } + if (args(0).type_id () == functionspace::static_type_id ()) { const functionspace & fspo = static_cast (args(0).get_rep ()); @@ -59,6 +67,7 @@ if (!error_state) { + std::cout <<"Building essential boundary condition..."<< std::endl; const boost::shared_ptr & V (fspo.get_pfsp ()); octave_value_list b (3, 1); @@ -73,19 +82,10 @@ pf = new expression (*fh); boost::shared_ptr f (pf); - - if (! boundarycondition_type_loaded) - { - boundarycondition::register_type (); - boundarycondition_type_loaded = true; - mlock (); - } - boundarycondition * pbc = new boundarycondition (); for (octave_idx_type i = 0; i < side.length (); ++i) pbc->add_bc (V, f, side(i)); - retval = octave_value (pbc); } } diff -r 77eefe47f7ab -r 70322135b25f src/Plot_2d.cc --- a/src/Plot_2d.cc Tue Aug 27 22:32:57 2013 +0200 +++ b/src/Plot_2d.cc Tue Aug 27 22:58:58 2013 +0200 @@ -1,3 +1,19 @@ +/* + Copyright (C) 2013 Marco Vassallo + + 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 + Foundation; either version 2 of the License, or (at your option) any later + version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . +*/ #include "mesh.h" #include "Plot_2d.h" diff -r 77eefe47f7ab -r 70322135b25f src/Plot_2d.ufl --- a/src/Plot_2d.ufl Tue Aug 27 22:32:57 2013 +0200 +++ b/src/Plot_2d.ufl Tue Aug 27 22:58:58 2013 +0200 @@ -1,3 +1,17 @@ +# Copyright (C) 2013 Marco Vassallo + +# 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 +# Foundation; either version 2 of the License, or (at your option) any later +# version. + +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. + +# You should have received a copy of the GNU General Public License along with +# this program; if not, see . CG = FiniteElement("Lagrange", triangle, 1) u = TrialFunction (CG) diff -r 77eefe47f7ab -r 70322135b25f src/Plot_3d.cc --- a/src/Plot_3d.cc Tue Aug 27 22:32:57 2013 +0200 +++ b/src/Plot_3d.cc Tue Aug 27 22:58:58 2013 +0200 @@ -1,3 +1,19 @@ +/* + Copyright (C) 2013 Marco Vassallo + + 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 + Foundation; either version 2 of the License, or (at your option) any later + version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . +*/ #include "mesh.h" #include "Plot_3d.h" diff -r 77eefe47f7ab -r 70322135b25f src/Plot_3d.ufl --- a/src/Plot_3d.ufl Tue Aug 27 22:32:57 2013 +0200 +++ b/src/Plot_3d.ufl Tue Aug 27 22:58:58 2013 +0200 @@ -1,3 +1,19 @@ + +# Copyright (C) 2013 Marco Vassallo + +# 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 +# Foundation; either version 2 of the License, or (at your option) any later +# version. + +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. + +# You should have received a copy of the GNU General Public License along with +# this program; if not, see . + CG = FiniteElement("Lagrange", tetrahedron, 1) u = TrialFunction (CG) diff -r 77eefe47f7ab -r 70322135b25f src/assemble_system.cc --- a/src/assemble_system.cc Tue Aug 27 22:32:57 2013 +0200 +++ b/src/assemble_system.cc Tue Aug 27 22:58:58 2013 +0200 @@ -99,6 +99,8 @@ error ("assemble_system: unknown argument type"); } + std::cout << "Assembling Matrix from the bilinear form..." + << std::endl; std::size_t nr = A.size (0), nc = A.size (1); std::vector data_tmp; std::vector cidx_tmp; @@ -134,6 +136,8 @@ SparseMatrix sm (data, ridx, cidx, nr, nc); retval(0) = sm; + std::cout << "Assembling Vector from the linear form..." + << std::endl; dim_vector dim; dim.resize (2); dim(0) = B.size (); @@ -201,6 +205,8 @@ error ("assemble_system: unknown argument type"); } + std::cout << "Assembling Matrix from the bilinear form..." + << std::endl; std::size_t nr = A.size (0), nc = A.size (1); std::vector data_tmp; std::vector cidx_tmp; @@ -237,6 +243,8 @@ SparseMatrix sm (data, ridx, cidx, nr, nc); retval(0) = sm; + std::cout << "Assembling Vector from the linear form..." + << std::endl; dim_vector dim; dim.resize (2); dim(0) = B.size (); diff -r 77eefe47f7ab -r 70322135b25f src/fem_eval.cc --- a/src/fem_eval.cc Tue Aug 27 22:32:57 2013 +0200 +++ b/src/fem_eval.cc Tue Aug 27 22:58:58 2013 +0200 @@ -1,3 +1,20 @@ +/* + Copyright (C) 2013 Marco Vassallo + + 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 + Foundation; either version 2 of the License, or (at your option) any later + version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . +*/ + #include "function.h" DEFUN_DLD (fem_eval, args, , "-*- texinfo -*-\n\ diff -r 77eefe47f7ab -r 70322135b25f src/fem_plot.cc --- a/src/fem_plot.cc Tue Aug 27 22:32:57 2013 +0200 +++ b/src/fem_plot.cc Tue Aug 27 22:58:58 2013 +0200 @@ -1,4 +1,19 @@ -#include +/* + Copyright (C) 2013 Marco Vassallo + + 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 + Foundation; either version 2 of the License, or (at your option) any later + version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . +*/ #include "function.h" DEFUN_DLD (fem_plot, args, , "-*- texinfo -*-\n\ diff -r 77eefe47f7ab -r 70322135b25f src/fem_save.cc --- a/src/fem_save.cc Tue Aug 27 22:32:57 2013 +0200 +++ b/src/fem_save.cc Tue Aug 27 22:58:58 2013 +0200 @@ -1,4 +1,19 @@ -#include +/* + Copyright (C) 2013 Marco Vassallo + + 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 + Foundation; either version 2 of the License, or (at your option) any later + version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . +*/ #include "function.h" DEFUN_DLD (fem_save, args, , "-*- texinfo -*-\n\