Mercurial > fem-fenics-eugenio
annotate inst/JacobianForm.m @ 270:f4d6ae912a08 default tip
Correct typos in the doc-strings
author | Eugenio Gianniti <eugenio.gianniti@mail.polimi.it> |
---|---|
date | Thu, 14 Aug 2014 17:55:32 +0200 |
parents | 63df40d0b4d4 |
children |
rev | line source |
---|---|
152
1dbe146bff03
Update license to gpl v3
gedeone-octave <marcovass89@hotmail.it>
parents:
148
diff
changeset
|
1 ## Copyright (C) 2013 Marco Vassallo <gedeone-octave@users.sourceforge.net> |
148
f2193e825ad7
Maint: update copyright notice
gedeone-octave <marcovass89@hotmail.it>
parents:
137
diff
changeset
|
2 ## |
134
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
3 ## This program is free software; you can redistribute it and/or modify it under |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
4 ## the terms of the GNU General Public License as published by the Free Software |
152
1dbe146bff03
Update license to gpl v3
gedeone-octave <marcovass89@hotmail.it>
parents:
148
diff
changeset
|
5 ## Foundation; either version 3 of the License, or (at your option) any later |
134
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
6 ## version. |
148
f2193e825ad7
Maint: update copyright notice
gedeone-octave <marcovass89@hotmail.it>
parents:
137
diff
changeset
|
7 ## |
134
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
8 ## This program is distributed in the hope that it will be useful, but WITHOUT |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
9 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
10 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
11 ## details. |
148
f2193e825ad7
Maint: update copyright notice
gedeone-octave <marcovass89@hotmail.it>
parents:
137
diff
changeset
|
12 ## |
134
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
13 ## You should have received a copy of the GNU General Public License along with |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
14 ## this program; if not, see <http://www.gnu.org/licenses/>. |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
15 |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
16 ## -*- texinfo -*- |
184
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
17 ## @deftypefn {Function File} {[@var{J}]} = @ |
202
63df40d0b4d4
Fix the documentation.
gedeone-octave <marcovass89@hotmail.it>
parents:
185
diff
changeset
|
18 ## JacobianForm (@var{my_problem}, @var{U}, @var{V}, @var{coefficient_1}, @ |
184
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
19 ## @var{coefficient_2},...) |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
20 ## |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
21 ## Construct a JacobianForm previously imported from a ufl file with the |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
22 ## function import_ufl_BilinearForm. |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
23 ## |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
24 ## The compulsory arguments are: |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
25 ## @itemize @bullet |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
26 ## @item @var{my_problem} the name of the problem to solve. |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
27 ## @item the FunctionSpace @var{U} and @var{V} where the problem is defined. |
185
0e6d1d79244a
Fix error in the documentation.
gedeone-octave <marcovass89@hotmail.it>
parents:
184
diff
changeset
|
28 ## @end itemize |
184
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
29 ## |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
30 ## The optional arguments are the @var{coefficient_1}, @var{coefficient_2} |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
31 ## which specify the parameters for the JacobianForm with the same name which |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
32 ## was used in the ufl file. |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
33 ## They can be either a Constant, a Function or an Expression. |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
34 ## |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
35 ## @seealso{import_ufl_BilinearForm, LinearForm, ResidualForm, BilinearForm} |
134
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
36 ## @end deftypefn |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
37 |
184
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
38 function a = JacobianForm (name, U, V, varargin) |
134
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
39 |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
40 if nargin < 2 |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
41 error ("JacobianForm: wrong number of input parameters."); |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
42 elseif ! ischar (name) |
152
1dbe146bff03
Update license to gpl v3
gedeone-octave <marcovass89@hotmail.it>
parents:
148
diff
changeset
|
43 error ("JacobianForm: first argument is not a valid string"); |
134
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
44 endif |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
45 |
184
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
163
diff
changeset
|
46 program = sprintf ("%s_BilinearForm(U, V", name); |
134
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
47 for k = 1:length (varargin) |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
48 eval(['f_' num2str(k) '=varargin{k};']); |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
49 program = strjoin ({ program, strcat('f_',num2str(k))}, ','); |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
50 end |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
51 |
137
3a0f952a79ec
Avois useless output.
gedeone-octave <marcovass89@hotmail.it>
parents:
134
diff
changeset
|
52 program = strjoin ({program, ');'}); |
134
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
53 a = eval (program); |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
54 |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
55 endfunction |