changeset 11134:2fbef5cee4d6 octave-forge

prepare for release
author cdf
date Sun, 21 Oct 2012 14:06:08 +0000
parents d1032364b080
children 60ce6636a41b
files extra/bim/NEWS extra/bim/inst/bim1a_advection_diffusion.m extra/bim/inst/bim1a_advection_upwind.m extra/bim/inst/bim1a_laplacian.m extra/bim/inst/bim1a_reaction.m extra/bim/inst/bim1a_rhs.m extra/bim/inst/bim2a_advection_diffusion.m extra/bim/inst/bim2a_advection_upwind.m extra/bim/inst/bim2a_laplacian.m extra/bim/inst/bim2a_reaction.m extra/bim/inst/bim2a_rhs.m extra/bim/inst/bim2c_global_flux.m extra/bim/inst/bim3a_advection_diffusion.m extra/bim/inst/bim3a_laplacian.m extra/bim/inst/bim3a_osc_advection_diffusion.m extra/bim/inst/bim3a_osc_laplacian.m extra/bim/inst/bim3a_reaction.m extra/bim/inst/bim3a_rhs.m extra/bim/inst/bim3c_global_flux.m extra/bim/inst/bim3c_tri_to_nodes.m
diffstat 20 files changed, 73 insertions(+), 199 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extra/bim/NEWS	Sun Oct 21 14:06:08 2012 +0000
@@ -0,0 +1,13 @@
+Summary of important user-visible changes for bim 1.1.0:
+-------------------------------------------------------------------
+
+ ** Added new functions implementing the Orthogonal Subdomain Collocation 
+    method in 3D.
+
+ ** More functions for 3d problems were added.
+
+ ** Demostrations of how to use the package are now in the wiki.
+
+
+
+
--- a/extra/bim/inst/bim1a_advection_diffusion.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim1a_advection_diffusion.m	Sun Oct 21 14:06:08 2012 +0000
@@ -30,17 +30,7 @@
 ## 
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ - ( \alpha  \gamma  ( \eta  u' - \vect{beta} u ))' = f $
-## @end tex 
-## @end iftex 
-## @ifinfo
-## - (@var{alpha} * @var{gamma} (@var{eta} u' - @var{beta} u ))' = f
-## @end ifinfo
-## @ifhtml
-## - (@var{alpha} * @var{gamma} (@var{eta} u' - @var{beta} u ))' = f
-## @end ifhtml
+## - div (@var{alpha} * @var{gamma} (@var{eta} grad (u) - @var{beta} u)) = f
 ##
 ## where @var{alpha} is an element-wise constant scalar function,
 ## @var{eta} and @var{gamma} are piecewise linear conforming scalar
@@ -53,8 +43,7 @@
 ## If @var{phi} is a single scalar value @var{beta} is assumed to be 0
 ## in the whole domain. 
 ##
-## @seealso{bim1a_rhs, bim1a_reaction, bim1a_laplacian,
-## bim2a_advection_diffusion} 
+## @seealso{bim1a_rhs, bim1a_reaction, bim1a_laplacian, bim2a_advection_diffusion} 
 ## @end deftypefn
 
 function A = bim1a_advection_diffusion (x,alpha,gamma,eta,beta)
--- a/extra/bim/inst/bim1a_advection_upwind.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim1a_advection_upwind.m	Sun Oct 21 14:06:08 2012 +0000
@@ -28,17 +28,7 @@
 ## 
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ (\vect{beta} u)' = f $
-## @end tex 
-## @end iftex 
-## @ifinfo
 ##  (@var{beta} u)' = f
-## @end ifinfo
-## @ifhtml
-## (@var{beta} u ))' = f
-## @end ifhtml
 ##
 ## where @var{beta} is an element-wise constant.
 ##
@@ -49,8 +39,7 @@
 ## If @var{phi} is a single scalar value @var{beta} is assumed to be 0
 ## in the whole domain. 
 ##
-## @seealso{bim1a_rhs, bim1a_reaction, bim1a_laplacian,
-## bim2a_advection_diffusion} 
+## @seealso{bim1a_rhs, bim1a_reaction, bim1a_laplacian, bim2a_advection_diffusion} 
 ## @end deftypefn
 
 function A = bim1a_advection_upwind (x, beta)
--- a/extra/bim/inst/bim1a_laplacian.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim1a_laplacian.m	Sun Oct 21 14:06:08 2012 +0000
@@ -29,17 +29,7 @@
 ##
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ -( \varepsilon  \kappa  ( u' ))' = f $
-## @end tex 
-## @end iftex 
-## @ifinfo
 ## - (@var{epsilon} * @var{kappa} ( u' ))' = f
-## @end ifinfo
-## @ifhtml
-## - (@var{epsilon} * @var{kappa} ( u' ))' = f
-## @end ifhtml
 ## 
 ## where @var{epsilon} is an element-wise constant scalar function,
 ## while @var{kappa} is a piecewise linear conforming scalar function.
--- a/extra/bim/inst/bim1a_reaction.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim1a_reaction.m	Sun Oct 21 14:06:08 2012 +0000
@@ -28,17 +28,7 @@
 ##
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ \delta \zeta u = f $
-## @end tex 
-## @end iftex 
-## @ifinfo
 ## @var{delta} * @var{zeta} * u = f
-## @end ifinfo
-## @ifhtml
-## @var{delta} * @var{zeta} * u = f
-## @end ifhtml
 ## 
 ## where @var{delta} is an element-wise constant scalar function, while
 ## @var{zeta} is a piecewise linear conforming scalar function.
--- a/extra/bim/inst/bim1a_rhs.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim1a_rhs.m	Sun Oct 21 14:06:08 2012 +0000
@@ -28,17 +28,7 @@
 ##
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ \delta u = f g$
-## @end tex 
-## @end iftex 
-## @ifinfo
 ## @var{delta} * u = f * g
-## @end ifinfo
-## @ifhtml
-## @var{delta} * u = f * g
-## @end ifhtml
 ## 
 ## where @var{f} is an element-wise constant scalar function, while
 ## @var{g} is a piecewise linear conforming scalar function.
--- a/extra/bim/inst/bim2a_advection_diffusion.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim2a_advection_diffusion.m	Sun Oct 21 14:06:08 2012 +0000
@@ -30,17 +30,7 @@
 ## 
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ - ( \alpha  \gamma  ( \eta  u' - \vect{beta} u ))' = f $
-## @end tex 
-## @end iftex 
-## @ifinfo
-## - (@var{alpha} * @var{gamma} (@var{eta} u' - @var{beta} u ))' = f
-## @end ifinfo
-## @ifhtml
-## - (@var{alpha} * @var{gamma} (@var{eta} u' - @var{beta} u ))' = f
-## @end ifhtml
+## - div (@var{alpha} * @var{gamma} (@var{eta} grad (u) - @var{beta} u )) = f
 ##
 ## where @var{alpha} is an element-wise constant scalar function,
 ## @var{eta} and @var{gamma} are piecewise linear conforming scalar
--- a/extra/bim/inst/bim2a_advection_upwind.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim2a_advection_upwind.m	Sun Oct 21 14:06:08 2012 +0000
@@ -29,17 +29,7 @@
 ## 
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ (\vect{beta} u )' = f $
-## @end tex 
-## @end iftex 
-## @ifinfo
-## (@var{beta} u )' = f
-## @end ifinfo
-## @ifhtml
-## (@var{beta} u )' = f
-## @end ifhtml
+## div (@var{beta} u) = f
 ##
 ## where @var{beta} is an element-wise constant vector function.
 ##
--- a/extra/bim/inst/bim2a_laplacian.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim2a_laplacian.m	Sun Oct 21 14:06:08 2012 +0000
@@ -29,23 +29,12 @@
 ##
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ -( \varepsilon  \kappa  ( u' ))' = f $
-## @end tex 
-## @end iftex 
-## @ifinfo
-## - (@var{epsilon} * @var{kappa} ( u' ))' = f
-## @end ifinfo
-## @ifhtml
-## - (@var{epsilon} * @var{kappa} ( u' ))' = f
-## @end ifhtml
+## - div (@var{epsilon} * @var{kappa} grad (u)) = f
 ## 
 ## where @var{epsilon} is an element-wise constant scalar function,
 ## while @var{kappa} is a piecewise linear conforming scalar function.
 ##
-## @seealso{bim2a_rhs, bim2a_reaction, bim2a_advection_diffusion,
-## bim1a_laplacian, bim3a_laplacian}
+## @seealso{bim2a_rhs, bim2a_reaction, bim2a_advection_diffusion, bim1a_laplacian, bim3a_laplacian}
 ## @end deftypefn
 
 function [A] = bim2a_laplacian(mesh,epsilon,kappa)
--- a/extra/bim/inst/bim2a_reaction.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim2a_reaction.m	Sun Oct 21 14:06:08 2012 +0000
@@ -28,17 +28,7 @@
 ##
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ \delta \zeta u = f $
-## @end tex 
-## @end iftex 
-## @ifinfo
 ## @var{delta} * @var{zeta} * u = f
-## @end ifinfo
-## @ifhtml
-## @var{delta} * @var{zeta} * u = f
-## @end ifhtml
 ## 
 ## where @var{delta} is an element-wise constant scalar function, while
 ## @var{zeta} is a piecewise linear conforming scalar function.
--- a/extra/bim/inst/bim2a_rhs.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim2a_rhs.m	Sun Oct 21 14:06:08 2012 +0000
@@ -28,17 +28,7 @@
 ##
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ \delta u = f g$
-## @end tex 
-## @end iftex 
-## @ifinfo
 ## @var{delta} * u = f * g
-## @end ifinfo
-## @ifhtml
-## @var{delta} * u = f * g
-## @end ifhtml
 ## 
 ## where @var{f} is an element-wise constant scalar function, while
 ## @var{g} is a piecewise linear conforming scalar function.
--- a/extra/bim/inst/bim2c_global_flux.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim2c_global_flux.m	Sun Oct 21 14:06:08 2012 +0000
@@ -28,17 +28,7 @@
 ##
 ## The vector field is defined as:
 ##
-## @iftex 
-## @tex
-## $ \vect{J}(u) = \alpha \gamma (\eta\vect{\nabla}u-\vect{beta}u) $
-## @end tex 
-## @end iftex 
-## @ifinfo
 ## J(@var{u}) = @var{alpha}* @var{gamma} * (@var{eta} * grad @var{u} - @var{beta} * @var{u}))
-## @end ifinfo
-## @ifhtml
-## J(@var{u}) = @var{alpha}* @var{gamma} * (@var{eta} * grad @var{u} - @var{beta} * @var{u}))
-## @end ifhtml
 ## 
 ## where @var{alpha} is an element-wise constant scalar function,
 ## @var{eta} and @var{gamma} are piecewise linear conforming scalar
--- a/extra/bim/inst/bim3a_advection_diffusion.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim3a_advection_diffusion.m	Sun Oct 21 14:06:08 2012 +0000
@@ -29,17 +29,7 @@
 ## 
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ - ( \alpha ( u' - \nabla v u ))' = f $
-## @end tex 
-## @end iftex 
-## @ifinfo
-## - (@var{alpha} ( u' - @var{v}' u ))' = f
-## @end ifinfo
-## @ifhtml
-## - (@var{alpha} ( u' - @var{v}' u ))' = f
-## @end ifhtml
+## - div (@var{alpha} ( grad (u) - grad (@var{v}) u)) = f
 ##
 ## where @var{v} is a piecewise linear continuous scalar
 ## functions and @var{alpha} is a piecewise constant scalar function.
--- a/extra/bim/inst/bim3a_laplacian.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim3a_laplacian.m	Sun Oct 21 14:06:08 2012 +0000
@@ -28,17 +28,7 @@
 ##
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ -( \varepsilon  \kappa  ( u' ))' = f $
-## @end tex 
-## @end iftex 
-## @ifinfo
 ## - (@var{epsilon} * @var{kappa} ( u' ))' = f
-## @end ifinfo
-## @ifhtml
-## - (@var{epsilon} * @var{kappa} ( u' ))' = f
-## @end ifhtml
 ## 
 ## where @var{epsilon} is an element-wise constant scalar function,
 ## while @var{kappa} is a piecewise linear conforming scalar function.
--- a/extra/bim/inst/bim3a_osc_advection_diffusion.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim3a_osc_advection_diffusion.m	Sun Oct 21 14:06:08 2012 +0000
@@ -31,17 +31,7 @@
 ##
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ - ( \alpha ( u' - \nabla v u ))' = f $
-## @end tex 
-## @end iftex 
-## @ifinfo
-## - (@var{alpha} ( u' - @var{v}' u ))' = f
-## @end ifinfo
-## @ifhtml
-## - (@var{alpha} ( u' - @var{v}' u ))' = f
-## @end ifhtml
+## - div (@var{alpha} ( grad (u) - grad (@var{v}) u)) = f
 ##
 ## where @var{v} is a piecewise linear continuous scalar
 ## functions and @var{alpha} is a piecewise constant scalar function.
@@ -179,7 +169,6 @@
 %! M = bim3a_osc_advection_diffusion (msh, 1, z);
 %! assert (norm (sum (M, 1), inf), 0, eps * 100)
 
-%!shared msh, Mosc, Mgal
 %!demo
 %! gmsh_input = [["Point(1) = {0, 0, 0, .1};      \n"], ...
 %! ["Point(2) = {1, 0, 0, .1};                    \n"], ...
@@ -221,7 +210,7 @@
 %! [fid, msg] = fopen (strcat (fname, ".geo"), "w");
 %! if (fid < 0); error (msg); endif
 %! fputs (fid, gmsh_input);
-%! fclose (fid);
+%! fclose (fid); 
 %! msh = bim3c_mesh_properties (msh3m_gmsh ("tubo", "clscale", ".25"));
 %! x = msh.p (1, :).';
 %! u = x;
@@ -237,11 +226,56 @@
 %! printf ("saving results to %s \n", strcat (fname_out, ".vtu"));
 %! fpl_vtk_raw_write_field (fname_out, msh, {uosc, "u_osc"; ugal, "u_galerkin"}, {});
 %! unlink (fname);
+
 %!demo
+%! gmsh_input = [["Point(1) = {0, 0, 0, .1};      \n"], ...
+%! ["Point(2) = {1, 0, 0, .1};                    \n"], ...
+%! ["Point(3) = {0, -.3, 0, .1};                  \n"], ...
+%! ["Point(4) = {0, +.3, 0, .1};                  \n"], ...
+%! ["Point(5) = {1, -.3, 0, .1};                  \n"], ...
+%! ["Point(6) = {1, 0.3, 0, .1};                  \n"], ...
+%! ["Point(7) = {0, 0, -.3, .1};                  \n"], ...
+%! ["Point(8) = {0, 0, +.3, .1};                  \n"], ...
+%! ["Point(9) = {1, 0, -.3, .1};                  \n"], ...
+%! ["Point(10) = {1, 0, 0.3, .1};                 \n"], ...
+%! ["Circle(1) = {4, 1, 7};                       \n"], ...
+%! ["Circle(2) = {7, 1, 3};                       \n"], ...
+%! ["Circle(3) = {3, 1, 8};                       \n"], ...
+%! ["Circle(4) = {8, 1, 4};                       \n"], ...
+%! ["Circle(5) = {6, 2, 9};                       \n"], ...
+%! ["Circle(6) = {9, 2, 5};                       \n"], ...
+%! ["Circle(7) = {5, 2, 10};                      \n"], ...
+%! ["Circle(8) = {10, 2, 6};                      \n"], ...
+%! ["Line(9) = {4, 6};                            \n"], ...
+%! ["Line(10) = {3, 5};                           \n"], ...
+%! ["Line(11) = {8, 10};                          \n"], ...
+%! ["Line(12) = {7, 9};                           \n"], ...
+%! ["Line Loop(13) = {4, 1, 2, 3};                \n"], ...
+%! ["Plane Surface(14) = {13};                    \n"], ...
+%! ["Line Loop(15) = {5, 6, 7, 8};                \n"], ...
+%! ["Plane Surface(16) = {15};                    \n"], ...
+%! ["Line Loop(17) = {9, -8, -11, 4};             \n"], ...
+%! ["Ruled Surface(18) = {17};                    \n"], ...
+%! ["Line Loop(19) = {12, -5, -9, 1};             \n"], ...
+%! ["Ruled Surface(20) = {19};                    \n"], ...
+%! ["Line Loop(21) = {12, 6, -10, -2};            \n"], ...
+%! ["Ruled Surface(22) = {21};                    \n"], ...
+%! ["Line Loop(23) = {11, -7, -10, 3};            \n"], ...
+%! ["Ruled Surface(24) = {23};                    \n"], ...
+%! ["Surface Loop(25) = {18, 20, 22, 16, 24, 14}; \n"], ...
+%! ["Volume(26) = {25};                           \n"]];
+%! fname = tmpnam ();
+%! [fid, msg] = fopen (strcat (fname, ".geo"), "w");
+%! if (fid < 0); error (msg); endif
+%! fputs (fid, gmsh_input);
+%! fclose (fid); 
+%! msh = bim3c_mesh_properties (msh3m_gmsh ("tubo", "clscale", ".25"));
 %! x = msh.p (1, :).';
 %! u = x;
 %! bnd = bim3c_unknowns_on_faces (msh, [14, 16]);
 %! int = setdiff (1:columns (msh.p), bnd);
+%! Mosc = bim3a_osc_advection_diffusion (msh, 1, msh.p(1,:)'*0);
+%! Mgal = bim3a_advection_diffusion (msh, 1, msh.p(1,:)'*0);
 %! f = bim3a_rhs (msh, 10, 1);
 %! u(int) = Mosc(int, int) \ (f(int) - Mosc(int, bnd) * u(bnd));
 %! uosc = u;
--- a/extra/bim/inst/bim3a_osc_laplacian.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim3a_osc_laplacian.m	Sun Oct 21 14:06:08 2012 +0000
@@ -30,17 +30,7 @@
 ##
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ -( \varepsilon  \kappa  ( u' ))' = f $
-## @end tex 
-## @end iftex 
-## @ifinfo
-## - (@var{epsilon} ( u' ))' = f
-## @end ifinfo
-## @ifhtml
-## - (@var{epsilon} ( u' ))' = f
-## @end ifhtml
+## - div (@var{epsilon} grad (u)) = f
 ## 
 ## where @var{epsilon} is an element-wise constant scalar function,
 ## while @var{kappa} is a piecewise linear conforming scalar function.
--- a/extra/bim/inst/bim3a_reaction.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim3a_reaction.m	Sun Oct 21 14:06:08 2012 +0000
@@ -28,17 +28,7 @@
 ##
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ \delta \zeta u = f $
-## @end tex 
-## @end iftex 
-## @ifinfo
 ## @var{delta} * @var{zeta} * u = f
-## @end ifinfo
-## @ifhtml
-## @var{delta} * @var{zeta} * u = f
-## @end ifhtml
 ## 
 ## where @var{delta} is an element-wise constant scalar function, while
 ## @var{zeta} is a piecewise linear conforming scalar function.
--- a/extra/bim/inst/bim3a_rhs.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim3a_rhs.m	Sun Oct 21 14:06:08 2012 +0000
@@ -28,17 +28,7 @@
 ##
 ## The equation taken into account is:
 ##
-## @iftex 
-## @tex
-## $ \delta u = f g$
-## @end tex 
-## @end iftex 
-## @ifinfo
-## @var{delta} * u = f * g
-## @end ifinfo
-## @ifhtml
-## @var{delta} * u = f * g
-## @end ifhtml
+## @var{delta} * u =  @var{f} * @var{g}
 ## 
 ## where @var{f} is an element-wise constant scalar function, while
 ## @var{g} is a piecewise linear conforming scalar function.
--- a/extra/bim/inst/bim3c_global_flux.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim3c_global_flux.m	Sun Oct 21 14:06:08 2012 +0000
@@ -1,4 +1,4 @@
-## Copyright (C) 2010  Carlo de Falco
+## Copyright (C) 2012  Carlo de Falco
 ##
 ## This file is part of:
 ##     BIM - Diffusion Advection Reaction PDE Solver
@@ -29,17 +29,7 @@
 ##
 ## The vector field is defined as:
 ##
-## @iftex 
-## @tex
-## $F = - \alpha ( u' - \nabla v u )  $
-## @end tex 
-## @end iftex 
-## @ifinfo
-## F =- @var{alpha} ( u' - @var{v}' u ) 
-## @end ifinfo
-## @ifhtml
-## F =- @var{alpha} ( u' - @var{v}' u )
-## @end ifhtml
+## F =- @var{alpha} ( grad (u) - gard (@var{v}) u ) 
 ##
 ## where @var{v} is a piecewise linear continuous scalar
 ## functions and @var{alpha} is a piecewise constant scalar function.
--- a/extra/bim/inst/bim3c_tri_to_nodes.m	Sun Oct 21 13:03:06 2012 +0000
+++ b/extra/bim/inst/bim3c_tri_to_nodes.m	Sun Oct 21 14:06:08 2012 +0000
@@ -32,7 +32,7 @@
 ## Author: Carlo de Falco <carlo@guglielmo.local>
 ## Created: 2011-03-07
 
-function [u_nod, m_tri] = bim2c_tri_to_nodes (m, u_tri)
+function [u_nod, m_tri] = bim3c_tri_to_nodes (m, u_tri)
 
   if (nargout >1)
     if (isstruct (m))