Mercurial > fem-fenics-eugenio
comparison inst/fem_create_fs.m @ 52:0aefa30d4ce0
New function for the creation of the functionalspace
* fem_create_fs: create a function fem_fs_name based on a problem defined
from the user. name is the name of the problem.
* fem_ffc.m: function replaced from fem_create_fs
author | gedeone-octave <marco.vassallo@outlook.com> |
---|---|
date | Thu, 25 Jul 2013 11:36:57 +0200 |
parents | |
children | 5a781e79bee1 |
comparison
equal
deleted
inserted
replaced
51:54cca651760e | 52:0aefa30d4ce0 |
---|---|
1 ## Copyright (C) 2013 Marco Vassallo | |
2 | |
3 ## This program is free software; you can redistribute it and/or modify it under | |
4 ## the terms of the GNU General Public License as published by the Free Software | |
5 ## Foundation; either version 2 of the License, or (at your option) any later | |
6 ## version. | |
7 | |
8 ## This program is distributed in the hope that it will be useful, but WITHOUT | |
9 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
10 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | |
11 ## details. | |
12 | |
13 ## You should have received a copy of the GNU General Public License along with | |
14 ## this program; if not, see <http://www.gnu.org/licenses/>. | |
15 | |
16 | |
17 ## -*- texinfo -*- | |
18 ## @deftypefn {Function File} {} = fem_ffc (myproblem.ufl) | |
19 ## This function take as input the name of the .ufl file where | |
20 ## the Variational Problem is defined. | |
21 ## @example | |
22 ## | |
23 ## @end example | |
24 ## @seealso{} | |
25 ## @end deftypefn | |
26 | |
27 function fem_create_fs (var_prob) | |
28 | |
29 if nargin != 1 | |
30 error ("fem_create_fs: wrong number of input parameters."); | |
31 elseif ! ischar (var_prob) | |
32 error ("fem_create_fs: first argument is not a valid string"); | |
33 endif | |
34 | |
35 n = length (mfilename ("fullpath")) - length (mfilename()); | |
36 path = strtrunc(mfilename ("fullpath"), n); | |
37 | |
38 private = fullfile (path, "private/"); | |
39 program = fullfile (path, "bin/create_fs.py"); | |
40 [output, text] = python (program, var_prob, private); | |
41 if output != 0 | |
42 display (text); | |
43 error ("Compilation failed"); | |
44 endif | |
45 | |
46 endfunction |