Mercurial > fem-fenics-eugenio
annotate inst/LinearForm.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 | a61fc34334ca |
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 |
270
f4d6ae912a08
Correct typos in the doc-strings
Eugenio Gianniti <eugenio.gianniti@mail.polimi.it>
parents:
263
diff
changeset
|
16 |
134
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
17 ## -*- texinfo -*- |
184
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
diff
changeset
|
18 ## @deftypefn {Function File} {[@var{L}]} = @ |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
diff
changeset
|
19 ## LinearForm (@var{my_problem}, @var{U}, @var{coefficient_1}, @ |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
diff
changeset
|
20 ## @var{coefficient_2},...) |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
diff
changeset
|
21 ## |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
diff
changeset
|
22 ## Construct a Functional previously imported from a ufl file. |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
diff
changeset
|
23 ## |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
diff
changeset
|
24 ## The compulsory arguments are: |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
diff
changeset
|
25 ## @itemize @bullet |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
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:
152
diff
changeset
|
27 ## @item the FunctionSpace @var{U} 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:
152
diff
changeset
|
29 ## |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
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:
152
diff
changeset
|
31 ## which specify the parameters for the LinearForm with the same name which |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
diff
changeset
|
32 ## was used in the ufl file. |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
diff
changeset
|
33 ## They can be either a Constant, a Function or an Expression. |
263
a61fc34334ca
Use meshfunction to mark subdomains
Eugenio Gianniti <eugenio.gianniti@mail.polimi.it>
parents:
185
diff
changeset
|
34 ## You can also optionally provide a MeshFunction marking subdomains. |
184
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
diff
changeset
|
35 ## |
66071811eef8
Improve the documentation for the pkg releae.
gedeone-octave <marcovass89@hotmail.it>
parents:
152
diff
changeset
|
36 ## @seealso{import_ufl_LinearForm, import_ufl_Problem, BilinearForm, |
263
a61fc34334ca
Use meshfunction to mark subdomains
Eugenio Gianniti <eugenio.gianniti@mail.polimi.it>
parents:
185
diff
changeset
|
37 ## ResidualForm, MeshFunction} |
134
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
38 ## @end deftypefn |
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 function a = LinearForm (name, V, varargin) |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
41 |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
42 if nargin < 2 |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
43 error ("LinearForm: 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
|
44 elseif ! ischar (name) |
152
1dbe146bff03
Update license to gpl v3
gedeone-octave <marcovass89@hotmail.it>
parents:
148
diff
changeset
|
45 error ("LinearForm: 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
|
46 endif |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
47 |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
48 program = sprintf ("%s_LinearForm(V", name); |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
49 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
|
50 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
|
51 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
|
52 end |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
53 |
137
3a0f952a79ec
Avois useless output.
gedeone-octave <marcovass89@hotmail.it>
parents:
134
diff
changeset
|
54 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
|
55 a = eval (program); |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
56 |
286930e440cf
New functions used to call the DLD-functions created from the user.
gedeone-octave <marcovass89@hotmail.it>
parents:
diff
changeset
|
57 endfunction |