changeset 184:66071811eef8

Improve the documentation for the pkg releae.
author gedeone-octave <marcovass89@hotmail.it>
date Sat, 09 Nov 2013 10:44:51 +0000
parents 536ee96a8cd0
children 0e6d1d79244a
files inst/BilinearForm.m inst/FunctionSpace.m inst/Functional.m inst/JacobianForm.m inst/LinearForm.m inst/ResidualForm.m inst/import_ufl_Problem.m src/DirichletBC.cc src/SubSpace.cc src/assemble.cc src/assemble_system.cc src/feval.cc src/plot_func.cc src/plot_mesh.cc src/save.cc
diffstat 15 files changed, 142 insertions(+), 73 deletions(-) [+]
line wrap: on
line diff
--- a/inst/BilinearForm.m	Fri Nov 08 00:35:55 2013 +0000
+++ b/inst/BilinearForm.m	Sat Nov 09 10:44:51 2013 +0000
@@ -14,11 +14,24 @@
 ## this program; if not, see <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {[@var{a}]} = BilinearForm (name, U, V, [coefficients])
-## This function takes as input the name of the problem that you want to solve 
-## and the FunctionSpace where it is defined and return a Form defined with
-## the coefficients passed as optional argument.
-## @seealso{FunctionSpace, BilinearForm, ResidualForm}
+## @deftypefn {Function File} {[@var{a}]} = @
+## BilinearForm (@var{my_problem}, @var{U}, @var{V}, @var{coefficient_1}, @
+## @var{coefficient_2},...)
+##
+## Construct a BilinearForm previously imported from ufl.
+##
+## The compulsory arguments are:
+## @itemize @bullet
+## @item @var{my_problem} the name of the problem to solve.
+## @item the FunctionSpace @var{U} and @var{V} where the problem is defined.
+## @enditemize
+##
+## The optional arguments are the @var{coefficient_1}, @var{coefficient_2} 
+## which specify the parameters for the BilinearForm as stated in the ufl file.
+## They can be either a Constant, a Function or an Expression.
+##
+## @seealso{@import_ufl_BilinearForm, @import_ufl_Problem, FunctionSpace, 
+## LinearForm, ResidualForm}
 ## @end deftypefn
 function a = BilinearForm (name, U, V, varargin)
 
--- a/inst/FunctionSpace.m	Fri Nov 08 00:35:55 2013 +0000
+++ b/inst/FunctionSpace.m	Sat Nov 09 10:44:51 2013 +0000
@@ -16,13 +16,12 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {@var{V}} = @
-## FunctionSpace (@var{myproblem}, 
-## @var{mesh})
+## FunctionSpace (@var{myproblem}, @var{mesh})
 ##
 ## Generate a FunctionSpace on a specific mesh.
 ##
-## This function takes as input the name @var{myproblem}of the ufl file where 
-## the FunctionSpace is defined and the mesh @var{mesh} where it has to be 
+## This function takes as input the name @var{myproblem} of the ufl file where 
+## the FunctionSpace is defined and the @var{mesh} where it has to be 
 ## created.
 ##
 ## @seealso{FunctionSpace, SubSpace, import_ufl_FunctionSpace} 
--- a/inst/Functional.m	Fri Nov 08 00:35:55 2013 +0000
+++ b/inst/Functional.m	Sat Nov 09 10:44:51 2013 +0000
@@ -14,11 +14,24 @@
 ## this program; if not, see <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {V} = ResidualForm (name, V, [coefficients])
-## This function takes as input the name of the problem that you want to solve 
-## and the FunctionSpace where it is defined and return a Form defined with
-## the coefficients passed as optional argument.
-## @seealso{FunctionSpace, BilinearForm, ResidualForm}
+## @deftypefn {Function File} {[@var{L}]} = @
+## Functional (@var{my_problem}, @var{U}, @var{coefficient_1}, @
+## @var{coefficient_2},...)
+##
+## Construct a Functional previously imported from a ufl file.
+##
+## The compulsory arguments are:
+## @itemize @bullet
+## @item @var{my_problem} the name of the problem to solve.
+## @item the FunctionSpace @var{U} where the problem is defined.
+## @enditemize
+##
+## The optional arguments are the @var{coefficient_1}, @var{coefficient_2} 
+## which specify the parameters for the Functional with the same name which
+## was used in the ufl file.
+## They can be either a Constant, a Function or an Expression.
+##
+## @seealso{import_ufl_Functional, LinearForm, ResidualForm, BilinearForm}
 ## @end deftypefn
 
 function a = Functional (name, V, varargin)
--- a/inst/JacobianForm.m	Fri Nov 08 00:35:55 2013 +0000
+++ b/inst/JacobianForm.m	Sat Nov 09 10:44:51 2013 +0000
@@ -14,14 +14,28 @@
 ## this program; if not, see <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {V} = JacobianForm (name, U, V, [coefficients])
-## This function takes as input the name of the problem that you want to solve 
-## and the FunctionSpace where it is defined and return a Form defined with
-## the coefficients passed as optional argument.
-## @seealso{FunctionSpace, BilinearForm, ResidualForm}
+## @deftypefn {Function File} {[@var{J}]} = @
+## Functional (@var{my_problem}, @var{U}, @var{V}, @var{coefficient_1}, @
+## @var{coefficient_2},...)
+##
+## Construct a JacobianForm previously imported from a ufl file with the 
+## function import_ufl_BilinearForm.
+##
+## The compulsory arguments are:
+## @itemize @bullet
+## @item @var{my_problem} the name of the problem to solve.
+## @item the FunctionSpace @var{U} and @var{V} where the problem is defined.
+## @enditemize
+##
+## The optional arguments are the @var{coefficient_1}, @var{coefficient_2} 
+## which specify the parameters for the JacobianForm with the same name which
+## was used in the ufl file.
+## They can be either a Constant, a Function or an Expression.
+##
+## @seealso{import_ufl_BilinearForm, LinearForm, ResidualForm, BilinearForm}
 ## @end deftypefn
 
-function a = JacobianForm (name, V, varargin)
+function a = JacobianForm (name, U, V, varargin)
 
   if nargin < 2
     error ("JacobianForm: wrong number of input parameters.");
@@ -29,7 +43,7 @@
     error ("JacobianForm: first argument is not a valid string");
   endif
 
-  program = sprintf ("%s_BilinearForm(V, V", name);
+  program = sprintf ("%s_BilinearForm(U, V", name);
    for k = 1:length (varargin)
       eval(['f_' num2str(k) '=varargin{k};']);
       program = strjoin ({ program, strcat('f_',num2str(k))}, ',');
--- a/inst/LinearForm.m	Fri Nov 08 00:35:55 2013 +0000
+++ b/inst/LinearForm.m	Sat Nov 09 10:44:51 2013 +0000
@@ -14,11 +14,25 @@
 ## this program; if not, see <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {V} = ResidualForm (name, V, [coefficients])
-## This function takes as input the name of the problem that you want to solve 
-## and the FunctionSpace where it is defined and return a Form defined with
-## the coefficients passed as optional argument.
-## @seealso{FunctionSpace, BilinearForm, ResidualForm}
+## @deftypefn {Function File} {[@var{L}]} = @
+## LinearForm (@var{my_problem}, @var{U}, @var{coefficient_1}, @
+## @var{coefficient_2},...)
+##
+## Construct a Functional previously imported from a ufl file.
+##
+## The compulsory arguments are:
+## @itemize @bullet
+## @item @var{my_problem} the name of the problem to solve.
+## @item the FunctionSpace @var{U} where the problem is defined.
+## @enditemize
+##
+## The optional arguments are the @var{coefficient_1}, @var{coefficient_2} 
+## which specify the parameters for the LinearForm with the same name which
+## was used in the ufl file.
+## They can be either a Constant, a Function or an Expression.
+##
+## @seealso{import_ufl_LinearForm, import_ufl_Problem, BilinearForm, 
+## ResidualForm, BilinearForm}
 ## @end deftypefn
 
 function a = LinearForm (name, V, varargin)
--- a/inst/ResidualForm.m	Fri Nov 08 00:35:55 2013 +0000
+++ b/inst/ResidualForm.m	Sat Nov 09 10:44:51 2013 +0000
@@ -15,11 +15,26 @@
 
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {V} = ResidualForm (name, V, [coefficients])
-## This function takes as input the name of the problem that you want to solve 
-## and the FunctionSpace where it is defined and return a Form defined with
-## the coefficients passed as optional argument.
-## @seealso{FunctionSpace, BilinearForm, ResidualForm}
+## @deftypefn {Function File} {[@var{L}]} = @
+## LinearForm (@var{my_problem}, @var{U}, @var{coefficient_1}, @
+## @var{coefficient_2},...)
+##
+## Construct a ResidualForm previously imported from a ufl file with the 
+## function import_ufl_LinearForm.
+##
+## The compulsory arguments are:
+## @itemize @bullet
+## @item @var{my_problem} the name of the problem to solve.
+## @item the FunctionSpace @var{U} where the problem is defined.
+## @enditemize
+##
+## The optional arguments are the @var{coefficient_1}, @var{coefficient_2} 
+## which specify the parameters for the ResidualForm with the same name which
+## was used in the ufl file.
+## They can be either a Constant, a Function or an Expression.
+##
+## @seealso{import_ufl_LinearForm, import_ufl_Problem, BilinearForm, 
+## ResidualForm, BilinearForm}
 ## @end deftypefn
 
 function a = ResidualForm (name, V, varargin)
--- a/inst/import_ufl_Problem.m	Fri Nov 08 00:35:55 2013 +0000
+++ b/inst/import_ufl_Problem.m	Sat Nov 09 10:44:51 2013 +0000
@@ -20,8 +20,8 @@
 ## @var{myproblem} is the name of the ufl file where 
 ## the BilinearForm, the LinearForm and the FunctionSpace are defined.
 ##
-## @seealso{import_ufl_Problem, FunctionSpace, BilinearForm, LinearForm, 
-## Functional} 
+## @seealso{import_ufl_BilinearForm, FunctionSpace, BilinearForm, LinearForm, 
+## Functional}
 ## @end deftypefn
 
 function import_ufl_Problem (var_prob)
--- a/src/DirichletBC.cc	Fri Nov 08 00:35:55 2013 +0000
+++ b/src/DirichletBC.cc	Sat Nov 09 10:44:51 2013 +0000
@@ -32,8 +32,8 @@
 @item @var{Function_handle} is a function handle which contains the expression \
 that we want to apply as a BC. If we have a Vector field, we can just use a\n\
 vector of function handles: \
-@var{Function handle} = [''@''(x, y) f1, ''@''(x, y) f2, ...]\n\
-@item @var{Boundary} is an Array which contains the label(s) of the \
+@var{Function handle} = [@(x, y) f1, @(x, y) f2, ...]\n\
+@item @var{Boundary_Label} is an Array which contains the label(s) of the \
 side(s) where the BC has to be applied.\n\
 @end itemize\n\
 The output @var{bc} is an object which contains the boundary conditions\n\
--- a/src/SubSpace.cc	Fri Nov 08 00:35:55 2013 +0000
+++ b/src/SubSpace.cc	Sat Nov 09 10:44:51 2013 +0000
@@ -18,15 +18,15 @@
 
 DEFUN_DLD (SubSpace, args, , "-*- texinfo -*-\n\
 @deftypefn {Function File} {[@var{V1}]} = \
-SubSpace (@var{Space V}, @var{index}) \n\
+SubSpace (@var{V}, @var{index}) \n\
 Extract a SubSpace from an object of type FunctionSpace. \n\
 The input arguments are\n\
 @itemize @bullet\n\
-@item @var{Space V} which is a FunctionalSpace\n\
+@item @var{V} which is a FunctionalSpace\n\
 @item @var{index} is a positive integer number which represents the SubSpace \
 which has to be extracted.\n\
 @end itemize \n\
-The output @var{V0} is the SubSpace needed.\n\
+The output @var{V1} is the SubSpace needed.\n\
 @seealso{FunctionSpace}\n\
 @end deftypefn")
 {
--- a/src/assemble.cc	Fri Nov 08 00:35:55 2013 +0000
+++ b/src/assemble.cc	Sat Nov 09 10:44:51 2013 +0000
@@ -21,26 +21,28 @@
 DEFUN_DLD (assemble, args, nargout, 
 "-*- texinfo -*-\n\
 @deftypefn {Function File} {[@var{A}], [@var{x}(Optional)]} = \
-assemble (@var{form a}, @var{DirichletBC}(Optional), @var{...}) \n\
+assemble (@var{form_a}, @var{DirichletBC}) \n\
+Construct the discretization of a Form and apply essential BC.\n\
 The input arguments are\n\
 @itemize @bullet\n\
-@item @var{form a} which is the form to assemble. \n\
-It can be a form of rank 2 (bilinear), a form of rank 1 (linear) or a form\n\
-of rank 0 (functional).\n\
-@item @var{DirichletBC} represents the optional BC that you wish to apply to\n\
-the system. If more than one BC has to be applied, just list them.\n\
+@item @var{form_a} which is the form to assemble.\n\
+It can be a form of rank 2 (BilinearForm or JacobianForm), \
+a form of rank 1 (LinearForm or ResidualForm) or a form \
+of rank 0 (Functional).\n\
+@item @var{DirichletBC} represents the optional BC applied to \
+the system. \n\
 @end itemize \n\
-The output @var{A} is a discretized representation of the @var{form a}:\n\
+The output @var{A} is a discretized representation of the @var{form_a}:\n\
 @itemize @bullet\n\
-@item @var{A} is a sparse Matrix if @var{form a} is a bilinear form\n\
-@item @var{A} is a Vector if @var{form a} is a linear form\n\
-@item @var{A} is a Double if @var{form a} is a functional\n\
+@item @var{A} is a sparse Matrix if @var{form_a} is a bilinear form\n\
+@item @var{A} is a Vector if @var{form_a} is a linear form\n\
+@item @var{A} is a Double if @var{form_a} is a functional\n\
 @end itemize \n\
-If you need to apply boundary condition to a vector for a nonlinear problem \n\
-then you should provide as 2nd argument the vector and you will receive it back\n\
-as the second output argument. For an example of this situation, you can look\n\
-at the example HyperElasticity.m\n\
-@seealso{BilinearForm, LinearForm, ResidualForm, JacobianForm}\n\
+If boundary condition has to be applied to a vector for a nonlinear problem \
+then it should be provide as 2nd argument and it will be given back \
+as the second output argument. For an example of this situation, please refer \
+to the HyperElasticity example. \n\
+@seealso{BilinearForm, LinearForm, ResidualForm, JacobianForm, Functional}\n\
 @end deftypefn")
 {
   int nargin = args.length ();
--- a/src/assemble_system.cc	Fri Nov 08 00:35:55 2013 +0000
+++ b/src/assemble_system.cc	Sat Nov 09 10:44:51 2013 +0000
@@ -21,25 +21,22 @@
 DEFUN_DLD (assemble_system, args, nargout,
 "-*- texinfo -*-\n\
 @deftypefn {Function File} {[@var{A}], [@var{b}], [@var{x}(Optional)]} = \
-assemble_system (@var{form a}, @var{form L}, @var{DirichletBC}(Optional), \
-                 @var{...}) \n\
+assemble_system (@var{form_a}, @var{form_L}, @var{DirichletBC})\n\
+Construct the discretization of a system and apply essential BC.\n\
 The input arguments are\n\
 @itemize @bullet\n\
-@item @var{form a} the bilinear form to assemble.\n\
-@item @var{form a} the linear form to assemble.\n\
-@item @var{DirichletBC} represents the optional BC that you wish to apply to\n\
-the system. If more than one BC has to be applied, just list them.\n\
+@item @var{form_a} which is the BilinearForm to assemble.\n\
+@item @var{form_L} which is the LinearForm to assemble.\n\
+@item @var{DirichletBC} represents the optional BC applied to \
+the system. \n\
 @end itemize \n\
-The output @var{A} is a discretized representation of the system:\n\
-@itemize @bullet\n\
-@item @var{A} is the sparse Matrix corresponding to the @var{form a}\n\
-@item @var{A} is the Vector corresponding to the @var{form L}\n\
-@end itemize \n\
-If you need to apply boundary condition to a system for a nonlinear problem \n\
-then you should provide as 3rd argument the vector and you will receive it \n\
-back as the third output argument.\n\
-For an example of this situation, you can look the example HyperElasticity.m\n\
-@seealso{BilinearForm, LinearForm, ResidualForm, JacobianForm}\n\
+The output @var{A} is a matrix representing the @var{form_a} while \
+@var{b} represents @var{form_L}. \n\
+If boundary conditions have to be applied to a vector for a nonlinear problem \
+then it should be provide as 3rd argument and it will be given back \
+as the 3rd output argument. For an example of this situation, please refer \
+to the HyperElasticity example. \n\
+@seealso{BilinearForm, LinearForm, ResidualForm, JacobianForm, Functional}\n\
 @end deftypefn")
 {
   int nargin = args.length ();
--- a/src/feval.cc	Fri Nov 08 00:35:55 2013 +0000
+++ b/src/feval.cc	Sat Nov 09 10:44:51 2013 +0000
@@ -20,8 +20,9 @@
 DEFUN_DLD (feval, args, , "-*- texinfo -*-\n\
 @deftypefn {Function File} {[@var{value}]} = \
 feval (@var{function_name}, @var{Coordinate})\n\
+Evaluate a function at a specific point of the domain and return the value. \n\
 The input parameters are the function and the point where it has to\
-be evaluated\n\
+be evaluated.\n\
 @seealso{Function}\n\
 @end deftypefn")
 {
--- a/src/plot_func.cc	Fri Nov 08 00:35:55 2013 +0000
+++ b/src/plot_func.cc	Sat Nov 09 10:44:51 2013 +0000
@@ -20,8 +20,7 @@
 DEFUN_DLD (plot, args, , "-*- texinfo -*-\n\
 @deftypefn {Function File} \
 plot (@var{Function})\n\
-The input parameter is the object that you want to plot\n\
-It can be either a Function or a Mesh \n\
+Plot a Function. \n\
 @seealso{Function, Save}\n\
 @end deftypefn")
 {
--- a/src/plot_mesh.cc	Fri Nov 08 00:35:55 2013 +0000
+++ b/src/plot_mesh.cc	Sat Nov 09 10:44:51 2013 +0000
@@ -23,7 +23,8 @@
 DEFUN_DLD (plot, args, , "-*- texinfo -*-\n\
 @deftypefn {Function File} \
 plot (@var{Mesh}, @var{Nodal_Values}(OPTIONAL))\n\
-The input parameter is the mesh and optionally also a vector representing\
+Plot a Mesh. \n\
+The input parameter is the Mesh and optionally also a vector representing \
 the values of a function at each node.\n\
 @seealso{Mesh, save}\n\
 @end deftypefn")
--- a/src/save.cc	Fri Nov 08 00:35:55 2013 +0000
+++ b/src/save.cc	Sat Nov 09 10:44:51 2013 +0000
@@ -19,6 +19,7 @@
 DEFUN_DLD (save, args, , "-*- texinfo -*-\n\
 @deftypefn {Function File} \
 fem_save (@var{Function}, @var{Name})\n\
+Save a function in vtu format.\n\
 The input parameters are\n\
 @itemize @bullet \n\
 @item @var{Function} is the function that you want to save\n\