changeset 117:70322135b25f

Maint: Add copyright notice
author gedeone-octave <marcovass89@hotmail.it>
date Tue, 27 Aug 2013 22:58:58 +0200
parents 77eefe47f7ab
children ee608d1bffca
files src/DirichletBC.cc src/Plot_2d.cc src/Plot_2d.ufl src/Plot_3d.cc src/Plot_3d.ufl src/assemble_system.cc src/fem_eval.cc src/fem_plot.cc src/fem_save.cc
diffstat 9 files changed, 131 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- 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<const functionspace&> (args(0).get_rep ());
@@ -59,6 +67,7 @@
 
           if (!error_state)
             {
+              std::cout <<"Building essential boundary condition..."<< std::endl;
               const boost::shared_ptr <const dolfin::FunctionSpace> & V (fspo.get_pfsp ());
 
               octave_value_list b (3, 1);
@@ -73,19 +82,10 @@
                 pf = new expression (*fh);
 
               boost::shared_ptr<const expression> 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);
             }
         }
--- 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 <http://www.gnu.org/licenses/>.
+*/
 #include "mesh.h"
 #include "Plot_2d.h"
 
--- 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 <http://www.gnu.org/licenses/>.
 CG = FiniteElement("Lagrange", triangle, 1)
 
 u = TrialFunction (CG)
--- 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 <http://www.gnu.org/licenses/>.
+*/
 #include "mesh.h"
 #include "Plot_3d.h"
 
--- 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 <http://www.gnu.org/licenses/>.
+
 CG = FiniteElement("Lagrange", tetrahedron, 1)
 
 u = TrialFunction (CG)
--- 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<double> data_tmp;
                       std::vector<std::size_t> 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<double> data_tmp;
                       std::vector<std::size_t> 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 ();
--- 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 <http://www.gnu.org/licenses/>.
+*/
+
 #include "function.h"
 
 DEFUN_DLD (fem_eval, args, , "-*- texinfo -*-\n\
--- 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 <dolfin.h>
+/*
+ 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 <http://www.gnu.org/licenses/>.
+*/
 #include "function.h"
 
 DEFUN_DLD (fem_plot, args, , "-*- texinfo -*-\n\
--- 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 <dolfin.h>
+/*
+ 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 <http://www.gnu.org/licenses/>.
+*/
 #include "function.h"
 
 DEFUN_DLD (fem_save, args, , "-*- texinfo -*-\n\