getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] (no subject)


From: Yves Renard
Subject: [Getfem-commits] (no subject)
Date: Tue, 8 Oct 2019 10:55:41 -0400 (EDT)

branch: devel-yves-octave
commit 28fe545581a39cfd60727fbfa30a1f416cff1902
Author: Yves Renard <address@hidden>
Date:   Tue Oct 8 16:55:11 2019 +0200

    first attempt for an octave interface by Abderrahmane Bendali
---
 interface/src/octave/@gfContStruct/char.m          |    4 +
 interface/src/octave/@gfContStruct/display.m       |    6 +
 interface/src/octave/@gfContStruct/get.m           |   11 +
 interface/src/octave/@gfContStruct/gfContStruct.m  |   21 +
 interface/src/octave/@gfContStruct/loadobj.m       |    6 +
 interface/src/octave/@gfContStruct/saveobj.m       |    6 +
 interface/src/octave/@gfContStruct/subsref.m       |   48 +
 interface/src/octave/@gfCvStruct/char.m            |    4 +
 interface/src/octave/@gfCvStruct/display.m         |    6 +
 interface/src/octave/@gfCvStruct/get.m             |   11 +
 interface/src/octave/@gfCvStruct/gfCvStruct.m      |   21 +
 interface/src/octave/@gfCvStruct/loadobj.m         |    6 +
 interface/src/octave/@gfCvStruct/saveobj.m         |    6 +
 interface/src/octave/@gfCvStruct/subsref.m         |   48 +
 interface/src/octave/@gfEltm/gfEltm.m              |   21 +
 interface/src/octave/@gfEltm/loadobj.m             |    6 +
 interface/src/octave/@gfEltm/saveobj.m             |    6 +
 interface/src/octave/@gfEltm/subsref.m             |   34 +
 interface/src/octave/@gfFem/char.m                 |    4 +
 interface/src/octave/@gfFem/display.m              |    6 +
 interface/src/octave/@gfFem/get.m                  |   11 +
 interface/src/octave/@gfFem/gfFem.m                |   21 +
 interface/src/octave/@gfFem/loadobj.m              |    6 +
 interface/src/octave/@gfFem/saveobj.m              |    6 +
 interface/src/octave/@gfFem/subsref.m              |   48 +
 interface/src/octave/@gfGeoTrans/char.m            |    4 +
 interface/src/octave/@gfGeoTrans/display.m         |    6 +
 interface/src/octave/@gfGeoTrans/get.m             |   11 +
 interface/src/octave/@gfGeoTrans/gfGeoTrans.m      |   21 +
 interface/src/octave/@gfGeoTrans/loadobj.m         |    6 +
 interface/src/octave/@gfGeoTrans/saveobj.m         |    6 +
 interface/src/octave/@gfGeoTrans/subsref.m         |   48 +
 interface/src/octave/@gfGlobalFunction/char.m      |    4 +
 interface/src/octave/@gfGlobalFunction/display.m   |    6 +
 interface/src/octave/@gfGlobalFunction/get.m       |   11 +
 .../octave/@gfGlobalFunction/gfGlobalFunction.m    |   21 +
 interface/src/octave/@gfGlobalFunction/loadobj.m   |    6 +
 interface/src/octave/@gfGlobalFunction/saveobj.m   |    6 +
 interface/src/octave/@gfGlobalFunction/subsref.m   |   48 +
 interface/src/octave/@gfInteg/char.m               |    4 +
 interface/src/octave/@gfInteg/display.m            |    6 +
 interface/src/octave/@gfInteg/get.m                |   11 +
 interface/src/octave/@gfInteg/gfInteg.m            |   21 +
 interface/src/octave/@gfInteg/loadobj.m            |    6 +
 interface/src/octave/@gfInteg/saveobj.m            |    6 +
 interface/src/octave/@gfInteg/subsref.m            |   48 +
 interface/src/octave/@gfLevelSet/char.m            |    4 +
 interface/src/octave/@gfLevelSet/display.m         |    6 +
 interface/src/octave/@gfLevelSet/get.m             |   11 +
 interface/src/octave/@gfLevelSet/gfLevelSet.m      |   21 +
 interface/src/octave/@gfLevelSet/loadobj.m         |    6 +
 interface/src/octave/@gfLevelSet/saveobj.m         |    6 +
 interface/src/octave/@gfLevelSet/set.m             |   11 +
 interface/src/octave/@gfLevelSet/subsref.m         |   80 ++
 interface/src/octave/@gfMesh/char.m                |    4 +
 interface/src/octave/@gfMesh/display.m             |    6 +
 interface/src/octave/@gfMesh/get.m                 |   11 +
 interface/src/octave/@gfMesh/gfMesh.m              |   21 +
 interface/src/octave/@gfMesh/loadobj.m             |    6 +
 interface/src/octave/@gfMesh/saveobj.m             |    6 +
 interface/src/octave/@gfMesh/set.m                 |   11 +
 interface/src/octave/@gfMesh/subsref.m             |  250 ++++
 interface/src/octave/@gfMeshFem/char.m             |    4 +
 interface/src/octave/@gfMeshFem/display.m          |    6 +
 interface/src/octave/@gfMeshFem/get.m              |   11 +
 interface/src/octave/@gfMeshFem/gfMeshFem.m        |   21 +
 interface/src/octave/@gfMeshFem/loadobj.m          |    6 +
 interface/src/octave/@gfMeshFem/saveobj.m          |    6 +
 interface/src/octave/@gfMeshFem/set.m              |   11 +
 interface/src/octave/@gfMeshFem/subsref.m          |  170 +++
 interface/src/octave/@gfMeshIm/char.m              |    4 +
 interface/src/octave/@gfMeshIm/display.m           |    6 +
 interface/src/octave/@gfMeshIm/get.m               |   11 +
 interface/src/octave/@gfMeshIm/gfMeshIm.m          |   21 +
 interface/src/octave/@gfMeshIm/loadobj.m           |    6 +
 interface/src/octave/@gfMeshIm/saveobj.m           |    6 +
 interface/src/octave/@gfMeshIm/set.m               |   11 +
 interface/src/octave/@gfMeshIm/subsref.m           |   80 ++
 interface/src/octave/@gfMeshImData/char.m          |    4 +
 interface/src/octave/@gfMeshImData/display.m       |    6 +
 interface/src/octave/@gfMeshImData/get.m           |   11 +
 interface/src/octave/@gfMeshImData/gfMeshImData.m  |   21 +
 interface/src/octave/@gfMeshImData/loadobj.m       |    6 +
 interface/src/octave/@gfMeshImData/saveobj.m       |    6 +
 interface/src/octave/@gfMeshImData/set.m           |   11 +
 interface/src/octave/@gfMeshImData/subsref.m       |   80 ++
 interface/src/octave/@gfMeshLevelSet/char.m        |    4 +
 interface/src/octave/@gfMeshLevelSet/display.m     |    6 +
 interface/src/octave/@gfMeshLevelSet/get.m         |   11 +
 .../src/octave/@gfMeshLevelSet/gfMeshLevelSet.m    |   21 +
 interface/src/octave/@gfMeshLevelSet/loadobj.m     |    6 +
 interface/src/octave/@gfMeshLevelSet/saveobj.m     |    6 +
 interface/src/octave/@gfMeshLevelSet/set.m         |   11 +
 interface/src/octave/@gfMeshLevelSet/subsref.m     |   90 ++
 interface/src/octave/@gfMesherObject/char.m        |    4 +
 interface/src/octave/@gfMesherObject/display.m     |    6 +
 interface/src/octave/@gfMesherObject/get.m         |   11 +
 .../src/octave/@gfMesherObject/gfMesherObject.m    |   21 +
 interface/src/octave/@gfMesherObject/loadobj.m     |    6 +
 interface/src/octave/@gfMesherObject/saveobj.m     |    6 +
 interface/src/octave/@gfMesherObject/subsref.m     |   48 +
 interface/src/octave/@gfModel/char.m               |    4 +
 interface/src/octave/@gfModel/display.m            |    6 +
 interface/src/octave/@gfModel/get.m                |   11 +
 interface/src/octave/@gfModel/gfModel.m            |   21 +
 interface/src/octave/@gfModel/loadobj.m            |    6 +
 interface/src/octave/@gfModel/saveobj.m            |    6 +
 interface/src/octave/@gfModel/set.m                |   11 +
 interface/src/octave/@gfModel/subsref.m            | 1270 +++++++++++++++++
 interface/src/octave/@gfPrecond/char.m             |    4 +
 interface/src/octave/@gfPrecond/display.m          |    6 +
 interface/src/octave/@gfPrecond/get.m              |   11 +
 interface/src/octave/@gfPrecond/gfPrecond.m        |   21 +
 interface/src/octave/@gfPrecond/loadobj.m          |    6 +
 interface/src/octave/@gfPrecond/saveobj.m          |    6 +
 interface/src/octave/@gfPrecond/subsref.m          |   48 +
 interface/src/octave/@gfSlice/char.m               |    4 +
 interface/src/octave/@gfSlice/display.m            |    6 +
 interface/src/octave/@gfSlice/get.m                |   11 +
 interface/src/octave/@gfSlice/gfSlice.m            |   21 +
 interface/src/octave/@gfSlice/loadobj.m            |    6 +
 interface/src/octave/@gfSlice/saveobj.m            |    6 +
 interface/src/octave/@gfSlice/set.m                |   11 +
 interface/src/octave/@gfSlice/subsref.m            |   70 +
 interface/src/octave/@gfSpmat/char.m               |    4 +
 interface/src/octave/@gfSpmat/display.m            |    6 +
 interface/src/octave/@gfSpmat/get.m                |   11 +
 interface/src/octave/@gfSpmat/gfSpmat.m            |   21 +
 interface/src/octave/@gfSpmat/loadobj.m            |    6 +
 interface/src/octave/@gfSpmat/saveobj.m            |    6 +
 interface/src/octave/@gfSpmat/set.m                |   11 +
 interface/src/octave/@gfSpmat/subsref.m            |  170 +++
 interface/src/octave/Makefile.am                   |  121 ++
 .../src/octave/first_step_interface_oct_getfem.txt |   22 +
 interface/src/octave/getfem_interface.h            |   51 +
 interface/src/octave/gfObject.m                    |   27 +
 interface/src/octave/gf_asm.m                      |  343 +++++
 interface/src/octave/gf_asm_pdetoolbc.m            |  160 +++
 interface/src/octave/gf_colormap.m                 |  128 ++
 interface/src/octave/gf_compute.m                  |  169 +++
 interface/src/octave/gf_compute_Q1grid_interp.m    |   82 ++
 interface/src/octave/gf_cont_struct.m              |   90 ++
 interface/src/octave/gf_cont_struct_get.m          |   77 +
 interface/src/octave/gf_cvstruct_get.m             |   42 +
 interface/src/octave/gf_delete.m                   |   32 +
 interface/src/octave/gf_eltm.m                     |   49 +
 interface/src/octave/gf_fem.m                      |   93 ++
 interface/src/octave/gf_fem_get.m                  |   88 ++
 interface/src/octave/gf_geotrans.m                 |   35 +
 interface/src/octave/gf_geotrans_get.m             |   53 +
 interface/src/octave/gf_global_function.m          |   40 +
 interface/src/octave/gf_global_function_get.m      |   40 +
 interface/src/octave/gf_integ.m                    |   67 +
 interface/src/octave/gf_integ_get.m                |   63 +
 interface/src/octave/gf_levelset.m                 |   40 +
 interface/src/octave/gf_levelset_get.m             |   41 +
 interface/src/octave/gf_levelset_set.m             |   24 +
 interface/src/octave/gf_linsolve.m                 |   41 +
 interface/src/octave/gf_mesh.m                     |  126 ++
 interface/src/octave/gf_mesh_fem.m                 |   72 +
 interface/src/octave/gf_mesh_fem_get.m             |  282 ++++
 interface/src/octave/gf_mesh_fem_get_eval.m        |   83 ++
 interface/src/octave/gf_mesh_fem_set.m             |   82 ++
 interface/src/octave/gf_mesh_get.m                 |  298 ++++
 interface/src/octave/gf_mesh_im.m                  |   76 +
 interface/src/octave/gf_mesh_im_data.m             |   24 +
 interface/src/octave/gf_mesh_im_data_get.m         |   36 +
 interface/src/octave/gf_mesh_im_data_set.m         |   22 +
 interface/src/octave/gf_mesh_im_get.m              |   86 ++
 interface/src/octave/gf_mesh_im_set.m              |   31 +
 interface/src/octave/gf_mesh_levelset.m            |   22 +
 interface/src/octave/gf_mesh_levelset_get.m        |   44 +
 interface/src/octave/gf_mesh_levelset_set.m        |   36 +
 interface/src/octave/gf_mesh_set.m                 |  125 ++
 interface/src/octave/gf_mesher_object.m            |   60 +
 interface/src/octave/gf_mesher_object_get.m        |   25 +
 interface/src/octave/gf_model.m                    |   25 +
 interface/src/octave/gf_model_get.m                |  331 +++++
 interface/src/octave/gf_model_set.m                | 1408 +++++++++++++++++++
 interface/src/octave/gf_plot.m                     |  279 ++++
 interface/src/octave/gf_plot_1D.m                  |  101 ++
 interface/src/octave/gf_plot_mesh.m                |  288 ++++
 interface/src/octave/gf_plot_slice.m               |  333 +++++
 interface/src/octave/gf_precond.m                  |   57 +
 interface/src/octave/gf_precond_get.m              |   40 +
 interface/src/octave/gf_slice.m                    |  113 ++
 interface/src/octave/gf_slice_get.m                |  139 ++
 interface/src/octave/gf_slice_set.m                |   22 +
 interface/src/octave/gf_spmat.m                    |   68 +
 interface/src/octave/gf_spmat_get.m                |   91 ++
 interface/src/octave/gf_spmat_set.m                |   62 +
 interface/src/octave/gf_util.m                     |   34 +
 interface/src/octave/gf_workspace.m                |   59 +
 interface/src/octave/gfi_array.h                   |  213 +++
 interface/src/octave/gfm_common.c                  |  422 ++++++
 interface/src/octave/gfm_common.h                  |   46 +
 interface/src/octave/gfm_mex.c                     |  144 ++
 interface/src/octave/gfm_rpc_mexint.c              |  273 ++++
 interface/src/octave/matrix.h                      | 1474 ++++++++++++++++++++
 interface/src/octave/private/Makefile.am           |   20 +
 interface/src/octave/private/getopt.m              |   28 +
 interface/src/octave/tmwtypes.h                    |  827 +++++++++++
 202 files changed, 14173 insertions(+)

diff --git a/interface/src/octave/@gfContStruct/char.m 
b/interface/src/octave/@gfContStruct/char.m
new file mode 100644
index 0000000..eb5f8a3
--- /dev/null
+++ b/interface/src/octave/@gfContStruct/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfContStruct/char output a textual representation of the object
+  s=gf_cont_struct_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfContStruct/display.m 
b/interface/src/octave/@gfContStruct/display.m
new file mode 100644
index 0000000..6edc87f
--- /dev/null
+++ b/interface/src/octave/@gfContStruct/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfContStruct/display displays a short summary for a gfContStruct object 
+  for i=1:numel(cs),
+    gf_cont_struct_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfContStruct/get.m 
b/interface/src/octave/@gfContStruct/get.m
new file mode 100644
index 0000000..6f93196
--- /dev/null
+++ b/interface/src/octave/@gfContStruct/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfContStruct/get.m
+% see gf_cont_struct_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_cont_struct_get(obj, varargin{:});
+else
+  gf_cont_struct_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfContStruct/gfContStruct.m 
b/interface/src/octave/@gfContStruct/gfContStruct.m
new file mode 100644
index 0000000..74b986a
--- /dev/null
+++ b/interface/src/octave/@gfContStruct/gfContStruct.m
@@ -0,0 +1,21 @@
+function [m,b]=gfContStruct(a, varargin)
+% gfContStruct class pseudo-constructor
+  this_class = 'gfContStruct';
+  if (nargin==0) error('cant create an empty cont_struct reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_cont_struct(a,varargin{:});
+      end;
+    else
+      m = gf_cont_struct(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfContStruct/loadobj.m 
b/interface/src/octave/@gfContStruct/loadobj.m
new file mode 100644
index 0000000..180427b
--- /dev/null
+++ b/interface/src/octave/@gfContStruct/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfContStruct/loadobj
+% this function is automatically called by matlab when objects of class
+% gfContStructare loaded from a MAT-file
+  a=gfContStruct('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfContStruct/saveobj.m 
b/interface/src/octave/@gfContStruct/saveobj.m
new file mode 100644
index 0000000..3c6ee7d
--- /dev/null
+++ b/interface/src/octave/@gfContStruct/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfContStruct/saveobj
+% this function is automatically called by matlab when objects of class
+% gfContStructare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfContStruct/subsref.m 
b/interface/src/octave/@gfContStruct/subsref.m
new file mode 100644
index 0000000..495e02a
--- /dev/null
+++ b/interface/src/octave/@gfContStruct/subsref.m
@@ -0,0 +1,48 @@
+function [varargout]=subsref(obj, index)
+% gfContStruct/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_cont_struct_get;
+  FSET = @gf_cont_struct_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfContStruct objects')
+    case '()'
+      error('array indexing not supported by gfContStruct objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfCvStruct/char.m 
b/interface/src/octave/@gfCvStruct/char.m
new file mode 100644
index 0000000..923f09f
--- /dev/null
+++ b/interface/src/octave/@gfCvStruct/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfCvStruct/char output a textual representation of the object
+  s=gf_cvstruct_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfCvStruct/display.m 
b/interface/src/octave/@gfCvStruct/display.m
new file mode 100644
index 0000000..133c6a0
--- /dev/null
+++ b/interface/src/octave/@gfCvStruct/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfCvStruct/display displays a short summary for a gfCvStruct object 
+  for i=1:numel(cs),
+    gf_cvstruct_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfCvStruct/get.m 
b/interface/src/octave/@gfCvStruct/get.m
new file mode 100644
index 0000000..d1a0978
--- /dev/null
+++ b/interface/src/octave/@gfCvStruct/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfCvStruct/get.m
+% see gf_cvstruct_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_cvstruct_get(obj, varargin{:});
+else
+  gf_cvstruct_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfCvStruct/gfCvStruct.m 
b/interface/src/octave/@gfCvStruct/gfCvStruct.m
new file mode 100644
index 0000000..9fa9c9d
--- /dev/null
+++ b/interface/src/octave/@gfCvStruct/gfCvStruct.m
@@ -0,0 +1,21 @@
+function [m,b]=gfCvStruct(a, varargin)
+% gfCvStruct class pseudo-constructor
+  this_class = 'gfCvStruct';
+  if (nargin==0) error('cant create an empty cvstruct reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_cvstruct(a,varargin{:});
+      end;
+    else
+      m = gf_cvstruct(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfCvStruct/loadobj.m 
b/interface/src/octave/@gfCvStruct/loadobj.m
new file mode 100644
index 0000000..db89241
--- /dev/null
+++ b/interface/src/octave/@gfCvStruct/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfCvStruct/loadobj
+% this function is automatically called by matlab when objects of class
+% gfCvStructare loaded from a MAT-file
+  a=gfCvStruct('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfCvStruct/saveobj.m 
b/interface/src/octave/@gfCvStruct/saveobj.m
new file mode 100644
index 0000000..461756d
--- /dev/null
+++ b/interface/src/octave/@gfCvStruct/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfCvStruct/saveobj
+% this function is automatically called by matlab when objects of class
+% gfCvStructare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfCvStruct/subsref.m 
b/interface/src/octave/@gfCvStruct/subsref.m
new file mode 100644
index 0000000..f55a09a
--- /dev/null
+++ b/interface/src/octave/@gfCvStruct/subsref.m
@@ -0,0 +1,48 @@
+function [varargout]=subsref(obj, index)
+% gfCvStruct/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_cvstruct_get;
+  FSET = @gf_cvstruct_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfCvStruct objects')
+    case '()'
+      error('array indexing not supported by gfCvStruct objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfEltm/gfEltm.m 
b/interface/src/octave/@gfEltm/gfEltm.m
new file mode 100644
index 0000000..57784df
--- /dev/null
+++ b/interface/src/octave/@gfEltm/gfEltm.m
@@ -0,0 +1,21 @@
+function [m,b]=gfEltm(a, varargin)
+% gfEltm class pseudo-constructor
+  this_class = 'gfEltm';
+  if (nargin==0) error('cant create an empty eltm reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_eltm(a,varargin{:});
+      end;
+    else
+      m = gf_eltm(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfEltm/loadobj.m 
b/interface/src/octave/@gfEltm/loadobj.m
new file mode 100644
index 0000000..74b61e3
--- /dev/null
+++ b/interface/src/octave/@gfEltm/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfEltm/loadobj
+% this function is automatically called by matlab when objects of class
+% gfEltmare loaded from a MAT-file
+  a=gfEltm('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfEltm/saveobj.m 
b/interface/src/octave/@gfEltm/saveobj.m
new file mode 100644
index 0000000..30ba2bd
--- /dev/null
+++ b/interface/src/octave/@gfEltm/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfEltm/saveobj
+% this function is automatically called by matlab when objects of class
+% gfEltmare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfEltm/subsref.m 
b/interface/src/octave/@gfEltm/subsref.m
new file mode 100644
index 0000000..240df11
--- /dev/null
+++ b/interface/src/octave/@gfEltm/subsref.m
@@ -0,0 +1,34 @@
+function [varargout]=subsref(obj, index)
+% gfEltm/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_eltm_get;
+  FSET = @gf_eltm_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfEltm objects')
+    case '()'
+      error('array indexing not supported by gfEltm objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfFem/char.m 
b/interface/src/octave/@gfFem/char.m
new file mode 100644
index 0000000..0dffc25
--- /dev/null
+++ b/interface/src/octave/@gfFem/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfFem/char output a textual representation of the object
+  s=gf_fem_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfFem/display.m 
b/interface/src/octave/@gfFem/display.m
new file mode 100644
index 0000000..c13619a
--- /dev/null
+++ b/interface/src/octave/@gfFem/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfFem/display displays a short summary for a gfFem object 
+  for i=1:numel(cs),
+    gf_fem_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfFem/get.m 
b/interface/src/octave/@gfFem/get.m
new file mode 100644
index 0000000..d3c492c
--- /dev/null
+++ b/interface/src/octave/@gfFem/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfFem/get.m
+% see gf_fem_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_fem_get(obj, varargin{:});
+else
+  gf_fem_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfFem/gfFem.m 
b/interface/src/octave/@gfFem/gfFem.m
new file mode 100644
index 0000000..cfc9313
--- /dev/null
+++ b/interface/src/octave/@gfFem/gfFem.m
@@ -0,0 +1,21 @@
+function [m,b]=gfFem(a, varargin)
+% gfFem class pseudo-constructor
+  this_class = 'gfFem';
+  if (nargin==0) error('cant create an empty fem reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_fem(a,varargin{:});
+      end;
+    else
+      m = gf_fem(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfFem/loadobj.m 
b/interface/src/octave/@gfFem/loadobj.m
new file mode 100644
index 0000000..97aa033
--- /dev/null
+++ b/interface/src/octave/@gfFem/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfFem/loadobj
+% this function is automatically called by matlab when objects of class
+% gfFemare loaded from a MAT-file
+  a=gfFem('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfFem/saveobj.m 
b/interface/src/octave/@gfFem/saveobj.m
new file mode 100644
index 0000000..19930d5
--- /dev/null
+++ b/interface/src/octave/@gfFem/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfFem/saveobj
+% this function is automatically called by matlab when objects of class
+% gfFemare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfFem/subsref.m 
b/interface/src/octave/@gfFem/subsref.m
new file mode 100644
index 0000000..7addfb9
--- /dev/null
+++ b/interface/src/octave/@gfFem/subsref.m
@@ -0,0 +1,48 @@
+function [varargout]=subsref(obj, index)
+% gfFem/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_fem_get;
+  FSET = @gf_fem_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfFem objects')
+    case '()'
+      error('array indexing not supported by gfFem objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGeoTrans/char.m 
b/interface/src/octave/@gfGeoTrans/char.m
new file mode 100644
index 0000000..cbbde06
--- /dev/null
+++ b/interface/src/octave/@gfGeoTrans/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfGeoTrans/char output a textual representation of the object
+  s=gf_geotrans_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGeoTrans/display.m 
b/interface/src/octave/@gfGeoTrans/display.m
new file mode 100644
index 0000000..a28137b
--- /dev/null
+++ b/interface/src/octave/@gfGeoTrans/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfGeoTrans/display displays a short summary for a gfGeoTrans object 
+  for i=1:numel(cs),
+    gf_geotrans_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGeoTrans/get.m 
b/interface/src/octave/@gfGeoTrans/get.m
new file mode 100644
index 0000000..eda2240
--- /dev/null
+++ b/interface/src/octave/@gfGeoTrans/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfGeoTrans/get.m
+% see gf_geotrans_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_geotrans_get(obj, varargin{:});
+else
+  gf_geotrans_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGeoTrans/gfGeoTrans.m 
b/interface/src/octave/@gfGeoTrans/gfGeoTrans.m
new file mode 100644
index 0000000..617506b
--- /dev/null
+++ b/interface/src/octave/@gfGeoTrans/gfGeoTrans.m
@@ -0,0 +1,21 @@
+function [m,b]=gfGeoTrans(a, varargin)
+% gfGeoTrans class pseudo-constructor
+  this_class = 'gfGeoTrans';
+  if (nargin==0) error('cant create an empty geotrans reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_geotrans(a,varargin{:});
+      end;
+    else
+      m = gf_geotrans(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGeoTrans/loadobj.m 
b/interface/src/octave/@gfGeoTrans/loadobj.m
new file mode 100644
index 0000000..dd4cab2
--- /dev/null
+++ b/interface/src/octave/@gfGeoTrans/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfGeoTrans/loadobj
+% this function is automatically called by matlab when objects of class
+% gfGeoTransare loaded from a MAT-file
+  a=gfGeoTrans('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGeoTrans/saveobj.m 
b/interface/src/octave/@gfGeoTrans/saveobj.m
new file mode 100644
index 0000000..a9d04a9
--- /dev/null
+++ b/interface/src/octave/@gfGeoTrans/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfGeoTrans/saveobj
+% this function is automatically called by matlab when objects of class
+% gfGeoTransare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGeoTrans/subsref.m 
b/interface/src/octave/@gfGeoTrans/subsref.m
new file mode 100644
index 0000000..5343bfc
--- /dev/null
+++ b/interface/src/octave/@gfGeoTrans/subsref.m
@@ -0,0 +1,48 @@
+function [varargout]=subsref(obj, index)
+% gfGeoTrans/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_geotrans_get;
+  FSET = @gf_geotrans_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfGeoTrans objects')
+    case '()'
+      error('array indexing not supported by gfGeoTrans objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGlobalFunction/char.m 
b/interface/src/octave/@gfGlobalFunction/char.m
new file mode 100644
index 0000000..1a81bf3
--- /dev/null
+++ b/interface/src/octave/@gfGlobalFunction/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfGlobalFunction/char output a textual representation of the object
+  s=gf_global_function_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGlobalFunction/display.m 
b/interface/src/octave/@gfGlobalFunction/display.m
new file mode 100644
index 0000000..bf81084
--- /dev/null
+++ b/interface/src/octave/@gfGlobalFunction/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfGlobalFunction/display displays a short summary for a gfGlobalFunction 
object 
+  for i=1:numel(cs),
+    gf_global_function_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGlobalFunction/get.m 
b/interface/src/octave/@gfGlobalFunction/get.m
new file mode 100644
index 0000000..80c8878
--- /dev/null
+++ b/interface/src/octave/@gfGlobalFunction/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfGlobalFunction/get.m
+% see gf_global_function_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_global_function_get(obj, varargin{:});
+else
+  gf_global_function_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGlobalFunction/gfGlobalFunction.m 
b/interface/src/octave/@gfGlobalFunction/gfGlobalFunction.m
new file mode 100644
index 0000000..9a7280e
--- /dev/null
+++ b/interface/src/octave/@gfGlobalFunction/gfGlobalFunction.m
@@ -0,0 +1,21 @@
+function [m,b]=gfGlobalFunction(a, varargin)
+% gfGlobalFunction class pseudo-constructor
+  this_class = 'gfGlobalFunction';
+  if (nargin==0) error('cant create an empty global_function reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_global_function(a,varargin{:});
+      end;
+    else
+      m = gf_global_function(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGlobalFunction/loadobj.m 
b/interface/src/octave/@gfGlobalFunction/loadobj.m
new file mode 100644
index 0000000..7285e97
--- /dev/null
+++ b/interface/src/octave/@gfGlobalFunction/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfGlobalFunction/loadobj
+% this function is automatically called by matlab when objects of class
+% gfGlobalFunctionare loaded from a MAT-file
+  a=gfGlobalFunction('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGlobalFunction/saveobj.m 
b/interface/src/octave/@gfGlobalFunction/saveobj.m
new file mode 100644
index 0000000..f8affb0
--- /dev/null
+++ b/interface/src/octave/@gfGlobalFunction/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfGlobalFunction/saveobj
+% this function is automatically called by matlab when objects of class
+% gfGlobalFunctionare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfGlobalFunction/subsref.m 
b/interface/src/octave/@gfGlobalFunction/subsref.m
new file mode 100644
index 0000000..4db24ac
--- /dev/null
+++ b/interface/src/octave/@gfGlobalFunction/subsref.m
@@ -0,0 +1,48 @@
+function [varargout]=subsref(obj, index)
+% gfGlobalFunction/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_global_function_get;
+  FSET = @gf_global_function_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfGlobalFunction objects')
+    case '()'
+      error('array indexing not supported by gfGlobalFunction objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfInteg/char.m 
b/interface/src/octave/@gfInteg/char.m
new file mode 100644
index 0000000..2e9668e
--- /dev/null
+++ b/interface/src/octave/@gfInteg/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfInteg/char output a textual representation of the object
+  s=gf_integ_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfInteg/display.m 
b/interface/src/octave/@gfInteg/display.m
new file mode 100644
index 0000000..51a173d
--- /dev/null
+++ b/interface/src/octave/@gfInteg/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfInteg/display displays a short summary for a gfInteg object 
+  for i=1:numel(cs),
+    gf_integ_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfInteg/get.m 
b/interface/src/octave/@gfInteg/get.m
new file mode 100644
index 0000000..d298957
--- /dev/null
+++ b/interface/src/octave/@gfInteg/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfInteg/get.m
+% see gf_integ_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_integ_get(obj, varargin{:});
+else
+  gf_integ_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfInteg/gfInteg.m 
b/interface/src/octave/@gfInteg/gfInteg.m
new file mode 100644
index 0000000..04b9e06
--- /dev/null
+++ b/interface/src/octave/@gfInteg/gfInteg.m
@@ -0,0 +1,21 @@
+function [m,b]=gfInteg(a, varargin)
+% gfInteg class pseudo-constructor
+  this_class = 'gfInteg';
+  if (nargin==0) error('cant create an empty integ reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_integ(a,varargin{:});
+      end;
+    else
+      m = gf_integ(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfInteg/loadobj.m 
b/interface/src/octave/@gfInteg/loadobj.m
new file mode 100644
index 0000000..a87033b
--- /dev/null
+++ b/interface/src/octave/@gfInteg/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfInteg/loadobj
+% this function is automatically called by matlab when objects of class
+% gfIntegare loaded from a MAT-file
+  a=gfInteg('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfInteg/saveobj.m 
b/interface/src/octave/@gfInteg/saveobj.m
new file mode 100644
index 0000000..2e5fb90
--- /dev/null
+++ b/interface/src/octave/@gfInteg/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfInteg/saveobj
+% this function is automatically called by matlab when objects of class
+% gfIntegare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfInteg/subsref.m 
b/interface/src/octave/@gfInteg/subsref.m
new file mode 100644
index 0000000..80ea38b
--- /dev/null
+++ b/interface/src/octave/@gfInteg/subsref.m
@@ -0,0 +1,48 @@
+function [varargout]=subsref(obj, index)
+% gfInteg/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_integ_get;
+  FSET = @gf_integ_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfInteg objects')
+    case '()'
+      error('array indexing not supported by gfInteg objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfLevelSet/char.m 
b/interface/src/octave/@gfLevelSet/char.m
new file mode 100644
index 0000000..03eacc8
--- /dev/null
+++ b/interface/src/octave/@gfLevelSet/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfLevelSet/char output a textual representation of the object
+  s=gf_levelset_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfLevelSet/display.m 
b/interface/src/octave/@gfLevelSet/display.m
new file mode 100644
index 0000000..780e73e
--- /dev/null
+++ b/interface/src/octave/@gfLevelSet/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfLevelSet/display displays a short summary for a gfLevelSet object 
+  for i=1:numel(cs),
+    gf_levelset_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfLevelSet/get.m 
b/interface/src/octave/@gfLevelSet/get.m
new file mode 100644
index 0000000..1268427
--- /dev/null
+++ b/interface/src/octave/@gfLevelSet/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfLevelSet/get.m
+% see gf_levelset_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_levelset_get(obj, varargin{:});
+else
+  gf_levelset_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfLevelSet/gfLevelSet.m 
b/interface/src/octave/@gfLevelSet/gfLevelSet.m
new file mode 100644
index 0000000..03d9931
--- /dev/null
+++ b/interface/src/octave/@gfLevelSet/gfLevelSet.m
@@ -0,0 +1,21 @@
+function [m,b]=gfLevelSet(a, varargin)
+% gfLevelSet class pseudo-constructor
+  this_class = 'gfLevelSet';
+  if (nargin==0) error('cant create an empty levelset reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_levelset(a,varargin{:});
+      end;
+    else
+      m = gf_levelset(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfLevelSet/loadobj.m 
b/interface/src/octave/@gfLevelSet/loadobj.m
new file mode 100644
index 0000000..12cf972
--- /dev/null
+++ b/interface/src/octave/@gfLevelSet/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfLevelSet/loadobj
+% this function is automatically called by matlab when objects of class
+% gfLevelSetare loaded from a MAT-file
+  a=gfLevelSet('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfLevelSet/saveobj.m 
b/interface/src/octave/@gfLevelSet/saveobj.m
new file mode 100644
index 0000000..ea6c94b
--- /dev/null
+++ b/interface/src/octave/@gfLevelSet/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfLevelSet/saveobj
+% this function is automatically called by matlab when objects of class
+% gfLevelSetare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfLevelSet/set.m 
b/interface/src/octave/@gfLevelSet/set.m
new file mode 100644
index 0000000..70c96e4
--- /dev/null
+++ b/interface/src/octave/@gfLevelSet/set.m
@@ -0,0 +1,11 @@
+function varargout=set(obj, varargin)
+% gfLevelSet/set.m
+% see gf_levelset_set for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_levelset_set(obj, varargin{:});
+else
+  gf_levelset_set(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfLevelSet/subsref.m 
b/interface/src/octave/@gfLevelSet/subsref.m
new file mode 100644
index 0000000..f85b654
--- /dev/null
+++ b/interface/src/octave/@gfLevelSet/subsref.m
@@ -0,0 +1,80 @@
+function [varargout]=subsref(obj, index)
+% gfLevelSet/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_levelset_get;
+  FSET = @gf_levelset_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfLevelSet objects')
+    case '()'
+      error('array indexing not supported by gfLevelSet objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'set_values'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'values', index(2).subs{:});
+          else
+            FSET(obj, 'values', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'simplify'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'simplify', index(2).subs{:});
+          else
+            FSET(obj, 'simplify', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, index(2).subs{:});
+          else
+            FSET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesh/char.m 
b/interface/src/octave/@gfMesh/char.m
new file mode 100644
index 0000000..5abc768
--- /dev/null
+++ b/interface/src/octave/@gfMesh/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfMesh/char output a textual representation of the object
+  s=gf_mesh_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesh/display.m 
b/interface/src/octave/@gfMesh/display.m
new file mode 100644
index 0000000..380e71c
--- /dev/null
+++ b/interface/src/octave/@gfMesh/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfMesh/display displays a short summary for a gfMesh object 
+  for i=1:numel(cs),
+    gf_mesh_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesh/get.m 
b/interface/src/octave/@gfMesh/get.m
new file mode 100644
index 0000000..dac468c
--- /dev/null
+++ b/interface/src/octave/@gfMesh/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfMesh/get.m
+% see gf_mesh_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_mesh_get(obj, varargin{:});
+else
+  gf_mesh_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesh/gfMesh.m 
b/interface/src/octave/@gfMesh/gfMesh.m
new file mode 100644
index 0000000..c10d07b
--- /dev/null
+++ b/interface/src/octave/@gfMesh/gfMesh.m
@@ -0,0 +1,21 @@
+function [m,b]=gfMesh(a, varargin)
+% gfMesh class pseudo-constructor
+  this_class = 'gfMesh';
+  if (nargin==0) error('cant create an empty mesh reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_mesh(a,varargin{:});
+      end;
+    else
+      m = gf_mesh(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesh/loadobj.m 
b/interface/src/octave/@gfMesh/loadobj.m
new file mode 100644
index 0000000..bcaf609
--- /dev/null
+++ b/interface/src/octave/@gfMesh/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfMesh/loadobj
+% this function is automatically called by matlab when objects of class
+% gfMeshare loaded from a MAT-file
+  a=gfMesh('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesh/saveobj.m 
b/interface/src/octave/@gfMesh/saveobj.m
new file mode 100644
index 0000000..5be440a
--- /dev/null
+++ b/interface/src/octave/@gfMesh/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfMesh/saveobj
+% this function is automatically called by matlab when objects of class
+% gfMeshare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesh/set.m 
b/interface/src/octave/@gfMesh/set.m
new file mode 100644
index 0000000..d267577
--- /dev/null
+++ b/interface/src/octave/@gfMesh/set.m
@@ -0,0 +1,11 @@
+function varargout=set(obj, varargin)
+% gfMesh/set.m
+% see gf_mesh_set for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_mesh_set(obj, varargin{:});
+else
+  gf_mesh_set(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesh/subsref.m 
b/interface/src/octave/@gfMesh/subsref.m
new file mode 100644
index 0000000..4d56674
--- /dev/null
+++ b/interface/src/octave/@gfMesh/subsref.m
@@ -0,0 +1,250 @@
+function [varargout]=subsref(obj, index)
+% gfMesh/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_mesh_get;
+  FSET = @gf_mesh_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfMesh objects')
+    case '()'
+      error('array indexing not supported by gfMesh objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'set_pts'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'pts', index(2).subs{:});
+          else
+            FSET(obj, 'pts', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_point'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_point', index(2).subs{:});
+          else
+            FSET(obj, 'add_point', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'del_point'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'del_point', index(2).subs{:});
+          else
+            FSET(obj, 'del_point', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_convex'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_convex', index(2).subs{:});
+          else
+            FSET(obj, 'add_convex', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'del_convex'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'del_convex', index(2).subs{:});
+          else
+            FSET(obj, 'del_convex', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'del_convex_of_dim'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'del_convex_of_dim', 
index(2).subs{:});
+          else
+            FSET(obj, 'del_convex_of_dim', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'translate'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'translate', index(2).subs{:});
+          else
+            FSET(obj, 'translate', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'transform'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'transform', index(2).subs{:});
+          else
+            FSET(obj, 'transform', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_boundary'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'boundary', index(2).subs{:});
+          else
+            FSET(obj, 'boundary', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_region'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'region', index(2).subs{:});
+          else
+            FSET(obj, 'region', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'extend_region'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'extend_region', 
index(2).subs{:});
+          else
+            FSET(obj, 'extend_region', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'region_intersect'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'region_intersect', 
index(2).subs{:});
+          else
+            FSET(obj, 'region_intersect', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'region_merge'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'region_merge', 
index(2).subs{:});
+          else
+            FSET(obj, 'region_merge', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'region_subtract'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'region_subtract', 
index(2).subs{:});
+          else
+            FSET(obj, 'region_subtract', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'delete_boundary'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'delete_boundary', 
index(2).subs{:});
+          else
+            FSET(obj, 'delete_boundary', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'delete_region'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'delete_region', 
index(2).subs{:});
+          else
+            FSET(obj, 'delete_region', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'merge'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'merge', index(2).subs{:});
+          else
+            FSET(obj, 'merge', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'optimize_structure'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'optimize_structure', 
index(2).subs{:});
+          else
+            FSET(obj, 'optimize_structure', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'refine'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'refine', index(2).subs{:});
+          else
+            FSET(obj, 'refine', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, index(2).subs{:});
+          else
+            FSET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshFem/char.m 
b/interface/src/octave/@gfMeshFem/char.m
new file mode 100644
index 0000000..2abe314
--- /dev/null
+++ b/interface/src/octave/@gfMeshFem/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfMeshFem/char output a textual representation of the object
+  s=gf_mesh_fem_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshFem/display.m 
b/interface/src/octave/@gfMeshFem/display.m
new file mode 100644
index 0000000..c44be55
--- /dev/null
+++ b/interface/src/octave/@gfMeshFem/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfMeshFem/display displays a short summary for a gfMeshFem object 
+  for i=1:numel(cs),
+    gf_mesh_fem_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshFem/get.m 
b/interface/src/octave/@gfMeshFem/get.m
new file mode 100644
index 0000000..b09d5b5
--- /dev/null
+++ b/interface/src/octave/@gfMeshFem/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfMeshFem/get.m
+% see gf_mesh_fem_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_mesh_fem_get(obj, varargin{:});
+else
+  gf_mesh_fem_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshFem/gfMeshFem.m 
b/interface/src/octave/@gfMeshFem/gfMeshFem.m
new file mode 100644
index 0000000..3a21c00
--- /dev/null
+++ b/interface/src/octave/@gfMeshFem/gfMeshFem.m
@@ -0,0 +1,21 @@
+function [m,b]=gfMeshFem(a, varargin)
+% gfMeshFem class pseudo-constructor
+  this_class = 'gfMeshFem';
+  if (nargin==0) error('cant create an empty mesh_fem reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_mesh_fem(a,varargin{:});
+      end;
+    else
+      m = gf_mesh_fem(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshFem/loadobj.m 
b/interface/src/octave/@gfMeshFem/loadobj.m
new file mode 100644
index 0000000..a79b78e
--- /dev/null
+++ b/interface/src/octave/@gfMeshFem/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfMeshFem/loadobj
+% this function is automatically called by matlab when objects of class
+% gfMeshFemare loaded from a MAT-file
+  a=gfMeshFem('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshFem/saveobj.m 
b/interface/src/octave/@gfMeshFem/saveobj.m
new file mode 100644
index 0000000..2340f70
--- /dev/null
+++ b/interface/src/octave/@gfMeshFem/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfMeshFem/saveobj
+% this function is automatically called by matlab when objects of class
+% gfMeshFemare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshFem/set.m 
b/interface/src/octave/@gfMeshFem/set.m
new file mode 100644
index 0000000..d7e1b29
--- /dev/null
+++ b/interface/src/octave/@gfMeshFem/set.m
@@ -0,0 +1,11 @@
+function varargout=set(obj, varargin)
+% gfMeshFem/set.m
+% see gf_mesh_fem_set for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_mesh_fem_set(obj, varargin{:});
+else
+  gf_mesh_fem_set(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshFem/subsref.m 
b/interface/src/octave/@gfMeshFem/subsref.m
new file mode 100644
index 0000000..88a45c6
--- /dev/null
+++ b/interface/src/octave/@gfMeshFem/subsref.m
@@ -0,0 +1,170 @@
+function [varargout]=subsref(obj, index)
+% gfMeshFem/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_mesh_fem_get;
+  FSET = @gf_mesh_fem_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfMeshFem objects')
+    case '()'
+      error('array indexing not supported by gfMeshFem objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'set_fem'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'fem', index(2).subs{:});
+          else
+            FSET(obj, 'fem', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_classical_fem'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'classical_fem', 
index(2).subs{:});
+          else
+            FSET(obj, 'classical_fem', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_classical_discontinuous_fem'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'classical_discontinuous_fem', 
index(2).subs{:});
+          else
+            FSET(obj, 'classical_discontinuous_fem', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_qdim'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'qdim', index(2).subs{:});
+          else
+            FSET(obj, 'qdim', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'reduction_matrices'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'reduction_matrices', 
index(2).subs{:});
+          else
+            FSET(obj, 'reduction_matrices', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'reduction'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'reduction', index(2).subs{:});
+          else
+            FSET(obj, 'reduction', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'reduce_meshfem'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'reduce_meshfem', 
index(2).subs{:});
+          else
+            FSET(obj, 'reduce_meshfem', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_dof_partition'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'dof_partition', 
index(2).subs{:});
+          else
+            FSET(obj, 'dof_partition', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_partial'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'set_partial', 
index(2).subs{:});
+          else
+            FSET(obj, 'set_partial', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'adapt'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'adapt', index(2).subs{:});
+          else
+            FSET(obj, 'adapt', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_enriched_dofs'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'set_enriched_dofs', 
index(2).subs{:});
+          else
+            FSET(obj, 'set_enriched_dofs', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, index(2).subs{:});
+          else
+            FSET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshIm/char.m 
b/interface/src/octave/@gfMeshIm/char.m
new file mode 100644
index 0000000..c3ef362
--- /dev/null
+++ b/interface/src/octave/@gfMeshIm/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfMeshIm/char output a textual representation of the object
+  s=gf_mesh_im_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshIm/display.m 
b/interface/src/octave/@gfMeshIm/display.m
new file mode 100644
index 0000000..6d69c42
--- /dev/null
+++ b/interface/src/octave/@gfMeshIm/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfMeshIm/display displays a short summary for a gfMeshIm object 
+  for i=1:numel(cs),
+    gf_mesh_im_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshIm/get.m 
b/interface/src/octave/@gfMeshIm/get.m
new file mode 100644
index 0000000..28d7e4e
--- /dev/null
+++ b/interface/src/octave/@gfMeshIm/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfMeshIm/get.m
+% see gf_mesh_im_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_mesh_im_get(obj, varargin{:});
+else
+  gf_mesh_im_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshIm/gfMeshIm.m 
b/interface/src/octave/@gfMeshIm/gfMeshIm.m
new file mode 100644
index 0000000..f6136d9
--- /dev/null
+++ b/interface/src/octave/@gfMeshIm/gfMeshIm.m
@@ -0,0 +1,21 @@
+function [m,b]=gfMeshIm(a, varargin)
+% gfMeshIm class pseudo-constructor
+  this_class = 'gfMeshIm';
+  if (nargin==0) error('cant create an empty mesh_im reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_mesh_im(a,varargin{:});
+      end;
+    else
+      m = gf_mesh_im(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshIm/loadobj.m 
b/interface/src/octave/@gfMeshIm/loadobj.m
new file mode 100644
index 0000000..14f3706
--- /dev/null
+++ b/interface/src/octave/@gfMeshIm/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfMeshIm/loadobj
+% this function is automatically called by matlab when objects of class
+% gfMeshImare loaded from a MAT-file
+  a=gfMeshIm('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshIm/saveobj.m 
b/interface/src/octave/@gfMeshIm/saveobj.m
new file mode 100644
index 0000000..155510c
--- /dev/null
+++ b/interface/src/octave/@gfMeshIm/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfMeshIm/saveobj
+% this function is automatically called by matlab when objects of class
+% gfMeshImare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshIm/set.m 
b/interface/src/octave/@gfMeshIm/set.m
new file mode 100644
index 0000000..2ce1f03
--- /dev/null
+++ b/interface/src/octave/@gfMeshIm/set.m
@@ -0,0 +1,11 @@
+function varargout=set(obj, varargin)
+% gfMeshIm/set.m
+% see gf_mesh_im_set for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_mesh_im_set(obj, varargin{:});
+else
+  gf_mesh_im_set(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshIm/subsref.m 
b/interface/src/octave/@gfMeshIm/subsref.m
new file mode 100644
index 0000000..b746cf5
--- /dev/null
+++ b/interface/src/octave/@gfMeshIm/subsref.m
@@ -0,0 +1,80 @@
+function [varargout]=subsref(obj, index)
+% gfMeshIm/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_mesh_im_get;
+  FSET = @gf_mesh_im_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfMeshIm objects')
+    case '()'
+      error('array indexing not supported by gfMeshIm objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'set_integ'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'integ', index(2).subs{:});
+          else
+            FSET(obj, 'integ', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'adapt'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'adapt', index(2).subs{:});
+          else
+            FSET(obj, 'adapt', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, index(2).subs{:});
+          else
+            FSET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshImData/char.m 
b/interface/src/octave/@gfMeshImData/char.m
new file mode 100644
index 0000000..5773323
--- /dev/null
+++ b/interface/src/octave/@gfMeshImData/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfMeshImData/char output a textual representation of the object
+  s=gf_mesh_im_data_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshImData/display.m 
b/interface/src/octave/@gfMeshImData/display.m
new file mode 100644
index 0000000..11429cc
--- /dev/null
+++ b/interface/src/octave/@gfMeshImData/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfMeshImData/display displays a short summary for a gfMeshImData object 
+  for i=1:numel(cs),
+    gf_mesh_im_data_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshImData/get.m 
b/interface/src/octave/@gfMeshImData/get.m
new file mode 100644
index 0000000..01ea2ef
--- /dev/null
+++ b/interface/src/octave/@gfMeshImData/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfMeshImData/get.m
+% see gf_mesh_im_data_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_mesh_im_data_get(obj, varargin{:});
+else
+  gf_mesh_im_data_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshImData/gfMeshImData.m 
b/interface/src/octave/@gfMeshImData/gfMeshImData.m
new file mode 100644
index 0000000..d596d1c
--- /dev/null
+++ b/interface/src/octave/@gfMeshImData/gfMeshImData.m
@@ -0,0 +1,21 @@
+function [m,b]=gfMeshImData(a, varargin)
+% gfMeshImData class pseudo-constructor
+  this_class = 'gfMeshImData';
+  if (nargin==0) error('cant create an empty mesh_im_data reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_mesh_im_data(a,varargin{:});
+      end;
+    else
+      m = gf_mesh_im_data(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshImData/loadobj.m 
b/interface/src/octave/@gfMeshImData/loadobj.m
new file mode 100644
index 0000000..a13b917
--- /dev/null
+++ b/interface/src/octave/@gfMeshImData/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfMeshImData/loadobj
+% this function is automatically called by matlab when objects of class
+% gfMeshImDataare loaded from a MAT-file
+  a=gfMeshImData('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshImData/saveobj.m 
b/interface/src/octave/@gfMeshImData/saveobj.m
new file mode 100644
index 0000000..0369bf5
--- /dev/null
+++ b/interface/src/octave/@gfMeshImData/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfMeshImData/saveobj
+% this function is automatically called by matlab when objects of class
+% gfMeshImDataare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshImData/set.m 
b/interface/src/octave/@gfMeshImData/set.m
new file mode 100644
index 0000000..33da35f
--- /dev/null
+++ b/interface/src/octave/@gfMeshImData/set.m
@@ -0,0 +1,11 @@
+function varargout=set(obj, varargin)
+% gfMeshImData/set.m
+% see gf_mesh_im_data_set for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_mesh_im_data_set(obj, varargin{:});
+else
+  gf_mesh_im_data_set(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshImData/subsref.m 
b/interface/src/octave/@gfMeshImData/subsref.m
new file mode 100644
index 0000000..4497f19
--- /dev/null
+++ b/interface/src/octave/@gfMeshImData/subsref.m
@@ -0,0 +1,80 @@
+function [varargout]=subsref(obj, index)
+% gfMeshImData/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_mesh_im_data_get;
+  FSET = @gf_mesh_im_data_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfMeshImData objects')
+    case '()'
+      error('array indexing not supported by gfMeshImData objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'set_region'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'region', index(2).subs{:});
+          else
+            FSET(obj, 'region', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_tensor_size'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'tensor_size', 
index(2).subs{:});
+          else
+            FSET(obj, 'tensor_size', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, index(2).subs{:});
+          else
+            FSET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshLevelSet/char.m 
b/interface/src/octave/@gfMeshLevelSet/char.m
new file mode 100644
index 0000000..f6ca02b
--- /dev/null
+++ b/interface/src/octave/@gfMeshLevelSet/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfMeshLevelSet/char output a textual representation of the object
+  s=gf_mesh_levelset_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshLevelSet/display.m 
b/interface/src/octave/@gfMeshLevelSet/display.m
new file mode 100644
index 0000000..bd967a4
--- /dev/null
+++ b/interface/src/octave/@gfMeshLevelSet/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfMeshLevelSet/display displays a short summary for a gfMeshLevelSet object 
+  for i=1:numel(cs),
+    gf_mesh_levelset_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshLevelSet/get.m 
b/interface/src/octave/@gfMeshLevelSet/get.m
new file mode 100644
index 0000000..1a54500
--- /dev/null
+++ b/interface/src/octave/@gfMeshLevelSet/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfMeshLevelSet/get.m
+% see gf_mesh_levelset_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_mesh_levelset_get(obj, varargin{:});
+else
+  gf_mesh_levelset_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshLevelSet/gfMeshLevelSet.m 
b/interface/src/octave/@gfMeshLevelSet/gfMeshLevelSet.m
new file mode 100644
index 0000000..8de9011
--- /dev/null
+++ b/interface/src/octave/@gfMeshLevelSet/gfMeshLevelSet.m
@@ -0,0 +1,21 @@
+function [m,b]=gfMeshLevelSet(a, varargin)
+% gfMeshLevelSet class pseudo-constructor
+  this_class = 'gfMeshLevelSet';
+  if (nargin==0) error('cant create an empty mesh_levelset reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_mesh_levelset(a,varargin{:});
+      end;
+    else
+      m = gf_mesh_levelset(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshLevelSet/loadobj.m 
b/interface/src/octave/@gfMeshLevelSet/loadobj.m
new file mode 100644
index 0000000..91d4bd3
--- /dev/null
+++ b/interface/src/octave/@gfMeshLevelSet/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfMeshLevelSet/loadobj
+% this function is automatically called by matlab when objects of class
+% gfMeshLevelSetare loaded from a MAT-file
+  a=gfMeshLevelSet('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshLevelSet/saveobj.m 
b/interface/src/octave/@gfMeshLevelSet/saveobj.m
new file mode 100644
index 0000000..bf65593
--- /dev/null
+++ b/interface/src/octave/@gfMeshLevelSet/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfMeshLevelSet/saveobj
+% this function is automatically called by matlab when objects of class
+% gfMeshLevelSetare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshLevelSet/set.m 
b/interface/src/octave/@gfMeshLevelSet/set.m
new file mode 100644
index 0000000..5c2a094
--- /dev/null
+++ b/interface/src/octave/@gfMeshLevelSet/set.m
@@ -0,0 +1,11 @@
+function varargout=set(obj, varargin)
+% gfMeshLevelSet/set.m
+% see gf_mesh_levelset_set for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_mesh_levelset_set(obj, varargin{:});
+else
+  gf_mesh_levelset_set(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMeshLevelSet/subsref.m 
b/interface/src/octave/@gfMeshLevelSet/subsref.m
new file mode 100644
index 0000000..9dbbebb
--- /dev/null
+++ b/interface/src/octave/@gfMeshLevelSet/subsref.m
@@ -0,0 +1,90 @@
+function [varargout]=subsref(obj, index)
+% gfMeshLevelSet/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_mesh_levelset_get;
+  FSET = @gf_mesh_levelset_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfMeshLevelSet objects')
+    case '()'
+      error('array indexing not supported by gfMeshLevelSet objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'add'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add', index(2).subs{:});
+          else
+            FSET(obj, 'add', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'sup'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'sup', index(2).subs{:});
+          else
+            FSET(obj, 'sup', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'adapt'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'adapt', index(2).subs{:});
+          else
+            FSET(obj, 'adapt', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, index(2).subs{:});
+          else
+            FSET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesherObject/char.m 
b/interface/src/octave/@gfMesherObject/char.m
new file mode 100644
index 0000000..afe6f22
--- /dev/null
+++ b/interface/src/octave/@gfMesherObject/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfMesherObject/char output a textual representation of the object
+  s=gf_mesher_object_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesherObject/display.m 
b/interface/src/octave/@gfMesherObject/display.m
new file mode 100644
index 0000000..c350a10
--- /dev/null
+++ b/interface/src/octave/@gfMesherObject/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfMesherObject/display displays a short summary for a gfMesherObject object 
+  for i=1:numel(cs),
+    gf_mesher_object_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesherObject/get.m 
b/interface/src/octave/@gfMesherObject/get.m
new file mode 100644
index 0000000..8958c81
--- /dev/null
+++ b/interface/src/octave/@gfMesherObject/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfMesherObject/get.m
+% see gf_mesher_object_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_mesher_object_get(obj, varargin{:});
+else
+  gf_mesher_object_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesherObject/gfMesherObject.m 
b/interface/src/octave/@gfMesherObject/gfMesherObject.m
new file mode 100644
index 0000000..9e6663e
--- /dev/null
+++ b/interface/src/octave/@gfMesherObject/gfMesherObject.m
@@ -0,0 +1,21 @@
+function [m,b]=gfMesherObject(a, varargin)
+% gfMesherObject class pseudo-constructor
+  this_class = 'gfMesherObject';
+  if (nargin==0) error('cant create an empty mesher_object reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_mesher_object(a,varargin{:});
+      end;
+    else
+      m = gf_mesher_object(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesherObject/loadobj.m 
b/interface/src/octave/@gfMesherObject/loadobj.m
new file mode 100644
index 0000000..8168c10
--- /dev/null
+++ b/interface/src/octave/@gfMesherObject/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfMesherObject/loadobj
+% this function is automatically called by matlab when objects of class
+% gfMesherObjectare loaded from a MAT-file
+  a=gfMesherObject('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesherObject/saveobj.m 
b/interface/src/octave/@gfMesherObject/saveobj.m
new file mode 100644
index 0000000..c644fed
--- /dev/null
+++ b/interface/src/octave/@gfMesherObject/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfMesherObject/saveobj
+% this function is automatically called by matlab when objects of class
+% gfMesherObjectare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfMesherObject/subsref.m 
b/interface/src/octave/@gfMesherObject/subsref.m
new file mode 100644
index 0000000..7bf46ec
--- /dev/null
+++ b/interface/src/octave/@gfMesherObject/subsref.m
@@ -0,0 +1,48 @@
+function [varargout]=subsref(obj, index)
+% gfMesherObject/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_mesher_object_get;
+  FSET = @gf_mesher_object_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfMesherObject objects')
+    case '()'
+      error('array indexing not supported by gfMesherObject objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfModel/char.m 
b/interface/src/octave/@gfModel/char.m
new file mode 100644
index 0000000..09b73fb
--- /dev/null
+++ b/interface/src/octave/@gfModel/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfModel/char output a textual representation of the object
+  s=gf_model_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfModel/display.m 
b/interface/src/octave/@gfModel/display.m
new file mode 100644
index 0000000..55b294f
--- /dev/null
+++ b/interface/src/octave/@gfModel/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfModel/display displays a short summary for a gfModel object 
+  for i=1:numel(cs),
+    gf_model_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfModel/get.m 
b/interface/src/octave/@gfModel/get.m
new file mode 100644
index 0000000..bffa439
--- /dev/null
+++ b/interface/src/octave/@gfModel/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfModel/get.m
+% see gf_model_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_model_get(obj, varargin{:});
+else
+  gf_model_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfModel/gfModel.m 
b/interface/src/octave/@gfModel/gfModel.m
new file mode 100644
index 0000000..ff8e50a
--- /dev/null
+++ b/interface/src/octave/@gfModel/gfModel.m
@@ -0,0 +1,21 @@
+function [m,b]=gfModel(a, varargin)
+% gfModel class pseudo-constructor
+  this_class = 'gfModel';
+  if (nargin==0) error('cant create an empty model reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_model(a,varargin{:});
+      end;
+    else
+      m = gf_model(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfModel/loadobj.m 
b/interface/src/octave/@gfModel/loadobj.m
new file mode 100644
index 0000000..e854c42
--- /dev/null
+++ b/interface/src/octave/@gfModel/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfModel/loadobj
+% this function is automatically called by matlab when objects of class
+% gfModelare loaded from a MAT-file
+  a=gfModel('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfModel/saveobj.m 
b/interface/src/octave/@gfModel/saveobj.m
new file mode 100644
index 0000000..169c45b
--- /dev/null
+++ b/interface/src/octave/@gfModel/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfModel/saveobj
+% this function is automatically called by matlab when objects of class
+% gfModelare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfModel/set.m 
b/interface/src/octave/@gfModel/set.m
new file mode 100644
index 0000000..5c3574e
--- /dev/null
+++ b/interface/src/octave/@gfModel/set.m
@@ -0,0 +1,11 @@
+function varargout=set(obj, varargin)
+% gfModel/set.m
+% see gf_model_set for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_model_set(obj, varargin{:});
+else
+  gf_model_set(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfModel/subsref.m 
b/interface/src/octave/@gfModel/subsref.m
new file mode 100644
index 0000000..ae27674
--- /dev/null
+++ b/interface/src/octave/@gfModel/subsref.m
@@ -0,0 +1,1270 @@
+function [varargout]=subsref(obj, index)
+% gfModel/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_model_get;
+  FSET = @gf_model_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfModel objects')
+    case '()'
+      error('array indexing not supported by gfModel objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'clear'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'clear', index(2).subs{:});
+          else
+            FSET(obj, 'clear', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_fem_variable'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_fem_variable', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_fem_variable', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_filtered_fem_variable'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_filtered_fem_variable', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_filtered_fem_variable', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_variable'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_variable', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_variable', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'delete_variable'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'delete_variable', 
index(2).subs{:});
+          else
+            FSET(obj, 'delete_variable', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'resize_variable'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'resize_variable', 
index(2).subs{:});
+          else
+            FSET(obj, 'resize_variable', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_multiplier'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_multiplier', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_multiplier', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_im_data'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_im_data', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_im_data', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_fem_data'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_fem_data', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_fem_data', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_initialized_fem_data'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_initialized_fem_data', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_initialized_fem_data', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_data'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_data', index(2).subs{:});
+          else
+            FSET(obj, 'add_data', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_macro'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_macro', index(2).subs{:});
+          else
+            FSET(obj, 'add_macro', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'del_macro'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'del_macro', index(2).subs{:});
+          else
+            FSET(obj, 'del_macro', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_initialized_data'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_initialized_data', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_initialized_data', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_variable'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'variable', index(2).subs{:});
+          else
+            FSET(obj, 'variable', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'to_variables'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'to_variables', 
index(2).subs{:});
+          else
+            FSET(obj, 'to_variables', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'delete_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'delete_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 'delete_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'define_variable_group'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'define_variable_group', 
index(2).subs{:});
+          else
+            FSET(obj, 'define_variable_group', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_elementary_rotated_RT0_projection'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_elementary_rotated_RT0_projection', index(2).subs{:});
+          else
+            FSET(obj, 'add_elementary_rotated_RT0_projection', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_interpolate_transformation_from_expression'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_interpolate_transformation_from_expression', index(2).subs{:});
+          else
+            FSET(obj, 'add_interpolate_transformation_from_expression', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_element_extrapolation_transformation'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_element_extrapolation_transformation', index(2).subs{:});
+          else
+            FSET(obj, 'add_element_extrapolation_transformation', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_element_extrapolation_correspondance'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'set_element_extrapolation_correspondance', index(2).subs{:});
+          else
+            FSET(obj, 'set_element_extrapolation_correspondance', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_raytracing_transformation'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_raytracing_transformation', index(2).subs{:});
+          else
+            FSET(obj, 'add_raytracing_transformation', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_master_contact_boundary_to_raytracing_transformation'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_master_contact_boundary_to_raytracing_transformation', index(2).subs{:});
+          else
+            FSET(obj, 
'add_master_contact_boundary_to_raytracing_transformation', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_slave_contact_boundary_to_raytracing_transformation'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_slave_contact_boundary_to_raytracing_transformation', index(2).subs{:});
+          else
+            FSET(obj, 
'add_slave_contact_boundary_to_raytracing_transformation', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_rigid_obstacle_to_raytracing_transformation'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_rigid_obstacle_to_raytracing_transformation', index(2).subs{:});
+          else
+            FSET(obj, 'add_rigid_obstacle_to_raytracing_transformation', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_projection_transformation'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_projection_transformation', index(2).subs{:});
+          else
+            FSET(obj, 'add_projection_transformation', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_master_contact_boundary_to_projection_transformation'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_master_contact_boundary_to_projection_transformation', index(2).subs{:});
+          else
+            FSET(obj, 
'add_master_contact_boundary_to_projection_transformation', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_slave_contact_boundary_to_projection_transformation'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_slave_contact_boundary_to_projection_transformation', index(2).subs{:});
+          else
+            FSET(obj, 
'add_slave_contact_boundary_to_projection_transformation', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_rigid_obstacle_to_projection_transformation'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_rigid_obstacle_to_projection_transformation', index(2).subs{:});
+          else
+            FSET(obj, 'add_rigid_obstacle_to_projection_transformation', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_linear_term'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_linear_term', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_linear_term', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_linear_generic_assembly_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_linear_generic_assembly_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_linear_generic_assembly_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_nonlinear_term'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_nonlinear_term', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_nonlinear_term', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_nonlinear_generic_assembly_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_nonlinear_generic_assembly_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_nonlinear_generic_assembly_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_source_term'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_source_term', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_source_term', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_source_term_generic_assembly_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_source_term_generic_assembly_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_source_term_generic_assembly_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_assembly_assignment'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_assembly_assignment', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_assembly_assignment', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'clear_assembly_assignment'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'clear_assembly_assignment', 
index(2).subs{:});
+          else
+            FSET(obj, 'clear_assembly_assignment', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Laplacian_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_Laplacian_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_Laplacian_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_generic_elliptic_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_generic_elliptic_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_generic_elliptic_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_source_term_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_source_term_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_source_term_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_normal_source_term_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_normal_source_term_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_normal_source_term_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Dirichlet_condition_with_simplification'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_Dirichlet_condition_with_simplification', index(2).subs{:});
+          else
+            FSET(obj, 'add_Dirichlet_condition_with_simplification', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Dirichlet_condition_with_multipliers'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_Dirichlet_condition_with_multipliers', index(2).subs{:});
+          else
+            FSET(obj, 'add_Dirichlet_condition_with_multipliers', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Dirichlet_condition_with_Nitsche_method'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_Dirichlet_condition_with_Nitsche_method', index(2).subs{:});
+          else
+            FSET(obj, 'add_Dirichlet_condition_with_Nitsche_method', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Dirichlet_condition_with_penalization'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_Dirichlet_condition_with_penalization', index(2).subs{:});
+          else
+            FSET(obj, 'add_Dirichlet_condition_with_penalization', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_normal_Dirichlet_condition_with_multipliers'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_normal_Dirichlet_condition_with_multipliers', index(2).subs{:});
+          else
+            FSET(obj, 'add_normal_Dirichlet_condition_with_multipliers', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_normal_Dirichlet_condition_with_penalization'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_normal_Dirichlet_condition_with_penalization', index(2).subs{:});
+          else
+            FSET(obj, 'add_normal_Dirichlet_condition_with_penalization', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_normal_Dirichlet_condition_with_Nitsche_method'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_normal_Dirichlet_condition_with_Nitsche_method', index(2).subs{:});
+          else
+            FSET(obj, 'add_normal_Dirichlet_condition_with_Nitsche_method', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_generalized_Dirichlet_condition_with_multipliers'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_generalized_Dirichlet_condition_with_multipliers', index(2).subs{:});
+          else
+            FSET(obj, 'add_generalized_Dirichlet_condition_with_multipliers', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_generalized_Dirichlet_condition_with_penalization'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_generalized_Dirichlet_condition_with_penalization', index(2).subs{:});
+          else
+            FSET(obj, 'add_generalized_Dirichlet_condition_with_penalization', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_generalized_Dirichlet_condition_with_Nitsche_method'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_generalized_Dirichlet_condition_with_Nitsche_method', index(2).subs{:});
+          else
+            FSET(obj, 
'add_generalized_Dirichlet_condition_with_Nitsche_method', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_pointwise_constraints_with_multipliers'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_pointwise_constraints_with_multipliers', index(2).subs{:});
+          else
+            FSET(obj, 'add_pointwise_constraints_with_multipliers', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_pointwise_constraints_with_given_multipliers'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_pointwise_constraints_with_given_multipliers', index(2).subs{:});
+          else
+            FSET(obj, 'add_pointwise_constraints_with_given_multipliers', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_pointwise_constraints_with_penalization'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_pointwise_constraints_with_penalization', index(2).subs{:});
+          else
+            FSET(obj, 'add_pointwise_constraints_with_penalization', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'change_penalization_coeff'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'change_penalization_coeff', 
index(2).subs{:});
+          else
+            FSET(obj, 'change_penalization_coeff', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Helmholtz_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_Helmholtz_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_Helmholtz_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Fourier_Robin_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_Fourier_Robin_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_Fourier_Robin_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_constraint_with_multipliers'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_constraint_with_multipliers', index(2).subs{:});
+          else
+            FSET(obj, 'add_constraint_with_multipliers', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_constraint_with_penalization'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_constraint_with_penalization', index(2).subs{:});
+          else
+            FSET(obj, 'add_constraint_with_penalization', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_explicit_matrix'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_explicit_matrix', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_explicit_matrix', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_explicit_rhs'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_explicit_rhs', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_explicit_rhs', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_private_matrix'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'set_private_matrix', 
index(2).subs{:});
+          else
+            FSET(obj, 'set_private_matrix', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_private_rhs'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'set_private_rhs', 
index(2).subs{:});
+          else
+            FSET(obj, 'set_private_rhs', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_isotropic_linearized_elasticity_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_isotropic_linearized_elasticity_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_isotropic_linearized_elasticity_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_isotropic_linearized_elasticity_brick_pstrain'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_isotropic_linearized_elasticity_brick_pstrain', index(2).subs{:});
+          else
+            FSET(obj, 'add_isotropic_linearized_elasticity_brick_pstrain', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_isotropic_linearized_elasticity_brick_pstress'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_isotropic_linearized_elasticity_brick_pstress', index(2).subs{:});
+          else
+            FSET(obj, 'add_isotropic_linearized_elasticity_brick_pstress', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_linear_incompressibility_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_linear_incompressibility_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_linear_incompressibility_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_nonlinear_elasticity_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_nonlinear_elasticity_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_nonlinear_elasticity_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_finite_strain_elasticity_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_finite_strain_elasticity_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_finite_strain_elasticity_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_small_strain_elastoplasticity_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_small_strain_elastoplasticity_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_small_strain_elastoplasticity_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_elastoplasticity_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_elastoplasticity_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_elastoplasticity_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_finite_strain_elastoplasticity_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_finite_strain_elastoplasticity_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_finite_strain_elastoplasticity_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_nonlinear_incompressibility_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_nonlinear_incompressibility_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_nonlinear_incompressibility_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_finite_strain_incompressibility_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_finite_strain_incompressibility_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_finite_strain_incompressibility_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_bilaplacian_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_bilaplacian_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_bilaplacian_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Kirchhoff_Love_plate_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_Kirchhoff_Love_plate_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_Kirchhoff_Love_plate_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_normal_derivative_source_term_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_normal_derivative_source_term_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_normal_derivative_source_term_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Kirchhoff_Love_Neumann_term_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_Kirchhoff_Love_Neumann_term_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_Kirchhoff_Love_Neumann_term_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_normal_derivative_Dirichlet_condition_with_multipliers'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_normal_derivative_Dirichlet_condition_with_multipliers', index(2).subs{:});
+          else
+            FSET(obj, 
'add_normal_derivative_Dirichlet_condition_with_multipliers', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_normal_derivative_Dirichlet_condition_with_penalization'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_normal_derivative_Dirichlet_condition_with_penalization', 
index(2).subs{:});
+          else
+            FSET(obj, 
'add_normal_derivative_Dirichlet_condition_with_penalization', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Mindlin_Reissner_plate_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_Mindlin_Reissner_plate_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_Mindlin_Reissner_plate_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_mass_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_mass_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_mass_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'shift_variables_for_time_integration'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'shift_variables_for_time_integration', index(2).subs{:});
+          else
+            FSET(obj, 'shift_variables_for_time_integration', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'perform_init_time_derivative'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'perform_init_time_derivative', 
index(2).subs{:});
+          else
+            FSET(obj, 'perform_init_time_derivative', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_time_step'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'set_time_step', 
index(2).subs{:});
+          else
+            FSET(obj, 'set_time_step', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_time'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'set_time', index(2).subs{:});
+          else
+            FSET(obj, 'set_time', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_theta_method_for_first_order'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_theta_method_for_first_order', index(2).subs{:});
+          else
+            FSET(obj, 'add_theta_method_for_first_order', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_theta_method_for_second_order'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_theta_method_for_second_order', index(2).subs{:});
+          else
+            FSET(obj, 'add_theta_method_for_second_order', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Newmark_scheme'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_Newmark_scheme', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_Newmark_scheme', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'disable_bricks'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'disable_bricks', 
index(2).subs{:});
+          else
+            FSET(obj, 'disable_bricks', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'enable_bricks'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'enable_bricks', 
index(2).subs{:});
+          else
+            FSET(obj, 'enable_bricks', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'disable_variable'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'disable_variable', 
index(2).subs{:});
+          else
+            FSET(obj, 'disable_variable', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'enable_variable'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'enable_variable', 
index(2).subs{:});
+          else
+            FSET(obj, 'enable_variable', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'first_iter'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'first_iter', index(2).subs{:});
+          else
+            FSET(obj, 'first_iter', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'next_iter'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'next_iter', index(2).subs{:});
+          else
+            FSET(obj, 'next_iter', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_basic_contact_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add_basic_contact_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 'add_basic_contact_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_basic_contact_brick_two_deformable_bodies'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_basic_contact_brick_two_deformable_bodies', index(2).subs{:});
+          else
+            FSET(obj, 'add_basic_contact_brick_two_deformable_bodies', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'contact_brick_set_BN'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'contact_brick_set_BN', 
index(2).subs{:});
+          else
+            FSET(obj, 'contact_brick_set_BN', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'contact_brick_set_BT'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'contact_brick_set_BT', 
index(2).subs{:});
+          else
+            FSET(obj, 'contact_brick_set_BT', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_nodal_contact_with_rigid_obstacle_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_nodal_contact_with_rigid_obstacle_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_nodal_contact_with_rigid_obstacle_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_contact_with_rigid_obstacle_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_contact_with_rigid_obstacle_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_contact_with_rigid_obstacle_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_integral_contact_with_rigid_obstacle_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_integral_contact_with_rigid_obstacle_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_integral_contact_with_rigid_obstacle_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_penalized_contact_with_rigid_obstacle_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_penalized_contact_with_rigid_obstacle_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_penalized_contact_with_rigid_obstacle_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Nitsche_contact_with_rigid_obstacle_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_Nitsche_contact_with_rigid_obstacle_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_Nitsche_contact_with_rigid_obstacle_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Nitsche_midpoint_contact_with_rigid_obstacle_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_Nitsche_midpoint_contact_with_rigid_obstacle_brick', index(2).subs{:});
+          else
+            FSET(obj, 
'add_Nitsche_midpoint_contact_with_rigid_obstacle_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Nitsche_fictitious_domain_contact_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_Nitsche_fictitious_domain_contact_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_Nitsche_fictitious_domain_contact_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_nodal_contact_between_nonmatching_meshes_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_nodal_contact_between_nonmatching_meshes_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_nodal_contact_between_nonmatching_meshes_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_nonmatching_meshes_contact_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_nonmatching_meshes_contact_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_nonmatching_meshes_contact_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_integral_contact_between_nonmatching_meshes_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_integral_contact_between_nonmatching_meshes_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_integral_contact_between_nonmatching_meshes_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_penalized_contact_between_nonmatching_meshes_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_penalized_contact_between_nonmatching_meshes_brick', index(2).subs{:});
+          else
+            FSET(obj, 
'add_penalized_contact_between_nonmatching_meshes_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_integral_large_sliding_contact_brick_raytracing'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_integral_large_sliding_contact_brick_raytracing', index(2).subs{:});
+          else
+            FSET(obj, 'add_integral_large_sliding_contact_brick_raytracing', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_rigid_obstacle_to_large_sliding_contact_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_rigid_obstacle_to_large_sliding_contact_brick', index(2).subs{:});
+          else
+            FSET(obj, 'add_rigid_obstacle_to_large_sliding_contact_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_master_contact_boundary_to_large_sliding_contact_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_master_contact_boundary_to_large_sliding_contact_brick', index(2).subs{:});
+          else
+            FSET(obj, 
'add_master_contact_boundary_to_large_sliding_contact_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_slave_contact_boundary_to_large_sliding_contact_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_slave_contact_boundary_to_large_sliding_contact_brick', index(2).subs{:});
+          else
+            FSET(obj, 
'add_slave_contact_boundary_to_large_sliding_contact_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_master_slave_contact_boundary_to_large_sliding_contact_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_master_slave_contact_boundary_to_large_sliding_contact_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 
'add_master_slave_contact_boundary_to_large_sliding_contact_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_Nitsche_large_sliding_contact_brick_raytracing'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_Nitsche_large_sliding_contact_brick_raytracing', index(2).subs{:});
+          else
+            FSET(obj, 'add_Nitsche_large_sliding_contact_brick_raytracing', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add_rigid_obstacle_to_Nitsche_large_sliding_contact_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_rigid_obstacle_to_Nitsche_large_sliding_contact_brick', index(2).subs{:});
+          else
+            FSET(obj, 
'add_rigid_obstacle_to_Nitsche_large_sliding_contact_brick', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 
'add_master_contact_boundary_to_biased_Nitsche_large_sliding_contact_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_master_contact_boundary_to_biased_Nitsche_large_sliding_contact_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 
'add_master_contact_boundary_to_biased_Nitsche_large_sliding_contact_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 
'add_slave_contact_boundary_to_biased_Nitsche_large_sliding_contact_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_slave_contact_boundary_to_biased_Nitsche_large_sliding_contact_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 
'add_slave_contact_boundary_to_biased_Nitsche_large_sliding_contact_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 
'add_contact_boundary_to_unbiased_Nitsche_large_sliding_contact_brick'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 
'add_contact_boundary_to_unbiased_Nitsche_large_sliding_contact_brick', 
index(2).subs{:});
+          else
+            FSET(obj, 
'add_contact_boundary_to_unbiased_Nitsche_large_sliding_contact_brick', 
index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, index(2).subs{:});
+          else
+            FSET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfPrecond/char.m 
b/interface/src/octave/@gfPrecond/char.m
new file mode 100644
index 0000000..d2459b4
--- /dev/null
+++ b/interface/src/octave/@gfPrecond/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfPrecond/char output a textual representation of the object
+  s=gf_precond_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfPrecond/display.m 
b/interface/src/octave/@gfPrecond/display.m
new file mode 100644
index 0000000..42a0a81
--- /dev/null
+++ b/interface/src/octave/@gfPrecond/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfPrecond/display displays a short summary for a gfPrecond object 
+  for i=1:numel(cs),
+    gf_precond_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfPrecond/get.m 
b/interface/src/octave/@gfPrecond/get.m
new file mode 100644
index 0000000..19b95be
--- /dev/null
+++ b/interface/src/octave/@gfPrecond/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfPrecond/get.m
+% see gf_precond_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_precond_get(obj, varargin{:});
+else
+  gf_precond_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfPrecond/gfPrecond.m 
b/interface/src/octave/@gfPrecond/gfPrecond.m
new file mode 100644
index 0000000..f251998
--- /dev/null
+++ b/interface/src/octave/@gfPrecond/gfPrecond.m
@@ -0,0 +1,21 @@
+function [m,b]=gfPrecond(a, varargin)
+% gfPrecond class pseudo-constructor
+  this_class = 'gfPrecond';
+  if (nargin==0) error('cant create an empty precond reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_precond(a,varargin{:});
+      end;
+    else
+      m = gf_precond(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfPrecond/loadobj.m 
b/interface/src/octave/@gfPrecond/loadobj.m
new file mode 100644
index 0000000..3d8370a
--- /dev/null
+++ b/interface/src/octave/@gfPrecond/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfPrecond/loadobj
+% this function is automatically called by matlab when objects of class
+% gfPrecondare loaded from a MAT-file
+  a=gfPrecond('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfPrecond/saveobj.m 
b/interface/src/octave/@gfPrecond/saveobj.m
new file mode 100644
index 0000000..d0778b8
--- /dev/null
+++ b/interface/src/octave/@gfPrecond/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfPrecond/saveobj
+% this function is automatically called by matlab when objects of class
+% gfPrecondare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfPrecond/subsref.m 
b/interface/src/octave/@gfPrecond/subsref.m
new file mode 100644
index 0000000..a146c38
--- /dev/null
+++ b/interface/src/octave/@gfPrecond/subsref.m
@@ -0,0 +1,48 @@
+function [varargout]=subsref(obj, index)
+% gfPrecond/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_precond_get;
+  FSET = @gf_precond_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfPrecond objects')
+    case '()'
+      error('array indexing not supported by gfPrecond objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSlice/char.m 
b/interface/src/octave/@gfSlice/char.m
new file mode 100644
index 0000000..f4255f4
--- /dev/null
+++ b/interface/src/octave/@gfSlice/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfSlice/char output a textual representation of the object
+  s=gf_slice_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSlice/display.m 
b/interface/src/octave/@gfSlice/display.m
new file mode 100644
index 0000000..8af5a59
--- /dev/null
+++ b/interface/src/octave/@gfSlice/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfSlice/display displays a short summary for a gfSlice object 
+  for i=1:numel(cs),
+    gf_slice_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSlice/get.m 
b/interface/src/octave/@gfSlice/get.m
new file mode 100644
index 0000000..41c7ef1
--- /dev/null
+++ b/interface/src/octave/@gfSlice/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfSlice/get.m
+% see gf_slice_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_slice_get(obj, varargin{:});
+else
+  gf_slice_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSlice/gfSlice.m 
b/interface/src/octave/@gfSlice/gfSlice.m
new file mode 100644
index 0000000..cb6e374
--- /dev/null
+++ b/interface/src/octave/@gfSlice/gfSlice.m
@@ -0,0 +1,21 @@
+function [m,b]=gfSlice(a, varargin)
+% gfSlice class pseudo-constructor
+  this_class = 'gfSlice';
+  if (nargin==0) error('cant create an empty slice reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_slice(a,varargin{:});
+      end;
+    else
+      m = gf_slice(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSlice/loadobj.m 
b/interface/src/octave/@gfSlice/loadobj.m
new file mode 100644
index 0000000..83b68ec
--- /dev/null
+++ b/interface/src/octave/@gfSlice/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfSlice/loadobj
+% this function is automatically called by matlab when objects of class
+% gfSliceare loaded from a MAT-file
+  a=gfSlice('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSlice/saveobj.m 
b/interface/src/octave/@gfSlice/saveobj.m
new file mode 100644
index 0000000..fe0371b
--- /dev/null
+++ b/interface/src/octave/@gfSlice/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfSlice/saveobj
+% this function is automatically called by matlab when objects of class
+% gfSliceare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSlice/set.m 
b/interface/src/octave/@gfSlice/set.m
new file mode 100644
index 0000000..a6e84b7
--- /dev/null
+++ b/interface/src/octave/@gfSlice/set.m
@@ -0,0 +1,11 @@
+function varargout=set(obj, varargin)
+% gfSlice/set.m
+% see gf_slice_set for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_slice_set(obj, varargin{:});
+else
+  gf_slice_set(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSlice/subsref.m 
b/interface/src/octave/@gfSlice/subsref.m
new file mode 100644
index 0000000..4aea291
--- /dev/null
+++ b/interface/src/octave/@gfSlice/subsref.m
@@ -0,0 +1,70 @@
+function [varargout]=subsref(obj, index)
+% gfSlice/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_slice_get;
+  FSET = @gf_slice_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfSlice objects')
+    case '()'
+      error('array indexing not supported by gfSlice objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'set_pts'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'pts', index(2).subs{:});
+          else
+            FSET(obj, 'pts', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, index(2).subs{:});
+          else
+            FSET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSpmat/char.m 
b/interface/src/octave/@gfSpmat/char.m
new file mode 100644
index 0000000..0609daa
--- /dev/null
+++ b/interface/src/octave/@gfSpmat/char.m
@@ -0,0 +1,4 @@
+function s=char(m)
+% gfSpmat/char output a textual representation of the object
+  s=gf_spmat_get(m,'char');
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSpmat/display.m 
b/interface/src/octave/@gfSpmat/display.m
new file mode 100644
index 0000000..caf6c7a
--- /dev/null
+++ b/interface/src/octave/@gfSpmat/display.m
@@ -0,0 +1,6 @@
+function display(cs)
+% gfSpmat/display displays a short summary for a gfSpmat object 
+  for i=1:numel(cs),
+    gf_spmat_get(cs(i), 'display');
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSpmat/get.m 
b/interface/src/octave/@gfSpmat/get.m
new file mode 100644
index 0000000..1be23eb
--- /dev/null
+++ b/interface/src/octave/@gfSpmat/get.m
@@ -0,0 +1,11 @@
+function varargout=get(obj, varargin)
+% gfSpmat/get.m
+% see gf_spmat_get for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_spmat_get(obj, varargin{:});
+else
+  gf_spmat_get(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSpmat/gfSpmat.m 
b/interface/src/octave/@gfSpmat/gfSpmat.m
new file mode 100644
index 0000000..e1671e5
--- /dev/null
+++ b/interface/src/octave/@gfSpmat/gfSpmat.m
@@ -0,0 +1,21 @@
+function [m,b]=gfSpmat(a, varargin)
+% gfSpmat class pseudo-constructor
+  this_class = 'gfSpmat';
+  if (nargin==0) error('cant create an empty spmat reference'); end;
+  if (isa(a,this_class)),
+    m=a;
+  else
+    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
+      cname = gf_workspace('class name',a);
+      if (strcmp(cname, this_class))
+        m = a;
+      else
+        m = gf_spmat(a,varargin{:});
+      end;
+    else
+      m = gf_spmat(a,varargin{:});
+    end;
+    m.txt = '';
+    m = class(m, this_class);
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSpmat/loadobj.m 
b/interface/src/octave/@gfSpmat/loadobj.m
new file mode 100644
index 0000000..ca9dc39
--- /dev/null
+++ b/interface/src/octave/@gfSpmat/loadobj.m
@@ -0,0 +1,6 @@
+function a=loadobj(a)
+% gfSpmat/loadobj
+% this function is automatically called by matlab when objects of class
+% gfSpmatare loaded from a MAT-file
+  a=gfSpmat('from string',b.txt);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSpmat/saveobj.m 
b/interface/src/octave/@gfSpmat/saveobj.m
new file mode 100644
index 0000000..f03cdec
--- /dev/null
+++ b/interface/src/octave/@gfSpmat/saveobj.m
@@ -0,0 +1,6 @@
+function b=saveobj(a)
+% gfSpmat/saveobj
+% this function is automatically called by matlab when objects of class
+% gfSpmatare saved in a MAT-file
+  b=a; b.txt=char(a);
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSpmat/set.m 
b/interface/src/octave/@gfSpmat/set.m
new file mode 100644
index 0000000..b65414c
--- /dev/null
+++ b/interface/src/octave/@gfSpmat/set.m
@@ -0,0 +1,11 @@
+function varargout=set(obj, varargin)
+% gfSpmat/set.m
+% see gf_spmat_set for more help.
+if (nargout), 
+  [varargout{1:nargout}] = gf_spmat_set(obj, varargin{:});
+else
+  gf_spmat_set(obj,varargin{:});
+  if (exist('ans','var') == 1), varargout{1}=ans;
+  end;
+end;
+% autogenerated mfile;
diff --git a/interface/src/octave/@gfSpmat/subsref.m 
b/interface/src/octave/@gfSpmat/subsref.m
new file mode 100644
index 0000000..77bcc30
--- /dev/null
+++ b/interface/src/octave/@gfSpmat/subsref.m
@@ -0,0 +1,170 @@
+function [varargout]=subsref(obj, index)
+% gfSpmat/subsref
+  nout = max(nargout, 1); cnt=1;
+  FGET = @gf_spmat_get;
+  FSET = @gf_spmat_set;
+  switch index(1).type
+    case '{}'
+      error('Cell array indexing not supported by gfSpmat objects')
+    case '()'
+      error('array indexing not supported by gfSpmat objects')
+    case '.'
+      switch index(1).subs
+        case 'id'
+          [varargout{1:nout}] = obj.id;
+        case 'clear'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'clear', index(2).subs{:});
+          else
+            FSET(obj, 'clear', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'scale'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'scale', index(2).subs{:});
+          else
+            FSET(obj, 'scale', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'transpose'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'transpose', index(2).subs{:});
+          else
+            FSET(obj, 'transpose', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'conjugate'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'conjugate', index(2).subs{:});
+          else
+            FSET(obj, 'conjugate', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'transconj'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'transconj', index(2).subs{:});
+          else
+            FSET(obj, 'transconj', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'to_csc'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'to_csc', index(2).subs{:});
+          else
+            FSET(obj, 'to_csc', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'to_wsc'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'to_wsc', index(2).subs{:});
+          else
+            FSET(obj, 'to_wsc', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'to_complex'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'to_complex', index(2).subs{:});
+          else
+            FSET(obj, 'to_complex', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set_diag'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'diag', index(2).subs{:});
+          else
+            FSET(obj, 'diag', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'assign'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'assign', index(2).subs{:});
+          else
+            FSET(obj, 'assign', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'add'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, 'add', index(2).subs{:});
+          else
+            FSET(obj, 'add', index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              varargout{1}=ans;
+            end;
+          end;
+          return;
+        case 'set'
+          if (nargout)
+            [varargout{1:nargout}] = FSET(obj, index(2).subs{:});
+          else
+            FSET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        case 'get'
+          if (nargout) 
+            h = FGET(obj, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          else
+            FGET(obj,index(2).subs{:});
+            if (exist('ans', 'var') == 1)
+              h=ans;
+              if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+              varargout{1}=h;
+            end;
+          end;
+          return;
+        otherwise
+          if ((numel(index) > 1) && (strcmp(index(2).type, '()')))
+            h = FGET(obj,index(1).subs, index(2).subs{:});
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+            cnt = cnt + 1;
+          else
+            h = FGET(obj, index(1).subs);
+            if (isstruct(h) & isfield(h,'id') & isfield(h,'cid')), h = 
gfObject(h); end;
+            [varargout{1:nargout}] = h;
+          end
+      end
+  end
+  % if there are others indexes, let matlab do its work
+  if (numel(index) > cnt)
+    for i=1:nout,
+      varargout{i} = subsref(varargout{i}, index((cnt+1):end));
+    end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/Makefile.am b/interface/src/octave/Makefile.am
new file mode 100644
index 0000000..99771cd
--- /dev/null
+++ b/interface/src/octave/Makefile.am
@@ -0,0 +1,121 @@
+#  Copyright (C) 1999-2017 Yves Renard
+#
+#  This file is a part of GetFEM++
+#
+#  GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+#  under  the  terms  of the  GNU  Lesser General Public License as published
+#  by  the  Free Software Foundation;  either version 3 of the License,  or
+#  (at your option) any later version along with the GCC Runtime Library
+#  Exception either version 3.1 or (at your option) any later version.
+#  This program  is  distributed  in  the  hope  that it will be useful,  but
+#  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+#  or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+#  License and GCC Runtime Library Exception for more details.
+#  You  should  have received a copy of the GNU Lesser General Public License
+#  along  with  this program;  if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+
+SUBDIRS = private
+
+RPC_INC_DIR=@RPC_INC_DIR@
+
+
+AUTO_M_FILES = $(PSEUDO_FUNCTIONS_LOC:.cc=.m)
+
+# $(warning PSEUDO_FUNCTIONS= $(PSEUDO_FUNCTIONS))
+
+
+
+gf_mesh.m : ../libgetfemint.la $(top_srcdir)/bin/extract_doc
+       $(top_srcdir)/bin/extract_doc @srcdir@/.. matlab-com || (rm -f 
gf_mesh.m; /bin/false )
+
+
+EXTRA_DIST = gfm_rpc_mexint.c gfm_mex.c gfm_common.c gfm_common.h $(M_FILES)
+
+all: gf_mesh.m gf_matlab@MATLAB_COM_EXT@
+
+MEX=@MEX@
+RPC_LIB = @RPC_LIB@
+GNUMEX=@top_srcdir@/gnumex
+GNUMEXOPTS=@top_srcdir@/gnumex.opts
+
+GETFEM_LIB_LA = ../../../src/libgetfem.la
+GETFEM_STATIC_LIB = ../../../src/.libs/libgetfem.a @LIBS@
+
+if BUILDMEX
+if USE_MINGW_MEX
+
+#command extremely sensitive to any modification! fragile! keep the order of 
the files
+# (gfm_mex.c must be first, libstdc++.a must be last)
+
+gf_matlab@MATLAB_COM_EXT@: gfm_mex.c gfm_common.c ../libgetfemint.la 
../gfi_array.c $(GETFEM_LIB_LA)
+       matlab -nodesktop -nosplash -nojvm -r "mex -v -output gf_matlab -g 
./gfm_mex.c ./gfm_common.c -largeArrayDims -I. -I.. ./../gfi_array.c 
../.libs/libgetfemint.a ../../../src/.libs/libgetfem.a 
../../../superlu/.libs/libsuperlu.a /msys/local/lib/libsmumps.a 
/msys/local/lib/libcmumps.a /msys/local/lib/libdmumps.a 
/msys/local/lib/libzmumps.a /msys/local/lib/libmumps_common.a 
/msys/local/lib/libmpiseq.a /msys/local/lib/libpord.a 
/msys/local/lib/liblapack.a /msys/local/lib/libblas.a /msys/loca [...]
+
+
+#      $(GNUMEX) $(GNUMEXOPTS) -output gf_matlab -g @srcdir@/gfm_mex.c \
+#      @srcdir@/gfm_common.c -I@srcdir@ \
+#      @srcdir@/../gfi_array.c ../.libs/libgetfemint.a $(GETFEM_STATIC_LIB) 
@STDCPP_STATICLIBS@
+
+
+#        /c/MinGW/lib/libstdc++.a
+#      cmd /c "$mexbat -v -f c:/gnumex/mexopts.bat gfm_mex.c -output 
gfm_rpc_mexint gfi*.o gf_*.o matlabint*.o 
c:\\msys\\1.0\\home\\j\\getfem++-1.5\\src\\.libs\\libgetfem.a getfem_matlab.o 
c:\\mingw\\lib\\libstdc++.a -Ic:\\msys\\1.0\\home\\j\\mingw_liboncrpc-4.0"
+else !USE_MINGW_MEX
+if BUILDMEXRPC
+gf_matlab@MATLAB_COM_EXT@: ../gfi_rpc_clnt.c gfm_rpc_mexint.c gfm_common.c 
../gfi_rpc_xdr.c ../gfi_array.c
+       $(MEX) -largeArrayDims -output gf_matlab -g CDEBUGFLAGS="$(CFLAGS)" 
$(RPC_LIB) \
+       -I@srcdir@ -I@srcdir@/.. -DMATLAB_RELEASE=@MATLAB_RELEASE@ -DUSE_RPC \
+       @srcdir@/gfm_rpc_mexint.c @srcdir@/gfm_common.c 
@srcdir@/../gfi_rpc_clnt.c \
+        @srcdir@/../gfi_rpc_xdr.c @srcdir@/../gfi_array.c || (rm $@; false)
+else !BUILDMEXRPC
+# 2006/02/06 I remove the @STDCPP_STATICLIBS@ at the end (added to
+# avoid crashes in exception throw code when parts of getfem where
+# compiled with ifc (i.e. mumps)) of the command line, as it 
+# break the linking with g++-3.3 and matlab R14/R13 on debian (at least) ..
+gf_matlab@MATLAB_COM_EXT@: gfm_mex.c gfm_common.c ../libgetfemint.la 
../gfi_array.c $(GETFEM_LIB_LA)
+       $(MEX) -largeArrayDims -output gf_matlab -g CDEBUGFLAGS="$(CFLAGS)" 
LD="$(CXX)" \
+       -I@srcdir@ -I@srcdir@/.. -DMATLAB_RELEASE=@MATLAB_RELEASE@ \
+       @srcdir@/gfm_mex.c @srcdir@/gfm_common.c @srcdir@/../gfi_array.c \
+       ../.libs/libgetfemint.a $(GETFEM_STATIC_LIB) @STDCPP_STATICLIBS@ || (rm 
$@; false)
+endif !BUILDMEXRPC
+endif !USE_MINGW_MEX
+endif 
+
+# -largeArrayDims
+
+M_FILES = \
+       gf_asm_pdetoolbc.m \
+       gf_compute_Q1grid_interp.m \
+       gf_mesh_fem_get_eval.m \
+       gf_plot.m \
+       gf_plot_1D.m \
+       gf_plot_mesh.m \
+       gf_plot_slice.m \
+       gf_colormap.m \
+       gfObject.m
+
+
+.NOTPARALLEL: $(M_FILES)
+
+clean-m-files:
+       @echo "cleaning auto generated m-files and directories"
+       rm -f $(AUTO_M_FILES)
+       rm -fr \@gf* 
+
+clean-local: clean-m-files
+       rm -f gf_matlab@MATLAB_COM_EXT@
+
+toolboxdir=@TOOLBOXDIR@
+
+install:
+       $(mkinstalldirs) $(toolboxdir)/private
+       @INSTALL@ -m 644 -t $(toolboxdir)/ *.m
+       @INSTALL@ -m 644 -t $(toolboxdir)/ $(srcdir)/*.m
+       @INSTALL@ -m 644 -t $(toolboxdir)/private/ $(srcdir)/private/*.m
+       @list='$(MATLAB_OBJ_DIRS)'; for p in $$list; do \
+         $(mkinstalldirs) $(toolboxdir)/$$p; \
+         @INSTALL@ -m 644 -t $(toolboxdir)/$$p $$p/*.m; \
+       done
+       @INSTALL@ -m 744 -t $(toolboxdir)/ gf_matlab@MATLAB_COM_EXT@
+
+uninstall:
+       rm -fr $(toolboxdir)
diff --git a/interface/src/octave/first_step_interface_oct_getfem.txt 
b/interface/src/octave/first_step_interface_oct_getfem.txt
new file mode 100644
index 0000000..8f005b7
--- /dev/null
+++ b/interface/src/octave/first_step_interface_oct_getfem.txt
@@ -0,0 +1,22 @@
+This is a first attempt to build an interface enabling one to make Octave 
calls of getfem 
+functions within windows 10 (64 bits). Since Octave aims to run matlab code, 
we followed
+the installation procedure of getfem for win10. However we only installed the 
main 
+library, superlu but not QHULL and MUMPS. 
+
+We then moved to the directory 
+msys_path\msys64\home\login\getfem-5.3\interface\src\matlab
+and put the two matlab files matrix.h and tmwtypes.h
+
+We then suppressed some class initializations in gfm_common.c (indicated in 
this file by
+## oct-modif ##)
+
+We then added, uncommented and modified some commands in Makefile (likewise 
indicated by
+## oct-modif ##)
+
+By launching a make command, we built the file gf_matlab.mex which was then 
copied to a 
+directory related to a previous installation of getfem interface to matlab. 
+
+Most of the basic commands of getfem then well worked. It seems that only 
those functions 
+making use of mxArray or oop yield an error stop message. It must be noticed 
that 
+graphical matlab commands have to be customized to octave. These either 
generate an error 
+message or incomplete graphics or are too slow.       
\ No newline at end of file
diff --git a/interface/src/octave/getfem_interface.h 
b/interface/src/octave/getfem_interface.h
new file mode 100644
index 0000000..9b5ceab
--- /dev/null
+++ b/interface/src/octave/getfem_interface.h
@@ -0,0 +1,51 @@
+/* -*- c++ -*- (enables emacs c++ mode) */
+/*===========================================================================
+
+ Copyright (C) 2006-2017 Yves Renard, Julien Pommier.
+
+ This file is a part of GetFEM++
+
+ GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+ under  the  terms  of the  GNU  Lesser General Public License as published
+ by  the  Free Software Foundation;  either version 3 of the License,  or
+ (at your option) any later version along with the GCC Runtime Library
+ Exception either version 3.1 or (at your option) any later version.
+ This program  is  distributed  in  the  hope  that it will be useful,  but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+ License and GCC Runtime Library Exception for more details.
+ You  should  have received a copy of the GNU Lesser General Public License
+ along  with  this program;  if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+
+ As a special exception, you  may use  this file  as it is a part of a free
+ software  library  without  restriction.  Specifically,  if   other  files
+ instantiate  templates  or  use macros or inline functions from this file,
+ or  you compile this  file  and  link  it  with other files  to produce an
+ executable, this file  does  not  by itself cause the resulting executable
+ to be covered  by the GNU Lesser General Public License.  This   exception
+ does not  however  invalidate  any  other  reasons why the executable file
+ might be covered by the GNU Lesser General Public License.
+
+===========================================================================*/
+
+#ifndef GETFEM_INTERFACE_H
+#define GETFEM_INTERFACE_H
+
+#include "gfi_array.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+char* getfem_interface_main(int config_id, const char *function, 
+                           int nb_in_args,
+                           const gfi_array *in_args[], 
+                           int *nb_out_args,
+                           gfi_array ***pout_args, char **pinfomsg, int 
scilab_flag);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/interface/src/octave/gfObject.m b/interface/src/octave/gfObject.m
new file mode 100644
index 0000000..c18453d
--- /dev/null
+++ b/interface/src/octave/gfObject.m
@@ -0,0 +1,27 @@
+function b=gfObject(a)
+% converts a getfem struct to an object such as gfMesh, gfFem etc..    
+%  Copyright (C) 1999-2017 Yves Renard
+%
+%  This file is a part of GetFEM++
+%
+%  GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+%  under  the  terms  of the  GNU  Lesser General Public License as published
+%  by  the  Free Software Foundation;  either version 3 of the License,  or
+%  (at your option) any later version along with the GCC Runtime Library
+%  Exception either version 3.1 or (at your option) any later version.
+%  This program  is  distributed  in  the  hope  that it will be useful,  but
+%  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+%  or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+%  License and GCC Runtime Library Exception for more details.
+%  You  should  have received a copy of the GNU Lesser General Public License
+%  along  with  this program;  if not, write to the Free Software Foundation,
+%  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+  if (isempty(a))
+    b=[];
+  elseif (isobject(a))
+    b=a;
+  elseif (isstruct(a) & numel(a))
+    sclass = gf_workspace('class name',a(1));
+    b=feval(sclass,a);
+  else error('neither an object nor a struct');
+  end;
diff --git a/interface/src/octave/gf_asm.m b/interface/src/octave/gf_asm.m
new file mode 100644
index 0000000..54dce58
--- /dev/null
+++ b/interface/src/octave/gf_asm.m
@@ -0,0 +1,343 @@
+% FUNCTION [...] = gf_asm([operation [, args]])
+%
+%   
+%   General assembly function.
+%   
+%   Many of the functions below use more than one mesh_fem: the main
+%   mesh_fem (mf_u) used for the main unknown, and data mesh_fem (mf_d)
+%   used for the data. It is always assumed that the Qdim of mf_d is
+%   equal to 1: if mf_d is used to describe vector or tensor data, you
+%   just have to "stack" (in fortran ordering) as many scalar fields as
+%   necessary.
+%   
+%
+%   * {...} = gf_asm('generic', mesh_im mim, int order, string expression, int 
region, [model model,] [string varname, int is_variable[, {mesh_fem mf, 
mesh_imd mimd}], value], ...)
+%   High-level generic assembly procedure for volumic or boundary assembly.
+%   
+%   Performs the generic assembly of `expression` with the integration
+%   method `mim` on the mesh region of index `region` (-1 means all
+%   the element of the mesh). The same mesh should be shared by
+%   the integration method and all the finite element methods or
+%   mesh_im_data corresponding to the variables.
+%   
+%   `order` indicates either that the (scalar) potential
+%   (order = 0) or the (vector) residual (order = 1) or the
+%   tangent (matrix) (order = 2) is to be computed.
+%   
+%   `model` is an optional parameter allowing to take into account
+%   all variables and data of a model.
+%   
+%   The variables and constant (data) are listed after the
+%   region number (or optionally the model).
+%   For each variable/constant, first the variable/constant
+%   name should be given (as it is referred in the assembly string), then
+%   1 if it is a variable or 0 for a constant, then the finite element
+%   method if it is a fem variable/constant or the mesh_im_data if it is
+%   data defined on integration points, and the vector representing
+%   the value of the variable/constant. It is possible to give an arbitrary
+%   number of variable/constant. The difference between a variable and a
+%   constant is that automatic differentiation is done with respect to
+%   variables only (see GetFEM++ user documentation). Test functions are
+%   only available for variables, not for constants.
+%   
+%   Note that if several variables are given, the assembly of the
+%   tangent matrix/residual vector will be done considering the order
+%   in the call of the function (the degrees of freedom of the first
+%   variable, then of the second, and so on). If a model is provided,
+%   all degrees of freedom of the model will be counted first.
+%   
+%   For example, the L2 norm of a vector field "u" can be computed with::
+%   
+%   gf_compute('L2 norm') or with the square root of:
+%   
+%   gf_asm('generic', mim, 0, 'u.u', -1, 'u', 1, mf, U);
+%   
+%   The nonhomogeneous Laplacian stiffness matrix of a scalar field can be 
evaluated with::
+%   
+%   gf_asm('laplacian', mim, mf, mf_data, A) or equivalently with:
+%   
+%   gf_asm('generic', mim, 2, 'A*Grad_Test2_u.Grad_Test_u', -1, 'u', 1, mf, U, 
'A', 0, mf_data, A);
+%   
+%   
+%
+%   * M = gf_asm('mass matrix', mesh_im mim, mesh_fem mf1[, mesh_fem mf2[, int 
region]])
+%   Assembly of a mass matrix.
+%   
+%   Return a spmat object.
+%   
+%
+%   * L = gf_asm('laplacian', mesh_im mim, mesh_fem mf_u, mesh_fem mf_d, vec 
a[, int region])
+%   Assembly of the matrix for the Laplacian problem.
+%   
+%   :math:`\nabla\cdot(a(x)\nabla u)`  with `a` a scalar.
+%   
+%   Return a spmat object.
+%   
+%
+%   * Le = gf_asm('linear elasticity', mesh_im mim, mesh_fem mf_u, mesh_fem 
mf_d, vec lambda_d, vec mu_d[, int region])
+%   Assembles of the matrix for the linear (isotropic) elasticity problem.
+%   
+%   :math:`\nabla\cdot(C(x):\nabla u)`
+%   with :math:`C` defined via `lambda_d` and `mu_d`.
+%   
+%   Return a spmat object.
+%   
+%
+%   * TRHS = gf_asm('nonlinear elasticity', mesh_im mim, mesh_fem mf_u, vec U, 
string law, mesh_fem mf_d, mat params, {'tangent matrix'|'rhs'|'incompressible 
tangent matrix', mesh_fem mf_p, vec P|'incompressible rhs', mesh_fem mf_p, vec 
P})
+%   Assembles terms (tangent matrix and right hand side) for nonlinear 
elasticity.
+%   
+%   The solution `U` is required at the current time-step. The `law`
+%   may be choosen among:
+%   
+%   - 'SaintVenant Kirchhoff':
+%   Linearized law, should be avoided). This law has the two usual
+%   Lame coefficients as parameters, called lambda and mu.
+%   - 'Mooney Rivlin':
+%   This law has three parameters, called C1, C2 and D1.
+%   Can be preceded with the words 'compressible' or 'incompressible' to force
+%   a specific version. By default, the incompressible version is considered
+%   which requires only the first two material coefficients.
+%   - 'neo Hookean':
+%   A special case of the 'Mooney Rivlin' law that requires one material
+%   coefficient less (C2 = 0). By default, its compressible version is used.
+%   - 'Ciarlet Geymonat':
+%   This law has 3 parameters, called lambda, mu and gamma, with
+%   gamma chosen such that gamma is in ]-lambda/2-mu, -mu[.
+%   
+%   The parameters of the material law are described on the mesh_fem `mf_d`.
+%   The matrix `params` should have `nbdof(mf_d)` columns, each row
+%   correspounds to a parameter.
+%   
+%   The last argument selects what is to be built: either the tangent
+%   matrix, or the right hand side. If the incompressibility is
+%   considered, it should be followed by a mesh_fem `mf_p`, for the
+%   pression.
+%   
+%   Return a spmat object (tangent matrix), vec object (right hand
+%   side), tuple of spmat objects (incompressible tangent matrix), or
+%   tuple of vec objects (incompressible right hand side).
+%   
+%
+%   * A = gf_asm('helmholtz', mesh_im mim, mesh_fem mf_u, mesh_fem mf_d, vec 
k[, int region])
+%   Assembly of the matrix for the Helmholtz problem.
+%   
+%   :math:`\Delta u + k^2 u` = 0,  with `k` complex scalar.
+%   
+%   Return a spmat object.
+%   
+%
+%   * A = gf_asm('bilaplacian', mesh_im mim, mesh_fem mf_u, mesh_fem mf_d, vec 
a[, int region])
+%   Assembly of the matrix for the Bilaplacian problem.
+%   
+%   :math:`\Delta(a(x)\Delta u) = 0`   with `a` scalar.
+%   
+%   Return a spmat object.
+%   
+%
+%   * A = gf_asm('bilaplacian KL', mesh_im mim, mesh_fem mf_u, mesh_fem mf_d, 
vec a, vec nu[, int region])
+%   Assembly of the matrix for the Bilaplacian problem with Kirchhoff-Love 
formulation.
+%   
+%   :math:`\Delta(a(x)\Delta u) = 0`   with `a` scalar.
+%   
+%   Return a spmat object.
+%   
+%
+%   * V = gf_asm('volumic source', mesh_im mim, mesh_fem mf_u, mesh_fem mf_d, 
vec fd[, int region])
+%   Assembly of a volumic source term.
+%   
+%   Output a vector `V`, assembled on the mesh_fem `mf_u`, using the data
+%   vector `fd` defined on the data mesh_fem `mf_d`. `fd` may be real or
+%   complex-valued.
+%   
+%   Return a vec object.
+%   
+%
+%   * B = gf_asm('boundary source', int bnum, mesh_im mim, mesh_fem mf_u, 
mesh_fem mf_d, vec G)
+%   Assembly of a boundary source term.
+%   
+%   `G` should be a [Qdim x N] matrix, where N is the number of dof
+%   of `mf_d`, and Qdim is the dimension of the unkown u (that is set
+%   when creating the mesh_fem).
+%   
+%   Return a vec object.
+%   
+%
+%   * {HH, RR} = gf_asm('dirichlet', int bnum, mesh_im mim, mesh_fem mf_u, 
mesh_fem mf_d, mat H, vec R [, scalar threshold])
+%   Assembly of Dirichlet conditions of type `h.u = r`.
+%   
+%   Handle `h.u = r` where h is a square matrix (of any rank) whose
+%   size is equal to the dimension of the unkown u. This matrix is
+%   stored in `H`, one column per dof in `mf_d`, each column containing
+%   the values of the matrix h stored in fortran order:
+%   
+%   .. math::
+%   
+%   `H(:,j) = [h11(x_j) h21(x_j) h12(x_j) h22(x_j)]`
+%   
+%   if u is a 2D vector field.
+%   
+%   Of course, if the unknown is a scalar field, you just have to set
+%   `H = ones(1, N)`, where N is the number of dof of `mf_d`.
+%   
+%   This is basically the same than calling gf_asm('boundary qu term')
+%   for `H` and calling gf_asm('neumann') for `R`, except that this
+%   function tries to produce a 'better' (more diagonal) constraints
+%   matrix (when possible).
+%   
+%   See also gf_spmat_get(spmat S, 'Dirichlet_nullspace').
+%
+%   * Q = gf_asm('boundary qu term',int boundary_num, mesh_im mim, mesh_fem 
mf_u, mesh_fem mf_d, mat q)
+%   Assembly of a boundary qu term.
+%   
+%   `q` should be be a [Qdim x Qdim x N] array, where N is the number
+%   of dof of `mf_d`, and Qdim is the dimension of the unkown u (that
+%   is set when creating the mesh_fem).
+%   
+%   Return a spmat object.
+%   
+%
+%   * gf_asm('define function', string name, int nb_args, string expression[, 
string expression_derivative_t[, string expression_derivative_u]])
+%   Define a new function `name` which can be used in high level
+%   generic assembly. The function can have one or two parameters.
+%   In `expression` all available predefined function or operation
+%   of the generic assembly can be used. However, no reference to
+%   some variables or data can be specified. The argument of the
+%   function is `t` for a one parameter function and `t` and `u`
+%   for a two parameter function. For instance 'sin(pi*t)+2*t*t'
+%   is a valid expression for a one parameter function and
+%   'sin(max(t,u)*pi)' is a valid expression for a two parameters
+%   function. `expression_derivative_t` and `expression_derivative_u`
+%   are optional expressions for the derivatives with respect
+%   to `t` and `u`. If they are not furnished, a symbolic derivation
+%   is used.
+%
+%   * gf_asm('undefine function', string name)
+%   Cancel the definition of a previously defined function `name`
+%   for the high level generic assembly.
+%
+%   * gf_asm('define linear hardening function', string name, scalar sigma_y0, 
scalar H, ... [string 'Frobenius'])
+%   Define a new linear hardening function under the name `name`, with
+%   initial yield stress `sigma_y0` and hardening modulus H.
+%   If an extra string argument with the value 'Frobenius' is provided,
+%   the hardening function is expressed in terms of Frobenius norms of its
+%   input strain and output stress, instead of their Von-Mises equivalents.
+%
+%   * gf_asm('define Ramberg Osgood hardening function', string name, scalar 
sigma_ref, {scalar eps_ref | scalar E, scalar alpha}, scalar n[, string 
'Frobenius'])
+%   Define a new Ramberg Osgood hardening function under the name `name`,
+%   with initial yield stress `sigma_y0` and hardening modulus H.
+%   If an extra string argument with the value 'Frobenius' is provided,
+%   the hardening function is expressed in terms of Frobenius norms of its
+%   input strain and output stress, instead of their Von-Mises equivalents.
+%
+%   * gf_asm('expression analysis', string expression [, {@tm mesh | mesh_im 
mim}] [, der_order] [, model model] [, string varname, int is_variable[, 
{mesh_fem mf | mesh_imd mimd}], ...])
+%   Analyse a high-level generic assembly expression and print
+%   information about the provided expression.
+%
+%   * {...} = gf_asm('volumic' [,CVLST], expr [, mesh_ims, mesh_fems, data...])
+%   Low-level generic assembly procedure for volumic assembly.
+%   
+%   The expression `expr` is evaluated over the mesh_fem's listed in the
+%   arguments (with optional data) and assigned to the output arguments.
+%   For details about the syntax of assembly expressions, please refer
+%   to the getfem user manual (or look at the file getfem_assembling.h
+%   in the getfem++ sources).
+%   
+%   For example, the L2 norm of a field can be computed with::
+%   
+%   gf_compute('L2 norm') or with the square root of:
+%   
+%   gf_asm('volumic','u=data(#1); 
V()+=u(i).u(j).comp(Base(#1).Base(#1))(i,j)',mim,mf,U)
+%   
+%   The Laplacian stiffness matrix can be evaluated with::
+%   
+%   gf_asm('laplacian',mim, mf, mf_data, A) or equivalently with:
+%   
+%   
gf_asm('volumic','a=data(#2);M(#1,#1)+=sym(comp(Grad(#1).Grad(#1).Base(#2))(:,i,:,i,j).a(j))',
 mim,mf,mf_data,A);
+%
+%   * {...} = gf_asm('boundary', int bnum, string expr [, mesh_im mim, 
mesh_fem mf, data...])
+%   Low-level generic boundary assembly.
+%   
+%   See the help for gf_asm('volumic').
+%
+%   * Mi = gf_asm('interpolation matrix', mesh_fem mf, {mesh_fem mfi | vec 
pts})
+%   Build the interpolation matrix from a mesh_fem onto another mesh_fem or a 
set of points.
+%   
+%   Return a matrix `Mi`, such that `V = Mi.U` is equal to
+%   gf_compute('interpolate_on',mfi). Useful for repeated interpolations.
+%   Note that this is just interpolation, no elementary integrations
+%   are involved here, and `mfi` has to be lagrangian. In the more
+%   general case, you would have to do a L2 projection via the mass
+%   matrix.
+%   
+%   `Mi` is a spmat object.
+%   
+%
+%   * Me = gf_asm('extrapolation matrix',mesh_fem mf,  {mesh_fem mfe | vec 
pts})
+%   Build the extrapolation matrix from a mesh_fem onto another mesh_fem or a 
set of points.
+%   
+%   Return a matrix `Me`, such that `V = Me.U` is equal to
+%   gf_compute('extrapolate_on',mfe). Useful for repeated
+%   extrapolations.
+%   
+%   `Me` is a spmat object.
+%   
+%
+%   * B = gf_asm('integral contact Uzawa projection', int bnum, mesh_im mim, 
mesh_fem mf_u, vec U, mesh_fem mf_lambda, vec vec_lambda, mesh_fem mf_obstacle, 
vec obstacle, scalar r [, {scalar coeff | mesh_fem mf_coeff, vec coeff} [, int 
option[, scalar alpha, vec W]]])
+%   Specific assembly procedure for the use of an Uzawa algorithm to solve
+%   contact problems. Projects the term $-(\lambda - r (u_N-g))_-$ on the
+%   finite element space of $\lambda$.
+%   
+%   Return a vec object.
+%   
+%
+%   * B = gf_asm('level set normal source term', int bnum, mesh_im mim, 
mesh_fem mf_u, mesh_fem mf_lambda, vec vec_lambda, mesh_fem mf_levelset, vec 
levelset)
+%   Performs an assembly of the source term represented by `vec_lambda`
+%   on `mf_lambda` considered to be a component in the direction of the
+%   gradient of a levelset function (normal to the levelset) of a vector
+%   field defined on `mf_u` on the boundary `bnum`.
+%   
+%   Return a vec object.
+%   
+%
+%   * M = gf_asm('lsneuman matrix', mesh_im mim, mesh_fem mf1, mesh_fem mf2, 
levelset ls[, int region])
+%   Assembly of a level set Neuman  matrix.
+%   
+%   Return a spmat object.
+%   
+%
+%   * M = gf_asm('nlsgrad matrix', mesh_im mim, mesh_fem mf1, mesh_fem mf2, 
levelset ls[, int region])
+%   Assembly of a nlsgrad matrix.
+%   
+%   Return a spmat object.
+%   
+%
+%   * M = gf_asm('stabilization patch matrix', @tm mesh, mesh_fem mf,  mesh_im 
mim, real ratio, real h)
+%   Assembly of stabilization patch matrix .
+%   
+%   Return a spmat object.
+%   
+%
+%   * {Q, G, H, R, F} = gf_asm('pdetool boundary conditions', mf_u, mf_d, b, 
e[, f_expr])
+%   Assembly of pdetool boundary conditions.
+%   
+%   `B` is the boundary matrix exported by pdetool, and `E` is the
+%   edges array. `f_expr` is an optionnal expression (or vector) for
+%   the volumic term. On return `Q, G, H, R, F` contain the assembled
+%   boundary conditions (`Q` and `H` are matrices), similar to the
+%   ones returned by the function ASSEMB from PDETOOL.
+%   
+%
+%
+function [varargout]=gf_asm(varargin)
+
+  if (nargin>=1 & strcmpi(varargin{1},'pdetool boundary conditions')),
+    [varargout{1:nargout}]=gf_asm_pdetoolbc(varargin{[1 3:nargin]}); return;
+  end;
+  
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('asm', varargin{:});
+  else
+    gf_matlab('asm', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_asm_pdetoolbc.m 
b/interface/src/octave/gf_asm_pdetoolbc.m
new file mode 100644
index 0000000..66bd81a
--- /dev/null
+++ b/interface/src/octave/gf_asm_pdetoolbc.m
@@ -0,0 +1,160 @@
+function [Q,G,H,R,F]=gf_asm_pdetoolbc(mf_u, mf_d, b, e, f_expr)
+%  FUNCTION [Q,G,H,R,F]=gf_asm_pdetoolbc(mf_u, mf_d, b, e, f_expr)
+%  'pdetool style' assembling of boundary conditions
+%  See gf_asm
+%  Copyright (C) 1999-2017 Yves Renard
+%
+%  This file is a part of GetFEM++
+%
+%  GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+%  under  the  terms  of the  GNU  Lesser General Public License as published
+%  by  the  Free Software Foundation;  either version 3 of the License,  or
+%  (at your option) any later version along with the GCC Runtime Library
+%  Exception either version 3.1 or (at your option) any later version.
+%  This program  is  distributed  in  the  hope  that it will be useful,  but
+%  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+%  or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+%  License and GCC Runtime Library Exception for more details.
+%  You  should  have received a copy of the GNU Lesser General Public License
+%  along  with  this program;  if not, write to the Free Software Foundation,
+%  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+% $Id$  
+  if (nargin < 4), error('not enough input arguments'); end;
+  nb_boundaries = size(b,2);
+  xyeval = gf_mesh_fem_get(mf_d, 'dof nodes');
+  nbdof = size(xyeval,2);
+  N=b(1,1); % dimension of the system (1->scalar, 2->vector 2D)
+  qdim = gf_mesh_fem_get(mf_u, 'qdim');
+
+  
+  if (qdim ~= N),
+    error(sprintf(['the boundary condition b was generated for a %d-D problem, 
'...
+                  'while the Qdim of the mesh_fem is %d'], N, qdim));
+  end;
+  if (nargin >= 5 & qdim ~= size(f_expr,1)),
+    error('the qdim of the mesh fem and the size of f (the volumic source 
term) do not match');
+  end;
+  if (gf_mesh_fem_get(mf_d, 'qdim') ~= 1),
+    error('the Qdim of the data mesh_fem should always be 1');
+  end;
+  
+  for bnum=1:nb_boundaries,
+    %ignores
+    if (b(1,bnum)==0), continue; end;
+    
+    %select edges which belong to
+    %boundary 'bnum'
+    E=e(:, find(e(5,:)==bnum));
+    
+    EC = gf_mesh_get(mf_d, 'faces from pid', [E(1,:) E(2,:)]);
+%    EC=[];
+%    for i=1:size(E,2)
+%      EC = [EC gf_mesh_get(mf_d, 'faces from pid', E(1:2,i))];
+%    end;
+    gf_mesh_fem_set(mf_d, 'boundary',bnum, EC);
+    gf_mesh_fem_set(mf_u, 'boundary',bnum, EC);
+
+    M = b(2,bnum); % number of dirichlet conditions (0,1,..N)
+    if (M>N), disp('invalid geometry matrix'); return; end;
+    
+    clear qexpr gexpr;
+    pos_len = 3;
+    pos = 3+N*N+N+M*N+M;
+    
+    % reading Q expressions
+    for j=1:N,
+      for i=1:N,
+       len=b(pos_len,bnum);
+       qexpr{i,j}=char(b(pos:(pos+len-1), bnum)');
+       pos_len = pos_len+1;
+       pos = pos+len;
+      end;
+    end;
+    
+    
+    % reading G expressions
+    for i=1:N,
+      len=b(pos_len,bnum);
+      gexpr{i}=char(b(pos:(pos+len-1), bnum)');
+      pos_len = pos_len+1;
+      pos = pos+len;
+    end;      
+    
+    
+    % reading H expression
+    for j=1:N,
+      for i=1:M,
+       len=b(pos_len,bnum);
+       hexpr{i,j}=char(b(pos:(pos+len-1), bnum)');
+       pos_len = pos_len+1;
+       pos = pos+len;  
+      end;
+    end;
+    
+    
+    % reading R expressions
+    for i=1:M,
+      len=b(pos_len,bnum);
+      rexpr{i}=char(b(pos:(pos+len-1), bnum)');
+      pos_len = pos_len+1;
+      pos = pos+len;   
+    end;
+    
+    
+    % computations of expressions on the dof
+    vQ = zeros(N,N,nbdof);
+    for i=1:N,
+      for j=1:N,
+       vQ(i,j,:) = eval_expr(xyeval, qexpr{i,j});
+      end;
+    end;
+    vG = zeros(N,nbdof);
+    for i=1:N,
+      vG(i,:) = eval_expr(xyeval, gexpr{i});
+    end;
+
+    vH = zeros(N,N,nbdof);
+    for i=1:M,
+      for j=1:N,
+       vH(i,j,:) = eval_expr(xyeval, hexpr{i,j});
+      end;
+    end;
+    
+    vR = zeros(N,nbdof);
+    for i=1:M,
+      vR(i,:) = eval_expr(xyeval, rexpr{i});
+    end;
+    bQ = gf_asm('boundary qu term', bnum, mf_u, mf_d, reshape(vQ,N*N,nbdof));
+%    bH = gf_asm('boundary qu term', bnum, mf_u, mf_d, reshape(vH,N*N,nbdof));
+    bG = gf_asm('boundary source', bnum, mf_u, mf_d, reshape(vG,N,nbdof));
+%    bR = gf_asm('neumann', bnum, mf_u, mf_d, reshape(vR,N,nbdof));
+    [bH,bR] = gf_asm('dirichlet',bnum, mf_u, mf_d, reshape(vH,N*N,nbdof), 
reshape(vR,N,nbdof));
+    if (bnum ~= 1),
+      Q=Q+bQ; G=G+bG; H=H+bH; R=R+bR;
+    else
+      Q=bQ; G=bG; H=bH; R=bR;
+    end
+  end;
+
+  % check for volumic source term
+  if (nargin == 5 & nargout == 5),
+    if (isstr(f_expr)),
+      Fd = zeros(N,nbdof);
+      for i=1:N
+       Fd(i,:) = eval_expr(xyeval, f_expr(i,:));
+      end;
+    else
+      Fd = f_expr;
+    end;
+    F=gf_asm('volumic source', mf_u, mf_d, Fd);
+    F=F(:);
+  end;
+  
+function V=eval_expr(xypos, expr)
+  %disp(['expr=' expr]);
+  V=zeros(1,size(xypos,2));
+  x=xypos(1,:); 
+  if (size(xypos,1) >= 2), y=xypos(2,:); else y=0; end;
+  if (size(xypos,1) >= 3), z=xypos(3,:); else z=0; end;
+  eval(['e=' expr ';']); V(:) = e(:);
+  
diff --git a/interface/src/octave/gf_colormap.m 
b/interface/src/octave/gf_colormap.m
new file mode 100644
index 0000000..68019d7
--- /dev/null
+++ b/interface/src/octave/gf_colormap.m
@@ -0,0 +1,128 @@
+function varargout=gf_colormap(name),
+% function  c=gf_colormap(name)
+%   return a colormap, or change the current colormap.
+%   name can be: 'tripod', 'chouette', 'froid', 'tank'
+%   or 'earth'.
+%  Copyright (C) 1999-2017 Yves Renard
+%
+%  This file is a part of GetFEM++
+%
+%  GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+%  under  the  terms  of the  GNU  Lesser General Public License as published
+%  by  the  Free Software Foundation;  either version 3 of the License,  or
+%  (at your option) any later version along with the GCC Runtime Library
+%  Exception either version 3.1 or (at your option) any later version.
+%  This program  is  distributed  in  the  hope  that it will be useful,  but
+%  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+%  or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+%  License and GCC Runtime Library Exception for more details.
+%  You  should  have received a copy of the GNU Lesser General Public License
+%  along  with  this program;  if not, write to the Free Software Foundation,
+%  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+  if (strcmp(name,'tripod')),
+    r=[0.7 .7 .7]; 
+    l = r(end,:); 
+    s=63; s1=20; s2=25; s3=48;s4=55; 
+    for i=1:s, 
+      c1 = max(min((i-s1)/(s2-s1),1),0);
+      c2 = max(min((i-s3)/(s4-s3),1),0); 
+      r(end+1,:)=(1-c2)*((1-c1)*l + c1*[1 0 0]) + c2*[1 .8 .2]; 
+    end;
+  elseif (strcmp(name,'chouette')),
+      gg = [ .8 1 .8; 
+            .7 .9 .4;
+            .3 .8 .2;
+            .1 .7 .4;
+            .2 0.7 1.0000;
+            .3 0.3 1.0000;
+            1.0 .8 .1;
+            1.0 .6 .1;
+            1.0 .45 .1;
+            1.0 0.3 .1];
+      r = reshape(repmat(gg',6,1),3,60)'; 
+  elseif (strcmp(name,'froid')),
+      gg = [ .8 1 .8; 
+            .7 .9 .4;
+            .3 .8 .2;
+            .1 .7 .4;
+            .2 0.7 1.0000;
+            .3 0.3 1.0000];
+      r = reshape(repmat(gg',10,1),3,60)';     
+  elseif (strcmp(name, 'tank')),
+    r=[0 0 1; 0 .5 1; 0 1 .5; 
+       0 1 0; .5 1 0; 1 .5 0; 
+       1 .4 0; 1 0 0; 1 .2 0; 
+       1 .4 0; 1 .6 0; 1 .8 0];
+      r = reshape(repmat(r',5,1),3,60)';     
+  elseif (strcmp(name, 'earth')),
+    r=[252 233  79; %  Butter 1
+       247 222  30;
+       237 212   0; %  Butter 2
+       216 180   0;
+       196 160   0; %  Butter 3
+       138 226  52; %  Chameleon 1
+       115 210  22; %  Chameleon 2
+       78 154   6];
+    r = repmat(r'/255, 8,1); r = reshape(r,3,numel(r)/3)';     
+  else
+    error('wrong colormap');
+  end;    
+  if (nargout),
+    varargout={r}
+  else
+    colormap(r);
+  end;
+  c=[252 233  79; %    Butter 1
+     237 212   0; %    Butter 2
+     196 160   0; %    Butter 3
+     138 226  52; %    Chameleon 1
+     115 210  22; %    Chameleon 2
+     78 154   6; %     Chameleon 3
+     252 175  62; %    Orange 1
+     245 121   0; %    Orange 2
+     206  92   0; %    Orange 3
+     114 159 207; %    Sky Blue 1
+     114 159 207; %    Sky Blue 1
+     52 101 164; %     Sky Blue 2
+     52 101 164; %     Sky Blue 2
+     32  74 135; %     Sky Blue 3
+     32  74 135; %     Sky Blue 3
+     173 127 168; %    Plum 1
+     173 127 168; %    Plum 1
+     173 127 168; %    Plum 1
+     117  80 123; %    Plum 2
+     117  80 123; %    Plum 2
+     117  80 123; %    Plum 2
+     92  53 102; %     Plum 3
+     92  53 102; %     Plum 3
+     92  53 102; %     Plum 3
+     233 185 110; %    Chocolate 1
+     233 185 110; %    Chocolate 1
+     233 185 110; %    Chocolate 1
+     233 185 110; %    Chocolate 1
+     193 125  17; %    Chocolate 2
+     193 125  17; %    Chocolate 2
+     193 125  17; %    Chocolate 2
+     193 125  17; %    Chocolate 2
+     143  89   2; %    Chocolate 3
+     143  89   2; %    Chocolate 3
+     143  89   2; %    Chocolate 3
+     143  89   2; %    Chocolate 3
+     239  41  41; %    Scarlet Red 1
+     239  41  41; %    Scarlet Red 1
+     239  41  41; %    Scarlet Red 1
+     239  41  41; %    Scarlet Red 1
+     239  41  41; %    Scarlet Red 1
+     204   0   0; %    Scarlet Red 2
+     204   0   0; %    Scarlet Red 2
+     204   0   0; %    Scarlet Red 2
+     204   0   0; %    Scarlet Red 2
+     204   0   0; %    Scarlet Red 2
+     164   0   0; %    Scarlet Red 3
+     164   0   0; %    Scarlet Red 3
+     164   0   0; %    Scarlet Red 3
+     164   0   0; %    Scarlet Red 3
+     164   0   0]; %   Scarlet Red 3
+%     238 238 236]; %  Untitled
+
+  c=c/255;
diff --git a/interface/src/octave/gf_compute.m 
b/interface/src/octave/gf_compute.m
new file mode 100644
index 0000000..9b9a2c7
--- /dev/null
+++ b/interface/src/octave/gf_compute.m
@@ -0,0 +1,169 @@
+% FUNCTION [...] = gf_compute(mesh_fem MF, vec U, [operation [, args]])
+%
+%   
+%   Various computations involving the solution U to a finite element problem.
+%   
+%
+%   * n = gf_compute(mesh_fem MF, vec U, 'L2 norm', mesh_im mim[, mat CVids])
+%   Compute the L2 norm of the (real or complex) field `U`.
+%   
+%   If `CVids` is given, the norm will be computed only on the listed
+%   elements.
+%
+%   * n = gf_compute(mesh_fem MF, vec U, 'L2 dist', mesh_im mim, mesh_fem mf2, 
vec U2[, mat CVids])
+%   Compute the L2 distance between `U` and `U2`.
+%   
+%   If `CVids` is given, the norm will be computed only on the listed
+%   elements.
+%
+%   * n = gf_compute(mesh_fem MF, vec U, 'H1 semi norm', mesh_im mim[, mat 
CVids])
+%   Compute the L2 norm of grad(`U`).
+%   
+%   If `CVids` is given, the norm will be computed only on the listed
+%   elements.
+%
+%   * n = gf_compute(mesh_fem MF, vec U, 'H1 semi dist', mesh_im mim, mesh_fem 
mf2, vec U2[, mat CVids])
+%   Compute the semi H1 distance between `U` and `U2`.
+%   
+%   If `CVids` is given, the norm will be computed only on the listed
+%   elements.
+%
+%   * n = gf_compute(mesh_fem MF, vec U, 'H1 norm', mesh_im mim[, mat CVids])
+%   Compute the H1 norm of `U`.
+%   
+%   If `CVids` is given, the norm will be computed only on the listed
+%   elements.
+%
+%   * n = gf_compute(mesh_fem MF, vec U, 'H2 semi norm', mesh_im mim[, mat 
CVids])
+%   Compute the L2 norm of D^2(`U`).
+%   
+%   If `CVids` is given, the norm will be computed only on the listed
+%   elements.
+%
+%   * n = gf_compute(mesh_fem MF, vec U, 'H2 norm', mesh_im mim[, mat CVids])
+%   Compute the H2 norm of `U`.
+%   
+%   If `CVids` is given, the norm will be computed only on the listed
+%   elements.
+%
+%   * DU = gf_compute(mesh_fem MF, vec U, 'gradient', mesh_fem mf_du)
+%   Compute the gradient of the field `U` defined on mesh_fem `mf_du`.
+%   
+%   The gradient is interpolated on the mesh_fem `mf_du`, and returned in
+%   `DU`. For example, if `U` is defined on a P2 mesh_fem, `DU` should be
+%   evaluated on a P1-discontinuous mesh_fem. `mf` and `mf_du` should
+%   share the same mesh.
+%   
+%   `U` may have any number of dimensions (i.e. this function is not
+%   restricted to the gradient of scalar fields, but may also be used
+%   for tensor fields). However the last dimension of `U` has to be
+%   equal to the number of dof of `mf`. For example, if `U` is a
+%   [3x3xNmf] array (where Nmf is the number of dof of `mf`), `DU` will
+%   be a [Nx3x3[xQ]xNmf_du] array, where N is the dimension of the mesh,
+%   Nmf_du is the number of dof of `mf_du`, and the optional Q dimension
+%   is inserted if `Qdim_mf != Qdim_mf_du`, where Qdim_mf is the Qdim of
+%   `mf` and Qdim_mf_du is the Qdim of `mf_du`.
+%
+%   * HU = gf_compute(mesh_fem MF, vec U, 'hessian', mesh_fem mf_h)
+%   Compute the hessian of the field `U` defined on mesh_fem `mf_h`.
+%   
+%   See also gf_compute('gradient', mesh_fem mf_du).
+%
+%   * UP = gf_compute(mesh_fem MF, vec U, 'eval on triangulated surface', int 
Nrefine, [vec CVLIST])
+%   [OBSOLETE FUNCTION! will be removed in a future release]
+%   Utility function designed for 2D triangular meshes : returns a list
+%   of triangles coordinates with interpolated U values. This can be
+%   used for the accurate visualization of data defined on a
+%   discontinous high order element. On output, the six first rows of UP
+%   contains the triangle coordinates, and the others rows contain the
+%   interpolated values of U (one for each triangle vertex) CVLIST may
+%   indicate the list of convex number that should be consider, if not
+%   used then all the mesh convexes will be used. U should be a row
+%   vector.
+%   
+%
+%   * Ui = gf_compute(mesh_fem MF, vec U, 'interpolate on', {mesh_fem mfi | 
slice sli | vec pts})
+%   Interpolate a field on another mesh_fem or a slice or a list of points.
+%   
+%   - Interpolation on another mesh_fem `mfi`:
+%   `mfi` has to be Lagrangian. If `mf` and `mfi` share the same
+%   mesh object, the interpolation will be much faster.
+%   - Interpolation on a slice `sli`:
+%   this is similar to interpolation on a refined P1-discontinuous
+%   mesh, but it is much faster. This can also be used with
+%   gf_slice('points') to obtain field values at a given set of
+%   points.
+%   - Interpolation on a set of points `pts`
+%   
+%   See also gf_asm('interpolation matrix')
+%   
+%
+%   * Ue = gf_compute(mesh_fem MF, vec U, 'extrapolate on', mesh_fem mfe)
+%   Extrapolate a field on another mesh_fem.
+%   
+%   If the mesh of `mfe` is stricly included in the mesh of `mf`, this
+%   function does stricly the same job as gf_compute('interpolate_on').
+%   However, if the mesh of `mfe` is not exactly included in `mf`
+%   (imagine interpolation between a curved refined mesh and a coarse
+%   mesh), then values which are outside `mf` will be
+%   extrapolated.
+%   
+%   See also gf_asm('extrapolation matrix')
+%
+%   * E = gf_compute(mesh_fem MF, vec U, 'error estimate', mesh_im mim)
+%   Compute an a posteriori error estimate.
+%   
+%   Currently there is only one which is available: for each convex,
+%   the jump of the normal derivative is integrated on its faces.
+%
+%   * E = gf_compute(mesh_fem MF, vec U, 'error estimate nitsche', mesh_im 
mim, int GAMMAC, int GAMMAN, scalar lambda_, scalar mu_, scalar gamma0, scalar 
f_coeff, scalar vertical_force)
+%   Compute an a posteriori error estimate in the case of Nitsche method.
+%   
+%   Currently there is only one which is available: for each convex,
+%   the jump of the normal derivative is integrated on its faces.
+%
+%   * gf_compute(mesh_fem MF, vec U, 'convect', mesh_fem mf_v, vec V, scalar 
dt, int nt[, string option[, vec per_min, vec per_max]])
+%   Compute a convection of `U` with regards to a steady state velocity
+%   field `V` with a Characteristic-Galerkin method. The result is returned
+%   in-place in `U`.
+%   This method is restricted to pure Lagrange fems for U. `mf_v` should
+%   represent a continuous finite element method. `dt` is the integration time
+%   and `nt` is the number of integration step on the caracteristics. `option`
+%   is an option for the part of the boundary where there is a re-entrant
+%   convection.
+%   `option = 'extrapolation'` for an extrapolation on the nearest element,
+%   `option = 'unchanged'` for a constant value on that boundary or
+%   `option = 'periodicity'` for a peridiodic boundary. For this latter option
+%   the two vectors per_min, per_max has to be given and represent the limits
+%   of the periodic domain (on components where per_max[k] < per_min[k]
+%   no operation is done).
+%   This method is rather dissipative, but stable.
+%   
+%
+%   * [U2[,MF2,[,X[,Y[,Z]]]]] = gf_compute(mesh_fem MF, vec U, 'interpolate on 
Q1 grid', {'regular h', hxyz | 'regular N', Nxyz | X[,Y[,Z]]})
+%   
+%   Creates a cartesian Q1 mesh fem and interpolates U on it. The
+%   returned field U2 is organized in a matrix such that in can be drawn
+%   via the MATLAB command 'pcolor'. The first dimension is the Qdim of
+%   MF (i.e.  1 if U is a scalar field)
+%   
+%   example (mf_u is a 2D mesh_fem):
+%   >> Uq=gf_compute(mf_u, U, 'interpolate on Q1 grid', 'regular h', [.05, 
.05]);
+%   >> pcolor(squeeze(Uq(1,:,:)));
+%   
+%
+%
+function [varargout]=gf_compute(varargin)
+
+  if (nargin>=3 & strcmpi(varargin{3}, 'interpolate on Q1 grid')),
+    [varargout{1:nargout}]=gf_compute_Q1grid_interp(varargin{[1 2 4:nargin]});
+    return;
+  end;
+  
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('compute', varargin{:});
+  else
+    gf_matlab('compute', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_compute_Q1grid_interp.m 
b/interface/src/octave/gf_compute_Q1grid_interp.m
new file mode 100644
index 0000000..01d736b
--- /dev/null
+++ b/interface/src/octave/gf_compute_Q1grid_interp.m
@@ -0,0 +1,82 @@
+function [U2,Iq,MF2]=gf_compute_Q1grid_interp(MF1,U1,varargin)
+% See help on gf_compute
+%  $Id$
+%  Copyright (C) 1999-2017 Yves Renard
+%
+%  This file is a part of GetFEM++
+%
+%  GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+%  under  the  terms  of the  GNU  Lesser General Public License as published
+%  by  the  Free Software Foundation;  either version 3 of the License,  or
+%  (at your option) any later version along with the GCC Runtime Library
+%  Exception either version 3.1 or (at your option) any later version.
+%  This program  is  distributed  in  the  hope  that it will be useful,  but
+%  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+%  or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+%  License and GCC Runtime Library Exception for more details.
+%  You  should  have received a copy of the GNU Lesser General Public License
+%  along  with  this program;  if not, write to the Free Software Foundation,
+%  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+  if (nargin < 3), error('not enough input arguments'); end;
+    
+  gf_workspace('push', 'gf_compute_Q1grid_interp');
+  
+  
+  
+  meshpts = gf_mesh_get(MF1, 'pts');
+  zmin = min(meshpts,[],2); zmax = max(meshpts,[],2);
+  ndim = length(zmin);
+  if (ndim > 3) error('this number of dim is not supported (patch me)'); end;
+  X = cell(ndim,1);
+  
+  try
+    switch varargin{1}
+     case 'regular h'
+      if (length(varargin) ~= 2), error('wrong number of arguments'); end;
+      if (length(varargin{2}) ~= ndim), error('invalid dimension'); end;
+      for i=1:ndim,
+       if (varargin{2}(i) <= 0), error('invalid step value'); end;
+       X{i} = zmin(i):(varargin{2}(i)):zmax(i);
+      end;
+     case 'regular N'
+      if (length(varargin) ~= 2), error('wrong number of arguments'); end;
+      if (length(varargin{2}) ~= ndim), error('invalid dimension'); end;
+      for i=1:ndim,
+       if (varargin{2}(i) <= 0), error('invalid number of cells'); end;
+       h = (zmax(i) - zmin(i))/(varargin{2}(i));
+       X{i} = zmin(i):h:zmax(i);
+      end;
+     otherwise
+      X = varargin{1};
+      if (~iscell(X)), error('grid points should be stored in a cell array of 
size nbdim'); end;
+      if (length(X) ~= ndim) error('wrong number of dimension in the grid 
points argument'); end;
+    end
+
+    Q=gf_mesh_fem_get(MF1,'qdim');
+    M = gf_mesh('cartesian', X{:});
+    MF2 = gf_mesh_fem(M,Q);
+    gf_mesh_fem_set(MF2, 'classical fem', 1); % Q1 fem
+    mfU2 = gf_compute(MF1,U1, 'interpolate on', MF2);
+
+    PTS = gf_mesh_fem_get(MF2, 'dof nodes');
+
+    PTS = PTS(end:-1:1,1:Q:end);   % (x,y,z)->(z,y,x) and remove duplicate dof
+    [PTS,I] = sortrows(PTS'); % sort points, by z then by y then by x etc..
+    I = Q*(I-1) + 1;
+    sz = Q;
+    for i=1:numel(X) sz = [sz length(X{i})]; end;
+    Iq=zeros(Q,numel(I));
+    for q=1:Q,
+      Iq(q,:) = I'+(q-1);
+    end;
+    Iq = Iq(:);
+    U2 = reshape(mfU2(Iq),sz);
+    if (nargout == 3),
+      gf_workspace('keep', MF2);
+    end;
+  catch,
+    gf_workspace('pop');
+    error(lasterr);
+  end
+  gf_workspace('pop');
+  
diff --git a/interface/src/octave/gf_cont_struct.m 
b/interface/src/octave/gf_cont_struct.m
new file mode 100644
index 0000000..956db43
--- /dev/null
+++ b/interface/src/octave/gf_cont_struct.m
@@ -0,0 +1,90 @@
+% FUNCTION [...] = gf_cont_struct([operation [, args]])
+%
+%   General constructor for cont_struct objects.
+%
+%   This object serves for storing parameters and data used in numerical
+%   continuation of solution branches of models (for more details about
+%   continuation see the GetFEM++ user documentation).
+%   
+%
+%   * S = gf_cont_struct(model md, string dataname_parameter[,string 
dataname_init, string dataname_final, string dataname_current], scalar sc_fac[, 
...])
+%   The variable `dataname_parameter` should parametrise the model given by
+%   `md`. If the parametrisation is done via a vector datum, `dataname_init`
+%   and `dataname_final` should store two given values of this datum
+%   determining the parametrisation, and `dataname_current` serves for actual
+%   values of this datum. `sc_fac` is a scale factor involved in the weighted
+%   norm used in the continuation.
+%   
+%   Additional options:
+%   
+%   - 'lsolver', string SOLVER_NAME
+%   name of the solver to be used for the incorporated linear systems
+%   (the default value is 'auto', which lets getfem choose itself);
+%   possible values are 'superlu', 'mumps' (if supported), 'cg/ildlt',
+%   'gmres/ilu' and 'gmres/ilut';
+%   - 'h_init', scalar HIN
+%   initial step size (the default value is 1e-2);
+%   - 'h_max', scalar HMAX
+%   maximum step size (the default value is 1e-1);
+%   - 'h_min', scalar HMIN
+%   minimum step size (the default value is 1e-5);
+%   - 'h_inc', scalar HINC
+%   factor for enlarging the step size (the default value is 1.3);
+%   - 'h_dec', scalar HDEC
+%   factor for diminishing the step size (the default value is 0.5);
+%   - 'max_iter', int MIT
+%   maximum number of iterations allowed in the correction (the default
+%   value is 10);
+%   - 'thr_iter', int TIT
+%   threshold number of iterations of the correction for enlarging the
+%   step size (the default value is 4);
+%   - 'max_res', scalar RES
+%   target residual value of a new point on the solution curve (the
+%   default value is 1e-6);
+%   - 'max_diff', scalar DIFF
+%   determines a convergence criterion for two consecutive points (the
+%   default value is 1e-6);
+%   - 'min_cos', scalar MCOS
+%   minimal value of the cosine of the angle between tangents to the
+%   solution curve at an old point and a new one (the default value is
+%   0.9);
+%   - 'max_res_solve', scalar RES_SOLVE
+%   target residual value for the linear systems to be solved (the
+%   default value is 1e-8);
+%   - 'singularities', int SING
+%   activates tools for detection and treatment of singular points (1 for
+%   limit points, 2 for bifurcation points and points requiring special
+%   branching techniques);
+%   - 'non-smooth'
+%   determines that some special methods for non-smooth problems can be
+%   used;
+%   - 'delta_max', scalar DMAX
+%   maximum size of division for evaluating the test function on the
+%   convex combination of two augmented Jacobians that belong to different
+%   smooth pieces (the default value is 0.005);
+%   - 'delta_min', scalar DMIN
+%   minimum size of division for evaluating the test function on the
+%   convex combination (the default value is 0.00012);
+%   - 'thr_var', scalar TVAR
+%   threshold variation for refining the division (the default value is
+%   0.02);
+%   - 'nb_dir', int NDIR
+%   total number of the linear combinations of one couple of reference
+%   vectors when searching for new tangent predictions during location of
+%   new one-sided branches (the default value is 40);
+%   - 'nb_span', int NSPAN
+%   total number of the couples of the reference vectors forming the
+%   linear combinations (the default value is 1);
+%   - 'noisy' or 'very_noisy'
+%   determines how detailed information has to be displayed during the
+%   continuation process (residual values etc.).
+%
+%
+function [varargout]=gf_cont_struct(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('cont_struct', varargin{:});
+  else
+    gf_matlab('cont_struct', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_cont_struct_get.m 
b/interface/src/octave/gf_cont_struct_get.m
new file mode 100644
index 0000000..f9f93db
--- /dev/null
+++ b/interface/src/octave/gf_cont_struct_get.m
@@ -0,0 +1,77 @@
+% FUNCTION [...] = gf_cont_struct_get(cont_struct CS, [operation [, args]])
+%
+%   General function for querying information about cont_struct objects and for
+%   applying them to numerical continuation.
+%   
+%
+%   * h = gf_cont_struct_get(cont_struct CS, 'init step size')
+%   Return an initial step size for continuation.
+%
+%   * h = gf_cont_struct_get(cont_struct CS, 'min step size')
+%   Return the minimum step size for continuation.
+%
+%   * h = gf_cont_struct_get(cont_struct CS, 'max step size')
+%   Return the maximum step size for continuation.
+%
+%   * h = gf_cont_struct_get(cont_struct CS, 'step size decrement')
+%   Return the decrement ratio of the step size for continuation.
+%
+%   * h = gf_cont_struct_get(cont_struct CS, 'step size increment')
+%   Return the increment ratio of the step size for continuation.
+%
+%   * [vec tangent_sol, scalar tangent_par] = gf_cont_struct_get(cont_struct 
CS, 'compute tangent', vec solution, scalar parameter, vec tangent_sol, scalar 
tangent_par)
+%   Compute and return an updated tangent.
+%
+%   * E = gf_cont_struct_get(cont_struct CS, 'init Moore-Penrose 
continuation', vec solution, scalar parameter, scalar init_dir)
+%   Initialise the Moore-Penrose continuation: Return a unit tangent to
+%   the solution curve at the point given by `solution` and `parameter`,
+%   and an initial step size for the continuation. Orientation of the
+%   computed tangent with respect to the parameter is determined by the
+%   sign of `init_dir`.
+%
+%   * E = gf_cont_struct_get(cont_struct CS, 'Moore-Penrose continuation', vec 
solution, scalar parameter, vec tangent_sol, scalar tangent_par, scalar h)
+%   Compute one step of the Moore-Penrose continuation: Take the point
+%   given by `solution` and `parameter`, the tangent given by `tangent_sol`
+%   and `tangent_par`, and the step size `h`. Return a new point on the
+%   solution curve, the corresponding tangent, a step size for the next
+%   step and optionally the current step size. If the returned step
+%   size equals zero, the continuation has failed. Optionally, return
+%   the type of any detected singular point.
+%   NOTE: The new point need not to be saved in the model in the end!
+%
+%   * t = gf_cont_struct_get(cont_struct CS, 'non-smooth bifurcation test', 
vec solution1, scalar parameter1, vec tangent_sol1, scalar tangent_par1, vec 
solution2, scalar parameter2, vec tangent_sol2, scalar tangent_par2)
+%   Test for a non-smooth bifurcation point between the point given by
+%   `solution1` and `parameter1` with the tangent given by `tangent_sol1`
+%   and `tangent_par1` and the point given by `solution2` and `parameter2`
+%   with the tangent given by `tangent_sol2` and `tangent_par2`.
+%
+%   * t = gf_cont_struct_get(cont_struct CS, 'bifurcation test function')
+%   Return the last value of the bifurcation test function and eventaully
+%   the whole calculated graph when passing between different sub-domains
+%   of differentiability.
+%
+%   * {X, gamma, T_X, T_gamma} = gf_cont_struct_get(cont_struct CS, 
'sing_data')
+%   Return a singular point (`X`, `gamma`) stored in the cont_struct object 
and a
+%   couple of arrays (`T_X`, `T_gamma`) of tangents to all located solution
+%   branches that emanate from there.
+%
+%   * s = gf_cont_struct_get(cont_struct CS, 'char')
+%   Output a (unique) string representation of the cont_struct.
+%   
+%   This can be used for performing comparisons between two
+%   different cont_struct objects.
+%   This function is to be completed.
+%   
+%
+%   * gf_cont_struct_get(cont_struct CS, 'display')
+%   Display a short summary for a cont_struct object.
+%
+%
+function [varargout]=gf_cont_struct_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('cont_struct_get', varargin{:});
+  else
+    gf_matlab('cont_struct_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_cvstruct_get.m 
b/interface/src/octave/gf_cvstruct_get.m
new file mode 100644
index 0000000..bef8a9d
--- /dev/null
+++ b/interface/src/octave/gf_cvstruct_get.m
@@ -0,0 +1,42 @@
+% FUNCTION [...] = gf_cvstruct_get(cvstruct CVS, [operation [, args]])
+%
+%   General function for querying information about convex_structure objects.
+%   
+%   The convex structures are internal structures of getfem++. They do not
+%   contain points positions. These structures are recursive, since the faces
+%   of a convex structures are convex structures.
+%   
+%
+%   * n = gf_cvstruct_get(cvstruct CVS, 'nbpts')
+%   Get the number of points of the convex structure.
+%
+%   * d = gf_cvstruct_get(cvstruct CVS, 'dim')
+%   Get the dimension of the convex structure.
+%
+%   * cs = gf_cvstruct_get(cvstruct CVS, 'basic structure')
+%   Get the simplest convex structure.
+%   
+%   For example, the 'basic structure' of the 6-node triangle, is the
+%   canonical 3-noded triangle.
+%
+%   * cs = gf_cvstruct_get(cvstruct CVS, 'face', int F)
+%   Return the convex structure of the face `F`.
+%
+%   * I = gf_cvstruct_get(cvstruct CVS, 'facepts', int F)
+%   Return the list of point indices for the face `F`.
+%
+%   * s = gf_cvstruct_get(cvstruct CVS, 'char')
+%   Output a string description of the cvstruct.
+%
+%   * gf_cvstruct_get(cvstruct CVS, 'display')
+%   displays a short summary for a cvstruct object.
+%
+%
+function [varargout]=gf_cvstruct_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('cvstruct_get', varargin{:});
+  else
+    gf_matlab('cvstruct_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_delete.m b/interface/src/octave/gf_delete.m
new file mode 100644
index 0000000..343e83f
--- /dev/null
+++ b/interface/src/octave/gf_delete.m
@@ -0,0 +1,32 @@
+% FUNCTION [...] = gf_delete([operation [, args]])
+%
+%   Delete an existing getfem object from memory (mesh, mesh_fem, etc.).
+%   
+%   SEE ALSO:
+%   gf_workspace, gf_mesh, gf_mesh_fem.
+%   
+%
+%   * gf_delete(I[, J, K,...])
+%   
+%   I should be a descriptor given by gf_mesh(),
+%   gf_mesh_im(), gf_slice() etc.
+%   
+%   Note that if another object uses I, then object I will be deleted only
+%   when both have been asked for deletion.
+%   
+%   Only objects listed in the output of gf_workspace('stats') can be
+%   deleted (for example gf_fem objects cannot be destroyed).
+%   
+%   You may also use gf_workspace('clear all') to erase everything at
+%   once.
+%   
+%
+%
+function [varargout]=gf_delete(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('delete', varargin{:});
+  else
+    gf_matlab('delete', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_eltm.m b/interface/src/octave/gf_eltm.m
new file mode 100644
index 0000000..3e44710
--- /dev/null
+++ b/interface/src/octave/gf_eltm.m
@@ -0,0 +1,49 @@
+% FUNCTION [...] = gf_eltm([operation [, args]])
+%
+%   General constructor for eltm objects.
+%
+%   
+%   This object represents a type of elementary matrix. In order to obtain a
+%   numerical value of these matrices, see gf_mesh_im_get(mesh_im MI, 'eltm').
+%   
+%   If you have very particular assembling needs, or if you just want to check
+%   the content of an elementary matrix, this function might be useful. But
+%   the generic assembly abilities of gf_asm(...) should suit most needs.
+%   
+%
+%   * E = gf_eltm('base', fem FEM)
+%   return a descriptor for the integration of shape functions on
+%   elements, using the fem `FEM`.
+%
+%   * E = gf_eltm('grad', fem FEM)
+%   return a descriptor for the integration of the gradient of shape
+%   functions on elements, using the fem `FEM`.
+%
+%   * E = gf_eltm('hessian', fem FEM)
+%   return a descriptor for the integration of the hessian of shape
+%   functions on elements, using the fem `FEM`.
+%
+%   * E = gf_eltm('normal')
+%   return a descriptor for the unit normal of convex faces.
+%
+%   * E = gf_eltm('grad_geotrans')
+%   return a descriptor to the gradient matrix of the geometric
+%   transformation.
+%
+%   * E = gf_eltm('grad_geotrans_inv')
+%   return a descriptor to the inverse of the gradient matrix of the
+%   geometric transformation (this is rarely used).
+%
+%   * E = gf_eltm('product', eltm A, eltm B)
+%   return a descriptor for the integration of the tensorial product of
+%   elementary matrices `A` and `B`.
+%
+%
+function [varargout]=gf_eltm(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('eltm', varargin{:});
+  else
+    gf_matlab('eltm', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_fem.m b/interface/src/octave/gf_fem.m
new file mode 100644
index 0000000..633b9bc
--- /dev/null
+++ b/interface/src/octave/gf_fem.m
@@ -0,0 +1,93 @@
+% FUNCTION [...] = gf_fem([operation [, args]])
+%
+%   General constructor for fem objects.
+%
+%   This object represents a finite element method on a reference element.
+%   
+%
+%   * F = gf_fem('interpolated_fem', mesh_fem mf, mesh_im mim, [ivec 
blocked_dof])
+%   Build a special fem which is interpolated from another mesh_fem.
+%   
+%   Using this special finite element, it is possible to interpolate a given
+%   mesh_fem `mf` on another mesh, given the integration method `mim` that will
+%   be used on this mesh.
+%   
+%   Note that this finite element may be quite slow, and eats much
+%   memory.
+%
+%   * F = gf_fem(string fem_name)
+%   The `fem_name` should contain a description of the finite element
+%   method. Please refer to the getfem++ manual (especially the
+%   description of finite element and integration methods) for a complete
+%   reference. Here is a list of some of them:
+%   
+%   - FEM_PK(n,k) :
+%   classical Lagrange element Pk on a simplex of dimension `n`.
+%   - FEM_PK_DISCONTINUOUS(n,k[,alpha]) :
+%   discontinuous Lagrange element Pk on a simplex of dimension `n`.
+%   - FEM_QK(n,k) :
+%   classical Lagrange element Qk on quadrangles, hexahedrons etc.
+%   - FEM_QK_DISCONTINUOUS(n,k[,alpha]) :
+%   discontinuous Lagrange element Qk on quadrangles, hexahedrons etc.
+%   - FEM_Q2_INCOMPLETE(n) :
+%   incomplete Q2 elements with 8 and 20 dof (serendipity Quad 8 and
+%   Hexa 20 elements).
+%   - FEM_PK_PRISM(n,k) :
+%   classical Lagrange element Pk on a prism of dimension `n`.
+%   - FEM_PK_PRISM_DISCONTINUOUS(n,k[,alpha]) :
+%   classical discontinuous Lagrange element Pk on a prism.
+%   - FEM_PK_WITH_CUBIC_BUBBLE(n,k) :
+%   classical Lagrange element Pk on a simplex with an additional
+%   volumic bubble function.
+%   - FEM_P1_NONCONFORMING :
+%   non-conforming P1 method on a triangle.
+%   - FEM_P1_BUBBLE_FACE(n) :
+%   P1 method on a simplex with an additional bubble function on face 0.
+%   - FEM_P1_BUBBLE_FACE_LAG :
+%   P1 method on a simplex with an additional lagrange dof on face 0.
+%   - FEM_PK_HIERARCHICAL(n,k) :
+%   PK element with a hierarchical basis.
+%   - FEM_QK_HIERARCHICAL(n,k) :
+%   QK element with a hierarchical basis
+%   - FEM_PK_PRISM_HIERARCHICAL(n,k) :
+%   PK element on a prism with a hierarchical basis.
+%   - FEM_STRUCTURED_COMPOSITE(fem f,k) :
+%   Composite fem `f` on a grid with `k` divisions.
+%   - FEM_PK_HIERARCHICAL_COMPOSITE(n,k,s) :
+%   Pk composite element on a grid with `s` subdivisions and with a
+%   hierarchical basis.
+%   - FEM_PK_FULL_HIERARCHICAL_COMPOSITE(n,k,s) :
+%   Pk composite element with `s` subdivisions and a hierarchical basis
+%   on both degree and subdivision.
+%   - FEM_PRODUCT(A,B) :
+%   tensorial product of two polynomial elements.
+%   - FEM_HERMITE(n) :
+%   Hermite element P3 on a simplex of dimension `n = 1, 2, 3`.
+%   - FEM_ARGYRIS :
+%   Argyris element P5 on the triangle.
+%   - FEM_HCT_TRIANGLE :
+%   Hsieh-Clough-Tocher element on the triangle (composite P3 element
+%   which is C1), should be used with IM_HCT_COMPOSITE() integration
+%   method.
+%   - FEM_QUADC1_COMPOSITE :
+%   Quadrilateral element, composite P3 element and C1 (16 dof).
+%   - FEM_REDUCED_QUADC1_COMPOSITE :
+%   Quadrilateral element, composite P3 element and C1 (12 dof).
+%   - FEM_RT0(n) :
+%   Raviart-Thomas element of order 0 on a simplex of dimension `n`.
+%   - FEM_NEDELEC(n) :
+%   Nedelec edge element of order 0 on a simplex of dimension `n`.
+%   
+%   Of course, you have to ensure that the selected fem is compatible with
+%   the geometric transformation: a Pk fem has no meaning on a quadrangle.
+%   
+%
+%
+function [varargout]=gf_fem(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('fem', varargin{:});
+  else
+    gf_matlab('fem', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_fem_get.m 
b/interface/src/octave/gf_fem_get.m
new file mode 100644
index 0000000..a16f0ff
--- /dev/null
+++ b/interface/src/octave/gf_fem_get.m
@@ -0,0 +1,88 @@
+% FUNCTION [...] = gf_fem_get(fem F, [operation [, args]])
+%
+%   General function for querying information about FEM objects.
+%   
+%
+%   * n = gf_fem_get(fem F, 'nbdof'[, int cv])
+%   Return the number of dof for the fem.
+%   
+%   Some specific fem (for example 'interpolated_fem') may require a
+%   convex number `cv` to give their result. In most of the case, you
+%   can omit this convex number.
+%
+%   * n = gf_fem_get(fem F, 'index of global dof', cv)
+%   Return the index of global dof for special fems such as interpolated fem.
+%   
+%
+%   * d = gf_fem_get(fem F, 'dim')
+%   Return the dimension (dimension of the reference convex) of the fem.
+%
+%   * td = gf_fem_get(fem F, 'target_dim')
+%   Return the dimension of the target space.
+%   
+%   The target space dimension is usually 1, except for vector fem.
+%
+%   * P = gf_fem_get(fem F, 'pts'[, int cv])
+%   Get the location of the dof on the reference element.
+%   
+%   Some specific fem may require a convex number `cv` to give their
+%   result (for example 'interpolated_fem'). In most of the case, you
+%   can omit this convex number.
+%
+%   * b = gf_fem_get(fem F, 'is_equivalent')
+%   Return 0 if the fem is not equivalent.
+%   
+%   Equivalent fem are evaluated on the reference convex. This is
+%   the case of most classical fem's.
+%
+%   * b = gf_fem_get(fem F, 'is_lagrange')
+%   Return 0 if the fem is not of Lagrange type.
+%
+%   * b = gf_fem_get(fem F, 'is_polynomial')
+%   Return 0 if the basis functions are not polynomials.
+%
+%   * d = gf_fem_get(fem F, 'estimated_degree')
+%   Return an estimation of the polynomial degree of the fem.
+%   
+%   This is an estimation for fem which are not polynomials.
+%
+%   * E = gf_fem_get(fem F, 'base_value',mat p)
+%   Evaluate all basis functions of the FEM at point `p`.
+%   
+%   `p` is supposed to be in the reference convex!
+%
+%   * ED = gf_fem_get(fem F, 'grad_base_value',mat p)
+%   Evaluate the gradient of all base functions of the fem at point `p`.
+%   
+%   `p` is supposed to be in the reference convex!
+%
+%   * EH = gf_fem_get(fem F, 'hess_base_value',mat p)
+%   Evaluate the Hessian of all base functions of the fem at point `p`.
+%   
+%   `p` is supposed to be in the reference convex!.
+%
+%   * gf_fem_get(fem F, 'poly_str')
+%   Return the polynomial expressions of its basis functions in
+%   the reference convex.
+%   
+%   The result is expressed as a cell array of
+%   strings. Of course this will fail on non-polynomial fem's.
+%
+%   * string = gf_fem_get(fem F, 'char')
+%   Ouput a (unique) string representation of the fem.
+%   
+%   This can be used to perform comparisons between two different fem
+%   objects.
+%
+%   * gf_fem_get(fem F, 'display')
+%   displays a short summary for a fem object.
+%
+%
+function [varargout]=gf_fem_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('fem_get', varargin{:});
+  else
+    gf_matlab('fem_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_geotrans.m 
b/interface/src/octave/gf_geotrans.m
new file mode 100644
index 0000000..9c7949d
--- /dev/null
+++ b/interface/src/octave/gf_geotrans.m
@@ -0,0 +1,35 @@
+% FUNCTION [...] = gf_geotrans([operation [, args]])
+%
+%   General constructor for geotrans objects.
+%
+%   The geometric transformation must be used when you are building a custom
+%   mesh convex by convex (see the add_convex() function of mesh): it also
+%   defines the kind of convex (triangle, hexahedron, prism, etc..)
+%   
+%
+%   * GT = gf_geotrans(string name)
+%   
+%   The name argument contains the specification of the geometric 
transformation
+%   as a string, which may be:
+%   
+%   - GT_PK(n,k) :
+%   Transformation on simplexes, dim `n`, degree `k`.
+%   - GT_QK(n,k) :
+%   Transformation on parallelepipeds, dim `n`, degree `k`.
+%   - GT_PRISM(n,k) :
+%   Transformation on prisms, dim `n`, degree `k`.
+%   - GT_PRODUCT(A,B) :
+%   Tensorial product of two transformations.
+%   - GT_LINEAR_PRODUCT(geotrans gt1,geotrans gt2) :
+%   Linear tensorial product of two transformations
+%   
+%
+%
+function [varargout]=gf_geotrans(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('geotrans', varargin{:});
+  else
+    gf_matlab('geotrans', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_geotrans_get.m 
b/interface/src/octave/gf_geotrans_get.m
new file mode 100644
index 0000000..8a55524
--- /dev/null
+++ b/interface/src/octave/gf_geotrans_get.m
@@ -0,0 +1,53 @@
+% FUNCTION [...] = gf_geotrans_get(geotrans GT, [operation [, args]])
+%
+%   General function for querying information about geometric transformations
+%   objects.
+%   
+%
+%   * d = gf_geotrans_get(geotrans GT, 'dim')
+%   Get the dimension of the geotrans.
+%   
+%   This is the dimension of the source space, i.e. the dimension of
+%   the reference convex.
+%
+%   * b = gf_geotrans_get(geotrans GT, 'is_linear')
+%   Return 0 if the geotrans is not linear.
+%
+%   * n = gf_geotrans_get(geotrans GT, 'nbpts')
+%   Return the number of points of the geotrans.
+%
+%   * P = gf_geotrans_get(geotrans GT, 'pts')
+%   Return the reference convex points of the geotrans.
+%   
+%   The points are stored in the columns of the output matrix.
+%
+%   * N = gf_geotrans_get(geotrans GT, 'normals')
+%   Get the normals for each face of the reference convex of the geotrans.
+%   
+%   The normals are stored in the columns of the output matrix.
+%
+%   * Pt = gf_geotrans_get(geotrans GT, 'transform',mat G, mat Pr)
+%   Apply the geotrans to a set of points.
+%   
+%   `G` is the set of vertices of the real convex, `Pr` is the set
+%   of points (in the reference convex) that are to be transformed.
+%   The corresponding set of points in the real convex is returned.
+%
+%   * s = gf_geotrans_get(geotrans GT, 'char')
+%   Output a (unique) string representation of the geotrans.
+%   
+%   This can be used to perform comparisons between two
+%   different geotrans objects.
+%
+%   * gf_geotrans_get(geotrans GT, 'display')
+%   displays a short summary for a geotrans object.
+%
+%
+function [varargout]=gf_geotrans_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('geotrans_get', varargin{:});
+  else
+    gf_matlab('geotrans_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_global_function.m 
b/interface/src/octave/gf_global_function.m
new file mode 100644
index 0000000..a81eaf9
--- /dev/null
+++ b/interface/src/octave/gf_global_function.m
@@ -0,0 +1,40 @@
+% FUNCTION [...] = gf_global_function([operation [, args]])
+%
+%   General constructor for global_function objects.
+%
+%   Global function object is represented by three functions:
+%   
+%   * The function `val`.
+%   * The function gradient `grad`.
+%   * The function Hessian `hess`.
+%   
+%   this type of function is used as local and global enrichment function. The
+%   global function Hessian is an optional parameter (only for fourth order
+%   derivative problems).
+%
+%   * GF = gf_global_function('cutoff', int fn, scalar r, scalar r1, scalar r0)
+%   Create a cutoff global function.
+%
+%   * GF = gf_global_function('crack', int fn)
+%   Create a near-tip asymptotic global function for modelling cracks.
+%
+%   * GF = gf_global_function('parser', string val[, string grad[, string 
hess]])
+%   Create a global function from strings `val`, `grad` and `hess`.
+%   This function could be improved by using the derivation of the generic
+%   assembly language ... to be done.
+%
+%   * GF = gf_global_function('product', global_function F, global_function G)
+%   Create a product of two global functions.
+%
+%   * GF = gf_global_function('add', global_function gf1, global_function gf2)
+%   Create a add of two global functions.
+%
+%
+function [varargout]=gf_global_function(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('global_function', varargin{:});
+  else
+    gf_matlab('global_function', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_global_function_get.m 
b/interface/src/octave/gf_global_function_get.m
new file mode 100644
index 0000000..8379a15
--- /dev/null
+++ b/interface/src/octave/gf_global_function_get.m
@@ -0,0 +1,40 @@
+% FUNCTION [...] = gf_global_function_get(global_function GF, [operation [, 
args]])
+%
+%   General function for querying information about global_function objects.
+%   
+%
+%   * VALs = gf_global_function_get(global_function GF, 'val',mat PTs)
+%   Return `val` function evaluation in `PTs` (column points).
+%
+%   * GRADs = gf_global_function_get(global_function GF, 'grad',mat PTs)
+%   Return `grad` function evaluation in `PTs` (column points).
+%   
+%   On return, each column of `GRADs` is of the
+%   form [Gx,Gy].
+%
+%   * HESSs = gf_global_function_get(global_function GF, 'hess',mat PTs)
+%   Return `hess` function evaluation in `PTs` (column points).
+%   
+%   On return, each column of `HESSs` is of the
+%   form [Hxx,Hxy,Hyx,Hyy].
+%
+%   * s = gf_global_function_get(global_function GF, 'char')
+%   Output a (unique) string representation of the global_function.
+%   
+%   This can be used to perform comparisons between two
+%   different global_function objects.
+%   This function is to be completed.
+%   
+%
+%   * gf_global_function_get(global_function GF, 'display')
+%   displays a short summary for a global_function object.
+%
+%
+function [varargout]=gf_global_function_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('global_function_get', varargin{:});
+  else
+    gf_matlab('global_function_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_integ.m b/interface/src/octave/gf_integ.m
new file mode 100644
index 0000000..da9a811
--- /dev/null
+++ b/interface/src/octave/gf_integ.m
@@ -0,0 +1,67 @@
+% FUNCTION [...] = gf_integ([operation [, args]])
+%
+%   General constructor for integ objects.
+%
+%   General object for obtaining handles to various integrations methods on
+%   convexes (used when the elementary matrices are built).
+%   
+%
+%   * I = gf_integ(string method)
+%   Here is a list of some integration methods defined in getfem++ (see the
+%   description of finite element and integration methods for a complete
+%   reference):
+%   
+%   - IM_EXACT_SIMPLEX(n) :
+%   Exact integration on simplices (works only with linear geometric
+%   transformations and PK fem's).
+%   - IM_PRODUCT(A,B) :
+%   Product of two integration methods.
+%   - IM_EXACT_PARALLELEPIPED(n) :
+%   Exact integration on parallelepipeds.
+%   - IM_EXACT_PRISM(n) :
+%   Exact integration on prisms.
+%   - IM_GAUSS1D(k) :
+%   Gauss method on the segment, order `k=1,3,...,99`.
+%   - IM_NC(n,k) :
+%   Newton-Cotes approximative integration on simplexes, order `k`.
+%   - IM_NC_PARALLELEPIPED(n,k) :
+%   Product of Newton-Cotes integration on parallelepipeds.
+%   - IM_NC_PRISM(n,k) :
+%   Product of Newton-Cotes integration on prisms.
+%   - IM_GAUSS_PARALLELEPIPED(n,k) :
+%   Product of Gauss1D integration on parallelepipeds.
+%   - IM_TRIANGLE(k) :
+%   Gauss methods on triangles `k=1,3,5,6,7,8,9,10,13,17,19`.
+%   - IM_QUAD(k) :
+%   Gauss methods on quadrilaterons `k=2,3,5, ...,17`. Note that
+%   IM_GAUSS_PARALLELEPIPED should be prefered for QK fem's.
+%   - IM_TETRAHEDRON(k) :
+%   Gauss methods on tetrahedrons `k=1,2,3,5,6 or 8`.
+%   - IM_SIMPLEX4D(3) :
+%   Gauss method on a 4-dimensional simplex.
+%   - IM_STRUCTURED_COMPOSITE(im,k) :
+%   Composite method on a grid with `k` divisions.
+%   - IM_HCT_COMPOSITE(im) :
+%   Composite integration suited to the HCT composite finite element.
+%   
+%   Example:
+%   
+%   - I = gf_integ('IM_PRODUCT(IM_GAUSS1D(5),IM_GAUSS1D(5))')
+%   
+%   is the same as:
+%   
+%   - I = gf_integ('IM_GAUSS_PARALLELEPIPED(2,5)')
+%   
+%   Note that 'exact integration' should be avoided in general, since they
+%   only apply to linear geometric transformations, are quite slow, and
+%   subject to numerical stability problems for high degree fem's.
+%
+%
+function [varargout]=gf_integ(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('integ', varargin{:});
+  else
+    gf_matlab('integ', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_integ_get.m 
b/interface/src/octave/gf_integ_get.m
new file mode 100644
index 0000000..af58fb4
--- /dev/null
+++ b/interface/src/octave/gf_integ_get.m
@@ -0,0 +1,63 @@
+% FUNCTION [...] = gf_integ_get(integ I, [operation [, args]])
+%
+%   General function for querying information about integration method objects.
+%   
+%
+%   * b = gf_integ_get(integ I, 'is_exact')
+%   Return 0 if the integration is an approximate one.
+%
+%   * d = gf_integ_get(integ I, 'dim')
+%   Return the dimension of the reference convex of
+%   the method.
+%
+%   * n = gf_integ_get(integ I, 'nbpts')
+%   Return the total number of integration points.
+%   
+%   Count the points for the volume integration, and points for
+%   surface integration on each face of the reference convex.
+%   
+%   Only for approximate methods, this has no meaning for exact
+%   integration methods!
+%
+%   * Pp = gf_integ_get(integ I, 'pts')
+%   Return the list of integration points
+%   
+%   Only for approximate methods, this has no meaning for exact
+%   integration methods!
+%
+%   * Pf = gf_integ_get(integ I, 'face_pts',F)
+%   Return the list of integration points for a face.
+%   
+%   Only for approximate methods, this has no meaning for exact
+%   integration methods!
+%
+%   * Cp = gf_integ_get(integ I, 'coeffs')
+%   Returns the coefficients associated to each integration point.
+%   
+%   Only for approximate methods, this has no meaning for exact
+%   integration methods!
+%
+%   * Cf = gf_integ_get(integ I, 'face_coeffs',F)
+%   Returns the coefficients associated to each integration of a face.
+%   
+%   Only for approximate methods, this has no meaning for exact
+%   integration methods!
+%
+%   * s = gf_integ_get(integ I, 'char')
+%   Ouput a (unique) string representation of the integration method.
+%   
+%   This can be used to  comparisons between two different integ
+%   objects.
+%
+%   * gf_integ_get(integ I, 'display')
+%   displays a short summary for a integ object.
+%
+%
+function [varargout]=gf_integ_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('integ_get', varargin{:});
+  else
+    gf_matlab('integ_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_levelset.m 
b/interface/src/octave/gf_levelset.m
new file mode 100644
index 0000000..f4e5110
--- /dev/null
+++ b/interface/src/octave/gf_levelset.m
@@ -0,0 +1,40 @@
+% FUNCTION [...] = gf_levelset([operation [, args]])
+%
+%   General constructor for levelset objects.
+%
+%   
+%   The level-set object is represented by a primary level-set and optionally
+%   a secondary level-set used to represent fractures (if p(x) is the primary
+%   level-set function and s(x) is the secondary level-set, the crack is
+%   defined by :math:`p(x)=0` and :math:`s(x)\leq0` : the role of the 
secondary is to determine
+%   the crack front/tip).
+%   
+%   note:
+%   
+%   All tools listed below need the package qhull installed on your
+%   system. This package is widely available. It computes convex hull and
+%   delaunay triangulations in arbitrary dimension.
+%   
+%   
+%
+%   * LS = gf_levelset(mesh m, int d[, string 'ws'| string f1[, string f2 | 
string 'ws']])
+%   Create a levelset object on a mesh represented by a primary function
+%   (and optional secondary function, both) defined on a lagrange mesh_fem of
+%   degree `d`.
+%   
+%   If `ws` (with secondary) is set; this levelset is represented by a
+%   primary function and a secondary function. If `f1` is set; the primary
+%   function is defined by that expression (with the syntax of the high
+%   generic assembly language). If `f2` is set; this levelset
+%   is represented by a primary function and a secondary function defined
+%   by these expressions.
+%
+%
+function [varargout]=gf_levelset(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('levelset', varargin{:});
+  else
+    gf_matlab('levelset', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_levelset_get.m 
b/interface/src/octave/gf_levelset_get.m
new file mode 100644
index 0000000..89f4a95
--- /dev/null
+++ b/interface/src/octave/gf_levelset_get.m
@@ -0,0 +1,41 @@
+% FUNCTION [...] = gf_levelset_get(levelset LS, [operation [, args]])
+%
+%   General function for querying information about LEVELSET objects.
+%   
+%
+%   * V = gf_levelset_get(levelset LS, 'values', int nls)
+%   Return the vector of dof for `nls` funtion.
+%   
+%   If `nls` is 0, the method return the vector of dof for the primary
+%   level-set funtion. If `nls` is 1, the method return the vector of
+%   dof for the secondary level-set function (if any).
+%
+%   * d = gf_levelset_get(levelset LS, 'degree')
+%   Return the degree of lagrange representation.
+%
+%   * mf = gf_levelset_get(levelset LS, 'mf')
+%   Return a reference on the mesh_fem object.
+%
+%   * z = gf_levelset_get(levelset LS, 'memsize')
+%   Return the amount of memory (in bytes) used by the level-set.
+%
+%   * s = gf_levelset_get(levelset LS, 'char')
+%   Output a (unique) string representation of the levelset.
+%   
+%   This can be used to perform comparisons between two
+%   different levelset objects.
+%   This function is to be completed.
+%   
+%
+%   * gf_levelset_get(levelset LS, 'display')
+%   displays a short summary for a levelset.
+%
+%
+function [varargout]=gf_levelset_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('levelset_get', varargin{:});
+  else
+    gf_matlab('levelset_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_levelset_set.m 
b/interface/src/octave/gf_levelset_set.m
new file mode 100644
index 0000000..52ffbaa
--- /dev/null
+++ b/interface/src/octave/gf_levelset_set.m
@@ -0,0 +1,24 @@
+% FUNCTION [...] = gf_levelset_set(levelset LS, [operation [, args]])
+%
+%   General function for modification of LEVELSET objects.
+%   
+%
+%   * gf_levelset_set(levelset LS, 'values', {mat v1|string func_1}[, mat 
v2|string func_2])
+%   Set values of the vector of dof for the level-set functions.
+%   
+%   Set the primary function with the vector of dof `v1` (or the expression
+%   `func_1`) and the secondary function (if any) with  the vector of dof
+%   `v2` (or the expression `func_2`)
+%
+%   * gf_levelset_set(levelset LS, 'simplify'[, scalar eps=0.01])
+%   Simplify dof of level-set optionally with the parameter `eps`.
+%
+%
+function [varargout]=gf_levelset_set(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('levelset_set', varargin{:});
+  else
+    gf_matlab('levelset_set', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_linsolve.m 
b/interface/src/octave/gf_linsolve.m
new file mode 100644
index 0000000..b15163b
--- /dev/null
+++ b/interface/src/octave/gf_linsolve.m
@@ -0,0 +1,41 @@
+% FUNCTION [...] = gf_linsolve([operation [, args]])
+%
+%   Various linear system solvers.
+%   
+%
+%   * X = gf_linsolve('gmres', spmat M, vec b[, int restart][, precond 
P][,'noisy'][,'res', r][,'maxiter', n])
+%   Solve `M.X = b` with the generalized minimum residuals method.
+%   
+%   Optionally using `P` as preconditioner. The default value of the
+%   restart parameter is 50.
+%
+%   * X = gf_linsolve('cg', spmat M, vec b [, precond P][,'noisy'][,'res', 
r][,'maxiter', n])
+%   Solve `M.X = b` with the conjugated gradient method.
+%   
+%   Optionally using `P` as preconditioner.
+%
+%   * X = gf_linsolve('bicgstab', spmat M, vec b [, precond 
P][,'noisy'][,'res', r][,'maxiter', n])
+%   Solve `M.X = b` with the bi-conjugated gradient stabilized method.
+%   
+%   Optionally using `P` as a preconditioner.
+%
+%   * {U, cond} = gf_linsolve('lu', spmat M, vec b)
+%   Alias for gf_linsolve('superlu',...)
+%
+%   * {U, cond} = gf_linsolve('superlu', spmat M, vec b)
+%   Solve `M.U = b` apply the SuperLU solver (sparse LU factorization).
+%   
+%   The condition number estimate `cond` is returned with the solution `U`.
+%
+%   * {U, cond} = gf_linsolve('mumps', spmat M, vec b)
+%   Solve `M.U = b` using the MUMPS solver.
+%
+%
+function [varargout]=gf_linsolve(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('linsolve', varargin{:});
+  else
+    gf_matlab('linsolve', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh.m b/interface/src/octave/gf_mesh.m
new file mode 100644
index 0000000..3e88bd4
--- /dev/null
+++ b/interface/src/octave/gf_mesh.m
@@ -0,0 +1,126 @@
+% FUNCTION [...] = gf_mesh([operation [, args]])
+%
+%   General constructor for mesh objects.
+%
+%   This object is able to store any element in any dimension even if you mix
+%   elements with different dimensions.
+%   
+%   Note that for recent (> 6.0) versions of matlab, you should
+%   replace the calls to 'gf_mesh' with 'gfMesh' (this will instruct Matlab to
+%   consider the getfem mesh as a regular matlab object that can be
+%   manipulated with get() and set() methods).
+%   
+%
+%   * M = gf_mesh('empty', int dim)
+%   Create a new empty mesh.
+%
+%   * M = gf_mesh('cartesian', vec X[, vec Y[, vec Z,..]])
+%   Build quickly a regular mesh of quadrangles, cubes, etc.
+%
+%   * M = gf_mesh('pyramidal', vec X[, vec Y[, vec Z,..]])
+%   Build quickly a regular mesh of pyramids, etc.
+%
+%   * M = gf_mesh('cartesian Q1', vec X, vec Y[, vec Z,..])
+%   Build quickly a regular mesh of quadrangles, cubes, etc. with
+%   Q1 elements.
+%
+%   * M = gf_mesh('triangles grid', vec X, vec Y)
+%   Build quickly a regular mesh of triangles.
+%   
+%   This is a very limited and somehow deprecated function (See also
+%   ``gf_mesh('ptND')``, ``gf_mesh('regular simplices')`` and
+%   ``gf_mesh('cartesian')``).
+%
+%   * M = gf_mesh('regular simplices', vec X[, vec Y[, vec Z,...]]['degree', 
int k]['noised'])
+%   Mesh a n-dimensionnal parallelepipeded with simplices (triangles,
+%   tetrahedrons etc) .
+%   
+%   The optional degree may be used to build meshes with non linear
+%   geometric transformations.
+%
+%   * M = gf_mesh('curved', mesh m, vec F)
+%   Build a curved (n+1)-dimensions mesh from a n-dimensions mesh `m`.
+%   
+%   The points of the new mesh have one additional coordinate, given by
+%   the vector `F`. This can be used to obtain meshes for shells. `m` may
+%   be a mesh_fem object, in that case its linked mesh will be used.
+%
+%   * M = gf_mesh('prismatic', mesh m, int nl[, int degree])
+%   Extrude a prismatic mesh `M` from a mesh `m`.
+%   
+%   In the additional dimension there are `nl` layers of elements
+%   distributed from ``0`` to ``1``.
+%   If the optional parameter `degree` is provided with a value greater
+%   than the default value of ``1``, a non-linear transformation of
+%   corresponding degree is considered in the extrusion direction.
+%
+%   * M = gf_mesh('pt2D', mat P, imat T[, int n])
+%   Build a mesh from a 2D triangulation.
+%   
+%   Each column of `P` contains a point coordinate, and each column of `T`
+%   contains the point indices of a triangle. `n` is optional and is a
+%   zone number. If `n` is specified then only the zone number `n` is
+%   converted (in that case, `T` is expected to have 4 rows, the fourth
+%   containing these zone numbers).
+%   
+%   Can be used to Convert a "pdetool" triangulation exported in
+%   variables P and T into a GETFEM mesh.
+%
+%   * M = gf_mesh('ptND', mat P, imat T)
+%   Build a mesh from a n-dimensional "triangulation".
+%   
+%   Similar function to 'pt2D', for building simplexes meshes from a
+%   triangulation given in `T`, and a list of points given in `P`. The
+%   dimension of the mesh will be the number of rows of `P`, and the
+%   dimension of the simplexes will be the number of rows of `T`.
+%
+%   * M = gf_mesh('load', string filename)
+%   Load a mesh from a getfem++ ascii mesh file.
+%   
+%   See also ``gf_mesh_get(mesh M, 'save', string filename)``.
+%
+%   * M = gf_mesh('from string', string s)
+%   Load a mesh from a string description.
+%   
+%   For example, a string returned by ``gf_mesh_get(mesh M, 'char')``.
+%
+%   * M = gf_mesh('import', string format, string filename)
+%   Import a mesh.
+%   
+%   `format` may be:
+%   
+%   - 'gmsh' for a mesh created with `Gmsh`
+%   - 'gid' for a mesh created with `GiD`
+%   - 'cdb' for a mesh created with `ANSYS`
+%   - 'am_fmt' for a mesh created with `EMC2`
+%
+%   * M = gf_mesh('clone', mesh m2)
+%   Create a copy of a mesh.
+%
+%   * M = gf_mesh('generate', mesher_object mo, scalar h[, int K = 1[, mat 
vertices]])
+%   Call the experimental mesher of Getfem on the geometry
+%   represented by `mo`. please control the conformity of the produced mesh.
+%   You can help the mesher by adding a priori vertices in the array
+%   `vertices` which should be of size ``n x m`` where ``n`` n is the
+%   dimension of the mesh and ``m`` the number of points. `h` is
+%   approximate diameter of the elements. `K` is the degree of the
+%   mesh ( > 1 for curved boundaries).  The mesher try to optimize the
+%   quality of the elements. This operation may be time consuming.
+%   Note that if the mesh generation fails, because of some random
+%   procedure used, it can be run again since it will not give necessarily
+%   the same result due to random procedures used.
+%   The messages send to the console by the mesh generation can be
+%   desactivated using `gf_util('trace level', 2)`. More information
+%   can be obtained by `gf_util('trace level', 4)`. See ``gf_mesher_object``
+%   to manipulate geometric primitives in order to desribe the geometry.
+%   
+%
+%
+function [varargout]=gf_mesh(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh', varargin{:});
+  else
+    gf_matlab('mesh', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_fem.m 
b/interface/src/octave/gf_mesh_fem.m
new file mode 100644
index 0000000..804f7db
--- /dev/null
+++ b/interface/src/octave/gf_mesh_fem.m
@@ -0,0 +1,72 @@
+% FUNCTION [...] = gf_mesh_fem([operation [, args]])
+%
+%   General constructor for mesh_fem objects.
+%
+%   This object represents a finite element method defined on a whole mesh.
+%   
+%
+%   * MF = gf_mesh_fem(mesh m[, int Qdim1=1[, int Qdim2=1, ...]])
+%   Build a new mesh_fem object.
+%   
+%   The `Qdim` parameters specifies the dimension of the field represented
+%   by the finite element method. Qdim1 = 1 for a scalar field,
+%   Qdim1 = n for a vector field off size n, Qdim1=m, Qdim2=n for
+%   a matrix field of size mxn ...
+%   Returns the handle of the created object.
+%
+%   * MF = gf_mesh_fem('load', string fname[, mesh m])
+%   Load a mesh_fem from a file.
+%   
+%   If the mesh `m` is not supplied (this kind of file does not store the
+%   mesh), then it is read from the file `fname` and its descriptor is
+%   returned as the second output argument.
+%
+%   * MF = gf_mesh_fem('from string', string s[, mesh m])
+%   Create a mesh_fem object from its string description.
+%   
+%   See also ``gf_mesh_fem_get(mesh_fem MF, 'char')``
+%
+%   * MF = gf_mesh_fem('clone', mesh_fem mf)
+%   Create a copy of a mesh_fem.
+%
+%   * MF = gf_mesh_fem('sum', mesh_fem mf1, mesh_fem mf2[, mesh_fem mf3[, 
...]])
+%   Create a mesh_fem that spans two (or more) mesh_fem's.
+%   
+%   All mesh_fem must share the same mesh.
+%   
+%   After that, you should not modify the FEM of `mf1`, `mf2` etc.
+%
+%   * MF = gf_mesh_fem('product', mesh_fem mf1, mesh_fem mf2)
+%   Create a mesh_fem that spans all the product of a selection of shape
+%   functions of `mf1` by all shape functions of `mf2`.
+%   Designed for Xfem enrichment.
+%   
+%   `mf1` and `mf2` must share the same mesh.
+%   
+%   After that, you should not modify the FEM of `mf1`, `mf2`.
+%
+%   * MF = gf_mesh_fem('levelset', mesh_levelset mls, mesh_fem mf)
+%   Create a mesh_fem that is conformal to implicit surfaces defined in
+%   mesh_levelset.
+%
+%   * MF = gf_mesh_fem('global function', mesh m, levelset ls, 
{global_function GF1,...}[, int Qdim_m])
+%   Create a mesh_fem whose base functions are global function given by the
+%   user in the system of coordinate defined by the iso-values of the two
+%   level-set function of `ls`.
+%
+%   * MF = gf_mesh_fem('partial', mesh_fem mf, ivec DOFs[, ivec RCVs])
+%   Build a restricted mesh_fem by keeping only a subset of the degrees of
+%   freedom of `mf`.
+%   
+%   If `RCVs` is given, no FEM will be put on the convexes listed in
+%   `RCVs`.
+%
+%
+function [varargout]=gf_mesh_fem(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_fem', varargin{:});
+  else
+    gf_matlab('mesh_fem', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_fem_get.m 
b/interface/src/octave/gf_mesh_fem_get.m
new file mode 100644
index 0000000..5f999c0
--- /dev/null
+++ b/interface/src/octave/gf_mesh_fem_get.m
@@ -0,0 +1,282 @@
+% FUNCTION [...] = gf_mesh_fem_get(mesh_fem MF, [operation [, args]])
+%
+%   General function for inquiry about mesh_fem objects.
+%   
+%
+%   * n = gf_mesh_fem_get(mesh_fem MF, 'nbdof')
+%   Return the number of degrees of freedom (dof) of the mesh_fem.
+%
+%   * n = gf_mesh_fem_get(mesh_fem MF, 'nb basic dof')
+%   Return the number of basic degrees of freedom (dof) of the mesh_fem.
+%
+%   * DOF = gf_mesh_fem_get(mesh_fem MF, 'dof from cv',mat CVids)
+%   Deprecated function. Use gf_mesh_fem_get(mesh_fem MF, 'basic dof from cv') 
instead.
+%
+%   * DOF = gf_mesh_fem_get(mesh_fem MF, 'basic dof from cv',mat CVids)
+%   Return the dof of the convexes listed in `CVids`.
+%   
+%   WARNING: the Degree of Freedom might be returned in ANY order, do
+%   not use this function in your assembly routines. Use 'basic dof from cvid'
+%   instead, if you want to be able to map a convex number with its
+%   associated degrees of freedom.
+%   
+%   One can also get the list of basic dof on a set on convex faces, by
+%   indicating on the second row of `CVids` the faces numbers (with
+%   respect to the convex number on the first row).
+%
+%   * {DOFs, IDx} = gf_mesh_fem_get(mesh_fem MF, 'dof from cvid'[, mat CVids])
+%   Deprecated function. Use gf_mesh_fem_get(mesh_fem MF, 'basic dof from 
cvid') instead.
+%   
+%
+%   * {DOFs, IDx} = gf_mesh_fem_get(mesh_fem MF, 'basic dof from cvid'[, mat 
CVids])
+%   Return the degrees of freedom attached to each convex of the mesh.
+%   
+%   If `CVids` is omitted, all the convexes will be considered (equivalent
+%   to `CVids = 1 ... gf_mesh_get(mesh M, 'max cvid')`).
+%   
+%   `IDx` is a row vector, `length(IDx) = length(CVids)+1`.
+%   `DOFs` is a row vector containing the concatenated list
+%   of dof of each convex in `CVids`. Each entry of `IDx` is the position
+%   of the corresponding convex point list in `DOFs`. Hence, for example,
+%   the list of points of the second convex is DOFs(IDx(2):IDx(3)-1).
+%   
+%   If `CVids` contains convex #id which do not exist in the mesh, their
+%   point list will be empty.
+%
+%   * gf_mesh_fem_get(mesh_fem MF, 'non conformal dof'[, mat CVids])
+%   Deprecated function. Use gf_mesh_fem_get(mesh_fem MF, 'non conformal basic 
dof') instead.
+%   
+%
+%   * gf_mesh_fem_get(mesh_fem MF, 'non conformal basic dof'[, mat CVids])
+%   Return partially linked degrees of freedom.
+%   
+%   Return the basic dof located on the border of a convex and which belong
+%   to only one convex, except the ones which are located on the border
+%   of the mesh.  For example, if the convex 'a' and 'b' share a common
+%   face, 'a' has a P1 FEM, and 'b' has a P2 FEM, then the basic dof on the
+%   middle of the face will be returned by this function (this can be
+%   useful when searching the interfaces between classical FEM and
+%   hierarchical FEM).
+%
+%   * gf_mesh_fem_get(mesh_fem MF, 'qdim')
+%   Return the dimension Q of the field interpolated by the mesh_fem.
+%   
+%   By default, Q=1 (scalar field). This has an impact on the dof numbering.
+%
+%   * {FEMs, CV2F} = gf_mesh_fem_get(mesh_fem MF, 'fem'[, mat CVids])
+%   Return a list of FEM used by the mesh_fem.
+%   
+%   `FEMs` is an array of all fem objects found in the convexes
+%   given in `CVids`. If `CV2F` was supplied as an output argument,
+%   it contains, for each convex listed in `CVids`, the index of its
+%   correspounding FEM in `FEMs`.
+%   
+%   Convexes which are not part of the mesh, or convexes which do not
+%   have any FEM have their correspounding entry in `CV2F` set to -1.
+%   
+%   Example::
+%   
+%   cvid=gf_mesh_get(mf,'cvid');
+%   [f,c2f]=gf_mesh_fem_get(mf, 'fem');
+%   for i=1:size(f), sf{i}=gf_fem_get('char',f(i)); end;
+%   for i=1:size(c2f),
+%   disp(sprintf('the fem of convex %d is %s',...
+%   cvid(i),sf{i}));
+%   end;
+%   
+%
+%   * CVs = gf_mesh_fem_get(mesh_fem MF, 'convex_index')
+%   Return the list of convexes who have a FEM.
+%
+%   * bB = gf_mesh_fem_get(mesh_fem MF, 'is_lagrangian'[, mat CVids])
+%   Test if the mesh_fem is Lagrangian.
+%   
+%   Lagrangian means that each base function Phi[i] is such that
+%   Phi[i](P[j]) = delta(i,j), where P[j] is the dof location of
+%   the jth base function, and delta(i,j) = 1 if i==j, else 0.
+%   
+%   If `CVids` is omitted, it returns 1 if all convexes in the mesh
+%   are Lagrangian. If `CVids` is used, it returns the convex indices
+%   (with respect to `CVids`) which are Lagrangian.
+%
+%   * bB = gf_mesh_fem_get(mesh_fem MF, 'is_equivalent'[, mat CVids])
+%   Test if the mesh_fem is equivalent.
+%   
+%   See gf_mesh_fem_get(mesh_fem MF, 'is_lagrangian')
+%
+%   * bB = gf_mesh_fem_get(mesh_fem MF, 'is_polynomial'[, mat CVids])
+%   Test if all base functions are polynomials.
+%   
+%   See gf_mesh_fem_get(mesh_fem MF, 'is_lagrangian')
+%
+%   * bB = gf_mesh_fem_get(mesh_fem MF, 'is_reduced')
+%   Return 1 if the optional reduction matrix is applied to the dofs.
+%
+%   * bB = gf_mesh_fem_get(mesh_fem MF, 'reduction matrix')
+%   Return the optional reduction matrix.
+%
+%   * bB = gf_mesh_fem_get(mesh_fem MF, 'extension matrix')
+%   Return the optional extension matrix.
+%
+%   * Vr = gf_mesh_fem_get(mesh_fem MF, 'reduce vector', vec V)
+%   Multiply the provided vector V with the extension matrix of the mesh_fem.
+%
+%   * Ve = gf_mesh_fem_get(mesh_fem MF, 'extend vector', vec V)
+%   Multiply the provided vector V with the reduction matrix of the mesh_fem.
+%
+%   * DOFs = gf_mesh_fem_get(mesh_fem MF, 'basic dof on region',mat Rs)
+%   Return the list of basic dof (before the optional reduction) lying on one
+%   of the mesh regions listed in `Rs`.
+%   
+%   More precisely, this function returns the basic dof whose support is
+%   non-null on one of regions whose #ids are listed in `Rs` (note
+%   that for boundary regions, some dof nodes may not lie exactly
+%   on the boundary, for example the dof of Pk(n,0) lies on the center
+%   of the convex, but the base function in not null on the convex
+%   border).
+%
+%   * DOFs = gf_mesh_fem_get(mesh_fem MF, 'dof on region',mat Rs)
+%   Return the list of dof (after the optional reduction) lying on one
+%   of the mesh regions listed in `Rs`.
+%   
+%   More precisely, this function returns the basic dof whose support is
+%   non-null on one of regions whose #ids are listed in `Rs` (note
+%   that for boundary regions, some dof nodes may not lie exactly
+%   on the boundary, for example the dof of Pk(n,0) lies on the center
+%   of the convex, but the base function in not null on the convex
+%   border).
+%   
+%   For a reduced mesh_fem
+%   a dof is lying on a region if its potential corresponding shape
+%   function is nonzero on this region. The extension matrix is used
+%   to make the correspondance between basic and reduced dofs.
+%
+%   * DOFpts = gf_mesh_fem_get(mesh_fem MF, 'dof nodes'[, mat DOFids])
+%   Deprecated function. Use gf_mesh_fem_get(mesh_fem MF, 'basic dof nodes') 
instead.
+%
+%   * DOFpts = gf_mesh_fem_get(mesh_fem MF, 'basic dof nodes'[, mat DOFids])
+%   Get location of basic degrees of freedom.
+%   
+%   Return the list of interpolation points for the specified
+%   dof #IDs in `DOFids` (if `DOFids` is omitted, all basic dof are
+%   considered).
+%
+%   * DOFP = gf_mesh_fem_get(mesh_fem MF, 'dof partition')
+%   Get the 'dof_partition' array.
+%   
+%   Return the array which associates an integer (the partition number)
+%   to each convex of the mesh_fem. By default, it is an all-zero array.
+%   The degrees of freedom of each convex of the mesh_fem are connected
+%   only to the dof of neighbouring convexes which have the same
+%   partition number, hence it is possible to create partially
+%   discontinuous mesh_fem very easily.
+%
+%   * gf_mesh_fem_get(mesh_fem MF, 'save',string filename[, string opt])
+%   Save a mesh_fem in a text file (and optionaly its linked mesh object
+%   if `opt` is the string 'with_mesh').
+%
+%   * gf_mesh_fem_get(mesh_fem MF, 'char'[, string opt])
+%   Output a string description of the mesh_fem.
+%   
+%   By default, it does not include the description of the linked mesh
+%   object, except if `opt` is 'with_mesh'.
+%
+%   * gf_mesh_fem_get(mesh_fem MF, 'display')
+%   displays a short summary for a mesh_fem object.
+%
+%   * m = gf_mesh_fem_get(mesh_fem MF, 'linked mesh')
+%   Return a reference to the mesh object linked to `mf`.
+%
+%   * m = gf_mesh_fem_get(mesh_fem MF, 'mesh')
+%   Return a reference to the mesh object linked to `mf`.
+%   (identical to gf_mesh_get(mesh M, 'linked mesh'))
+%
+%   * gf_mesh_fem_get(mesh_fem MF, 'export to vtk',string filename, ... 
['ascii'], U, 'name'...)
+%   Export a mesh_fem and some fields to a vtk file.
+%   
+%   The FEM and geometric transformations will be mapped to order 1
+%   or 2 isoparametric Pk (or Qk) FEMs (as VTK does not handle higher
+%   order elements). If you need to represent high-order FEMs or
+%   high-order geometric transformations, you should consider
+%   gf_slice_get(slice S, 'export to vtk').
+%
+%   * gf_mesh_fem_get(mesh_fem MF, 'export to dx',string filename, ...['as', 
string mesh_name][,'edges']['serie',string serie_name][,'ascii'][,'append'], U, 
'name'...)
+%   Export a mesh_fem and some fields to an OpenDX file.
+%   
+%   This function will fail if the mesh_fem mixes different convex types
+%   (i.e. quads and triangles), or if OpenDX does not handle a specific
+%   element type (i.e. prism connections are not known by OpenDX).
+%   
+%   The FEM will be mapped to order 1 Pk (or Qk) FEMs. If you need to
+%   represent high-order FEMs or high-order geometric transformations,
+%   you should consider gf_slice_get(slice S, 'export to dx').
+%
+%   * gf_mesh_fem_get(mesh_fem MF, 'export to pos',string filename[, string 
name][[,mesh_fem mf1], mat U1, string nameU1[[,mesh_fem mf2], mat U2, string 
nameU2,...]])
+%   Export a mesh_fem and some fields to a pos file.
+%   
+%   The FEM and geometric transformations will be mapped to order 1
+%   isoparametric Pk (or Qk) FEMs (as GMSH does not handle higher
+%   order elements).
+%
+%   * gf_mesh_fem_get(mesh_fem MF, 'dof_from_im',mesh_im mim[, int p])
+%   Return a selection of dof who contribute significantly to the
+%   mass-matrix that would be computed with `mf` and the integration
+%   method `mim`.
+%   
+%   `p` represents the dimension on what the integration method
+%   operates (default `p = mesh dimension`).
+%   
+%   IMPORTANT: you still have to set a valid integration method on
+%   the convexes which are not crosses by the levelset!
+%
+%   * U = gf_mesh_fem_get(mesh_fem MF, 'interpolate_convex_data',mat Ucv)
+%   
+%   Interpolate data given on each convex of the mesh to the mesh_fem dof.
+%   The mesh_fem has to be lagrangian, and should be discontinuous (typically
+%   a FEM_PK(N,0) or FEM_QK(N,0) should be used).
+%   
+%   The last dimension of the input vector Ucv should have
+%   gf_mesh_get(mesh M, 'max cvid') elements.
+%   
+%   Example of use: gf_mesh_fem_get(mesh_fem MF, 'interpolate_convex_data', 
gf_mesh_get(mesh M, 'quality'))
+%
+%   * z = gf_mesh_fem_get(mesh_fem MF, 'memsize')
+%   Return the amount of memory (in bytes) used by the mesh_fem object.
+%   
+%   The result does not take into account the linked mesh object.
+%
+%   * gf_mesh_fem_get(mesh_fem MF, 'has_linked_mesh_levelset')
+%   Is a mesh_fem_level_set or not.
+%
+%   * gf_mesh_fem_get(mesh_fem MF, 'linked_mesh_levelset')
+%   if it is a mesh_fem_level_set gives the linked mesh_level_set.
+%
+%   * U = gf_mesh_fem_get(mesh_fem MF, 'eval', expr [, DOFLST])
+%   
+%   Call gf_mesh_fem_get_eval. This function interpolates an expression on a
+%   lagrangian mesh_fem (for all dof except if DOFLST is specified).
+%   The expression can be a
+%   numeric constant, or a cell array containing numeric constants, string
+%   expressions or function handles. For example::
+%   
+%   U1=gf_mesh_fem_get(mf,'eval',1)
+%   U2=gf_mesh_fem_get(mf,'eval',[1;0]) % output has two rows
+%   U3=gf_mesh_fem_get(mf,'eval',[1 0]) % output has one row, only valid if 
qdim(mf)==2
+%   U4=gf_mesh_fem_get(mf,'eval',{'x';'y.*z';4;@myfunctionofxyz})
+%   
+%   
+%
+%
+function [varargout]=gf_mesh_fem_get(varargin)
+
+  if (nargin>=2 & strcmpi(varargin{2},'eval')),
+    [varargout{1:nargout}]=gf_mesh_fem_get_eval(varargin{[1 3:nargin]}); 
return;
+  end;
+  
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_fem_get', varargin{:});
+  else
+    gf_matlab('mesh_fem_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_fem_get_eval.m 
b/interface/src/octave/gf_mesh_fem_get_eval.m
new file mode 100644
index 0000000..8fae17f
--- /dev/null
+++ b/interface/src/octave/gf_mesh_fem_get_eval.m
@@ -0,0 +1,83 @@
+function X=gf_mesh_fem_get_eval(mf, what, dof)
+% gf_mesh_fem_get_eval : see the help in gf_mesh_fem_get(mf,'eval')
+%  Copyright (C) 1999-2017 Yves Renard
+%
+%  This file is a part of GetFEM++
+%
+%  GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+%  under  the  terms  of the  GNU  Lesser General Public License as published
+%  by  the  Free Software Foundation;  either version 3 of the License,  or
+%  (at your option) any later version along with the GCC Runtime Library
+%  Exception either version 3.1 or (at your option) any later version.
+%  This program  is  distributed  in  the  hope  that it will be useful,  but
+%  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+%  or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+%  License and GCC Runtime Library Exception for more details.
+%  You  should  have received a copy of the GNU Lesser General Public License
+%  along  with  this program;  if not, write to the Free Software Foundation,
+%  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+  
+  if (nargin < 2) error('not enough input arguments'); end;
+  qdim=gf_mesh_fem_get(mf, 'qdim');
+  nbdof=gf_mesh_fem_get(mf,'nbdof');
+  if (nargin==2) dof=1:qdim:nbdof; end;
+  % --- TODO --- only test the dof, not whole mesh
+  if (~gf_mesh_fem_get(mf, 'is lagrangian')),
+    error('interpolating on a non-lagrangian mesh fem');
+  end;
+%  if (qdim ~= 1),
+%    dof = dof(1:qdim:nbdof);
+%  end;
+  if (find(mod(dof-1,qdim)))
+    error(['when qdim is different of 1, only dofs 1,qdim+1,',...
+          '2*qdim+1,... are authorized']);
+  end;
+  dxy = gf_mesh_fem_get(mf, 'basic dof nodes',dof);
+  
+  if (size(what, 2) == nbdof & isnumeric(what)),
+    X = what;
+    return;
+  elseif (ischar(what))
+    error(['string expressions must be enclosed in a cell array: try with { 
',...
+           'your_expression }']);
+  elseif (size(what,2) ~= qdim)
+    error(sprintf(['wrong dimensions for the expression: should have ',...
+                  '%d (=Qdim) columns instead of %d'],qdim,size(what,2)));
+  end;
+  
+  X=zeros(size(what,1),nbdof);
+  if (isnumeric(what)),
+    X(dof) = repmat(what, 1, nbdof/qdim);
+    return;
+  elseif iscell(what),
+    m=size(what,1);
+    xpos = dxy(1,:);
+    if (size(dxy,1)>=2),
+      ypos = dxy(2,:);
+    else ypos = zeros(size(xpos)); end;
+    if (size(dxy,1)>=3),
+      zpos = dxy(3,:);
+    else zpos = zeros(size(xpos)); end;
+      
+    for i=1:m,
+      for j=1:qdim
+       if (isnumeric(what{i,j})),
+         if (numel(what{i,j}) ~= 1) error('numeric values should be scalar'); 
end;
+         X(i,dof+j-1)=what{i,j};
+       elseif (ischar(what{i,j})),
+         x=xpos; y=ypos; z=zpos;
+         X(i,dof+j-1)=eval(what{i,j});
+       elseif (isa(what{i,j},'function_handle'))
+         X(i,dof+j-1)=feval(what{i,j}, xpos, ypos, zpos);
+       else
+         error(['sorry, don''t know how to eval a ' class(what{i,j}),...
+               ' expression, only function handles, numeric constants and ',...
+               'string expressions are handled']);
+       end;
+      end;
+    end;
+  else
+    error(['can''t evaluate on mesh fem: argument is neither a numeric ',...
+          'constant nor a cell array of (strings|constants|function 
handles)']);
+  end;
+  
diff --git a/interface/src/octave/gf_mesh_fem_set.m 
b/interface/src/octave/gf_mesh_fem_set.m
new file mode 100644
index 0000000..a450656
--- /dev/null
+++ b/interface/src/octave/gf_mesh_fem_set.m
@@ -0,0 +1,82 @@
+% FUNCTION [...] = gf_mesh_fem_set(mesh_fem MF, [operation [, args]])
+%
+%   General function for modifying mesh_fem objects.
+%   
+%
+%   * gf_mesh_fem_set(mesh_fem MF, 'fem', fem f[, ivec CVids])
+%   Set the Finite Element Method.
+%   
+%   Assign a FEM `f` to all convexes whose #ids are listed in `CVids`.
+%   If `CVids` is not given, the integration is assigned to all convexes.
+%   
+%   See the help of gf_fem to obtain a list of available FEM methods.
+%
+%   * gf_mesh_fem_set(mesh_fem MF, 'classical fem', int k[[, 'complete'], ivec 
CVids])
+%   Assign a classical (Lagrange polynomial) fem of order `k` to the mesh_fem.
+%   The option 'complete' requests complete Langrange polynomial elements,
+%   even if the element geometric transformation is an incomplete one
+%   (e.g. 8-node quadrilateral or 20-node hexahedral).
+%   
+%   Uses FEM_PK for simplexes, FEM_QK for parallelepipeds etc.
+%
+%   * gf_mesh_fem_set(mesh_fem MF, 'classical discontinuous fem', int k[[, 
'complete'], @tscalar alpha[, ivec CVIDX]])
+%   Assigns a classical (Lagrange polynomial) discontinuous fem of order k.
+%   
+%   Similar to gf_mesh_fem_set(mesh_fem MF, 'set classical fem') except that
+%   FEM_PK_DISCONTINUOUS is used. Param `alpha` the node inset,
+%   :math:`0 \leq alpha < 1`, where 0 implies usual dof nodes, greater values
+%   move the nodes toward the center of gravity, and 1 means that all
+%   degrees of freedom collapse on the center of gravity.
+%   The option 'complete' requests complete Langrange polynomial elements,
+%   even if the element geometric transformation is an incomplete one
+%   (e.g. 8-node quadrilateral or 20-node hexahedral).
+%
+%   * gf_mesh_fem_set(mesh_fem MF, 'qdim', int Q)
+%   Change the `Q` dimension of the field that is interpolated by the mesh_fem.
+%   
+%   `Q = 1` means that the mesh_fem describes a scalar field, `Q = N` means
+%   that the mesh_fem describes a vector field of dimension N.
+%
+%   * gf_mesh_fem_set(mesh_fem MF, 'reduction matrices', mat R, mat E)
+%   Set the reduction and extension matrices and valid their use.
+%
+%   * gf_mesh_fem_set(mesh_fem MF, 'reduction', int s)
+%   Set or unset the use of the reduction/extension matrices.
+%
+%   * gf_mesh_fem_set(mesh_fem MF, 'reduce meshfem', mat RM)
+%   Set reduction mesh fem
+%   This function selects the degrees of freedom of the finite element
+%   method by selecting a set of independent vectors of the matrix RM.
+%   The numer of columns of RM should corresponds to the number of degrees
+%   of fredoom of the finite element method.
+%
+%   * gf_mesh_fem_set(mesh_fem MF, 'dof partition', ivec DOFP)
+%   Change the 'dof_partition' array.
+%   
+%   `DOFP` is a vector holding a integer value for each convex of the mesh_fem.
+%   See gf_mesh_fem_get(mesh_fem MF, 'dof partition') for a description of 
"dof partition".
+%
+%   * gf_mesh_fem_set(mesh_fem MF, 'set partial', ivec DOFs[, ivec RCVs])
+%   Can only be applied to a partial mesh_fem. Change the subset of the
+%   degrees of freedom of `mf`.
+%   
+%   If `RCVs` is given, no FEM will be put on the convexes listed
+%   in `RCVs`.
+%
+%   * gf_mesh_fem_set(mesh_fem MF, 'adapt')
+%   For a mesh_fem levelset object only. Adapt the mesh_fem object to a
+%   change of the levelset function.
+%
+%   * gf_mesh_fem_set(mesh_fem MF, 'set enriched dofs', ivec DOFs)
+%   For a mesh_fem product object only. Set te enriched dofs and adapt the 
mesh_fem product.
+%   
+%
+%
+function [varargout]=gf_mesh_fem_set(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_fem_set', varargin{:});
+  else
+    gf_matlab('mesh_fem_set', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_get.m 
b/interface/src/octave/gf_mesh_get.m
new file mode 100644
index 0000000..15bdeef
--- /dev/null
+++ b/interface/src/octave/gf_mesh_get.m
@@ -0,0 +1,298 @@
+% FUNCTION [...] = gf_mesh_get(mesh M, [operation [, args]])
+%
+%   General mesh inquiry function. All these functions accept also a
+%   mesh_fem argument instead of a mesh M (in that case, the mesh_fem
+%   linked mesh will be used). Note that when your mesh is
+%   recognized as a Matlab object , you can simply use "get(M, 'dim')"
+%   instead of "gf_mesh_get(M, 'dim')".
+%   
+%
+%   * d = gf_mesh_get(mesh M, 'dim')
+%   Get the dimension of the mesh (2 for a 2D mesh, etc).
+%
+%   * np = gf_mesh_get(mesh M, 'nbpts')
+%   Get the number of points of the mesh.
+%
+%   * nc = gf_mesh_get(mesh M, 'nbcvs')
+%   Get the number of convexes of the mesh.
+%
+%   * P = gf_mesh_get(mesh M, 'pts'[, ivec PIDs])
+%   Return the list of point coordinates of the mesh.
+%   
+%   Each column of the returned matrix contains the coordinates of one
+%   point. If the optional argument `PIDs` was given, only the points
+%   whose #id is listed in this vector are returned. Otherwise, the
+%   returned matrix will have gf_mesh_get(mesh M, 'max_pid') columns, which 
might
+%   be greater than gf_mesh_get(mesh M, 'nbpts') (if some points of the mesh 
have
+%   been destroyed and no call to gf_mesh_set(mesh M, 'optimize structure') 
have
+%   been issued). The columns corresponding to deleted points will be
+%   filled with NaN. You can use gf_mesh_get(mesh M, 'pid') to filter such 
invalid
+%   points.
+%
+%   * Pid = gf_mesh_get(mesh M, 'pid')
+%   Return the list of points #id of the mesh.
+%   
+%   Note that their numbering is not supposed to be contiguous from
+%   1 to gf_mesh_get(mesh M, 'nbpts'),
+%   especially if some points have been removed from the mesh. You
+%   can use gf_mesh_set(mesh M, 'optimize_structure') to enforce a contiguous
+%   numbering. Pid is a row vector.
+%
+%   * PIDs = gf_mesh_get(mesh M, 'pid in faces', imat CVFIDs)
+%   Search point #id listed in `CVFIDs`.
+%   
+%   `CVFIDs` is a two-rows matrix, the first row lists convex #ids,
+%   and the second lists face numbers. On return, `PIDs` is a
+%   row vector containing points #id.
+%
+%   * PIDs = gf_mesh_get(mesh M, 'pid in cvids', imat CVIDs)
+%   Search point #id listed in `CVIDs`.
+%   
+%   `PIDs` is a row vector containing points #id.
+%
+%   * PIDs = gf_mesh_get(mesh M, 'pid in regions', imat RIDs)
+%   Search point #id listed in `RIDs`.
+%   
+%   `PIDs` is a row vector containing points #id.
+%
+%   * PIDs = gf_mesh_get(mesh M, 'pid from coords', mat PTS[, scalar radius=0])
+%   Search point #id whose coordinates are listed in `PTS`.
+%   
+%   `PTS` is an array containing a list of point coordinates. On
+%   return, `PIDs` is a row vector containing points
+%   #id for each point found in `eps` range, and -1 for those
+%   which where not found in the mesh.
+%
+%   * {Pid, IDx} = gf_mesh_get(mesh M, 'pid from cvid'[, imat CVIDs])
+%   Return the points attached to each convex of the mesh.
+%   
+%   If `CVIDs` is omitted, all the convexes will be considered
+%   (equivalent to `CVIDs = gf_mesh_get(mesh M, 'max cvid')`). `IDx` is a
+%   row vector, length(IDx) = length(CVIDs)+1. `Pid` is a
+%   row vector containing the concatenated list of #id of
+%   points of each convex in `CVIDs`. Each entry of `IDx` is the
+%   position of the corresponding convex point list in `Pid`. Hence,
+%   for example, the list of #id of points of the second convex is
+%   Pid(IDx(2):IDx(3)-1).
+%   
+%   If `CVIDs` contains convex #id which do not exist in the mesh,
+%   their point list will be empty.
+%
+%   * {Pts, IDx} = gf_mesh_get(mesh M, 'pts from cvid'[, imat CVIDs])
+%   Search point listed in `CVID`.
+%   
+%   If `CVIDs` is omitted, all the convexes will be considered
+%   (equivalent to `CVIDs = gf_mesh_get(mesh M, 'max cvid')`). `IDx` is a
+%   row vector, length(IDx) = length(CVIDs)+1. `Pts` is a
+%   row vector containing the concatenated list of points
+%   of each convex in `CVIDs`. Each entry of `IDx` is the position
+%   of the corresponding convex point list in `Pts`. Hence, for
+%   example, the list of points of the second convex is
+%   Pts(:,IDx(2):IDx(3)-1).
+%   
+%   If `CVIDs` contains convex #id which do not exist in the mesh,
+%   their point list will be empty.
+%
+%   * CVid = gf_mesh_get(mesh M, 'cvid')
+%   Return the list of all convex #id.
+%   
+%   Note that their numbering is not supposed to be contiguous from
+%   1 to gf_mesh_get(mesh M, 'nbcvs'),
+%   especially if some points have been removed from the mesh. You
+%   can use gf_mesh_set(mesh M, 'optimize_structure') to enforce a contiguous
+%   numbering. CVid is a row vector.
+%
+%   * m = gf_mesh_get(mesh M, 'max pid')
+%   Return the maximum #id of all points in the mesh (see 'max cvid').
+%
+%   * m = gf_mesh_get(mesh M, 'max cvid')
+%   Return the maximum #id of all convexes in the mesh (see 'max pid').
+%
+%   * [E,C] = gf_mesh_get(mesh M, 'edges' [, CVLST][, 'merge'])
+%   [OBSOLETE FUNCTION! will be removed in a future release]
+%   
+%   Return the list of edges of mesh M for the convexes listed in the
+%   row vector CVLST. E is a 2 x nb_edges matrix containing point
+%   indices. If CVLST is omitted, then the edges of all convexes are
+%   returned. If CVLST has two rows then the first row is supposed to
+%   contain convex numbers, and the second face numbers, of which the
+%   edges will be returned.  If 'merge' is indicated, all common
+%   edges of convexes are merged in a single edge.  If the optional
+%   output argument C is specified, it will contain the convex number
+%   associated with each edge.
+%
+%   * [E,C] = gf_mesh_get(mesh M, 'curved edges', int N [, CVLST])
+%   [OBSOLETE FUNCTION! will be removed in a future release]
+%   
+%   More sophisticated version of gf_mesh_get(mesh M, 'edges') designed for
+%   curved elements. This one will return N (N>=2) points of the
+%   (curved) edges. With N==2, this is equivalent to
+%   gf_mesh_get(mesh M, 'edges'). Since the points are no more always part of
+%   the mesh, their coordinates are returned instead of points
+%   number, in the array E which is a [ mesh_dim x 2 x nb_edges ]
+%   array.  If the optional output argument C is specified, it will
+%   contain the convex number associated with each edge.
+%
+%   * PIDs = gf_mesh_get(mesh M, 'orphaned pid')
+%   Search point #id which are not linked to a convex.
+%
+%   * CVIDs = gf_mesh_get(mesh M, 'cvid from pid', ivec PIDs[, bool 
share=False])
+%   Search convex #ids related with the point #ids given in `PIDs`.
+%   
+%   If `share=False`, search convex whose vertex #ids are in `PIDs`.
+%   If `share=True`, search convex #ids that share the point #ids
+%   given in `PIDs`. `CVIDs` is a row vector (possibly
+%   empty).
+%
+%   * CVFIDs = gf_mesh_get(mesh M, 'faces from pid', ivec PIDs)
+%   Return the convex faces whose vertex #ids are in `PIDs`.
+%   
+%   `CVFIDs` is a two-rows matrix, the first row lists convex #ids,
+%   and the second lists face numbers (local number in the convex).
+%   For a convex face to be returned, EACH of its points have to be
+%   listed in `PIDs`.
+%
+%   * CVFIDs = gf_mesh_get(mesh M, 'outer faces'[, CVIDs])
+%   Return the set of faces not shared by two elements.
+%   
+%   The output `CVFIDs` is a two-rows matrix, the first row lists
+%   convex #ids, and the second one lists face numbers (local number
+%   in the convex). If `CVIDs` is not given, all convexes are
+%   considered, and it basically returns the mesh boundary. If `CVIDs`
+%   is given, it returns the boundary of the convex set whose #ids are
+%   listed in `CVIDs`.
+%
+%   * CVFIDs = gf_mesh_get(mesh M, 'inner faces'[, CVIDs])
+%   Return the set of faces shared at least by two elements in CVIDs.
+%   Each face is represented only once and is arbitrarily chosen
+%   between the two neighbour elements.
+%
+%   * CVFIDs = gf_mesh_get(mesh M, 'outer faces with direction', vec v, scalar 
angle [, CVIDs])
+%   Return the set of faces not shared by two convexes and with a mean outward 
vector lying within an angle `angle` (in radians) from vector `v`.
+%   
+%   The output `CVFIDs` is a two-rows matrix, the first row lists convex
+%   #ids, and the second one lists face numbers (local number in the
+%   convex). If `CVIDs` is given, it returns portion of the boundary of
+%   the convex set defined by the #ids listed in `CVIDs`.
+%
+%   * CVFIDs = gf_mesh_get(mesh M, 'outer faces in box', vec pmin, vec pmax [, 
CVIDs])
+%   Return the set of faces not shared by two convexes and lying within the 
box defined by the corner points `pmin` and `pmax`.
+%   
+%   The output `CVFIDs` is a two-rows matrix, the first row lists convex
+%   #ids, and the second one lists face numbers (local number in the
+%   convex). If `CVIDs` is given, it returns portion of the boundary of
+%   the convex set defined by the #ids listed in `CVIDs`.
+%
+%   * CVFIDs = gf_mesh_get(mesh M, 'adjacent face', int cvid, int fid)
+%   Return convex face of the neighbour element if it exists.
+%   If the convex have more than one neighbour
+%   relativley to the face ``f`` (think to bar elements in 3D for instance),
+%   return the first face found.
+%
+%   * CVFIDs = gf_mesh_get(mesh M, 'faces from cvid'[, ivec CVIDs][, 'merge'])
+%   Return a list of convex faces from a list of convex #id.
+%   
+%   `CVFIDs` is a two-rows matrix, the first row lists convex #ids,
+%   and the second lists face numbers (local number in the convex).
+%   If `CVIDs` is not given, all convexes are considered. The optional
+%   argument 'merge' merges faces shared by the convex of `CVIDs`.
+%
+%   * [mat T] = gf_mesh_get(mesh M, 'triangulated surface', int Nrefine 
[,CVLIST])
+%   [DEPRECATED FUNCTION! will be removed in a future release]
+%   
+%   Similar function to gf_mesh_get(mesh M, 'curved edges') : split (if
+%   necessary, i.e. if the geometric transformation if non-linear)
+%   each face into sub-triangles and return their coordinates in T
+%   (see also gf_compute('eval on P1 tri mesh'))
+%
+%   * N = gf_mesh_get(mesh M, 'normal of face', int cv, int f[, int nfpt])
+%   Evaluates the normal of convex `cv`, face `f` at the `nfpt` point of the 
face.
+%   
+%   If `nfpt` is not specified, then the normal is evaluated at each
+%   geometrical node of the face.
+%
+%   * N = gf_mesh_get(mesh M, 'normal of faces', imat CVFIDs)
+%   Evaluates (at face centers) the normals of convexes.
+%   
+%   `CVFIDs` is supposed a two-rows matrix, the first row lists convex
+%   #ids, and the second lists face numbers (local number in the convex).
+%
+%   * Q = gf_mesh_get(mesh M, 'quality'[, ivec CVIDs])
+%   Return an estimation of the quality of each convex (:math:`0 \leq Q \leq 
1`).
+%
+%   * A = gf_mesh_get(mesh M, 'convex area'[, ivec CVIDs])
+%   Return an estimate of the area of each convex.
+%
+%   * A = gf_mesh_get(mesh M, 'convex radius'[, ivec CVIDs])
+%   Return an estimate of the radius of each convex.
+%
+%   * {S, CV2S} = gf_mesh_get(mesh M, 'cvstruct'[, ivec CVIDs])
+%   Return an array of the convex structures.
+%   
+%   If `CVIDs` is not given, all convexes are considered. Each convex
+%   structure is listed once in `S`, and `CV2S` maps the convexes
+%   indice in `CVIDs` to the indice of its structure in `S`.
+%
+%   * {GT, CV2GT} = gf_mesh_get(mesh M, 'geotrans'[, ivec CVIDs])
+%   Returns an array of the geometric transformations.
+%   
+%   See also gf_mesh_get(mesh M, 'cvstruct').
+%
+%   * RIDs = gf_mesh_get(mesh M, 'boundaries')
+%   DEPRECATED FUNCTION. Use 'regions' instead.
+%
+%   * RIDs = gf_mesh_get(mesh M, 'regions')
+%   Return the list of valid regions stored in the mesh.
+%
+%   * RIDs = gf_mesh_get(mesh M, 'boundary')
+%   DEPRECATED FUNCTION. Use 'region' instead.
+%
+%   * CVFIDs = gf_mesh_get(mesh M, 'region', ivec RIDs)
+%   Return the list of convexes/faces on the regions `RIDs`.
+%   
+%   `CVFIDs` is a two-rows matrix, the first row lists convex #ids,
+%   and the second lists face numbers (local number in the convex).
+%   (and 0 when the whole convex is in the
+%   regions).
+%
+%   * gf_mesh_get(mesh M, 'save', string filename)
+%   Save the mesh object to an ascii file.
+%   
+%   This mesh can be restored with gf_mesh('load', filename).
+%
+%   * s = gf_mesh_get(mesh M, 'char')
+%   Output a string description of the mesh.
+%
+%   * gf_mesh_get(mesh M, 'export to vtk', string filename, ... 
[,'ascii'][,'quality'])
+%   Exports a mesh to a VTK file .
+%   
+%   If 'quality' is specified, an estimation of the quality of each
+%   convex will be written to the file.
+%   
+%   See also gf_mesh_fem_get(mesh_fem MF, 'export to vtk'), gf_slice_get(slice 
S, 'export to vtk').
+%
+%   * gf_mesh_get(mesh M, 'export to dx', string filename, ... 
[,'ascii'][,'append'][,'as',string name,[,'serie',string serie_name]][,'edges'])
+%   Exports a mesh to an OpenDX file.
+%   
+%   See also gf_mesh_fem_get(mesh_fem MF, 'export to dx'), gf_slice_get(slice 
S, 'export to dx').
+%
+%   * gf_mesh_get(mesh M, 'export to pos', string filename[, string name])
+%   Exports a mesh to a POS file .
+%   
+%   See also gf_mesh_fem_get(mesh_fem MF, 'export to pos'), gf_slice_get(slice 
S, 'export to pos').
+%
+%   * z = gf_mesh_get(mesh M, 'memsize')
+%   Return the amount of memory (in bytes) used by the mesh.
+%
+%   * gf_mesh_get(mesh M, 'display')
+%   displays a short summary for a mesh object.
+%
+%
+function [varargout]=gf_mesh_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_get', varargin{:});
+  else
+    gf_matlab('mesh_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_im.m 
b/interface/src/octave/gf_mesh_im.m
new file mode 100644
index 0000000..47f1def
--- /dev/null
+++ b/interface/src/octave/gf_mesh_im.m
@@ -0,0 +1,76 @@
+% FUNCTION [...] = gf_mesh_im([operation [, args]])
+%
+%   General constructor for mesh_im objects.
+%
+%   This object represents an integration method defined on a whole mesh (an
+%   potentialy on its boundaries).
+%   
+%
+%   * MIM = gf_mesh_im('load', string fname[, mesh m])
+%   Load a mesh_im from a file.
+%   
+%   If the mesh `m` is not supplied (this kind of file does not store the
+%   mesh), then it is read from the file and its descriptor is returned as
+%   the second output argument.
+%
+%   * MIM = gf_mesh_im('from string', string s[, mesh m])
+%   Create a mesh_im object from its string description.
+%   
+%   See also ``gf_mesh_im_get(mesh_im MI, 'char')``
+%
+%   * MIM = gf_mesh_im('clone', mesh_im mim)
+%   Create a copy of a mesh_im.
+%
+%   * MIM = gf_mesh_im('levelset', mesh_levelset mls, string where, integ im[, 
integ im_tip[, integ im_set]])
+%   Build an integration method conformal to a partition defined
+%   implicitely by a levelset.
+%   
+%   The `where` argument define the domain of integration with respect to
+%   the levelset, it has to be chosen among 'ALL', 'INSIDE', 'OUTSIDE' and
+%   'BOUNDARY'.
+%   
+%   it can be completed by a string defining the boolean operation
+%   to define the integration domain when there is more than one levelset.
+%   
+%   the syntax is very simple, for example if there are 3 different
+%   levelset,
+%   
+%   "a*b*c" is the intersection of the domains defined by each
+%   levelset (this is the default behaviour if this function is not
+%   called).
+%   
+%   "a+b+c" is the union of their domains.
+%   
+%   "c-(a+b)" is the domain of the third levelset minus the union of
+%   the domains of the two others.
+%   
+%   "!a" is the complementary of the domain of a (i.e. it is the
+%   domain where a(x)>0)
+%   
+%   The first levelset is always referred to with "a", the second
+%   with "b", and so on.
+%   
+%   for intance INSIDE(a*b*c)
+%   
+%   CAUTION: this integration method will be defined only on the element
+%   cut by the level-set. For the 'ALL', 'INSIDE' and 'OUTSIDE' options
+%   it is mandatory to use the method ``gf_mesh_im_set(mesh_im MI, 'integ')`` 
to define
+%   the integration method on the remaining elements.
+%   
+%
+%   * MIM = gf_mesh_im(mesh m, [{integ im|int im_degree}])
+%   Build a new mesh_im object.
+%   
+%   For convenience, optional arguments (`im` or `im_degree`) can be
+%   provided, in that case a call to ``gf_mesh_im_get(mesh_im MI, 'integ')`` 
is issued
+%   with these arguments.
+%
+%
+function [varargout]=gf_mesh_im(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_im', varargin{:});
+  else
+    gf_matlab('mesh_im', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_im_data.m 
b/interface/src/octave/gf_mesh_im_data.m
new file mode 100644
index 0000000..887cf51
--- /dev/null
+++ b/interface/src/octave/gf_mesh_im_data.m
@@ -0,0 +1,24 @@
+% FUNCTION [...] = gf_mesh_im_data([operation [, args]])
+%
+%   General constructor for mesh_im_data objects.
+%
+%   This object represents data defined on a mesh_im object.
+%   
+%
+%   * MIMD = gf_mesh_im_data(mesh_im mim, int region, ivec size)
+%   Build a new mesh_imd object linked to a mesh_im object. If `region` is
+%   provided, considered integration points are filtered in this region.
+%   `size` is a vector of integers that specifies the dimensions of the
+%   stored data per integration point. If not given, the scalar stored
+%   data are considered.
+%   
+%
+%
+function [varargout]=gf_mesh_im_data(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_im_data', varargin{:});
+  else
+    gf_matlab('mesh_im_data', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_im_data_get.m 
b/interface/src/octave/gf_mesh_im_data_get.m
new file mode 100644
index 0000000..7925cba
--- /dev/null
+++ b/interface/src/octave/gf_mesh_im_data_get.m
@@ -0,0 +1,36 @@
+% FUNCTION [...] = gf_mesh_im_data_get(mesh_im_data MID, [operation [, args]])
+%
+%   General function extracting information from mesh_im_data objects.
+%   
+%
+%   * gf_mesh_im_data_get(mesh_im_data MID, 'region')
+%   Output the region that the mesh_imd is restricted to.
+%   
+%
+%   * gf_mesh_im_data_get(mesh_im_data MID, 'nbpts')
+%   Output the number of integration points (filtered in the considered 
region).
+%   
+%
+%   * gf_mesh_im_data_get(mesh_im_data MID, 'nb tensor elements')
+%   Output the size of the stored data (per integration point).
+%   
+%
+%   * gf_mesh_im_data_get(mesh_im_data MID, 'tensor size')
+%   Output the dimensions of the stored data (per integration point).
+%   
+%
+%   * gf_mesh_im_data_get(mesh_im_data MID, 'display')
+%   displays a short summary for a mesh_imd object.
+%
+%   * m = gf_mesh_im_data_get(mesh_im_data MID, 'linked mesh')
+%   Returns a reference to the mesh object linked to `mim`.
+%
+%
+function [varargout]=gf_mesh_im_data_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_im_data_get', varargin{:});
+  else
+    gf_matlab('mesh_im_data_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_im_data_set.m 
b/interface/src/octave/gf_mesh_im_data_set.m
new file mode 100644
index 0000000..f395fa4
--- /dev/null
+++ b/interface/src/octave/gf_mesh_im_data_set.m
@@ -0,0 +1,22 @@
+% FUNCTION [...] = gf_mesh_im_data_set(mesh_im_data MID, [operation [, args]])
+%
+%   General function for modifying mesh_im objects
+%   
+%
+%   * gf_mesh_im_data_set(mesh_im_data MID, 'region', int rnum)
+%   Set the considered region to `rnum`.
+%   
+%
+%   * gf_mesh_im_data_set(mesh_im_data MID, 'tensor size',)
+%   Set the size of the data per integration point.
+%   
+%
+%
+function [varargout]=gf_mesh_im_data_set(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_im_data_set', varargin{:});
+  else
+    gf_matlab('mesh_im_data_set', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_im_get.m 
b/interface/src/octave/gf_mesh_im_get.m
new file mode 100644
index 0000000..9c9b480
--- /dev/null
+++ b/interface/src/octave/gf_mesh_im_get.m
@@ -0,0 +1,86 @@
+% FUNCTION [...] = gf_mesh_im_get(mesh_im MI, [operation [, args]])
+%
+%   General function extracting information from mesh_im objects.
+%   
+%
+%   * {I, CV2I} = gf_mesh_im_get(mesh_im MI, 'integ'[, mat CVids])
+%   Return a list of integration methods used by the mesh_im.
+%   
+%   `I` is an array of all integ objects found in the convexes
+%   given in `CVids`. If `CV2I` was supplied as an output argument, it
+%   contains, for each convex listed in `CVids`, the index of its
+%   correspounding integration method in `I`.
+%   
+%   Convexes which are not part of the mesh, or convexes which do
+%   not have any integration method have their correspounding entry
+%   in `CV2I` set to -1.
+%   
+%   Example::
+%   
+%   cvid=gf_mesh_get(mim,'cvid');
+%   [f,c2f]=gf_mesh_im_get(mim, 'integ');
+%   for i=1:size(f), sf{i}=gf_integ_get('char',f(i)); end;
+%   for i=1:size(c2f),
+%   disp(sprintf('the integration of convex %d is %s',...
+%   cvid(i),sf{i}));
+%   end;
+%   
+%   
+%
+%   * CVids = gf_mesh_im_get(mesh_im MI, 'convex_index')
+%   Return the list of convexes who have a integration method.
+%   
+%   Convexes who have the dummy IM_NONE method are not listed.
+%
+%   * M = gf_mesh_im_get(mesh_im MI, 'eltm', eltm em, int cv [, int f])
+%   Return the elementary matrix (or tensor) integrated on the convex `cv`.
+%   
+%   **WARNING**
+%   
+%   Be sure that the fem used for the construction of `em` is compatible
+%   with the fem assigned to element `cv` ! This is not checked by the
+%   function ! If the argument `f` is given, then the elementary tensor
+%   is integrated on the face `f` of `cv` instead of the whole convex.
+%
+%   * Ip = gf_mesh_im_get(mesh_im MI, 'im_nodes'[, mat CVids])
+%   Return the coordinates of the integration points, with their weights.
+%   
+%   `CVids` may be a list of convexes, or a list of convex faces, such
+%   as returned by gf_mesh_get(mesh M, 'region')
+%   
+%   **WARNING**
+%   
+%   Convexes which are not part of the mesh, or convexes which
+%   do not have an approximate integration method do not have
+%   their corresponding entry (this has no meaning for exact
+%   integration methods!).
+%
+%   * gf_mesh_im_get(mesh_im MI, 'save',string filename[, 'with mesh'])
+%   Saves a mesh_im in a text file (and optionaly its linked mesh object).
+%
+%   * gf_mesh_im_get(mesh_im MI, 'char'[,'with mesh'])
+%   Output a string description of the mesh_im.
+%   
+%   By default, it does not include the description of the linked
+%   mesh object.
+%
+%   * gf_mesh_im_get(mesh_im MI, 'display')
+%   displays a short summary for a mesh_im object.
+%
+%   * m = gf_mesh_im_get(mesh_im MI, 'linked mesh')
+%   Returns a reference to the mesh object linked to `mim`.
+%
+%   * z = gf_mesh_im_get(mesh_im MI, 'memsize')
+%   Return the amount of memory (in bytes) used by the mesh_im object.
+%   
+%   The result does not take into account the linked mesh object.
+%
+%
+function [varargout]=gf_mesh_im_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_im_get', varargin{:});
+  else
+    gf_matlab('mesh_im_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_im_set.m 
b/interface/src/octave/gf_mesh_im_set.m
new file mode 100644
index 0000000..b65dd84
--- /dev/null
+++ b/interface/src/octave/gf_mesh_im_set.m
@@ -0,0 +1,31 @@
+% FUNCTION [...] = gf_mesh_im_set(mesh_im MI, [operation [, args]])
+%
+%   General function for modifying mesh_im objects
+%   
+%
+%   * gf_mesh_im_set(mesh_im MI, 'integ',{integ im|int im_degree}[, ivec 
CVids])
+%   Set the integration method.
+%   
+%   Assign an integration method to all convexes whose #ids are
+%   listed in `CVids`. If `CVids` is not given, the integration is
+%   assigned to all convexes. It is possible to assign a specific
+%   integration method with an integration method handle `im` obtained
+%   via gf_integ('IM_SOMETHING'), or to let getfem choose a suitable
+%   integration method with `im_degree` (choosen such that polynomials
+%   of :math:`\text{degree} \leq \text{im\_degree}` are exactly integrated.
+%   If `im_degree=-1`, then the dummy integration method IM_NONE will
+%   be used.)
+%
+%   * gf_mesh_im_set(mesh_im MI, 'adapt')
+%   For a mesh_im levelset object only. Adapt the integration methods to a
+%   change of the levelset function.
+%
+%
+function [varargout]=gf_mesh_im_set(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_im_set', varargin{:});
+  else
+    gf_matlab('mesh_im_set', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_levelset.m 
b/interface/src/octave/gf_mesh_levelset.m
new file mode 100644
index 0000000..c4586dc
--- /dev/null
+++ b/interface/src/octave/gf_mesh_levelset.m
@@ -0,0 +1,22 @@
+% FUNCTION [...] = gf_mesh_levelset([operation [, args]])
+%
+%   General constructor for mesh_levelset objects.
+%
+%   General constructor for mesh_levelset objects. The role of this object is
+%   to provide a mesh cut by a certain number of level_set. This object is
+%   used to build conformal integration method (object mim and enriched finite
+%   element methods (Xfem)).
+%   
+%
+%   * MLS = gf_mesh_levelset(mesh m)
+%   Build a new mesh_levelset object from a mesh and returns its handle.
+%
+%
+function [varargout]=gf_mesh_levelset(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_levelset', varargin{:});
+  else
+    gf_matlab('mesh_levelset', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_levelset_get.m 
b/interface/src/octave/gf_mesh_levelset_get.m
new file mode 100644
index 0000000..cf6237e
--- /dev/null
+++ b/interface/src/octave/gf_mesh_levelset_get.m
@@ -0,0 +1,44 @@
+% FUNCTION [...] = gf_mesh_levelset_get(mesh_levelset MLS, [operation [, 
args]])
+%
+%   General function for querying information about mesh_levelset objects.
+%   
+%
+%   * M = gf_mesh_levelset_get(mesh_levelset MLS, 'cut_mesh')
+%   Return a mesh cut by the linked levelset's.
+%
+%   * LM = gf_mesh_levelset_get(mesh_levelset MLS, 'linked_mesh')
+%   Return a reference to the linked mesh.
+%
+%   * nbls = gf_mesh_levelset_get(mesh_levelset MLS, 'nb_ls')
+%   Return the number of linked levelset's.
+%
+%   * LS = gf_mesh_levelset_get(mesh_levelset MLS, 'levelsets')
+%   Return a list of references to the linked levelset's.
+%
+%   * CVIDs = gf_mesh_levelset_get(mesh_levelset MLS, 'crack_tip_convexes')
+%   Return the list of convex #id's of the linked mesh on
+%   which have a tip of any linked levelset's.
+%
+%   * SIZE = gf_mesh_levelset_get(mesh_levelset MLS, 'memsize')
+%   Return the amount of memory (in bytes) used by the mesh_levelset.
+%
+%   * s = gf_mesh_levelset_get(mesh_levelset MLS, 'char')
+%   Output a (unique) string representation of the mesh_levelsetn.
+%   
+%   This can be used to perform comparisons between two
+%   different mesh_levelset objects.
+%   This function is to be completed.
+%   
+%
+%   * gf_mesh_levelset_get(mesh_levelset MLS, 'display')
+%   displays a short summary for a mesh_levelset object.
+%
+%
+function [varargout]=gf_mesh_levelset_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_levelset_get', varargin{:});
+  else
+    gf_matlab('mesh_levelset_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_levelset_set.m 
b/interface/src/octave/gf_mesh_levelset_set.m
new file mode 100644
index 0000000..fcc1b69
--- /dev/null
+++ b/interface/src/octave/gf_mesh_levelset_set.m
@@ -0,0 +1,36 @@
+% FUNCTION [...] = gf_mesh_levelset_set(mesh_levelset MLS, [operation [, 
args]])
+%
+%   General function for modification of mesh_levelset objects.
+%   
+%
+%   * gf_mesh_levelset_set(mesh_levelset MLS, 'add', levelset ls)
+%   Add a link to the levelset `ls`.
+%   
+%   Only a reference is kept, no copy is done. In order to indicate
+%   that the linked mesh is cut by a levelset one has to call this
+%   method, where `ls` is an levelset object. An arbitrary number of
+%   levelset can be added.
+%   
+%   **WARNING**
+%   
+%   The mesh of `ls` and the linked mesh must be the same.
+%
+%   * gf_mesh_levelset_set(mesh_levelset MLS, 'sup', levelset ls)
+%   Remove a link to the levelset `ls`.
+%
+%   * gf_mesh_levelset_set(mesh_levelset MLS, 'adapt')
+%   Do all the work (cut the convexes with the levelsets).
+%   
+%   To initialice the mesh_levelset object or to actualize it when the
+%   value of any levelset function is modified, one has to call
+%   this method.
+%
+%
+function [varargout]=gf_mesh_levelset_set(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_levelset_set', varargin{:});
+  else
+    gf_matlab('mesh_levelset_set', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesh_set.m 
b/interface/src/octave/gf_mesh_set.m
new file mode 100644
index 0000000..80ec1e5
--- /dev/null
+++ b/interface/src/octave/gf_mesh_set.m
@@ -0,0 +1,125 @@
+% FUNCTION [...] = gf_mesh_set(mesh M, [operation [, args]])
+%
+%   General function for modification of a mesh object.
+%   
+%
+%   * PIDs = gf_mesh_set(mesh M, 'pts', mat PTS)
+%   Replace the coordinates of the mesh points with those given in `PTS`.
+%
+%   * PIDs = gf_mesh_set(mesh M, 'add point', mat PTS)
+%   Insert new points in the mesh and return their #ids.
+%   
+%   `PTS` should be an ``nxm`` matrix , where ``n`` is the mesh
+%   dimension, and ``m`` is the number of points that will be
+%   added to the mesh. On output, `PIDs` contains the point #ids
+%   of these new points.
+%   
+%   Remark: if some points are already part of the mesh (with a small
+%   tolerance of approximately ``1e-8``), they won't be inserted again,
+%   and `PIDs` will contain the previously assigned #ids of these
+%   points.
+%
+%   * gf_mesh_set(mesh M, 'del point', ivec PIDs)
+%   Removes one or more points from the mesh.
+%   
+%   `PIDs` should contain the point #ids, such as the one returned by
+%   the 'add point' command.
+%
+%   * CVIDs = gf_mesh_set(mesh M, 'add convex', geotrans GT, mat PTS)
+%   Add a new convex into the mesh.
+%   
+%   The convex structure (triangle, prism,...) is given by `GT`
+%   (obtained with gf_geotrans('...')), and its points are given by
+%   the columns of `PTS`. On return, `CVIDs` contains the convex #ids.
+%   `PTS` might be a 3-dimensional array in order to insert more than
+%   one convex (or a two dimensional array correctly shaped according
+%   to Fortran ordering).
+%
+%   * gf_mesh_set(mesh M, 'del convex', mat CVIDs)
+%   Remove one or more convexes from the mesh.
+%   
+%   `CVIDs` should contain the convexes #ids, such as the ones
+%   returned by the 'add convex' command.
+%
+%   * gf_mesh_set(mesh M, 'del convex of dim', ivec DIMs)
+%   Remove all convexes of dimension listed in `DIMs`.
+%   
+%   For example; ``gf_mesh_set(mesh M, 'del convex of dim', [1,2])`` remove
+%   all line segments, triangles and quadrangles.
+%
+%   * gf_mesh_set(mesh M, 'translate', vec V)
+%   Translates each point of the mesh from `V`.
+%
+%   * gf_mesh_set(mesh M, 'transform', mat T)
+%   Applies the matrix `T` to each point of the mesh.
+%   
+%   Note that `T` is not required to be a ``NxN`` matrix (with
+%   ``N = gf_mesh_get(mesh M, 'dim')``). Hence it is possible to transform
+%   a 2D mesh into a 3D one (and reciprocally).
+%
+%   * gf_mesh_set(mesh M, 'boundary', int rnum, mat CVFIDs)
+%   DEPRECATED FUNCTION. Use 'region' instead.
+%
+%   * gf_mesh_set(mesh M, 'region', int rnum, mat CVFIDs)
+%   Assigns the region number `rnum` to the set of convexes or/and convex
+%   faces provided in the matrix `CVFIDs`.
+%   
+%   The first row of `CVFIDs` contains convex #ids, and the second row
+%   contains a face number in the convex (or 0
+%   for the whole convex (regions are usually used to store a list of
+%   convex faces, but you may also use them to store a list of convexes).
+%   
+%   If a vector is provided (or a one row matrix) the region will represent
+%   the corresponding set of convex.
+%
+%   * gf_mesh_set(mesh M, 'extend region', int rnum, mat CVFIDs)
+%   Extends the region identified by the region number `rnum` to include
+%   the set of convexes or/and convex faces provided in the matrix
+%   `CVFIDs`, see also ``gf_mesh_set(mesh M, 'set region)``.
+%
+%   * gf_mesh_set(mesh M, 'region intersect', int r1, int r2)
+%   Replace the region number `r1` with its intersection with region number 
`r2`.
+%
+%   * gf_mesh_set(mesh M, 'region merge', int r1, int r2)
+%   Merge region number `r2` into region number `r1`.
+%
+%   * gf_mesh_set(mesh M, 'region subtract', int r1, int r2)
+%   Replace the region number `r1` with its difference with region
+%   number `r2`.
+%
+%   * gf_mesh_set(mesh M, 'delete boundary', int rnum, mat CVFIDs)
+%   DEPRECATED FUNCTION. Use 'delete region' instead.
+%
+%   * gf_mesh_set(mesh M, 'delete region', ivec RIDs)
+%   Remove the regions whose #ids are listed in `RIDs`
+%
+%   * gf_mesh_set(mesh M, 'merge', mesh m2[, scalar  tol])
+%   Merge with the mesh `m2`.
+%   
+%   Overlapping points, within a tolerance radius `tol`, will not be
+%   duplicated. If `m2` is a mesh_fem object, its linked mesh will be used.
+%
+%   * gf_mesh_set(mesh M, 'optimize structure'[, int with_renumbering])
+%   Reset point and convex numbering.
+%   
+%   After optimisation, the points (resp. convexes) will
+%   be consecutively numbered from 1 to gf_mesh_get(mesh M, 'max pid')
+%   (resp. gf_mesh_get(mesh M, 'max cvid')).
+%
+%   * gf_mesh_set(mesh M, 'refine'[, ivec CVIDs])
+%   Use a Bank strategy for mesh refinement.
+%   
+%   If `CVIDs` is not given, the whole mesh is refined. Note
+%   that the regions, and the finite element methods and
+%   integration methods of the mesh_fem and mesh_im objects linked
+%   to this mesh will be automagically refined.
+%
+%
+function [varargout]=gf_mesh_set(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesh_set', varargin{:});
+  else
+    gf_matlab('mesh_set', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesher_object.m 
b/interface/src/octave/gf_mesher_object.m
new file mode 100644
index 0000000..2227330
--- /dev/null
+++ b/interface/src/octave/gf_mesher_object.m
@@ -0,0 +1,60 @@
+% FUNCTION [...] = gf_mesher_object([operation [, args]])
+%
+%   General constructor for mesher_object objects.
+%
+%   This object represents a geometric object to be meshed by the
+%   experimental meshing procedure of Getfem.
+%   
+%
+%   * MF = gf_mesher_object('ball', vec center, scalar radius)
+%   Represents a ball of corresponding center and radius.
+%   
+%
+%   * MF = gf_mesher_object('half space', vec origin, vec normal_vector)
+%   Represents an half space delimited by the plane which contains the
+%   origin and normal to `normal_vector`. The selected part is the part
+%   in the direction of the normal vector. This allows to cut a geometry
+%   with a plane for instance to build a polygon or a polyhedron.
+%   
+%
+%   * MF = gf_mesher_object('cylinder', vec origin, vec n, scalar length, 
scalar radius)
+%   Represents a cylinder (in any dimension) of a certain radius whose axis
+%   is determined by the origin, a vector `n` and a certain length.
+%   
+%
+%   * MF = gf_mesher_object('cone', vec origin, vec n, scalar length, scalar 
half_angle)
+%   Represents a cone (in any dimension) of a certain half-angle (in radians)
+%   whose axis is determined by the origin, a vector `n` and a certain length.
+%   
+%
+%   * MF = gf_mesher_object('torus', scalar R, scalar r)
+%   Represents a torus in 3d of axis along the z axis with a great radius
+%   equal to `R` and small radius equal to `r`. For the moment, the
+%   possibility to change the axis is not given.
+%   
+%
+%   * MF = gf_mesher_object('rectangle', vec rmin, vec rmax)
+%   Represents a rectangle (or parallelepiped in 3D) parallel to the axes.
+%   
+%
+%   * MF = gf_mesher_object('intersect', mesher_object object1 , mesher_object 
object2, ...)
+%   Intersection of several objects.
+%   
+%
+%   * MF = gf_mesher_object('union', mesher_object object1 , mesher_object 
object2, ...)
+%   Union of several objects.
+%   
+%
+%   * MF = gf_mesher_object('set minus', mesher_object object1 , mesher_object 
object2)
+%   Geometric object being object1 minus object2.
+%   
+%
+%
+function [varargout]=gf_mesher_object(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesher_object', varargin{:});
+  else
+    gf_matlab('mesher_object', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_mesher_object_get.m 
b/interface/src/octave/gf_mesher_object_get.m
new file mode 100644
index 0000000..1ad2fac
--- /dev/null
+++ b/interface/src/octave/gf_mesher_object_get.m
@@ -0,0 +1,25 @@
+% FUNCTION [...] = gf_mesher_object_get(mesher_object MO, [operation [, args]])
+%
+%   General function for querying information about mesher_object objects.
+%   
+%
+%   * s = gf_mesher_object_get(mesher_object MO, 'char')
+%   Output a (unique) string representation of the mesher_object.
+%   
+%   This can be used to perform comparisons between two
+%   different mesher_object objects.
+%   This function is to be completed.
+%   
+%
+%   * gf_mesher_object_get(mesher_object MO, 'display')
+%   displays a short summary for a mesher_object object.
+%
+%
+function [varargout]=gf_mesher_object_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('mesher_object_get', varargin{:});
+  else
+    gf_matlab('mesher_object_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_model.m b/interface/src/octave/gf_model.m
new file mode 100644
index 0000000..8f25e43
--- /dev/null
+++ b/interface/src/octave/gf_model.m
@@ -0,0 +1,25 @@
+% FUNCTION [...] = gf_model([operation [, args]])
+%
+%   General constructor for model objects.
+%
+%   model variables store the variables and the state data and the
+%   description of a model. This includes the global tangent matrix, the right
+%   hand side and the constraints. There are two kinds of models, the `real`
+%   and the `complex` models.
+%   
+%
+%   * MD = gf_model('real')
+%   Build a model for real unknowns.
+%
+%   * MD = gf_model('complex')
+%   Build a model for complex unknowns.
+%
+%
+function [varargout]=gf_model(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('model', varargin{:});
+  else
+    gf_matlab('model', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_model_get.m 
b/interface/src/octave/gf_model_get.m
new file mode 100644
index 0000000..e7820b7
--- /dev/null
+++ b/interface/src/octave/gf_model_get.m
@@ -0,0 +1,331 @@
+% FUNCTION [...] = gf_model_get(model M, [operation [, args]])
+%
+%   Get information from a model object.
+%   
+%
+%   * b = gf_model_get(model M, 'is_complex')
+%   Return 0 is the model is real, 1 if it is complex.
+%
+%   * T = gf_model_get(model M, 'nbdof')
+%   Return the total number of degrees of freedom of the model.
+%
+%   * dt = gf_model_get(model M, 'get time step')
+%   Gives the value of the time step.
+%
+%   * t = gf_model_get(model M, 'get time')
+%   Give the value of the data `t` corresponding to the current time.
+%   
+%
+%   * T = gf_model_get(model M, 'tangent_matrix')
+%   Return the tangent matrix stored in the model .
+%
+%   * gf_model_get(model M, 'rhs')
+%   Return the right hand side of the tangent problem.
+%
+%   * gf_model_get(model M, 'brick term rhs', int ind_brick[, int ind_term, 
int sym, int ind_iter])
+%   Gives the access to the part of the right hand side of a term
+%   of a particular nonlinear brick. Does not account of the eventual
+%   time dispatcher. An assembly of the rhs has to be done first.
+%   `ind_brick` is the brick index. `ind_term` is the index of the
+%   term inside the brick (default value : 1).
+%   `sym` is to access to the second right hand side of for symmetric
+%   terms acting on two different variables (default is 0).
+%   `ind_iter` is the iteration number when time dispatchers are
+%   used (default is 1).
+%   
+%
+%   * z = gf_model_get(model M, 'memsize')
+%   Return a rough approximation of the amount of memory (in bytes) used by
+%   the model.
+%
+%   * gf_model_get(model M, 'variable list')
+%   print to the output the list of variables and constants of the model.
+%
+%   * gf_model_get(model M, 'brick list')
+%   print to the output the list of bricks of the model.
+%
+%   * gf_model_get(model M, 'list residuals')
+%   print to the output the residuals corresponding to all terms
+%   included in the model.
+%
+%   * V = gf_model_get(model M, 'variable', string name)
+%   Gives the value of a variable or data.
+%
+%   * V = gf_model_get(model M, 'interpolation', string expr, {mesh_fem mf | 
mesh_imd mimd | vec pts,  mesh m}[, int region[, int extrapolation[, int 
rg_source]]])
+%   Interpolate a certain expression with respect to the mesh_fem `mf`
+%   or the mesh_im_data `mimd` or the set of points `pts` on mesh `m`.
+%   The expression has to be valid according to the high-level generic
+%   assembly language possibly including references to the variables
+%   and data of the model.
+%   
+%   The options `extrapolation` and `rg_source` are specific to
+%   interpolations with respect to a set of points `pts`.
+%
+%   * V = gf_model_get(model M, 'local_projection', mesh_im mim, string expr, 
mesh_fem mf[, int region])
+%   Make an elementwise L2 projection of an expression with respect
+%   to the mesh_fem `mf`. This mesh_fem has to be
+%   a discontinuous one.
+%   The expression has to be valid according to the high-level generic
+%   assembly language possibly including references to the variables
+%   and data of the model.
+%
+%   * mf = gf_model_get(model M, 'mesh fem of variable', string name)
+%   Gives access to the `mesh_fem` of a variable or data.
+%
+%   * name = gf_model_get(model M, 'mult varname Dirichlet', int ind_brick)
+%   Gives the name of the multiplier variable for a Dirichlet brick.
+%   If the brick is not a Dirichlet condition with multiplier brick,
+%   this function has an undefined behavior
+%
+%   * I = gf_model_get(model M, 'interval of variable', string varname)
+%   Gives the interval of the variable `varname` in the linear system of
+%   the model.
+%
+%   * V = gf_model_get(model M, 'from variables')
+%   Return the vector of all the degrees of freedom of the model consisting
+%   of the concatenation of the variables of the model (useful
+%   to solve your problem with you own solver).
+%
+%   * gf_model_get(model M, 'assembly'[, string option])
+%   Assembly of the tangent system taking into account the terms
+%   from all bricks. `option`, if specified, should be 'build_all',
+%   'build_rhs', 'build_matrix'.
+%   The default is to build the whole
+%   tangent linear system (matrix and rhs). This function is useful
+%   to solve your problem with you own solver.
+%
+%   * {nbit, converged} = gf_model_get(model M, 'solve'[, ...])
+%   Run the standard getfem solver.
+%   
+%   Note that you should be able to use your own solver if you want
+%   (it is possible to obtain the tangent matrix and its right hand
+%   side with the gf_model_get(model M, 'tangent matrix') etc.).
+%   
+%   Various options can be specified:
+%   
+%   - 'noisy' or 'very_noisy'
+%   the solver will display some information showing the progress
+%   (residual values etc.).
+%   - 'max_iter', int NIT
+%   set the maximum iterations numbers.
+%   - 'max_res', @float RES
+%   set the target residual value.
+%   - 'diverged_res', @float RES
+%   set the threshold value of the residual beyond which the iterative
+%   method is considered to diverge (default is 1e200).
+%   - 'lsolver', string SOLVER_NAME
+%   select explicitely the solver used for the linear systems (the
+%   default value is 'auto', which lets getfem choose itself).
+%   Possible values are 'superlu', 'mumps' (if supported),
+%   'cg/ildlt', 'gmres/ilu' and 'gmres/ilut'.
+%   - 'lsearch', string LINE_SEARCH_NAME
+%   select explicitely the line search method used for the linear systems (the
+%   default value is 'default').
+%   Possible values are 'simplest', 'systematic', 'quadratic' or 'basic'.
+%   
+%   Return the number of iterations, if an iterative method is used.
+%   
+%   Note that it is possible to disable some variables
+%   (see gf_model_set(model M, 'disable variable') ) in order to
+%   solve the problem only with respect to a subset of variables (the
+%   disabled variables are then considered as data) for instance to
+%   replace the global Newton strategy with a fixed point one.
+%   
+%   
+%
+%   * gf_model_get(model M, 'test tangent matrix'[, scalar EPS[, int NB[, 
scalar scale]]])
+%   Test the consistency of the tangent matrix in some random positions
+%   and random directions (useful to test newly created bricks).
+%   `EPS` is the value of the small parameter for the finite difference
+%   computation of the derivative is the random direction (default is 1E-6).
+%   `NN` is the number of tests (default is 100). `scale` is a parameter
+%   for the random position (default is 1, 0 is an acceptable value) around
+%   the current position.
+%   Each dof of the random position is chosen in the range
+%   [current-scale, current+scale].
+%   
+%
+%   * gf_model_get(model M, 'test tangent matrix term', string varname1, 
string varname2[, scalar EPS[, int NB[, scalar scale]]])
+%   Test the consistency of a part of the tangent matrix in some
+%   random positions and random directions
+%   (useful to test newly created bricks).
+%   The increment is only made on variable `varname2` and tested on the
+%   part of the residual corresponding to `varname1`. This means that
+%   only the term (`varname1`, `varname2`) of the tangent matrix is tested.
+%   `EPS` is the value of the small parameter for the finite difference
+%   computation of the derivative is the random direction (default is 1E-6).
+%   `NN` is the number of tests (default is 100). `scale` is a parameter
+%   for the random position (default is 1, 0 is an acceptable value)
+%   around the current position.
+%   Each dof of the random position is chosen in the range
+%   [current-scale, current+scale].
+%   
+%
+%   * expr = gf_model_get(model M, 'Neumann term', string varname, int region)
+%   Gives the assembly string corresponding to the Neumann term of
+%   the fem variable `varname` on `region`. It is deduced from the
+%   assembly string declared by the model bricks.
+%   `region` should be the index of a boundary region
+%   on the mesh where `varname` is defined. Care to call this function
+%   only after all the volumic bricks have been declared.
+%   Complains, if a brick
+%   omit to declare an assembly string.
+%
+%   * V = gf_model_get(model M, 'compute isotropic linearized Von Mises or 
Tresca', string varname, string dataname_lambda, string dataname_mu, mesh_fem 
mf_vm[, string version])
+%   Compute the Von-Mises stress or the Tresca stress of a field (only
+%   valid for isotropic linearized elasticity in 3D). `version` should
+%   be  'Von_Mises' or 'Tresca' ('Von_Mises' is the default).
+%   Parametrized by Lame coefficients.
+%   
+%
+%   * V = gf_model_get(model M, 'compute isotropic linearized Von Mises 
pstrain', string varname, string data_E, string data_nu, mesh_fem mf_vm)
+%   Compute the Von-Mises stress  of a displacement field for isotropic
+%   linearized elasticity in 3D or in 2D with plane strain assumption.
+%   Parametrized by Young modulus and Poisson ratio.
+%   
+%
+%   * V = gf_model_get(model M, 'compute isotropic linearized Von Mises 
pstress', string varname, string data_E, string data_nu, mesh_fem mf_vm)
+%   Compute the Von-Mises stress  of a displacement field for isotropic
+%   linearized elasticity in 3D or in 2D with plane stress assumption.
+%   Parametrized by Young modulus and Poisson ratio.
+%   
+%
+%   * V = gf_model_get(model M, 'compute Von Mises or Tresca', string varname, 
string lawname, string dataname, mesh_fem mf_vm[, string version])
+%   Compute on `mf_vm` the Von-Mises stress or the Tresca stress of a field
+%   for nonlinear elasticity in 3D. `lawname` is the constitutive law which
+%   could be 'SaintVenant Kirchhoff', 'Mooney Rivlin', 'neo Hookean' or
+%   'Ciarlet Geymonat'.
+%   `dataname` is a vector of parameters for the constitutive law. Its length
+%   depends on the law. It could be a short vector of constant values or a
+%   vector field described on a finite element method for variable 
coefficients.
+%   `version` should be  'Von_Mises' or 'Tresca' ('Von_Mises' is the default).
+%   
+%
+%   * V = gf_model_get(model M, 'compute finite strain elasticity Von Mises',  
string lawname, string varname, string params, mesh_fem mf_vm[, int region])
+%   Compute on `mf_vm` the Von-Mises stress of a field `varname`
+%   for nonlinear elasticity in 3D. `lawname` is the constitutive law which
+%   should be a valid name. `params` are the parameters law. It could be
+%   a short vector of constant values or may depend on data or variables
+%   of the model.
+%   Uses the high-level generic assembly.
+%   
+%
+%   * V = gf_model_get(model M, 'compute second Piola Kirchhoff tensor', 
string varname, string lawname, string dataname, mesh_fem mf_sigma)
+%   Compute on `mf_sigma` the second Piola Kirchhoff stress tensor of a field
+%   for nonlinear elasticity in 3D. `lawname` is the constitutive law which
+%   could be 'SaintVenant Kirchhoff', 'Mooney Rivlin', 'neo Hookean' or
+%   'Ciarlet Geymonat'.
+%   `dataname` is a vector of parameters for the constitutive law. Its length
+%   depends on the law. It could be a short vector of constant values or a
+%   vector field described on a finite element method for variable
+%   coefficients.
+%   
+%
+%   * gf_model_get(model M, 'elastoplasticity next iter', mesh_im mim, string 
varname, string previous_dep_name, string projname, string datalambda, string 
datamu, string datathreshold, string datasigma)
+%   Used with the old (obsolete) elastoplasticity brick to pass from an
+%   iteration to the next one.
+%   Compute and save the stress constraints sigma for the next iterations.
+%   'mim' is the integration method to use for the computation.
+%   'varname' is the main variable of the problem.
+%   'previous_dep_name' represents the displacement at the previous time step.
+%   'projname' is the type of projection to use. For the moment it could only 
be 'Von Mises' or 'VM'.
+%   'datalambda' and 'datamu' are the Lame coefficients of the material.
+%   'datasigma' is a vector which will contain the new stress constraints 
values.
+%
+%   * gf_model_get(model M, 'small strain elastoplasticity next iter', mesh_im 
mim,  string lawname, string unknowns_type [, string varnames, ...] [, string 
params, ...] [, string theta = '1' [, string dt = 'timestep']] [, int region = 
-1])
+%   Function that allows to pass from a time step to another for the
+%   small strain plastic brick. The parameters have to be exactly the
+%   same than the one of `add_small_strain_elastoplasticity_brick`,
+%   so see the documentation of this function for the explanations.
+%   Basically, this brick computes the plastic strain
+%   and the plastic multiplier and stores them for the next step.
+%   Additionaly, it copies the computed displacement to the data
+%   that stores the displacement of the previous time step (typically
+%   'u' to 'Previous_u'). It has to be called before any use of
+%   `compute_small_strain_elastoplasticity_Von_Mises`.
+%   
+%
+%   * V = gf_model_get(model M, 'small strain elastoplasticity Von Mises', 
mesh_im mim, mesh_fem mf_vm, string lawname, string unknowns_type [, string 
varnames, ...] [, string params, ...] [, string theta = '1' [, string dt = 
'timestep']] [, int region])
+%   This function computes the Von Mises stress field with respect to
+%   a small strain elastoplasticity term, approximated on `mf_vm`,
+%   and stores the result into `VM`.  All other parameters have to be
+%   exactly the same as for `add_small_strain_elastoplasticity_brick`.
+%   Remember that `small_strain_elastoplasticity_next_iter` has to be called
+%   before any call of this function.
+%   
+%
+%   * V = gf_model_get(model M, 'compute elastoplasticity Von Mises or 
Tresca', string datasigma, mesh_fem mf_vm[, string version])
+%   Compute on `mf_vm` the Von-Mises or the Tresca stress of a field for 
plasticity and return it into the vector V.
+%   `datasigma` is a vector which contains the stress constraints values 
supported by the mesh.
+%   `version` should be  'Von_Mises' or 'Tresca' ('Von_Mises' is the default).
+%
+%   * V = gf_model_get(model M, 'compute plastic part', mesh_im mim, mesh_fem 
mf_pl, string varname, string previous_dep_name, string projname, string 
datalambda, string datamu, string datathreshold, string datasigma)
+%   Compute on `mf_pl` the plastic part and return it into the vector V.
+%   `datasigma` is a vector which contains the stress constraints values 
supported by the mesh.
+%
+%   * gf_model_get(model M, 'finite strain elastoplasticity next iter', 
mesh_im mim, string lawname, string unknowns_type, [, string varnames, ...] [, 
string params, ...] [, int region = -1])
+%   Function that allows to pass from a time step to another for the
+%   finite strain plastic brick. The parameters have to be exactly the
+%   same than the one of `add_finite_strain_elastoplasticity_brick`,
+%   so see the documentation of this function for the explanations.
+%   Basically, this brick computes the plastic strain
+%   and the plastic multiplier and stores them for the next step.
+%   For the Simo-Miehe law which is currently the only one implemented,
+%   this function updates the state variables defined in the last two
+%   entries of `varnames`, and resets the plastic multiplier field given
+%   as the second entry of `varnames`.
+%   
+%
+%   * V = gf_model_get(model M, 'compute finite strain elastoplasticity Von 
Mises', mesh_im mim, mesh_fem mf_vm, string lawname, string unknowns_type, [, 
string varnames, ...] [, string params, ...] [, int region = -1])
+%   Compute on `mf_vm` the Von-Mises or the Tresca stress of a field for 
plasticity and return it into the vector V.
+%   The first input parameters ar as in the function 'finite strain 
elastoplasticity next iter'.
+%   
+%
+%   * V = gf_model_get(model M, 'sliding data group name of large sliding 
contact brick', int indbrick)
+%   Gives the name of the group of variables corresponding to the
+%   sliding data for an existing large sliding contact brick.
+%
+%   * V = gf_model_get(model M, 'displacement group name of large sliding 
contact brick', int indbrick)
+%   Gives the name of the group of variables corresponding to the
+%   sliding data for an existing large sliding contact brick.
+%
+%   * V = gf_model_get(model M, 'transformation name of large sliding contact 
brick', int indbrick)
+%   Gives the name of the group of variables corresponding to the
+%   sliding data for an existing large sliding contact brick.
+%
+%   * V = gf_model_get(model M, 'sliding data group name of Nitsche large 
sliding contact brick', int indbrick)
+%   Gives the name of the group of variables corresponding to the
+%   sliding data for an existing large sliding contact brick.
+%
+%   * V = gf_model_get(model M, 'displacement group name of Nitsche large 
sliding contact brick', int indbrick)
+%   Gives the name of the group of variables corresponding to the
+%   sliding data for an existing large sliding contact brick.
+%
+%   * V = gf_model_get(model M, 'transformation name of Nitsche large sliding 
contact brick', int indbrick)
+%   Gives the name of the group of variables corresponding to the
+%   sliding data for an existing large sliding contact brick.
+%
+%   * M = gf_model_get(model M, 'matrix term', int ind_brick, int ind_term)
+%   Gives the matrix term ind_term of the brick ind_brick if it exists
+%   
+%
+%   * s = gf_model_get(model M, 'char')
+%   Output a (unique) string representation of the model.
+%   
+%   This can be used to perform comparisons between two
+%   different model objects.
+%   This function is to be completed.
+%   
+%
+%   * gf_model_get(model M, 'display')
+%   displays a short summary for a model object.
+%
+%
+function [varargout]=gf_model_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('model_get', varargin{:});
+  else
+    gf_matlab('model_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_model_set.m 
b/interface/src/octave/gf_model_set.m
new file mode 100644
index 0000000..9c4f4ba
--- /dev/null
+++ b/interface/src/octave/gf_model_set.m
@@ -0,0 +1,1408 @@
+% FUNCTION [...] = gf_model_set(model M, [operation [, args]])
+%
+%   Modifies a model object.
+%   
+%
+%   * gf_model_set(model M, 'clear')
+%   Clear the model.
+%
+%   * gf_model_set(model M, 'add fem variable', string name, mesh_fem mf)
+%   Add a variable to the model linked to a mesh_fem. `name` is the variable
+%   name.
+%
+%   * gf_model_set(model M, 'add filtered fem variable', string name, mesh_fem 
mf, int region)
+%   Add a variable to the model linked to a mesh_fem. The variable is filtered
+%   in the sense that only the dof on the region are considered.
+%   `name` is the variable name.
+%
+%   * gf_model_set(model M, 'add variable', string name, sizes)
+%   Add a variable to the model of constant sizes. `sizes` is either a
+%   integer (for a scalar or vector variable) or a vector of dimensions
+%   for a tensor variable. `name` is the variable name.
+%
+%   * gf_model_set(model M, 'delete variable', string name)
+%   Delete a variable or a data from the model.
+%
+%   * gf_model_set(model M, 'resize variable', string name, sizes)
+%   Resize a  constant size variable of the model.  `sizes` is either a
+%   integer (for a scalar or vector variable) or a vector of dimensions
+%   for a tensor variable. `name` is the variable name.
+%
+%   * gf_model_set(model M, 'add multiplier', string name, mesh_fem mf, string 
primalname[, mesh_im mim, int region])
+%   Add a particular variable linked to a fem being a multiplier with
+%   respect to a primal variable. The dof will be filtered with the
+%   ``gmm::range_basis`` function applied on the terms of the model
+%   which link the multiplier and the primal variable. This in order to
+%   retain only linearly independent constraints on the primal variable.
+%   Optimized for boundary multipliers.
+%
+%   * gf_model_set(model M, 'add im data', string name, mesh_imd mimd)
+%   Add a data set to the model linked to a mesh_imd. `name` is the data
+%   name.
+%
+%   * gf_model_set(model M, 'add fem data', string name, mesh_fem mf[, sizes])
+%   Add a data to the model linked to a mesh_fem. `name` is the data name,
+%   `sizes` an optional parameter which is either an
+%   integer  or a vector of suplementary dimensions with respect to `mf`.
+%
+%   * gf_model_set(model M, 'add initialized fem data', string name, mesh_fem 
mf, vec V[, sizes])
+%   Add a data to the model linked to a mesh_fem. `name` is the data name.
+%   The data is initiakized with `V`. The data can be a scalar or vector
+%   field. `sizes` an optional parameter which is either an
+%   integer or a vector of suplementary dimensions with respect to `mf`.
+%
+%   * gf_model_set(model M, 'add data', string name, int size)
+%   Add a fixed size data to the model.  `sizes` is either a
+%   integer (for a scalar or vector data) or a vector of dimensions
+%   for a tensor data. `name` is the data name.
+%
+%   * gf_model_set(model M, 'add macro', string name, string expr)
+%   Define a new macro for the high generic assembly language.
+%   The name include the parameters. For instance name='sp(a,b)', expr='a.b'
+%   is a valid definition. Macro without parameter can also be defined.
+%   For instance name='x1', expr='X[1]' is valid. Teh form name='grad(u)',
+%   expr='Grad_u' is also allowed but in that case, the parameter 'u' will
+%   only be allowed to be a variable name when using the macro. Note that
+%   macros can be directly defined inside the assembly strings with the
+%   keyword 'Def'.
+%   
+%
+%   * gf_model_set(model M, 'del macro', string name)
+%   Delete a previously defined macro for the high generic assembly language.
+%   
+%
+%   * gf_model_set(model M, 'add initialized data', string name, vec V[, 
sizes])
+%   Add an initialized fixed size data to the model. `sizes` an
+%   optional parameter which is either an
+%   integer  or a vector dimensions that describes the format of the
+%   data. By default, the data is considered to b a vector field.
+%   `name` is the data name and `V` is the value of the data.
+%
+%   * gf_model_set(model M, 'variable', string name, vec V)
+%   Set the value of a variable or data. `name` is the data name.
+%
+%   * gf_model_set(model M, 'to variables', vec V)
+%   Set the value of the variables of the model with the vector `V`.
+%   Typically, the vector `V` results of the solve of the tangent
+%   linear system (useful to solve your problem with you own solver).
+%
+%   * gf_model_set(model M, 'delete brick', int ind_brick)
+%   Delete a variable or a data from the model.
+%
+%   * gf_model_set(model M, 'define variable group', string name[, string 
varname, ...])
+%   Defines a group of variables for the interpolation (mainly for the
+%   raytracing interpolation transformation.
+%
+%   * gf_model_set(model M, 'add elementary rotated RT0 projection', string 
transname)
+%   Experimental method ...
+%
+%   * gf_model_set(model M, 'add interpolate transformation from expression', 
string transname, mesh source_mesh, mesh target_mesh, string expr)
+%   Add a transformation to the model from mesh `source_mesh` to mesh
+%   `target_mesh` given by the expression `expr` which corresponds to a
+%   high-level generic assembly expression which may contains some
+%   variable of the model. CAUTION: the derivative of the
+%   transformation with used variable is taken into account in the
+%   computation of the tangen system. However, order two derivative is not
+%   implemented, so such tranformation is not allowed in the definition
+%   of a potential.
+%
+%   * gf_model_set(model M, 'add element extrapolation transformation', string 
transname, mesh source_mesh, mat elt_corr)
+%   Add a special interpolation transformation which represents the identity
+%   transformation but allows to evaluate the expression on another element
+%   than the current element by polynomial extrapolation. It is used for
+%   stabilization term in fictitious domain applications. the array elt_cor
+%   should be a two entry array whose first line contains the elements
+%   concerned by the transformation and the second line the respective
+%   elements on which the extrapolation has to be made. If an element
+%   is not listed in elt_cor the evaluation is just made on the current
+%   element.
+%
+%   * gf_model_set(model M, 'set element extrapolation correspondance', string 
transname, mat elt_corr)
+%   Change the correspondance map of an element extrapolation interpolate
+%   transformation.
+%
+%   * gf_model_set(model M, 'add raytracing transformation', string transname, 
scalar release_distance)
+%   Add a raytracing interpolate transformation called `transname` to a model
+%   to be used by the generic assembly bricks.
+%   CAUTION: For the moment, the derivative of the
+%   transformation is not taken into account in the model solve.
+%
+%   * gf_model_set(model M, 'add master contact boundary to raytracing 
transformation', string transname, mesh m, string dispname, int region)
+%   Add a master contact boundary with corresponding displacement variable
+%   `dispname` on a specific boundary `region` to an existing raytracing
+%   interpolate transformation called `transname`.
+%
+%   * gf_model_set(model M, 'add slave contact boundary to raytracing 
transformation', string transname, mesh m, string dispname, int region)
+%   Add a slave contact boundary with corresponding displacement variable
+%   `dispname` on a specific boundary `region` to an existing raytracing
+%   interpolate transformation called `transname`.
+%
+%   * gf_model_set(model M, 'add rigid obstacle to raytracing transformation', 
string transname, string expr, int N)
+%   Add a rigid obstacle whose geometry corresponds to the zero level-set
+%   of the high-level generic assembly expression `expr`
+%   to an existing raytracing interpolate transformation called `transname`.
+%   
+%
+%   * gf_model_set(model M, 'add projection transformation', string transname, 
scalar release_distance)
+%   Add a projection interpolate transformation called `transname` to a model
+%   to be used by the generic assembly bricks.
+%   CAUTION: For the moment, the derivative of the
+%   transformation is not taken into account in the model solve.
+%
+%   * gf_model_set(model M, 'add master contact boundary to projection 
transformation', string transname, mesh m, string dispname, int region)
+%   Add a master contact boundary with corresponding displacement variable
+%   `dispname` on a specific boundary `region` to an existing projection
+%   interpolate transformation called `transname`.
+%
+%   * gf_model_set(model M, 'add slave contact boundary to projection 
transformation', string transname, mesh m, string dispname, int region)
+%   Add a slave contact boundary with corresponding displacement variable
+%   `dispname` on a specific boundary `region` to an existing projection
+%   interpolate transformation called `transname`.
+%
+%   * gf_model_set(model M, 'add rigid obstacle to projection transformation', 
string transname, string expr, int N)
+%   Add a rigid obstacle whose geometry corresponds to the zero level-set
+%   of the high-level generic assembly expression `expr`
+%   to an existing projection interpolate transformation called `transname`.
+%   
+%
+%   * ind = gf_model_set(model M, 'add linear term', mesh_im mim, string 
expression[, int region[, int is_symmetric[, int is_coercive]]])
+%   Adds a matrix term given by the assembly string `expr` which will
+%   be assembled in region `region` and with the integration method `mim`.
+%   Only the matrix term will be taken into account, assuming that it is
+%   linear.
+%   The advantage of declaring a term linear instead of nonlinear is that
+%   it will be assembled only once and no assembly is necessary for the
+%   residual.
+%   Take care that if the expression contains some variables and if the
+%   expression is a potential or of first order (i.e. describe the weak
+%   form, not the derivative of the weak form), the expression will be
+%   derivated with respect to all variables.
+%   You can specify if the term is symmetric, coercive or not.
+%   If you are not sure, the better is to declare the term not symmetric
+%   and not coercive. But some solvers (conjugate gradient for instance)
+%   are not allowed for non-coercive problems.
+%   `brickname` is an otpional name for the brick.
+%
+%   * ind = gf_model_set(model M, 'add linear generic assembly brick', mesh_im 
mim, string expression[, int region[, int is_symmetric[, int is_coercive]]])
+%   Deprecated. Use gf_model_set(model M, 'add linear term') instead.
+%
+%   * ind = gf_model_set(model M, 'add nonlinear term', mesh_im mim, string 
expression[, int region[, int is_symmetric[, int is_coercive]]])
+%   Adds a nonlinear term given by the assembly string `expr` which will
+%   be assembled in region `region` and with the integration method `mim`.
+%   The expression can describe a potential or a weak form. Second order
+%   terms (i.e. containing second order test functions, Test2) are not
+%   allowed.
+%   You can specify if the term is symmetric, coercive or not.
+%   If you are not sure, the better is to declare the term not symmetric
+%   and not coercive. But some solvers (conjugate gradient for instance)
+%   are not allowed for non-coercive problems.
+%   `brickname` is an otpional name for the brick.
+%
+%   * ind = gf_model_set(model M, 'add nonlinear generic assembly brick', 
mesh_im mim, string expression[, int region[, int is_symmetric[, int 
is_coercive]]])
+%   Deprecated. Use gf_model_set(model M, 'add nonlinear term') instead.
+%
+%   * ind = gf_model_set(model M, 'add source term', mesh_im mim, string 
expression[, int region])
+%   Adds a source term given by the assembly string `expr` which will
+%   be assembled in region `region` and with the integration method `mim`.
+%   Only the residual term will be taken into account.
+%   Take care that if the expression contains some variables and if the
+%   expression is a potential, the expression will be
+%   derivated with respect to all variables.
+%   `brickname` is an optional name for the brick.
+%
+%   * ind = gf_model_set(model M, 'add source term generic assembly brick', 
mesh_im mim, string expression[, int region])
+%   Deprecated. Use gf_model_set(model M, 'add source term') instead.
+%
+%   * gf_model_set(model M, 'add assembly assignment', string dataname, string 
expression[, int region[, int order[, int before]]])
+%   Adds expression `expr` to be evaluated at assembly time and being
+%   assigned to the data `dataname` which has to be of im_data type.
+%   This allows for instance to store a sub-expression of an assembly
+%   computation to be used on an other assembly. It can be used for instance
+%   to store the plastic strain in plasticity models.
+%   `order` represents the order of assembly where this assignement has to be
+%   done (potential(0), weak form(1) or tangent system(2) or at each
+%   order(-1)). The default value is 1.
+%   If before = 1, the the assignement is perfromed before the computation
+%   of the other assembly terms, such that the data can be used in the
+%   remaining of the assembly as an intermediary result (be careful that it is
+%   still considered as a data, no derivation of the expression is performed
+%   for the tangent system).
+%   If before = 0 (default), the assignement is done after the assembly terms.
+%   
+%
+%   * gf_model_set(model M, 'clear assembly assignment')
+%   Delete all added assembly assignments
+%   
+%
+%   * ind = gf_model_set(model M, 'add Laplacian brick', mesh_im mim, string 
varname[, int region])
+%   Add a Laplacian term to the model relatively to the variable `varname`
+%   (in fact with a minus : :math:`-\text{div}(\nabla u)`).
+%   If this is a vector valued variable, the Laplacian term is added
+%   componentwise. `region` is an optional mesh region on which the term
+%   is added. If it is not specified, it is added on the whole mesh. Return
+%   the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add generic elliptic brick', mesh_im mim, 
string varname, string dataname[, int region])
+%   Add a generic elliptic term to the model relatively to the variable 
`varname`.
+%   The shape of the elliptic term depends both on the variable and the data.
+%   This corresponds to a term
+%   :math:`-\text{div}(a\nabla u)`
+%   where :math:`a` is the data and :math:`u` the variable. The data can be
+%   a scalar,
+%   a matrix or an order four tensor. The variable can be vector valued or
+%   not. If the data is a scalar or a matrix and the variable is vector
+%   valued then the term is added componentwise. An order four tensor data
+%   is allowed for vector valued variable only. The data can be constant or
+%   describbed on a fem. Of course, when the data is a tensor describe on a
+%   finite element method (a tensor field) the data can be a huge vector.
+%   The components of the matrix/tensor have to be stored with the fortran
+%   order (columnwise) in the data vector (compatibility with blas). The
+%   symmetry of the given matrix/tensor is not verified (but assumed). If
+%   this is a vector valued variable, the elliptic term is added
+%   componentwise. `region` is an optional mesh region on which the term is
+%   added. If it is not specified, it is added on the whole mesh. Note that
+%   for the real
+%   version which uses the high-level generic assembly language, `dataname`
+%   can be any regular expression of the high-level generic assembly
+%   language (like "1", "sin(X(1))" or "Norm(u)" for instance) even
+%   depending on model variables. Return the
+%   brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add source term brick', mesh_im mim, string 
varname, string dataexpr[, int region[, string directdataname]])
+%   Add a source term to the model relatively to the variable `varname`.
+%   The source term is
+%   represented by `dataexpr` which could be any regular expression of the
+%   high-level generic assembly language (except for the complex version
+%   where it has to be a declared data of the model).
+%   `region` is an optional mesh region
+%   on which the term is added. An additional optional data `directdataname`
+%   can be provided. The corresponding data vector will be directly added
+%   to the right hand side without assembly. Note that when region is a
+%   boundary, this brick allows to prescribe a nonzero Neumann boundary
+%   condition. Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add normal source term brick', mesh_im mim, 
string varname, string dataname, int region)
+%   Add a source term on the variable `varname` on a boundary `region`.
+%   This region should be a boundary. The source term is
+%   represented by the data `dataepxpr` which could be any regular
+%   expression of the high-level generic assembly language (except
+%   for the complex version where it has to be a declared data of
+%   the model). A scalar
+%   product with the outward normal unit vector to the boundary is performed.
+%   The main aim of this brick is to represent a Neumann condition with a
+%   vector data without performing the scalar product with the normal as a
+%   pre-processing. Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add Dirichlet condition with 
simplification', string varname, int region[, string dataname])
+%   Adds a (simple) Dirichlet condition on the variable `varname` and
+%   the mesh region `region`. The Dirichlet condition is prescribed by
+%   a simple post-treatment of the final linear system (tangent system
+%   for nonlinear problems) consisting of modifying the lines corresponding
+%   to the degree of freedom of the variable on `region` (0 outside the
+%   diagonal, 1 on the diagonal of the matrix and the expected value on
+%   the right hand side).
+%   The symmetry of the linear system is kept if all other bricks are
+%   symmetric.
+%   This brick is to be reserved for simple Dirichlet conditions (only dof
+%   declared on the correspodning boundary are prescribed). The application
+%   of this brick on reduced dof may be problematic. Intrinsic vectorial
+%   finite element method are not supported.
+%   `dataname` is the optional right hand side of  the Dirichlet condition.
+%   It could be constant (but in that case, it can only be applied to
+%   Lagrange f.e.m.) or (important) described on the same finite
+%   element method as `varname`.
+%   Returns the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add Dirichlet condition with multipliers', 
mesh_im mim, string varname, mult_description, int region[, string dataname])
+%   Add a Dirichlet condition on the variable `varname` and the mesh
+%   region `region`. This region should be a boundary. The Dirichlet
+%   condition is prescribed with a multiplier variable described by
+%   `mult_description`. If `mult_description` is a string this is assumed
+%   to be the variable name corresponding to the multiplier (which should be
+%   first declared as a multiplier variable on the mesh region in the model).
+%   If it is a finite element method (mesh_fem object) then a multiplier
+%   variable will be added to the model and build on this finite element
+%   method (it will be restricted to the mesh region `region` and eventually
+%   some conflicting dofs with some other multiplier variables will be
+%   suppressed). If it is an integer, then a  multiplier variable will be
+%   added to the model and build on a classical finite element of degree
+%   that integer. `dataname` is the optional right hand side of  the
+%   Dirichlet condition. It could be constant or described on a fem; scalar
+%   or vector valued, depending on the variable on which the Dirichlet
+%   condition is prescribed. Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add Dirichlet condition with Nitsche 
method', mesh_im mim, string varname, string Neumannterm, string datagamma0, 
int region[, scalar theta][, string dataname])
+%   Add a Dirichlet condition on the variable `varname` and the mesh
+%   region `region`. This region should be a boundary. `Neumannterm`
+%   is the expression of the Neumann term (obtained by the Green formula)
+%   described as an expression of the high-level
+%   generic assembly language. This term can be obtained by
+%   gf_model_get(model M, 'Neumann term', varname, region) once all volumic 
bricks have
+%   been added to the model. The Dirichlet
+%   condition is prescribed with Nitsche's method. `datag` is the optional
+%   right hand side of the Dirichlet condition. `datagamma0` is the
+%   Nitsche's method parameter. `theta` is a scalar value which can be
+%   positive or negative. `theta = 1` corresponds to the standard symmetric
+%   method which is conditionnaly coercive for  `gamma0` small.
+%   `theta = -1` corresponds to the skew-symmetric method which is
+%   inconditionnaly coercive. `theta = 0` (default) is the simplest method
+%   for which the second derivative of the Neumann term is not necessary
+%   even for nonlinear problems. Return the brick index in the model.
+%   
+%
+%   * ind = gf_model_set(model M, 'add Dirichlet condition with penalization', 
mesh_im mim, string varname, scalar coeff, int region[, string dataname, 
mesh_fem mf_mult])
+%   Add a Dirichlet condition on the variable `varname` and the mesh
+%   region `region`. This region should be a boundary. The Dirichlet
+%   condition is prescribed with penalization. The penalization coefficient
+%   is initially `coeff` and will be added to the data of the model.
+%   `dataname` is the optional right hand side of the Dirichlet condition.
+%   It could be constant or described on a fem; scalar or vector valued,
+%   depending on the variable on which the Dirichlet condition is prescribed.
+%   `mf_mult` is an optional parameter which allows to weaken the
+%   Dirichlet condition specifying a multiplier space.
+%   Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add normal Dirichlet condition with 
multipliers', mesh_im mim, string varname, mult_description, int region[, 
string dataname])
+%   Add a Dirichlet condition to the normal component of the vector
+%   (or tensor) valued variable `varname` and the mesh
+%   region `region`. This region should be a boundary. The Dirichlet
+%   condition is prescribed with a multiplier variable described by
+%   `mult_description`. If `mult_description` is a string this is assumed
+%   to be the variable name corresponding to the multiplier (which should be
+%   first declared as a multiplier variable on the mesh region in the model).
+%   If it is a finite element method (mesh_fem object) then a multiplier
+%   variable will be added to the model and build on this finite element
+%   method (it will be restricted to the mesh region `region` and eventually
+%   some conflicting dofs with some other multiplier variables will be
+%   suppressed). If it is an integer, then a  multiplier variable will be
+%   added to the model and build on a classical finite element of degree
+%   that integer. `dataname` is the optional right hand side of  the
+%   Dirichlet condition. It could be constant or described on a fem; scalar
+%   or vector valued, depending on the variable on which the Dirichlet
+%   condition is prescribed (scalar if the variable
+%   is vector valued, vector if the variable is tensor valued).
+%   Returns the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add normal Dirichlet condition with 
penalization', mesh_im mim, string varname, scalar coeff, int region[, string 
dataname, mesh_fem mf_mult])
+%   Add a Dirichlet condition to the normal component of the vector
+%   (or tensor) valued variable `varname` and the mesh
+%   region `region`. This region should be a boundary. The Dirichlet
+%   condition is prescribed with penalization. The penalization coefficient
+%   is initially `coeff` and will be added to the data of the model.
+%   `dataname` is the optional right hand side of the Dirichlet condition.
+%   It could be constant or described on a fem; scalar or vector valued,
+%   depending on the variable on which the Dirichlet condition is prescribed
+%   (scalar if the variable
+%   is vector valued, vector if the variable is tensor valued).
+%   `mf_mult` is an optional parameter which allows to weaken the
+%   Dirichlet condition specifying a multiplier space.
+%   Returns the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add normal Dirichlet condition with Nitsche 
method', mesh_im mim, string varname, string Neumannterm, string gamma0name, 
int region[, scalar theta][, string dataname])
+%   Add a Dirichlet condition to the normal component of the vector
+%   (or tensor) valued variable `varname` and the mesh region `region`.
+%   This region should be a boundary. `Neumannterm`
+%   is the expression of the Neumann term (obtained by the Green formula)
+%   described as an expression of the high-level
+%   generic assembly language. This term can be obtained by
+%   gf_model_get(model M, 'Neumann term', varname, region) once all volumic 
bricks have
+%   been added to the model. The Dirichlet
+%   condition is prescribed with Nitsche's method. `dataname` is the optional
+%   right hand side of the Dirichlet condition. It could be constant or
+%   described on a fem. `gamma0name` is the
+%   Nitsche's method parameter. `theta` is a scalar value which can be
+%   positive or negative. `theta = 1` corresponds to the standard symmetric
+%   method which is conditionnaly coercive for  `gamma0` small.
+%   `theta = -1` corresponds to the skew-symmetric method which is
+%   inconditionnaly coercive. `theta = 0` is the simplest method
+%   for which the second derivative of the Neumann term is not necessary
+%   even for nonlinear problems.
+%   Returns the brick index in the model.
+%   (This brick is not fully tested)
+%   
+%
+%   * ind = gf_model_set(model M, 'add generalized Dirichlet condition with 
multipliers', mesh_im mim, string varname, mult_description, int region, string 
dataname, string Hname)
+%   Add a Dirichlet condition on the variable `varname` and the mesh
+%   region `region`.  This version is for vector field.
+%   It prescribes a condition :math:`Hu = r`
+%   where `H` is a matrix field. The region should be a boundary. The Dirichlet
+%   condition is prescribed with a multiplier variable described by
+%   `mult_description`. If `mult_description` is a string this is assumed
+%   to be the variable name corresponding to the multiplier (which should be
+%   first declared as a multiplier variable on the mesh region in the model).
+%   If it is a finite element method (mesh_fem object) then a multiplier
+%   variable will be added to the model and build on this finite element
+%   method (it will be restricted to the mesh region `region` and eventually
+%   some conflicting dofs with some other multiplier variables will be
+%   suppressed). If it is an integer, then a  multiplier variable will be
+%   added to the model and build on a classical finite element of degree
+%   that integer. `dataname` is the right hand side of  the
+%   Dirichlet condition. It could be constant or described on a fem; scalar
+%   or vector valued, depending on the variable on which the Dirichlet
+%   condition is prescribed. `Hname` is the data
+%   corresponding to the matrix field `H`.
+%   Returns the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add generalized Dirichlet condition with 
penalization', mesh_im mim, string varname, scalar coeff, int region, string 
dataname, string Hname[, mesh_fem mf_mult])
+%   Add a Dirichlet condition on the variable `varname` and the mesh
+%   region `region`. This version is for vector field.
+%   It prescribes a condition :math:`Hu = r`
+%   where `H` is a matrix field.
+%   The region should be a boundary. The Dirichlet
+%   condition is prescribed with penalization. The penalization coefficient
+%   is intially `coeff` and will be added to the data of the model.
+%   `dataname` is the right hand side of the Dirichlet condition.
+%   It could be constant or described on a fem; scalar or vector valued,
+%   depending on the variable on which the Dirichlet condition is prescribed.
+%   `Hname` is the data
+%   corresponding to the matrix field `H`. It has to be a constant matrix
+%   or described on a scalar fem.
+%   `mf_mult` is an optional parameter which allows to weaken the
+%   Dirichlet condition specifying a multiplier space.
+%   Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add generalized Dirichlet condition with 
Nitsche method', mesh_im mim, string varname, string Neumannterm, string 
gamma0name, int region[, scalar theta], string dataname, string Hname)
+%   Add a Dirichlet condition on the variable `varname` and the mesh
+%   region `region`.
+%   This version is for vector field. It prescribes a condition
+%   @f$ Hu = r @f$ where `H` is a matrix field.
+%   CAUTION : the matrix H should have all eigenvalues equal to 1 or 0.
+%   The region should be a boundary.   `Neumannterm`
+%   is the expression of the Neumann term (obtained by the Green formula)
+%   described as an expression of the high-level
+%   generic assembly language. This term can be obtained by
+%   gf_model_get(model M, 'Neumann term', varname, region) once all volumic 
bricks have
+%   been added to the model.  The Dirichlet
+%   condition is prescribed with Nitsche's method. `dataname` is the optional
+%   right hand side of the Dirichlet condition. It could be constant or
+%   described on a fem. `gamma0name` is the
+%   Nitsche's method parameter. `theta` is a scalar value which can be
+%   positive or negative. `theta = 1` corresponds to the standard symmetric
+%   method which is conditionnaly coercive for  `gamma0` small.
+%   `theta = -1` corresponds to the skew-symmetric method which is
+%   inconditionnaly coercive. `theta = 0` is the simplest method
+%   for which the second derivative of the Neumann term is not necessary
+%   even for nonlinear problems. `Hname` is the data
+%   corresponding to the matrix field `H`. It has to be a constant matrix
+%   or described on a scalar fem. Returns the brick index in the model.
+%   (This brick is not fully tested)
+%   
+%
+%   * ind = gf_model_set(model M, 'add pointwise constraints with 
multipliers', string varname, string dataname_pt[, string dataname_unitv] [, 
string dataname_val])
+%   Add some pointwise constraints on the variable `varname` using
+%   multiplier. The multiplier variable is automatically added to the model.
+%   The conditions are prescribed on a set of points given in the data
+%   `dataname_pt` whose dimension is the number of points times the dimension
+%   of the mesh.
+%   If the variable represents a vector field, one has to give the data
+%   `dataname_unitv` which represents a vector of dimension the number of
+%   points times the dimension of the vector field which should store some
+%   unit vectors. In that case the prescribed constraint is the scalar
+%   product of the variable at the corresponding point with the corresponding
+%   unit vector.
+%   The optional data `dataname_val` is the vector of values to be prescribed
+%   at the different points.
+%   This brick is specifically designed to kill rigid displacement
+%   in a Neumann problem.
+%   Returns the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add pointwise constraints with given 
multipliers', string varname, string multname, string dataname_pt[, string 
dataname_unitv] [, string dataname_val])
+%   Add some pointwise constraints on the variable `varname` using a given
+%   multiplier `multname`.
+%   The conditions are prescribed on a set of points given in the data
+%   `dataname_pt` whose dimension is the number of points times the dimension
+%   of the mesh.
+%   The multiplier variable should be a fixed size variable of size the
+%   number of points.
+%   If the variable represents a vector field, one has to give the data
+%   `dataname_unitv` which represents a vector of dimension the number of
+%   points times the dimension of the vector field which should store some
+%   unit vectors. In that case the prescribed constraint is the scalar
+%   product of the variable at the corresponding point with the corresponding
+%   unit vector.
+%   The optional data `dataname_val` is the vector of values to be prescribed
+%   at the different points.
+%   This brick is specifically designed to kill rigid displacement
+%   in a Neumann problem.
+%   Returns the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add pointwise constraints with 
penalization', string varname, scalar coeff, string dataname_pt[, string 
dataname_unitv] [, string dataname_val])
+%   Add some pointwise constraints on the variable `varname` thanks to
+%   a penalization. The penalization coefficient is initially
+%   `penalization_coeff` and will be added to the data of the model.
+%   The conditions are prescribed on a set of points given in the data
+%   `dataname_pt` whose dimension is the number of points times the dimension
+%   of the mesh.
+%   If the variable represents a vector field, one has to give the data
+%   `dataname_unitv` which represents a vector of dimension the number of
+%   points times the dimension of the vector field which should store some
+%   unit vectors. In that case the prescribed constraint is the scalar
+%   product of the variable at the corresponding point with the corresponding
+%   unit vector.
+%   The optional data `dataname_val` is the vector of values to be prescribed
+%   at the different points.
+%   This brick is specifically designed to kill rigid displacement
+%   in a Neumann problem.
+%   Returns the brick index in the model.
+%
+%   * gf_model_set(model M, 'change penalization coeff', int ind_brick, scalar 
coeff)
+%   Change the penalization coefficient of a Dirichlet condition with
+%   penalization brick. If the brick is not of this kind, this
+%   function has an undefined behavior.
+%
+%   * ind = gf_model_set(model M, 'add Helmholtz brick', mesh_im mim, string 
varname, string dataexpr[, int region])
+%   Add a Helmholtz term to the model relatively to the variable `varname`.
+%   `dataexpr` is the wave number. `region` is an optional mesh
+%   region on which the term is added. If it is not specified, it is added
+%   on the whole mesh. Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add Fourier Robin brick', mesh_im mim, 
string varname, string dataexpr, int region)
+%   Add a Fourier-Robin term to the model relatively to the variable
+%   `varname`. This corresponds to a weak term of the form
+%   :math:`\int (qu).v`. `dataexpr` is the parameter :math:`q` of
+%   the Fourier-Robin condition.  It can be an arbitrary valid expression
+%   of the high-level generic assembly language (except for the complex version
+%   for which it should be a data of the model). `region` is the mesh region
+%   on which the term is added. Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add constraint with multipliers', string 
varname, string multname, spmat B, {vec L | string dataname})
+%   Add an additional explicit constraint on the variable `varname` thank to
+%   a multiplier `multname` peviously added to the model (should be a fixed
+%   size variable). The constraint is :math:`BU=L`
+%   with `B` being a rectangular sparse matrix. It is possible to change
+%   the constraint at any time with the methods gf_model_set(model M, 'set 
private matrix')
+%   and gf_model_set(model M, 'set private rhs'). If `dataname` is specified 
instead of `L`,
+%   the vector `L` is defined in the model as data with the given name.
+%   Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add constraint with penalization', string 
varname, scalar coeff, spmat B, {vec L | string dataname})
+%   Add an additional explicit penalized constraint on the variable `varname`.
+%   The constraint is :math`BU=L` with `B` being a rectangular sparse matrix.
+%   Be aware that `B` should not contain a palin row, otherwise the whole
+%   tangent matrix will be plain. It is possible to change the constraint
+%   at any time with the methods gf_model_set(model M, 'set private matrix')
+%   and gf_model_set(model M, 'set private rhs'). The method
+%   gf_model_set(model M, 'change penalization coeff') can be used.
+%   If `dataname` is specified instead of `L`, the vector `L` is defined
+%   in the model as data with the given name.
+%   Return the brick
+%   index in the model.
+%
+%   * ind = gf_model_set(model M, 'add explicit matrix', string varname1, 
string varname2, spmat B[, int issymmetric[, int iscoercive]])
+%   Add a brick representing an explicit matrix to be added to the tangent
+%   linear system relatively to the variables `varname1` and `varname2`.
+%   The given matrix should have has many rows as the dimension of
+%   `varname1` and as many columns as the dimension of `varname2`.
+%   If the two variables are different and if `issymmetric` is set to 1
+%   then the transpose of the matrix is also added to the tangent system
+%   (default is 0). Set `iscoercive` to 1 if the term does not affect the
+%   coercivity of the tangent system (default is 0). The matrix can be
+%   changed by the command gf_model_set(model M, 'set private matrix'). Return 
the
+%   brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add explicit rhs', string varname, vec L)
+%   Add a brick representing an explicit right hand side to be added to
+%   the right hand side of the tangent linear system relatively to the
+%   variable `varname`. The given rhs should have the same size than the
+%   dimension of `varname`. The rhs can be changed by the command
+%   gf_model_set(model M, 'set private rhs'). If `dataname` is specified 
instead of
+%   `L`, the vector `L` is defined in the model as data with the given name.
+%   Return the brick index in the model.
+%
+%   * gf_model_set(model M, 'set private matrix', int indbrick, spmat B)
+%   For some specific bricks having an internal sparse matrix
+%   (explicit bricks: 'constraint brick' and 'explicit matrix brick'),
+%   set this matrix.
+%
+%   * gf_model_set(model M, 'set private rhs', int indbrick, vec B)
+%   For some specific bricks having an internal right hand side vector
+%   (explicit bricks: 'constraint brick' and 'explicit rhs brick'),
+%   set this rhs.
+%
+%   * ind = gf_model_set(model M, 'add isotropic linearized elasticity brick', 
mesh_im mim, string varname, string dataname_lambda, string dataname_mu[, int 
region])
+%   Add an isotropic linearized elasticity term to the model relatively to
+%   the variable `varname`. `dataname_lambda` and `dataname_mu` should
+%   contain the Lame coefficients. `region` is an optional mesh region
+%   on which the term is added. If it is not specified, it is added
+%   on the whole mesh. Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add isotropic linearized elasticity brick 
pstrain', mesh_im mim, string varname, string data_E, string data_nu[, int 
region])
+%   Add an isotropic linearized elasticity term to the model relatively to
+%   the variable `varname`. `data_E` and `data_nu` should
+%   contain the Young modulus and Poisson ratio, respectively.
+%   `region` is an optional mesh region on which the term is added.
+%   If it is not specified, it is added
+%   on the whole mesh.
+%   On two-dimensional meshes, the term will correpsond to a plain strain
+%   approximation. On three-dimensional meshes, it will correspond to the
+%   standard model.
+%   Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add isotropic linearized elasticity brick 
pstress', mesh_im mim, string varname, string data_E, string data_nu[, int 
region])
+%   Add an isotropic linearized elasticity term to the model relatively to
+%   the variable `varname`. `data_E` and `data_nu` should
+%   contain the Young modulus and Poisson ratio, respectively.
+%   `region` is an optional mesh region on which the term is added.
+%   If it is not specified, it is added
+%   on the whole mesh.
+%   On two-dimensional meshes, the term will correpsond to a plain stress
+%   approximation. On three-dimensional meshes, it will correspond to the
+%   standard model.
+%   Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add linear incompressibility brick', 
mesh_im mim, string varname, string multname_pressure[, int region[, string 
dataexpr_coeff]])
+%   Add a linear incompressibility condition on `variable`. `multname_pressure`
+%   is a variable which represent the pressure. Be aware that an inf-sup
+%   condition between the finite element method describing the pressure and the
+%   primal variable has to be satisfied. `region` is an optional mesh region on
+%   which the term is added. If it is not specified, it is added on the whole
+%   mesh. `dataexpr_coeff` is an optional penalization coefficient for nearly
+%   incompressible elasticity for instance. In this case, it is the inverse
+%   of the Lame coefficient :math:`\lambda`. Return the brick index in the
+%   model.
+%
+%   * ind = gf_model_set(model M, 'add nonlinear elasticity brick', mesh_im 
mim, string varname, string constitutive_law, string dataname[, int region])
+%   Add a nonlinear elasticity term to the model relatively to the
+%   variable `varname` (deprecated brick, use add_finite_strain_elaticity
+%   instead). `lawname` is the constitutive law which
+%   could be 'SaintVenant Kirchhoff', 'Mooney Rivlin', 'neo Hookean',
+%   'Ciarlet Geymonat' or 'generalized Blatz Ko'.
+%   'Mooney Rivlin' and 'neo Hookean' law names can be preceded with the word
+%   'compressible' or 'incompressible' to force using the corresponding 
version.
+%   The compressible version of these laws requires one additional material
+%   coefficient. By default, the incompressible version of 'Mooney Rivlin' law
+%   and the compressible one of the 'neo Hookean' law are considered. In
+%   general, 'neo Hookean' is a special case of the 'Mooney Rivlin' law that
+%   requires one coefficient less.
+%   IMPORTANT : if the variable is defined on a 2D mesh, the plane strain
+%   approximation is automatically used.
+%   `dataname` is a vector of parameters for the constitutive law. Its length
+%   depends on the law. It could be a short vector of constant values or a
+%   vector field described on a finite element method for variable
+%   coefficients. `region` is an optional mesh region on which the term
+%   is added. If it is not specified, it is added on the whole mesh.
+%   This brick use the low-level generic assembly.
+%   Returns the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add finite strain elasticity brick', 
mesh_im mim, string constitutive_law, string varname, string params[, int 
region])
+%   Add a nonlinear elasticity term to the model relatively to the
+%   variable `varname`. `lawname` is the constitutive law which
+%   could be 'SaintVenant Kirchhoff', 'Mooney Rivlin', 'Neo Hookean',
+%   'Ciarlet Geymonat' or 'Generalized Blatz Ko'.
+%   'Mooney Rivlin' and 'Neo Hookean' law names have to be preceeded with
+%   the word 'Compressible' or 'Incompressible' to force using the
+%   corresponding version.
+%   The compressible version of these laws requires one additional material
+%   coefficient.
+%   
+%   IMPORTANT : if the variable is defined on a 2D mesh, the plane strain
+%   approximation is automatically used.
+%   `params` is a vector of parameters for the constitutive law. Its length
+%   depends on the law. It could be a short vector of constant values or a
+%   vector field described on a finite element method for variable
+%   coefficients. `region` is an optional mesh region on which the term
+%   is added. If it is not specified, it is added on the whole mesh.
+%   This brick use the high-level generic assembly.
+%   Returns the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add small strain elastoplasticity brick', 
mesh_im mim,  string lawname, string unknowns_type [, string varnames, ...] [, 
string params, ...] [, string theta = '1' [, string dt = 'timestep']] [, int 
region = -1])
+%   Adds a small strain plasticity term to the model `M`. This is the
+%   main GetFEM++ brick for small strain plasticity. `lawname` is the name
+%   of an implemented plastic law, `unknowns_type` indicates the choice
+%   between a discretization where the plastic multiplier is an unknown of
+%   the problem or (return mapping approach) just a data of the model
+%   stored for the next iteration. Remember that in both cases, a multiplier
+%   is stored anyway. `varnames` is a set of variable and data names with
+%   length which may depend on the plastic law (at least the displacement,
+%   the plastic multiplier and the plastic strain). `params` is a list of
+%   expressions for the parameters (at least elastic coefficients and the
+%   yield stress). These expressions can be some data names (or even
+%   variable names) of the model but can also be any scalar valid expression
+%   of the high level assembly language (such as '1/2', '2+sin(X[0])',
+%   '1+Norm(v)' ...). The last two parameters optionally provided in
+%   `params` are the `theta` parameter of the `theta`-scheme (generalized
+%   trapezoidal rule) used for the plastic strain integration and the
+%   time-step`dt`. The default value for `theta` if omitted is 1, which
+%   corresponds to the classical Backward Euler scheme which is first order
+%   consistent. `theta=1/2` corresponds to the Crank-Nicolson scheme
+%   (trapezoidal rule) which is second order consistent. Any value
+%   between 1/2 and 1 should be a valid value. The default value of `dt` is
+%   'timestep' which simply indicates the time step defined in the model
+%   (by md.set_time_step(dt)). Alternatively it can be any expression
+%   (data name, constant value ...). The time step can be altered from one
+%   iteration to the next one. `region` is a mesh region.
+%   
+%   The available plasticity laws are:
+%   
+%   - 'Prandtl Reuss' (or 'isotropic perfect plasticity').
+%   Isotropic elasto-plasticity with no hardening. The variables are the
+%   displacement, the plastic multiplier and the plastic strain.
+%   The displacement should be a variable and have a corresponding data
+%   having the same name preceded by 'Previous\_' corresponding to the
+%   displacement at the previous time step (typically 'u' and 'Previous_u').
+%   The plastic multiplier should also have two versions (typically 'xi'
+%   and 'Previous_xi') the first one being defined as data if
+%   `unknowns_type ` is 'DISPLACEMENT_ONLY' or the integer value 0, or as
+%   a variable if `unknowns_type` is DISPLACEMENT_AND_PLASTIC_MULTIPLIER
+%   or the integer value 1.
+%   The plastic strain should represent a n x n data tensor field stored
+%   on mesh_fem or (preferably) on an im_data (corresponding to `mim`).
+%   The data are the first Lame coefficient, the second one (shear modulus)
+%   and the uniaxial yield stress. A typical call is
+%   gf_model_get(model M, 'add small strain elastoplasticity brick', mim, 
'Prandtl Reuss', 0, 'u', 'xi', 'Previous_Ep', 'lambda', 'mu', 'sigma_y', '1', 
'timestep');
+%   IMPORTANT: Note that this law implements
+%   the 3D expressions. If it is used in 2D, the expressions are just
+%   transposed to the 2D. For the plane strain approximation, see below.
+%   - "plane strain Prandtl Reuss"
+%   (or "plane strain isotropic perfect plasticity")
+%   The same law as the previous one but adapted to the plane strain
+%   approximation. Can only be used in 2D.
+%   - "Prandtl Reuss linear hardening"
+%   (or "isotropic plasticity linear hardening").
+%   Isotropic elasto-plasticity with linear isotropic and kinematic
+%   hardening. An additional variable compared to "Prandtl Reuss" law:
+%   the accumulated plastic strain. Similarly to the plastic strain, it
+%   is only stored at the end of the time step, so a simple data is
+%   required (preferably on an im_data).
+%   Two additional parameters: the kinematic hardening modulus and the
+%   isotropic one. 3D expressions only. A typical call is
+%   gf_model_get(model M, 'add small strain elastoplasticity brick', mim, 
'Prandtl Reuss linear hardening', 0, 'u', 'xi', 'Previous_Ep', 
'Previous_alpha', 'lambda', 'mu', 'sigma_y', 'H_k', H_i', '1', 'timestep');
+%   - "plane strain Prandtl Reuss linear hardening"
+%   (or "plane strain isotropic plasticity linear hardening").
+%   The same law as the previous one but adapted to the plane strain
+%   approximation. Can only be used in 2D.
+%   
+%   See GetFEM++ user documentation for further explanations on the
+%   discretization of the plastic flow and on the implemented plastic laws.
+%   See also GetFEM++ user documentation on time integration strategy
+%   (integration of transient problems).
+%   
+%   IMPORTANT : remember that `small_strain_elastoplasticity_next_iter` has
+%   to be called at the end of each time step, before the next one
+%   (and before any post-treatment : this sets the value of the plastic
+%   strain and plastic multiplier).
+%   
+%
+%   * ind = gf_model_set(model M, 'add elastoplasticity brick', mesh_im mim 
,string projname, string varname, string previous_dep_name, string datalambda, 
string datamu, string datathreshold, string datasigma[, int region])
+%   Old (obsolete) brick which do not use the high level generic
+%   assembly. Add a nonlinear elastoplastic term to the model relatively
+%   to the variable `varname`, in small deformations, for an isotropic
+%   material and for a quasistatic model. `projname` is the type of
+%   projection that used: only the Von Mises projection is
+%   available with 'VM' or 'Von Mises'.
+%   `datasigma` is the variable representing the constraints on the material.
+%   `previous_dep_name` represents the displacement at the previous time step.
+%   Moreover, the finite element method on which `varname` is described
+%   is an K ordered mesh_fem, the `datasigma` one have to be at least
+%   an K-1 ordered mesh_fem.
+%   `datalambda` and `datamu` are the Lame coefficients of the studied
+%   material.
+%   `datathreshold` is the plasticity threshold of the material.
+%   The three last variables could be constants or described on the
+%   same finite element method.
+%   `region` is an optional mesh region on which the term is added.
+%   If it is not specified, it is added on the whole mesh.
+%   Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add finite strain elastoplasticity brick', 
mesh_im mim , string lawname, string unknowns_type [, string varnames, ...] [, 
string params, ...] [, int region = -1])
+%   Add a finite strain elastoplasticity brick to the model.
+%   For the moment there is only one supported law defined through
+%   `lawname` as "Simo_Miehe".
+%   This law supports to possibilities of unknown variables to solve for
+%   defined by means of `unknowns_type` set to either
+%   'DISPLACEMENT_AND_PLASTIC_MULTIPLIER' (integer value 1) or
+%   'DISPLACEMENT_AND_PLASTIC_MULTIPLIER_AND_PRESSURE' (integer value 3).
+%   The  "Simo_Miehe" law expects as `varnames` a set of the
+%   following names that have to be defined as variables in the model:
+%   
+%   - the displacement variable which has to be defined as an unknown,
+%   - the plastic multiplier which has also defined as an unknown,
+%   - optionally the pressure variable for a mixed displacement-pressure
+%   formulation for 'DISPLACEMENT_AND_PLASTIC_MULTIPLIER_AND_PRESSURE'
+%   as `unknowns_type`,
+%   - the name of a (scalar) fem_data or im_data field that holds the
+%   plastic strain at the previous time step, and
+%   - the name of a fem_data or im_data field that holds all
+%   non-repeated components of the inverse of the plastic right
+%   Cauchy-Green tensor at the previous time step
+%   (it has to be a 4 element vector for plane strain 2D problems
+%   and a 6 element vector for 3D problems).
+%   
+%   The  "Simo_Miehe" law also expects as `params` a set of the
+%   following three parameters:
+%   
+%   - an expression for the initial bulk modulus K,
+%   - an expression for the initial shear modulus G,
+%   - the name of a user predefined function that decribes
+%   the yield limit as a function of the hardening variable
+%   (both the yield limit and the hardening variable values are
+%   assumed to be Frobenius norms of appropriate stress and strain
+%   tensors, respectively).
+%   
+%   As usual, `region` is an optional mesh region on which the term is added.
+%   If it is not specified, it is added on the whole mesh.
+%   Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add nonlinear incompressibility brick', 
mesh_im mim, string varname, string multname_pressure[, int region])
+%   Add a nonlinear incompressibility condition on `variable` (for large
+%   strain elasticity). `multname_pressure`
+%   is a variable which represent the pressure. Be aware that an inf-sup
+%   condition between the finite element method describing the pressure and the
+%   primal variable has to be satisfied. `region` is an optional mesh region on
+%   which the term is added. If it is not specified, it is added on the
+%   whole mesh. Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add finite strain incompressibility brick', 
mesh_im mim, string varname, string multname_pressure[, int region])
+%   Add a finite strain incompressibility condition on `variable` (for large
+%   strain elasticity). `multname_pressure`
+%   is a variable which represent the pressure. Be aware that an inf-sup
+%   condition between the finite element method describing the pressure and the
+%   primal variable has to be satisfied. `region` is an optional mesh region on
+%   which the term is added. If it is not specified, it is added on the
+%   whole mesh. Return the brick index in the model.
+%   This brick is equivalent to the ``nonlinear incompressibility brick`` but
+%   uses the high-level generic assembly adding the term
+%   ``p*(1-Det(Id(meshdim)+Grad_u))`` if ``p`` is the multiplier and
+%   ``u`` the variable which represent the displacement.
+%
+%   * ind = gf_model_set(model M, 'add bilaplacian brick', mesh_im mim, string 
varname, string dataname [, int region])
+%   Add a bilaplacian brick on the variable
+%   `varname` and on the mesh region `region`.
+%   This represent a term :math:`\Delta(D \Delta u)`.
+%   where :math:`D(x)` is a coefficient determined by `dataname` which
+%   could be constant or described on a f.e.m. The corresponding weak form
+%   is :math:`\int D(x)\Delta u(x) \Delta v(x) dx`.
+%   Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add Kirchhoff-Love plate brick', mesh_im 
mim, string varname, string dataname_D, string dataname_nu [, int region])
+%   Add a bilaplacian brick on the variable
+%   `varname` and on the mesh region `region`.
+%   This represent a term :math:`\Delta(D \Delta u)` where :math:`D(x)`
+%   is a the flexion modulus determined by `dataname_D`. The term is
+%   integrated by part following a Kirchhoff-Love plate model
+%   with `dataname_nu` the poisson ratio.
+%   Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add normal derivative source term brick', 
mesh_im mim, string varname, string dataname, int region)
+%   Add a normal derivative source term brick
+%   :math:`F = \int b.\partial_n v` on the variable `varname` and the
+%   mesh region `region`.
+%   
+%   Update the right hand side of the linear system.
+%   `dataname` represents `b` and `varname` represents `v`.
+%   Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add Kirchhoff-Love Neumann term brick', 
mesh_im mim, string varname, string dataname_M, string dataname_divM, int 
region)
+%   Add a Neumann term brick for Kirchhoff-Love model
+%   on the variable `varname` and the mesh region `region`.
+%   `dataname_M` represents the bending moment tensor and  `dataname_divM`
+%   its divergence.
+%   Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add normal derivative Dirichlet condition 
with multipliers', mesh_im mim, string varname, mult_description, int region [, 
string dataname, int R_must_be_derivated])
+%   Add a Dirichlet condition on the normal derivative of the variable
+%   `varname` and on the mesh region `region` (which should be a boundary.
+%   The general form is
+%   :math:`\int \partial_n u(x)v(x) = \int r(x)v(x) \forall v`
+%   where :math:`r(x)` is
+%   the right hand side for the Dirichlet condition (0 for
+%   homogeneous conditions) and :math:`v` is in a space of multipliers
+%   defined by `mult_description`.
+%   If `mult_description` is a string this is assumed
+%   to be the variable name corresponding to the multiplier (which should be
+%   first declared as a multiplier variable on the mesh region in the model).
+%   If it is a finite element method (mesh_fem object) then a multiplier
+%   variable will be added to the model and build on this finite element
+%   method (it will be restricted to the mesh region `region` and eventually
+%   some conflicting dofs with some other multiplier variables will be
+%   suppressed). If it is an integer, then a  multiplier variable will be
+%   added to the model and build on a classical finite element of degree
+%   that integer. `dataname` is an optional parameter which represents
+%   the right hand side of the Dirichlet condition.
+%   If `R_must_be_derivated` is set to `true` then the normal
+%   derivative of `dataname` is considered.
+%   Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add normal derivative Dirichlet condition 
with penalization', mesh_im mim, string varname, scalar coeff, int region [, 
string dataname, int R_must_be_derivated])
+%   Add a Dirichlet condition on the normal derivative of the variable
+%   `varname` and on the mesh region `region` (which should be a boundary.
+%   The general form is
+%   :math:`\int \partial_n u(x)v(x) = \int r(x)v(x) \forall v`
+%   where :math:`r(x)` is
+%   the right hand side for the Dirichlet condition (0 for
+%   homogeneous conditions).
+%   The penalization coefficient
+%   is initially `coeff` and will be added to the data of the model.
+%   It can be changed with the command gf_model_set(model M, 'change 
penalization coeff').
+%   `dataname` is an optional parameter which represents
+%   the right hand side of the Dirichlet condition.
+%   If `R_must_be_derivated` is set to `true` then the normal
+%   derivative of `dataname` is considered.
+%   Return the brick index in the model.
+%
+%   * ind = gf_model_set(model M, 'add Mindlin Reissner plate brick', mesh_im 
mim, mesh_im mim_reduced, string varname_u3, string varname_theta , string 
param_E, string param_nu, string param_epsilon, string param_kappa [,int 
variant [, int region]])
+%   Add a term corresponding to the classical Reissner-Mindlin plate
+%   model for which `varname_u3` is the transverse displacement,
+%   `varname_theta` the rotation of
+%   fibers normal to the midplane, 'param_E' the Young Modulus,
+%   `param_nu` the poisson ratio,
+%   `param_epsilon` the plate thickness,
+%   `param_kappa` the shear correction factor. Note that since this brick
+%   uses the high level generic assembly language, the parameter can
+%   be regular expression of this language.
+%   There are three variants.
+%   `variant = 0` corresponds to the an
+%   unreduced formulation and in that case only the integration
+%   method `mim` is used. Practically this variant is not usable since
+%   it is subject to a strong locking phenomenon.
+%   `variant = 1` corresponds to a reduced integration where `mim` is
+%   used for the rotation term and `mim_reduced` for the transverse
+%   shear term. `variant = 2` (default) corresponds to the projection onto
+%   a rotated RT0 element of the transverse shear term. For the moment, this
+%   is adapted to quadrilateral only (because it is not sufficient to
+%   remove the locking phenomenon on triangle elements). Note also that if
+%   you use high order elements, the projection on RT0 will reduce the order
+%   of the approximation.
+%   Returns the brick index in the model.
+%   
+%
+%   * ind = gf_model_set(model M, 'add mass brick', mesh_im mim, string 
varname[, string dataexpr_rho[, int region]])
+%   Add mass term to the model relatively to the variable `varname`.
+%   If specified, the data `dataexpr_rho` is the
+%   density (1 if omitted). `region` is an optional mesh region on
+%   which the term is added. If it is not specified, it
+%   is added on the whole mesh. Return the brick index in the model.
+%
+%   * gf_model_set(model M, 'shift variables for time integration')
+%   Function used to shift the variables of a model to the data
+%   corresponding of ther value on the previous time step for time
+%   integration schemes. For each variable for which a time integration
+%   scheme has been declared, the scheme is called to perform the shift.
+%   This function has to be called between two time steps.
+%
+%   * gf_model_set(model M, 'perform init time derivative', scalar ddt)
+%   By calling this function, indicates that the next solve will compute
+%   the solution for a (very) small time step `ddt` in order to initalize
+%   the data corresponding to the derivatives needed by time integration
+%   schemes (mainly the initial time derivative for order one in time
+%   problems  and the second order time derivative for second order in time
+%   problems). The next solve will not change the value of the variables.
+%
+%   * gf_model_set(model M, 'set time step', scalar dt)
+%   Set the value of the time step to `dt`. This value can be change
+%   from a step to another for all one-step schemes (i.e for the moment
+%   to all proposed time integration schemes).
+%
+%   * gf_model_set(model M, 'set time', scalar t)
+%   Set the value of the data `t` corresponding to the current time to `t`.
+%   
+%
+%   * gf_model_set(model M, 'add theta method for first order', string 
varname, scalar theta)
+%   Attach a theta method for the time discretization of the variable
+%   `varname`. Valid only if there is at most first order time derivative
+%   of the variable.
+%
+%   * gf_model_set(model M, 'add theta method for second order', string 
varname, scalar theta)
+%   Attach a theta method for the time discretization of the variable
+%   `varname`. Valid only if there is at most second order time derivative
+%   of the variable.
+%
+%   * gf_model_set(model M, 'add Newmark scheme', string varname, scalar beta, 
scalar gamma)
+%   Attach a theta method for the time discretization of the variable
+%   `varname`. Valid only if there is at most second order time derivative
+%   of the variable.
+%
+%   * gf_model_set(model M, 'disable bricks', ivec bricks_indices)
+%   Disable a brick (the brick will no longer participate to the
+%   building of the tangent linear system).
+%
+%   * gf_model_set(model M, 'enable bricks', ivec bricks_indices)
+%   Enable a disabled brick.
+%
+%   * gf_model_set(model M, 'disable variable', string varname)
+%   Disable a variable for a solve (and its attached multipliers).
+%   The next solve will operate only on
+%   the remaining variables. This allows to solve separately different
+%   parts of a model. If there is a strong coupling of the variables,
+%   a fixed point strategy can the be used.
+%
+%   * gf_model_set(model M, 'enable variable', string varname)
+%   Enable a disabled variable (and its attached multipliers).
+%
+%   * gf_model_set(model M, 'first iter')
+%   To be executed before the first iteration of a time integration
+%   scheme.
+%
+%   * gf_model_set(model M, 'next iter')
+%   To be executed at the end of each iteration of a time
+%   integration scheme.
+%
+%   * ind = gf_model_set(model M, 'add basic contact brick', string varname_u, 
string multname_n[, string multname_t], string dataname_r, spmat BN[, spmat BT, 
string dataname_friction_coeff][, string dataname_gap[, string dataname_alpha[, 
int augmented_version[, string dataname_gamma, string dataname_wt]]])
+%   
+%   Add a contact with or without friction brick to the model.
+%   If U is the vector
+%   of degrees of freedom on which the unilateral constraint is applied,
+%   the matrix `BN` have to be such that this constraint is defined by
+%   :math:`B_N U \le 0`. A friction condition can be considered by adding
+%   the three parameters `multname_t`, `BT` and `dataname_friction_coeff`.
+%   In this case, the tangential displacement is :math:`B_T U` and
+%   the matrix `BT` should have as many rows as `BN` multiplied by
+%   :math:`d-1` where :math:`d` is the domain dimension.
+%   In this case also, `dataname_friction_coeff` is a data which represents
+%   the coefficient of friction. It can be a scalar or a vector representing a
+%   value on each contact condition.  The unilateral constraint is prescribed
+%   thank to a multiplier
+%   `multname_n` whose dimension should be equal to the number of rows of
+%   `BN`. If a friction condition is added, it is prescribed with a
+%   multiplier `multname_t` whose dimension should be equal to the number
+%   of rows of `BT`. The augmentation parameter `r` should be chosen in
+%   a range of
+%   acceptabe values (see Getfem user documentation). `dataname_gap` is an
+%   optional parameter representing the initial gap. It can be a single value
+%   or a vector of value. `dataname_alpha` is an optional homogenization
+%   parameter for the augmentation parameter
+%   (see Getfem user documentation).  The parameter `augmented_version`
+%   indicates the augmentation strategy : 1 for the non-symmetric
+%   Alart-Curnier augmented Lagrangian, 2 for the symmetric one (except for
+%   the coupling between contact and Coulomb friction), 3 for the
+%   unsymmetric method with augmented multipliers, 4 for the unsymmetric
+%   method with augmented multipliers and De Saxce projection.
+%
+%   * ind = gf_model_set(model M, 'add basic contact brick two deformable 
bodies', string varname_u1, string varname_u2, string multname_n, string 
dataname_r, spmat BN1, spmat BN2[, string dataname_gap[, string 
dataname_alpha[, int augmented_version]]])
+%   
+%   Add a frictionless contact condition to the model between two deformable
+%   bodies. If U1, U2 are the vector
+%   of degrees of freedom on which the unilateral constraint is applied,
+%   the matrices `BN1` and `BN2` have to be such that this condition
+%   is defined by
+%   $B_{N1} U_1 B_{N2} U_2 + \le gap$. The constraint is prescribed thank
+%   to a multiplier
+%   `multname_n` whose dimension should be equal to the number of lines of
+%   `BN`. The augmentation parameter `r` should be chosen in a range of
+%   acceptabe values (see Getfem user documentation). `dataname_gap` is an
+%   optional parameter representing the initial gap. It can be a single value
+%   or a vector of value. `dataname_alpha` is an optional homogenization
+%   parameter for the augmentation parameter
+%   (see Getfem user documentation). The parameter `aug_version` indicates
+%   the augmentation strategy : 1 for the non-symmetric Alart-Curnier
+%   augmented Lagrangian, 2 for the symmetric one, 3 for the unsymmetric
+%   method with augmented multiplier.
+%
+%   * gf_model_set(model M, 'contact brick set BN', int indbrick, spmat BN)
+%   Can be used to set the BN matrix of a basic contact/friction brick.
+%
+%   * gf_model_set(model M, 'contact brick set BT', int indbrick, spmat BT)
+%   Can be used to set the BT matrix of a basic contact with
+%   friction brick.
+%
+%   * ind = gf_model_set(model M, 'add nodal contact with rigid obstacle 
brick',  mesh_im mim, string varname_u, string multname_n[, string multname_t], 
string dataname_r[, string dataname_friction_coeff], int region, string 
obstacle[,  int augmented_version])
+%   
+%   Add a contact with or without friction condition with a rigid obstacle
+%   to the model. The condition is applied on the variable `varname_u`
+%   on the boundary corresponding to `region`. The rigid obstacle should
+%   be described with the string `obstacle` being a signed distance to
+%   the obstacle. This string should be an expression where the coordinates
+%   are 'x', 'y' in 2D and 'x', 'y', 'z' in 3D. For instance, if the rigid
+%   obstacle correspond to :math:`z \le 0`, the corresponding signed distance
+%   will be simply "z". `multname_n` should be a fixed size variable whose size
+%   is the number of degrees of freedom on boundary `region`. It represents the
+%   contact equivalent nodal forces. In order to add a friction condition
+%   one has to add the `multname_t` and `dataname_friction_coeff` parameters.
+%   `multname_t` should be a fixed size variable whose size is
+%   the number of degrees of freedom on boundary `region` multiplied by
+%   :math:`d-1` where :math:`d` is the domain dimension. It represents
+%   the friction equivalent nodal forces.
+%   The augmentation parameter `r` should be chosen in a
+%   range of acceptabe values (close to the Young modulus of the elastic
+%   body, see Getfem user documentation).  `dataname_friction_coeff` is
+%   the friction coefficient. It could be a scalar or a vector of values
+%   representing the friction coefficient on each contact node.
+%   The parameter `augmented_version`
+%   indicates the augmentation strategy : 1 for the non-symmetric
+%   Alart-Curnier augmented Lagrangian, 2 for the symmetric one (except for
+%   the coupling between contact and Coulomb friction),
+%   3 for the new unsymmetric method.
+%   Basically, this brick compute the matrix BN
+%   and the vectors gap and alpha and calls the basic contact brick.
+%
+%   * ind = gf_model_set(model M, 'add contact with rigid obstacle brick',  
mesh_im mim, string varname_u, string multname_n[, string multname_t], string 
dataname_r[, string dataname_friction_coeff], int region, string obstacle[,  
int augmented_version])
+%   DEPRECATED FUNCTION. Use 'add nodal contact with rigid obstacle brick' 
instead.
+%
+%   * ind = gf_model_set(model M, 'add integral contact with rigid obstacle 
brick',  mesh_im mim, string varname_u, string multname, string 
dataname_obstacle, string dataname_r [, string dataname_friction_coeff], int 
region [, int option [, string dataname_alpha [, string dataname_wt [, string 
dataname_gamma [, string dataname_vt]]]]])
+%   
+%   Add a contact with or without friction condition with a rigid obstacle
+%   to the model. This brick adds a contact which is defined
+%   in an integral way. It is the direct approximation of an augmented
+%   Lagrangian formulation (see Getfem user documentation) defined at the
+%   continuous level. The advantage is a better scalability: the number of
+%   Newton iterations should be more or less independent of the mesh size.
+%   The contact condition is applied on the variable `varname_u`
+%   on the boundary corresponding to `region`. The rigid obstacle should
+%   be described with the data `dataname_obstacle` being a signed distance to
+%   the obstacle (interpolated on a finite element method).
+%   `multname` should be a fem variable representing the contact stress.
+%   An inf-sup condition beetween `multname` and `varname_u` is required.
+%   The augmentation parameter `dataname_r` should be chosen in a
+%   range of acceptabe values.
+%   The optional parameter `dataname_friction_coeff` is the friction
+%   coefficient which could be constant or defined on a finite element method.
+%   Possible values for `option` is 1 for the non-symmetric Alart-Curnier
+%   augmented Lagrangian method, 2 for the symmetric one, 3 for the
+%   non-symmetric Alart-Curnier method with an additional augmentation
+%   and 4 for a new unsymmetric method. The default value is 1.
+%   In case of contact with friction, `dataname_alpha` and `dataname_wt`
+%   are optional parameters to solve evolutionary friction problems.
+%   `dataname_gamma` and `dataname_vt` represent optional data for adding
+%   a parameter-dependent sliding velocity to the friction condition.
+%   
+%
+%   * ind = gf_model_set(model M, 'add penalized contact with rigid obstacle 
brick',  mesh_im mim, string varname_u, string dataname_obstacle, string 
dataname_r [, string dataname_coeff], int region [, int option, string 
dataname_lambda, [, string dataname_alpha [, string dataname_wt]]])
+%   
+%   Add a penalized contact with or without friction condition with a
+%   rigid obstacle to the model.
+%   The condition is applied on the variable `varname_u`
+%   on the boundary corresponding to `region`. The rigid obstacle should
+%   be described with the data `dataname_obstacle` being a signed distance to
+%   the obstacle (interpolated on a finite element method).
+%   The penalization parameter `dataname_r` should be chosen
+%   large enough to prescribe approximate non-penetration and friction
+%   conditions but not too large not to deteriorate too much the
+%   conditionning of the tangent system.
+%   `dataname_lambda` is an optional parameter used if option
+%   is 2. In that case, the penalization term is shifted by lambda (this
+%   allows the use of an Uzawa algorithm on the corresponding augmented
+%   Lagrangian formulation)
+%   
+%
+%   * ind = gf_model_set(model M, 'add Nitsche contact with rigid obstacle 
brick', mesh_im mim, string varname, string Neumannterm, string 
dataname_obstacle, string gamma0name,  int region[, scalar theta[, string 
dataname_friction_coeff[, string dataname_alpha, string dataname_wt]]])
+%   Adds a contact condition with or without Coulomb friction on the variable
+%   `varname` and the mesh boundary `region`. The contact condition
+%   is prescribed with Nitsche's method. The rigid obstacle should
+%   be described with the data `dataname_obstacle` being a signed distance to
+%   the obstacle (interpolated on a finite element method).
+%   `gamma0name` is the Nitsche's method parameter.
+%   `theta` is a scalar value which can be
+%   positive or negative. `theta = 1` corresponds to the standard symmetric
+%   method which is conditionnaly coercive for  `gamma0` small.
+%   `theta = -1` corresponds to the skew-symmetric method which is
+%   inconditionnaly coercive. `theta = 0` is the simplest method
+%   for which the second derivative of the Neumann term is not necessary.
+%   The optional parameter `dataname_friction_coeff` is the friction
+%   coefficient which could be constant or defined on a finite element
+%   method.
+%   CAUTION: This brick has to be added in the model after all the bricks
+%   corresponding to partial differential terms having a Neumann term.
+%   Moreover, This brick can only be applied to bricks declaring their
+%   Neumann terms. Returns the brick index in the model.
+%   
+%
+%   * ind = gf_model_set(model M, 'add Nitsche midpoint contact with rigid 
obstacle brick', mesh_im mim, string varname, string Neumannterm, string 
Neumannterm_wt, string dataname_obstacle, string gamma0name,  int region, 
scalar theta, string dataname_friction_coeff, string dataname_alpha, string 
dataname_wt)
+%   EXPERIMENTAL BRICK: for midpoint scheme only !!
+%   Adds a contact condition with or without Coulomb friction on the variable
+%   `varname` and the mesh boundary `region`. The contact condition
+%   is prescribed with Nitsche's method. The rigid obstacle should
+%   be described with the data `dataname_obstacle` being a signed distance to
+%   the obstacle (interpolated on a finite element method).
+%   `gamma0name` is the Nitsche's method parameter.
+%   `theta` is a scalar value which can be
+%   positive or negative. `theta = 1` corresponds to the standard symmetric
+%   method which is conditionnaly coercive for  `gamma0` small.
+%   `theta = -1` corresponds to the skew-symmetric method which is
+%   inconditionnaly coercive. `theta = 0` is the simplest method
+%   for which the second derivative of the Neumann term is not necessary.
+%   The optional parameter `dataname_friction_coeff` is the friction
+%   coefficient which could be constant or defined on a finite element
+%   method.
+%   Returns the brick index in the model.
+%   
+%   
+%
+%   * ind = gf_model_set(model M, 'add Nitsche fictitious domain contact 
brick', mesh_im mim, string varname1, string varname2, string dataname_d1, 
string dataname_d2, string gamma0name [, scalar theta[, string 
dataname_friction_coeff[, string dataname_alpha, string dataname_wt1,string 
dataname_wt2]]])
+%   Adds a contact condition with or without Coulomb friction between
+%   two bodies in a fictitious domain. The contact condition is applied on
+%   the variable `varname_u1` corresponds with the first and slave body
+%   with Nitsche's method and on the variable `varname_u2` corresponds
+%   with the second and master body with Nitsche's method.
+%   The contact condition is evaluated on the fictitious slave boundary.
+%   The first body should be described by the level-set `dataname_d1`
+%   and the second body should be described by the level-set `dataname_d2`.
+%   `gamma0name` is the Nitsche's method parameter.
+%   `theta` is a scalar value which can be positive or negative.
+%   `theta = 1` corresponds to the standard symmetric method which is
+%   conditionnaly coercive for  `gamma0` small.
+%   `theta = -1` corresponds to the skew-symmetric method which is 
inconditionnaly coercive.
+%   `theta = 0` is the simplest method for which the second derivative of
+%   the Neumann term is not necessary. The optional parameter 
`dataname_friction_coeff`
+%   is the friction coefficient which could be constant or defined on a finite 
element method.
+%   CAUTION: This brick has to be added in the model after all the bricks
+%   corresponding to partial differential terms having a Neumann term.
+%   Moreover, This brick can only be applied to bricks declaring their
+%   Neumann terms. Returns the brick index in the model.
+%   
+%
+%   * ind = gf_model_set(model M, 'add nodal contact between nonmatching 
meshes brick',  mesh_im mim1[, mesh_im mim2], string varname_u1[, string 
varname_u2], string multname_n[, string multname_t], string dataname_r[, string 
dataname_fr], int rg1, int rg2[, int slave1, int slave2,  int 
augmented_version])
+%   
+%   Add a contact with or without friction condition between two faces of
+%   one or two elastic bodies. The condition is applied on the variable
+%   `varname_u1` or the variables `varname_u1` and `varname_u2` depending
+%   if a single or two distinct displacement fields are given. Integers
+%   `rg1` and `rg2` represent the regions expected to come in contact with
+%   each other. In the single displacement variable case the regions defined
+%   in both `rg1` and `rg2` refer to the variable `varname_u1`. In the case
+%   of two displacement variables, `rg1` refers to `varname_u1` and `rg2`
+%   refers to `varname_u2`. `multname_n` should be a fixed size variable
+%   whose size is the number of degrees of freedom on those regions among
+%   the ones defined in `rg1` and `rg2` which are characterized as "slaves".
+%   It represents the contact equivalent nodal normal forces. `multname_t`
+%   should be a fixed size variable whose size corresponds to the size of
+%   `multname_n` multiplied by qdim - 1 . It represents the contact
+%   equivalent nodal tangent (frictional) forces. The augmentation parameter
+%   `r` should be chosen in a range of acceptabe values (close to the Young
+%   modulus of the elastic body, see Getfem user documentation). The
+%   friction coefficient stored in the parameter `fr` is either a single
+%   value or a vector of the same size as `multname_n`. The optional
+%   parameters `slave1` and `slave2` declare if the regions defined in `rg1`
+%   and `rg2` are correspondingly considered as "slaves". By default
+%   `slave1` is true and `slave2` is false, i.e. `rg1` contains the slave
+%   surfaces, while 'rg2' the master surfaces. Preferrably only one of
+%   `slave1` and `slave2` is set to true.  The parameter `augmented_version`
+%   indicates the augmentation strategy : 1 for the non-symmetric
+%   Alart-Curnier augmented Lagrangian, 2 for the symmetric one (except for
+%   the coupling between contact and Coulomb friction),
+%   3 for the new unsymmetric method.
+%   Basically, this brick computes the matrices BN and BT and the vectors
+%   gap and alpha and calls the basic contact brick.
+%
+%   * ind = gf_model_set(model M, 'add nonmatching meshes contact brick',  
mesh_im mim1[, mesh_im mim2], string varname_u1[, string varname_u2], string 
multname_n[, string multname_t], string dataname_r[, string dataname_fr], int 
rg1, int rg2[, int slave1, int slave2,  int augmented_version])
+%   DEPRECATED FUNCTION. Use 'add nodal contact between nonmatching meshes 
brick' instead.
+%
+%   * ind = gf_model_set(model M, 'add integral contact between nonmatching 
meshes brick',  mesh_im mim, string varname_u1, string varname_u2, string 
multname, string dataname_r [, string dataname_friction_coeff], int region1, 
int region2 [, int option [, string dataname_alpha [, string dataname_wt1 , 
string dataname_wt2]]])
+%   
+%   Add a contact with or without friction condition between nonmatching
+%   meshes to the model. This brick adds a contact which is defined
+%   in an integral way. It is the direct approximation of an augmented
+%   agrangian formulation (see Getfem user documentation) defined at the
+%   continuous level. The advantage should be a better scalability:
+%   the number of Newton iterations should be more or less independent
+%   of the mesh size.
+%   The condition is applied on the variables `varname_u1` and `varname_u2`
+%   on the boundaries corresponding to `region1` and `region2`.
+%   `multname` should be a fem variable representing the contact stress
+%   for the frictionless case and the contact and friction stress for the
+%   case with friction. An inf-sup condition between `multname` and
+%   `varname_u1` and `varname_u2` is required.
+%   The augmentation parameter `dataname_r` should be chosen in a
+%   range of acceptable values.
+%   The optional parameter `dataname_friction_coeff` is the friction
+%   coefficient which could be constant or defined on a finite element
+%   method on the same mesh as `varname_u1`.
+%   Possible values for `option` is 1 for the non-symmetric Alart-Curnier
+%   augmented Lagrangian method, 2 for the symmetric one, 3 for the
+%   non-symmetric Alart-Curnier method with an additional augmentation
+%   and 4 for a new unsymmetric method. The default value is 1.
+%   In case of contact with friction, `dataname_alpha`, `dataname_wt1` and
+%   `dataname_wt2` are optional parameters to solve evolutionary friction
+%   problems.
+%   
+%
+%   * ind = gf_model_set(model M, 'add penalized contact between nonmatching 
meshes brick',  mesh_im mim, string varname_u1, string varname_u2, string 
dataname_r [, string dataname_coeff], int region1, int region2 [, int option [, 
string dataname_lambda, [, string dataname_alpha [, string dataname_wt1, string 
dataname_wt2]]]])
+%   
+%   Add a penalized contact condition with or without friction between
+%   nonmatching meshes to the model.
+%   The condition is applied on the variables `varname_u1` and  `varname_u2`
+%   on the boundaries corresponding to `region1` and `region2`.
+%   The penalization parameter `dataname_r` should be chosen
+%   large enough to prescribe approximate non-penetration and friction
+%   conditions but not too large not to deteriorate too much the
+%   conditionning of the tangent system.
+%   The optional parameter `dataname_friction_coeff` is the friction
+%   coefficient which could be constant or defined on a finite element
+%   method on the same mesh as `varname_u1`.
+%   `dataname_lambda` is an optional parameter used if option
+%   is 2. In that case, the penalization term is shifted by lambda (this
+%   allows the use of an Uzawa algorithm on the corresponding augmented
+%   Lagrangian formulation)
+%   In case of contact with friction, `dataname_alpha`, `dataname_wt1` and
+%   `dataname_wt2` are optional parameters to solve evolutionary friction
+%   problems.
+%   
+%
+%   * ind = gf_model_set(model M, 'add integral large sliding contact brick 
raytracing', string dataname_r, scalar release_distance, [, string 
dataname_fr[, string dataname_alpha[, int version]]])
+%   Adds a large sliding contact with friction brick to the model.
+%   This brick is able to deal with self-contact, contact between
+%   several deformable bodies and contact with rigid obstacles.
+%   It uses the high-level generic assembly. It adds to the model
+%   a raytracing_interpolate_transformation object.
+%   For each slave boundary a multiplier variable should be defined.
+%   The release distance should be determined with care
+%   (generally a few times a mean element size, and less than the
+%   thickness of the body). Initially, the brick is added with no contact
+%   boundaries. The contact boundaries and rigid bodies are added with
+%   special functions. `version` is 0 (the default value) for the
+%   non-symmetric version and 1 for the more symmetric one
+%   (not fully symmetric even without friction).
+%
+%   * gf_model_set(model M, 'add rigid obstacle to large sliding contact 
brick', int indbrick, string expr, int N)
+%   Adds a rigid obstacle to an existing large sliding contact
+%   with friction brick. `expr` is an expression using the high-level
+%   generic assembly language (where `x` is the current point n the mesh)
+%   which should be a signed distance to the obstacle.
+%   `N` is the mesh dimension.
+%
+%   * gf_model_set(model M, 'add master contact boundary to large sliding 
contact brick', int indbrick, mesh_im mim, int region, string dispname[, string 
wname])
+%   Adds a master contact boundary to an existing large sliding contact
+%   with friction brick.
+%
+%   * gf_model_set(model M, 'add slave contact boundary to large sliding 
contact brick', int indbrick, mesh_im mim, int region, string dispname, string 
lambdaname[, string wname])
+%   Adds a slave contact boundary to an existing large sliding contact
+%   with friction brick.
+%
+%   * gf_model_set(model M, 'add master slave contact boundary to large 
sliding contact brick', int indbrick, mesh_im mim, int region, string dispname, 
string lambdaname[, string wname])
+%   Adds a contact boundary to an existing large sliding contact
+%   with friction brick which is both master and slave
+%   (allowing the self-contact).
+%
+%   * ind = gf_model_set(model M, 'add Nitsche large sliding contact brick 
raytracing', bool unbiased_version, string dataname_r, scalar 
release_distance[, string dataname_fr[, string dataname_alpha[, int version]]])
+%   Adds a large sliding contact with friction brick to the model based on the 
Nitsche's method.
+%   This brick is able to deal with self-contact, contact between
+%   several deformable bodies and contact with rigid obstacles.
+%   It uses the high-level generic assembly. It adds to the model
+%   a raytracing_interpolate_transformation object. "unbiased_version" refers 
to the version of Nische's method to be used.
+%   (unbiased or biased one).
+%   For each slave boundary a  material law should be defined as a function of 
the dispacement variable on this boundary.
+%   The release distance should be determined with care
+%   (generally a few times a mean element size, and less than the
+%   thickness of the body). Initially, the brick is added with no contact
+%   boundaries. The contact boundaries and rigid bodies are added with
+%   special functions. `version` is 0 (the default value) for the
+%   non-symmetric version and 1 for the more symmetric one
+%   (not fully symmetric even without friction).
+%
+%   * gf_model_set(model M, 'add rigid obstacle to Nitsche large sliding 
contact brick', int indbrick, string expr, int N)
+%   Adds a rigid obstacle to an existing large sliding contact
+%   with friction brick. `expr` is an expression using the high-level
+%   generic assembly language (where `x` is the current point n the mesh)
+%   which should be a signed distance to the obstacle.
+%   `N` is the mesh dimension.
+%
+%   * gf_model_set(model M, 'add master contact boundary to biased Nitsche 
large sliding contact brick', int indbrick, mesh_im mim, int region, string 
dispname[, string wname])
+%   Adds a master contact boundary to an existing biased Nitsche's large 
sliding contact
+%   with friction brick.
+%
+%   * gf_model_set(model M, 'add slave contact boundary to biased Nitsche 
large sliding contact brick', int indbrick, mesh_im mim, int region, string 
dispname, string lambdaname[, string wname])
+%   Adds a slave contact boundary to an existing biased Nitsche's large 
sliding contact
+%   with friction brick.
+%
+%   * gf_model_set(model M, 'add contact boundary to unbiased Nitsche large 
sliding contact brick', int indbrick, mesh_im mim, int region, string dispname, 
string lambdaname[, string wname])
+%   Adds a contact boundary to an existing unbiased Nitschelarge sliding 
contact
+%   with friction brick which is both master and slave.
+%
+%
+function [varargout]=gf_model_set(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('model_set', varargin{:});
+  else
+    gf_matlab('model_set', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_plot.m b/interface/src/octave/gf_plot.m
new file mode 100644
index 0000000..5128a0b
--- /dev/null
+++ b/interface/src/octave/gf_plot.m
@@ -0,0 +1,279 @@
+function [hsurf, hcontour, hquiver, hmesh, hdefmesh]=gf_plot(mf,U,varargin)
+% function h=gf_plot(mf,U,varargin)
+% this function plots a 2D or 3D finite elements field.
+%
+% The options are specified as pairs of "option name"/"option value"
+%  
+%  'zplot',{'off'|'on'}       : only for qdim=1, mdim=2
+%  'norm', {'off'|'on'}       : if qdim >= 2, color-plot the norm of the field
+%  'dir',[]                  : or the scalar product of the field with 'dir' 
+%                               (can be a vector, or 'x', 'y' etc..)
+%  'refine',8                : nb of refinments for curved edges and surface 
plots
+%  'interpolated',{'off'|'on'}: if triangular patch are interpolated
+%  'pcolor',{'on'|'off'}      : if the field is scalar, a color plot of its 
values is plotted
+%  'quiver',{'on'|'off'}      : if the field is vector, represent arrows       
       
+%  'quiver_density',50        : density of arrows in quiver plot
+%  'quiver_scale',1           : scaling of arrows (0=>no scaling)
+%  'mesh',{'off'|'on'}       : show the mesh ?
+%  'meshopts',{cell(0)}                 : cell array of options passed to 
gf_plot_slice for the mesh 
+%  'deformed_mesh', {'off'|'on'} : shows the deformed mesh (only when qdim == 
mdim)
+%  'deformed_meshopts', {cell(0)}: cell array of options passed to 
gf_plot_slice 
+%                                  for the deformed mesh 
+%  'deformation',[]          : plots on the deformed object (only when qdim == 
mdim)
+%  'deformation_mf',[]        : plots on the deformed object (only when qdim 
== mdim)
+%  'deformation_scale','10%'  : indicate the amplitude of the deformation. Can 
be 
+%                               a percentage of the mesh width if given as a 
string, 
+%                               or an absolute value if given as a number
+%  'cvlst',[]                : list of convexes to plot (empty=>all convexes)
+%  'title',[]                 : set the title
+%  'contour',[]               : list of contour values
+%  'disp_options', {'off'|'on'} : shows the option or not.
+%
+%
+%  Copyright (C) 1999-2017 Yves Renard
+%
+%  This file is a part of GetFEM++
+%
+%  GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+%  under  the  terms  of the  GNU  Lesser General Public License as published
+%  by  the  Free Software Foundation;  either version 3 of the License,  or
+%  (at your option) any later version along with the GCC Runtime Library
+%  Exception either version 3.1 or (at your option) any later version.
+%  This program  is  distributed  in  the  hope  that it will be useful,  but
+%  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+%  or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+%  License and GCC Runtime Library Exception for more details.
+%  You  should  have received a copy of the GNU Lesser General Public License
+%  along  with  this program;  if not, write to the Free Software Foundation,
+%  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+
+  try 
+    gf_workspace('push');
+    [hsurf, hcontour, hquiver, hmesh, hdefmesh]=gf_plot_aux(mf,U,varargin{:});
+  catch
+    disp(['error in gf_plot : ' lasterr]);
+  end;
+  gf_workspace('pop');
+  
+
+function [hsurf, hcontour, hquiver, hmesh, hdefmesh]=gf_plot_aux(mf,U,varargin)
+  if nargin<2,
+    error('Too few input arguments')
+  end
+
+  hsurf=[];
+  hcontour={};
+  hquiver=[];
+  hmesh=[];
+  hdefmesh=[];
+    
+  try
+    mf=struct(mf);
+    qdim = gf_mesh_fem_get(mf, 'qdim');
+    mdim = gf_mesh_get(mf, 'dim'); mdim3=mdim*3;
+  catch
+    error(['invalid mesh_fem ? -- ' lasterr]);
+  end;
+
+  if (mdim == 1),
+    hsurf = gf_plot_1D(mf,U,varargin{:});
+    return;
+  end;
+  
+  if (mdim ~= 2 & mdim ~= 3),
+    error('only 2D and 3D mesh are handled by this function');
+  end;
+  
+  opt = struct('zplot','off',...   % only for qdim=1, mdim=2
+              'norm','off',...     % if qdim >= 2, color-plot the norm of the 
field
+              'dir',[],...       % or the scalar product of the field with 
'dir' (can be a vector, or 'x', 'y' etc..)
+              'refine',8,...         % nb of refinments for curved edges and 
surface plots
+              'interpolated','off',... %if triangular patch are interpolated
+              'pcolor','on',... % if the field is scalar, a color plot of its 
values is plotted
+              'quiver','on',... % if the field is vector, represent arrows     
       
+              'quiver_density',50,... % density of arrows in quiver plot
+              'quiver_scale',1,... % scaling of arrows (0=>no scaling)
+              'mesh','off',...  % show the mesh ?
+              'meshopts',{cell(0)},... % cell array of options passed to 
gf_plot_slice for the mesh 
+              'deformed_mesh', 'off',... % shows the deformed mesh (only when 
qdim == mdim)
+              'deformed_meshopts', {cell(0)},... % cell array of options 
passed to gf_plot_slice for the deformed mesh 
+              'deformation',[],... % plots on the deformed object (only when 
qdim == mdim)
+              'deformation_mf',[],... % plots on the deformed object (only 
when qdim == mdim)
+              'deformation_scale','10%',... % indicate the amplitude of the 
deformation. Can be a percentage of the mesh width if given as a string, or an 
absolute value if given as a number
+              'cvlst',[],... % list of convexes to plot
+              'title',[],...
+              'contour',[],...
+               'mesh_level_set',[], ... % list of contour values
+              'disp_options', 'on');
+
+  opt = getopt(opt,varargin);
+
+  if (ison(opt.disp_options))
+    disp(opt);
+  end;
+  if (ison(opt.zplot))
+    if (mdim ~= 2),
+      error('zplot allowed only on 2D scalar mesh_fems');
+    else opt.interpolated = 'on'; % or patch won't work
+    end;
+  end;
+  is_scalarplot = (ison(opt.norm) + ~isempty(opt.dir));
+  if (is_scalarplot > 1),
+    error('only one occurence of the options ''norm'' and ''dir'' is allowed');
+  end;
+  if (ischar(opt.dir)),
+    v = zeros(1,qdim);
+    if (strcmp(opt.dir,'x'))
+      v(1)=1;
+    elseif (strcmp(opt.dir,'y'))
+      v(2)=1;
+    elseif (strcmp(opt.dir,'z'))
+      v(3)=1;
+    else error('wrong direction');
+    end;
+    opt.dir=v;
+  end;
+  scalarplot_dir=opt.dir(:);
+  if (qdim == 1) is_scalarplot = 1; scalarplot_dir=1; end;
+  if (~isempty(opt.contour) & ~is_scalarplot),
+    error('contour plot has no meaning for a vector field');
+  end;
+  mfdef = mf;
+  if (~isempty(opt.deformation_mf)) mfdef = struct(opt.deformation_mf); end;
+  dqdim = gf_mesh_fem_get(mfdef,'qdim');
+  if (~isempty(opt.deformation) | ison(opt.deformed_mesh)),
+    if (mdim ~= dqdim & ~ison(opt.zplot)),
+      error(sprintf('can''t plot the deformation of an %dD-object by a 
%dD-field',mdim,dqdim));
+    end;
+  end;
+
+  if (isempty(opt.cvlst)), opt.cvlst = gf_mesh_get(mf,'cvid'); end;
+
+  nbdof=gf_mesh_fem_get(mf,'nbdof');
+  if (nbdof <= 0), error('invalid finite element mf argument'); end
+
+  if (length(U) ~= nbdof),
+    error(['wrong dimensions for U, should' ...
+          ' have ' int2str(nbdof) 'columns']); 
+  end
+
+  % save graphical context
+  cax = newplot;
+  cfig = get(cax,'Parent');
+  hold_state = ishold;
+  ax_nextplot = lower(get(cax,'NextPlot'));
+  fig_nextplot = lower(get(cfig,'NextPlot'));
+
+  if (ison(opt.zplot) | mdim == 3), view(3); else view(2); end;
+  
+  % build the slice object
+  try
+    if (~isempty(opt.mesh_level_set)),
+      sl = gf_slice({'none'},opt.mesh_level_set,opt.refine,opt.cvlst);
+    elseif (gf_mesh_fem_get(mf, 'has_linked_mesh_levelset')),
+      sl  = 
gf_slice({'none'},gf_mesh_fem_get(mf,'linked_mesh_levelset'),opt.refine,opt.cvlst);
+    else
+      sl  = gf_slice({'none'},gf_mesh_fem_get(mf,'linked 
mesh'),opt.refine,opt.cvlst);
+    end;
+  catch
+    error(['can''t build slice : ' lasterr]);
+  end;
+  try
+    Usl = gf_compute(mf,U,'interpolate on',sl);
+  catch
+    error(['can''t interpolate on slice : ' lasterr]);
+  end;  
+  Psl = gf_slice_get(sl,'pts');
+
+  % plot the original mesh
+  if (ison(opt.mesh)), 
+    hmesh={gf_plot_slice(sl,'mesh','on',opt.meshopts{:})};
+    hold on;
+  end;
+
+  % apply the optional deformation
+  if (~isempty(opt.deformation) | mfdef.id ~= mf.id),
+    ida = gf_mesh_fem_get(mfdef,'linked mesh'); idb = 
gf_mesh_fem_get(mf,'linked mesh');
+    if (ida.id ~= idb.id),
+      error('the deformation mesh_fem and the data mesh_fem do not seem to 
share the same mesh');
+    end;
+    if (~isempty(opt.deformation)), Udef = opt.deformation;
+    else Udef = U;
+    end;
+    Pdef  = gf_compute(mfdef, Udef, 'interpolate on', sl);
+    if (isnumeric(opt.deformation_scale)), dscale = opt.deformation_scale;
+    elseif (ischar(opt.deformation_scale) & ...
+           numel(opt.deformation_scale) & opt.deformation_scale(end)=='%'),
+      dscale = str2num(opt.deformation_scale(1:end-1));
+      mwidth = max([max(Psl,[],2) - min(Psl,[],2)]);
+      defmax = max(abs(Pdef(:)));
+      if (defmax),     
+       dscale = dscale * 0.01 * mwidth / defmax;
+      end;
+    else error('wrong value for deformation_scale: should be a number or a 
percentage in a string');
+    end;
+    Psl = Psl + Pdef*dscale;
+    gf_slice_set(sl,'pts', Psl);    
+    clear Pdef Udef dscale mwidth defmax;
+  end;
+
+  if (is_scalarplot),
+    % compute scalar values if necessary
+    if (ison(opt.norm)),
+      sV = sqrt(sum(Usl.*conj(Usl),1));
+    else
+      sV = scalarplot_dir(:)'*Usl;
+    end;
+    % and optionally apply the zplot deformation
+    if (ison(opt.pcolor) & ison(opt.zplot) & is_scalarplot),
+      Psl = [Psl;sV]; gf_slice_set(sl,'pts',Psl);
+    end;
+  end;
+  
+  % plot the deformed mesh
+  if (ison(opt.deformed_mesh)),
+    hdefmesh={gf_plot_slice(sl,'mesh','on', opt.deformed_meshopts{:})};
+    hold on; 
+  end;
+
+  if (is_scalarplot),
+    % plot the 'surfacic' part
+    if (ison(opt.pcolor)),
+      gf_plot_slice(sl,'mesh','off','data',sV);
+    end;
+    
+    % basic contour plot (should work also on 3D surfaces)
+    contour_colors = [.9 0 0; 0 .8 0; .0 0 .6; .6 .6 0; .7 0 .7; 0 .7 .9]; 
+    contour_linestyle = get(cax,'LineStyleOrder');
+    hcontour=cell(numel(opt.contour),1);
+    for cnum=1:numel(opt.contour),
+      c=opt.contour(cnum);
+      slC = gf_slice({'isovalues',0,mf,U,c},sl);
+      [a,b,c,hcontour{cnum}]=gf_plot_slice(slC,'tube','off','mesh','off');
+      if (~isempty(hcontour{cnum})),
+        set(hcontour{cnum},...
+            'Color',contour_colors(mod(cnum,size(contour_colors,1))+1,:),...
+            
'LineStyle',contour_linestyle(mod(cnum,numel(contour_linestyle))+1),...
+            'LineWidth',1);
+      end;
+      gf_delete(slC);
+    end;
+  else
+    
[a,b,hquiver,c]=gf_plot_slice(sl,'data',Usl,'quiver','on','quiver_density',opt.quiver_density,'quiver_scale',opt.quiver_scale);
+  end
+  
+  if (~hold_state),
+    set(cax,'DataAspectRatio', [1 1 1]);
+    set(cax,'XLimMode','auto');
+    set(cax,'YLimMode','auto');
+    set(cax,'ZLimMode','auto');
+  end;
+  
+  % restore graphical context
+  set(cax,'NextPlot',ax_nextplot);
+  set(cfig,'NextPlot',fig_nextplot);
+
+
+function r=ison(v)
+  r = strcmpi(v,'on');
+  
diff --git a/interface/src/octave/gf_plot_1D.m 
b/interface/src/octave/gf_plot_1D.m
new file mode 100644
index 0000000..2cbd142
--- /dev/null
+++ b/interface/src/octave/gf_plot_1D.m
@@ -0,0 +1,101 @@
+function [hline, hdof] = gf_plot_1D(mf,U, varargin)
+% function h=gf_plot_1D(mf,U,...)
+% this function plots a 1D finite elements field.
+%
+% The options are specified as pairs of "option name"/"option value"
+%  'style', 'bo-'       : the line style and dof marker style (same
+%                         syntax as in the matlab command 'plot').
+%  'color', []          : override the line color.
+%  'dof_color', [1,0,0] : color of the markers for the degrees of freedom.
+%  'width', 2           : line width.
+%  Copyright (C) 1999-2017 Yves Renard
+%
+%  This file is a part of GetFEM++
+%
+%  GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+%  under  the  terms  of the  GNU  Lesser General Public License as published
+%  by  the  Free Software Foundation;  either version 3 of the License,  or
+%  (at your option) any later version along with the GCC Runtime Library
+%  Exception either version 3.1 or (at your option) any later version.
+%  This program  is  distributed  in  the  hope  that it will be useful,  but
+%  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+%  or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+%  License and GCC Runtime Library Exception for more details.
+%  You  should  have received a copy of the GNU Lesser General Public License
+%  along  with  this program;  if not, write to the Free Software Foundation,
+%  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+
+  try 
+    gf_workspace('push', 'gf_plot_1D');
+    [hline, hdof] = gf_plot_1D_aux(mf,U, varargin{:});
+  catch
+    disp(['error in gf_plot_1D : ' lasterr]);
+  end;
+  gf_workspace('pop');
+
+  
+function [hline, hdof] = gf_plot_1D_aux(mf, U, varargin)
+  opt = struct('style', 'bo-',...
+              'color', [], ...
+              'dof_color', [1, 0, 0],...
+              'width', 2);
+  
+  % parse argument list
+  opt = getopt(opt,varargin);
+  
+  % try to remove markers from the line style
+  s = opt.style; opt.style = ''; opt.dof_marker = '';
+  for i=s,
+    if (isempty(strfind('ox+*sdv^<>ph',i))),
+      opt.style = [opt.style i];
+    else
+      opt.dof_marker = i;
+    end;
+  end;
+  
+  % save graphical context
+  cax = newplot;
+  cfig = get(cax,'Parent');
+  hold_state = ishold;
+  ax_nextplot = lower(get(cax,'NextPlot'));
+  fig_nextplot = lower(get(cfig,'NextPlot'));
+
+  nbd=gf_mesh_fem_get(mf, 'nbdof');
+  if (nbd < 100)
+    REFINE = 32;
+  elseif (nbd < 1000)
+    REFINE = 6;
+  else
+    REFINE = 2;
+  end;
+  m=gf_mesh_fem_get(mf, 'linked_mesh');
+  sl=gf_slice({'none'},m, REFINE); 
+  Usl = gf_compute(mf,U,'interpolate on', sl);
+  D = unique(gf_mesh_fem_get(mf, 'basic dof nodes'));
+  slD = gf_slice('points', m, D);
+  UD  = gf_compute(mf,U,'interpolate on',slD);
+  
+  X = gf_slice_get(sl, 'pts');
+  Y = Usl;
+  hline = plot(X, Y, opt.style); 
+  set(hline, 'LineWidth', opt.width);
+  if (~isempty(opt.color)), set(hline, 'Color', opt.color); end;
+  %get(hline, 'Color')
+  hdof = [];
+  if (~isempty(opt.dof_marker)),
+    hold on;
+    hdof = scatter(gf_slice_get(slD, 'pts'), UD, opt.dof_marker);
+    set(hdof, 'CData', opt.dof_color);
+    hold off;
+  end;
+  
+  if (~hold_state),
+    set(cax,'XLimMode','auto');
+    set(cax,'YLimMode','auto');
+    set(cax,'ZLimMode','auto');
+  end;
+  
+  % restore graphical context
+  set(cax,'NextPlot',ax_nextplot);
+  set(cfig,'NextPlot',fig_nextplot);
+  
diff --git a/interface/src/octave/gf_plot_mesh.m 
b/interface/src/octave/gf_plot_mesh.m
new file mode 100644
index 0000000..a37e6c2
--- /dev/null
+++ b/interface/src/octave/gf_plot_mesh.m
@@ -0,0 +1,288 @@
+function [hmesh,hbound,hfill,hvert,hconv,hdof]=gf_plot_mesh(M, varargin)
+% function [hmesh,hbound,hfill,hvert,hconv,hdof]=gf_plot_mesh(M, [,properties])
+%                     [,'cvlst',CVLST] ['boundaries'[BLST]])
+%   General mesh plotting function.
+%  
+%   H=gf_plot_mesh(M) displays a mesh.
+%
+%   properties are:
+%    'vertices', {'off'|'on'}     displays also vertices numbers. 
+%    'convexes', {'off'|'on'}     displays also convexes numbers. 
+%    'dof',{'off'|'on'}           displays also finite element nodes.
+%    'regions',BLST               displays the boundaries listed in BLST.
+%    'cvlst',CVLST                display only the listed convexes. If
+%   CVLST has two rows, display only the faces listed in the second row.
+%    'edges', {'on' | 'off'}      display edges ?
+%    'faces', {'off'|'on'}        fills each 2D-face of the mesh
+%    'curved', {'off'|'on'}       displays curved edges
+%    'refine',N                   refine curved edges and filled faces N times 
 
+%    'deformation', Udef          optionnal deformation applied to the mesh (M 
must be a mesh_fem object)
+%    'edges_color',[.6 .6 1]      RGB values for the color of edges
+%    'edges_width',1              
+%    'faces_color',[.75 .75 .75]) RGB values for the color of faces
+%    'quality',{ 'off' | 'on' }   Display the quality of the mesh.
+%
+%   CAUTION:
+%     For 'dof', M should be a mesh_fem identifier, 
+%   not a simple mesh object.
+%  
+%   $Id$
+%  Copyright (C) 1999-2017 A. Huard, Y. Renard, J. Pommier
+%
+%  This file is a part of GetFEM++
+%
+%  GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+%  under  the  terms  of the  GNU  Lesser General Public License as published
+%  by  the  Free Software Foundation;  either version 3 of the License,  or
+%  (at your option) any later version along with the GCC Runtime Library
+%  Exception either version 3.1 or (at your option) any later version.
+%  This program  is  distributed  in  the  hope  that it will be useful,  but
+%  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+%  or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+%  License and GCC Runtime Library Exception for more details.
+%  You  should  have received a copy of the GNU Lesser General Public License
+%  along  with  this program;  if not, write to the Free Software Foundation,
+%  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+
+if nargin<1,
+  error('Too few input arguments')
+end
+hmesh=[];
+hbound=[];
+hfill=[];
+hvert=[];
+hconv=[];
+hdof=[];
+
+mdim = gf_mesh_get(M,'dim');
+if (mdim <= 2),
+  defaultref=8;
+else 
+  defaultref=4;
+end;
+opt = struct('vertices','off',...
+            'convexes','off',...
+            'dof','off',...
+            'regions',[],...
+            'boundaries',[],...
+            'cvlst',[],...
+            'edges','on',...
+            'faces','off',...
+            'explode',0,...
+            'quality','off',...
+            'curved','off',...
+            'refine',defaultref,...
+            'deformation',[],...
+            'edges_color',[.6 .6 1],...
+            'edges_width',.7,...
+            'faces_color',[.75 .75 .75]);
+
+% parse argument list
+opt = getopt(opt,varargin);
+
+if (numel(opt.boundaries) == 0),
+  opt.boundaries = opt.regions;
+end;
+
+if (strcmpi(opt.boundaries, 'all')),
+  opt.boundaries = gf_mesh_get(M, 'boundaries');
+end;
+
+% init cvlst and cvflst
+if (isempty(opt.cvlst)) 
+  cvlst = gf_mesh_get(M,'cvid'); 
+  cvflst = [cvlst; zeros(1,numel(cvlst))];
+else 
+  cvlst = opt.cvlst;
+  cvflst = cvlst;  
+  if (size(cvflst,1)==2),
+    cvlst = unique(cvlst(1,:));
+  end;
+end;
+
+PXY = gf_mesh_get(M, 'pts');
+
+E = gf_mesh_get(M, 'edges', cvflst);
+if (~ison(opt.curved) & isempty(opt.deformation)),
+  X = [PXY(1,E(1,:)); PXY(1,E(2,:))];
+  if (mdim == 1),
+    Y = zeros(size(X));
+    PXY = [PXY; zeros(size(PXY))];
+  elseif (mdim >= 2),
+    Y = [PXY(2,E(1,:)); PXY(2,E(2,:))];
+    if (mdim == 3),
+      Z = [PXY(3,E(1,:)); PXY(3,E(2,:))];
+    end;
+  end;
+else
+  % here, mdim is always >= 2
+  if (~isempty(opt.deformation)),
+    vE = gf_compute(M,opt.deformation,'mesh edges 
deformation',opt.refine,cvflst);
+  else
+    vE = gf_mesh_get(M, 'curved edges', opt.refine, cvflst);
+  end;
+  ni = size(vE,2);
+  ne = size(vE,3);
+  X = reshape(vE(1,:,:), [ni ne]);
+  Y = reshape(vE(2,:,:), [ni ne]);
+  if (mdim == 3),
+    Z = reshape(vE(3,:,:), [ni ne]);
+  end;
+end;
+
+% get the viewable pts id
+PID = union(E(1,:),E(2,:));
+if (mdim > 3), error('sorry, only mesh of dimension <= 3 allowed'); end;
+nbpts = size(PXY,2);
+
+Bmax  = max(PXY(:,PID)')';
+Bmin  = min(PXY(:,PID)')';
+Bdiff = Bmax - Bmin;
+Bdiff = Bdiff + (Bdiff == 0); % remplace 0.0 par 1.0
+ecart=Bdiff/150;
+
+
+
+if (ison(opt.convexes)),
+  cv_center = zeros(max(mdim,2),numel(cvlst));
+  % find convexes centers
+  [cv_pid, cv_idx] = gf_mesh_get(M, 'pid from cvid',cvlst);
+  for i=1:length(cvlst),
+    cv_center(:,i) = mean(PXY(:, 
cv_pid(double(cv_idx(i)):double(cv_idx(i+1))-1)),2);
+  end;
+end;
+
+if (ison(opt.dof)),
+  Q = gf_mesh_fem_get(M, 'qdim');
+  dofid = gf_mesh_fem_get(M, 'dof from cv', cvlst);
+  [dofpos] = gf_mesh_fem_get(M, 'dof nodes', dofid);
+  [keep] = find([1 any(dofpos(:,2:end) ~= dofpos(:,1:end-1),1)]);
+  dofmult = [keep(2:end)-keep(1:end-1) size(dofpos,2)+1-keep(end)];
+  dofpos = dofpos(:, keep); dofid = dofid(keep);
+  if (mdim == 1) dofpos = [dofpos; zeros(size(dofpos))]; end;
+end;
+
+for bnum=1:length(opt.boundaries),
+  cvf = gf_mesh_get(M, 'boundary', opt.boundaries(bnum));
+  
+  bid = gf_mesh_get(M, 'edges', cvf, 'merge convex');
+  if (bnum == 8) disp(bid); end;
+  
+  bedge{bnum} = zeros(2, size(bid,2), mdim);
+  for i=1:max(mdim,2),
+    bedge{bnum}(:,:,i) = [PXY(i,bid(1,:)); PXY(i,bid(2,:))];
+  end;
+end;
+
+% save graphical context
+cax = newplot;
+cfig = get(cax,'Parent');
+hold_state = ishold;
+ax_nextplot = lower(get(cax,'NextPlot'));
+fig_nextplot = lower(get(cfig,'NextPlot'));
+
+disp('plotting mesh...');
+if (mdim <= 2),
+  if (ison(opt.edges)) 
+    hmesh = line(X, Y, 'Color',opt.edges_color,'LineWidth',opt.edges_width); 
+  end;
+  for bnum=1:length(opt.boundaries),
+    hbound{bnum} = line(bedge{bnum}(:,:,1), bedge{bnum}(:,:,2), 
'Color','red','LineWidth',2);
+  end
+  if (ison(opt.vertices)),
+    hvert = text(PXY(1,PID)+ecart(1), PXY(2,PID)+ecart(2), 
num2str(double(PID')),...
+                'HorizontalAlignment','center','VerticalAlignment','middle');
+  end;
+  if (ison(opt.convexes)),
+    hconv = text(cv_center(1,:), cv_center(2,:), num2str(double(cvlst')), ...
+                'HorizontalAlignment','center','VerticalAlignment','middle',...
+                'Color', [.7 0 0]);
+  end;
+  if (ison(opt.dof)),
+    hdof = zeros(numel(dofid),1);
+    for i=1:numel(dofid),
+      if (dofmult(i)==1) s=int2str(dofid(i)); else 
s=sprintf('%d*%d',dofid(i),dofmult(i)); end;
+      hdof(i) = text(dofpos(1,i)-ecart(1), dofpos(2,i)-ecart(2), s,...
+                     
'HorizontalAlignment','center','VerticalAlignment','middle',...
+                     'Color', [0 .4 0]);
+    end;
+  end;
+else
+  if (ison(opt.edges)) 
+    hmesh = line(X, Y, Z, 
'Color',opt.edges_color,'LineWidth',opt.edges_width); 
+  end;
+  for bnum=1:length(opt.boundaries),
+    hbound{bnum} = line(bedge{bnum}(:,:,1), bedge{bnum}(:,:,2), 
bedge{bnum}(:,:,3), 'Color','red','LineWidth',2);
+  end
+  if (ison(opt.vertices)),
+    hvert = text(PXY(1,PID)+ecart(1), PXY(2,PID)+ecart(2), 
PXY(3,PID)+ecart(3), num2str(PID'),...
+                
'HorizontalAlignment','center','VerticalAlignment','middle','Color', [.0 0 0]);
+  end;
+  if (ison(opt.convexes)),
+    hconv = text(cv_center(1,:), cv_center(2,:), cv_center(3,:), 
num2str(cvlst'), ...
+                'HorizontalAlignment','center','VerticalAlignment','middle',...
+                'Color', [.7 0 0]);
+  end;
+  if (ison(opt.dof)),
+    hdof = text(dofpos(1,:)-ecart(1), dofpos(2,:)-ecart(2), 
dofpos(3,:)-ecart(3), num2str(dofid'),...
+                'HorizontalAlignment','center','VerticalAlignment','middle',...
+                'Color', [0 .4 0]);
+  end;
+end
+
+if (ison(opt.quality)),
+  q=gf_mesh_get(M,'quality', cvflst(1,:));
+  qmf=gf_mesh_fem(M);
+  gf_mesh_fem_set(qmf, 'classical fem', 0);
+  [a,b] = gf_mesh_fem_get(qmf, 'dof from cvid', cvflst(1,:));
+  Q=zeros(1, gf_mesh_fem_get(qmf, 'nbdof'));
+  for k=1:numel(b)-1,
+    Q(a(b(k))) = q(k);
+  end
+end;
+
+if (opt.explode ~= 0),
+  sl=gf_slice({'explode',opt.explode},M,opt.refine,cvflst);
+  data={};
+  if (ison(opt.quality)),
+    sQ = gf_compute(qmf,Q,'interpolate on',sl);
+    data={'data',sQ};
+  end;
+  gf_plot_slice(sl, data{:},'mesh_faces',opt.faces,...
+               'mesh_edges_color', opt.edges_color, ...
+               'mesh_edges_width',opt.edges_width, ...
+               'mesh_faces_color',opt.faces_color);
+  gf_delete(sl); light;
+elseif (ison(opt.quality)),
+  hold on; gf_plot(qmf, Q, 'cvlst', cvflst); hold off;
+elseif (ison(opt.faces)),
+  
+  % should be replaced by a gf_plot_slice ..
+  T = gf_mesh_get(M, 'triangulated surface', opt.refine, cvflst);
+  if (mdim == 2),
+    hfill=patch(T(1:mdim:(mdim*3),:),T(2:mdim:(mdim*3),:), ...
+               opt.faces_color, 'Erasemode','normal','Edgecolor','none');
+  else
+    hfill=patch(T(1:mdim:(mdim*3),:),T(2:mdim:(mdim*3),:), 
T(3:mdim:(mdim*3),:), ...
+               opt.faces_color, 'Erasemode','normal','Edgecolor','none');
+  end;
+  light;
+end;
+
+if (ison(opt.quality))
+  gf_delete(qmf);
+end;
+
+if (~hold_state),
+  set(cax,'DataAspectRatio', [1 1 1]);
+  set(cax,'XLimMode','auto');
+  set(cax,'YLimMode','auto');
+  set(cax,'ZLimMode','auto');
+end;
+% restore graphical context
+set(cax,'NextPlot',ax_nextplot)
+set(cfig,'NextPlot',fig_nextplot)
+
+ 
+function r=ison(v)
+  r = strcmpi(v,'on');
diff --git a/interface/src/octave/gf_plot_slice.m 
b/interface/src/octave/gf_plot_slice.m
new file mode 100644
index 0000000..9ea5820
--- /dev/null
+++ b/interface/src/octave/gf_plot_slice.m
@@ -0,0 +1,333 @@
+function [hfaces, htube, hquiver, hmesh]=gf_plot_slice(sl,varargin)
+% function [hfaces, htube, hquiver, hmesh]=gf_plot_slice(sl,varargin)
+% this function is used to plot a slice of mesh/mesh_fem (see gf_slice)
+%
+% The options are specified as pairs of "option name"/"option value"
+%
+%           OPTION NAME       DEFAULT VALUE         ACTION
+%                    data    []                  data to be plotted (one value 
per slice node)
+%             convex_data    []                  data to be plotted (one value 
per mesh convex)
+%                    mesh    'auto'              'on' -> show the mesh (faces 
of edges), 
+%                                                'off' -> ignore mesh
+%              mesh_edges    'on'                show mesh edges ?
+%        mesh_edges_color    [0.60 0.60 1]       color of mesh edges
+%        mesh_edges_width    0.70                width of mesh edges
+%        mesh_slice_edges    'on'                show edges of the slice ?
+%  mesh_slice_edges_color    [0.70 0 0]
+%  mesh_slice_edges_width    0.50
+%              mesh_faces    'off'               'on' -> fill mesh faces 
(otherwise they are transparent)
+%        mesh_faces_color    [0.75 0.75 0.75]
+%                  pcolor    'on'                if the field is scalar, a 
color plot of its values is plotted
+%                  quiver    'on'                if the field is vector, 
represent arrows
+%          quiver_density    50                  density of arrows in quiver 
plot
+%            quiver_scale    1                   density of arrows in quiver 
plot 
+%                    tube    'on'                use tube plot for 'filar' 
(1D) parts of the slice
+%              tube_color    'red'               color of tubes (ignored if 
'data' is not empty and 'pcolor' is on)
+%             tube_radius    '0.5%'              tube radius; you can use a 
constant, or a percentage 
+%                                                (of the mesh size) or a 
vector of nodal values
+%             showoptions    'on'                display the list of options
+%  
+% the 'data' and 'convex_data' are mutually exclusive.
+%  
+% RETURNS: handles to the various graphical objects created.  
+%  Copyright (C) 1999-2017 Yves Renard
+%
+%  This file is a part of GetFEM++
+%
+%  GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+%  under  the  terms  of the  GNU  Lesser General Public License as published
+%  by  the  Free Software Foundation;  either version 3 of the License,  or
+%  (at your option) any later version along with the GCC Runtime Library
+%  Exception either version 3.1 or (at your option) any later version.
+%  This program  is  distributed  in  the  hope  that it will be useful,  but
+%  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+%  or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+%  License and GCC Runtime Library Exception for more details.
+%  You  should  have received a copy of the GNU Lesser General Public License
+%  along  with  this program;  if not, write to the Free Software Foundation,
+%  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+
+  if nargin<1,
+    error('Too few input arguments')
+  end
+
+  %mf=struct(mf);
+  hfaces=[];
+  hquiver=[];
+  hmesh=[];
+  htube=[];
+  mdim = gf_slice_get(sl, 'dim');
+  
+  if (gf_slice_get(sl, 'nbsplxs', 3)),
+    warning('won''t plot 3D slices, extract the slice boundary first');
+  end;
+  
+  if (mdim ~= 2 & mdim ~= 3),
+    error('only 2D and 3D mesh are handled by this function');
+  end;
+  
+  opt = struct('data',[],... % data to be plotted on the slice (on slice nodes)
+              'convex_data',[],...% data to be plotted (given on the mesh 
convexes)
+              'mesh','auto',...  % show the mesh ?
+              'mesh_edges','on',... % show mesh edges ?
+               'mesh_edges_color',[.6 .6 1],...
+               'mesh_edges_width',.7,...
+               'mesh_slice_edges','on',...
+              'mesh_slice_edges_color',[.7 .0 0],...
+               'mesh_slice_edges_width',.5,...
+               'mesh_faces','off',... % fill mesh faces (otherwise they are 
transparent)
+               'mesh_faces_color',[.75 .75 .75],...
+              'pcolor','on',... % if the field is scalar, a color plot of its 
values is plotted
+              'quiver','on',... % if the field is vector, represent arrows     
       
+              'quiver_density',50,... % density of arrows in quiver plot
+              'quiver_scale',1,... % scaling of arrows (0=>no scaling)
+              'tube','on',... % use tube plot for linear parts of the slice
+              'tube_color','red',... % color of tubes (ignored if 'data' is 
not empty)
+               'tube_radius','0.5%',...  % tube radius; you can use a 
constant, or a percentage (of the mesh size) or a vector of nodal values
+               'showoptions','off'); % list options used
+
+  opt = getopt(opt,varargin);
+  
+  
+  
+  %qdim = numel(U) / gf_slice_get(sl, 'nbpts');
+  %if (fix(qdim) ~= qdim), error('wrong number of elements for U'); end;
+
+  if (ison(opt.showoptions)), disp(opt); end;
+  
+  if (~isempty(opt.convex_data)), 
+    if (~isempty(opt.data)),
+      error('"data" and "convex_data" are mutually exclusive');
+    end;
+    opt.data = gf_slice_get(sl, 'interpolate_convex_data', opt.convex_data);
+  end;
+  
+  if (isauto(opt.mesh)),
+    if (isempty(opt.data)), opt.mesh = 'on'; 
+    else opt.mesh = 'off'; end; 
+  end;
+  
+  Pm = gf_slice_get(sl,'pts'); 
+  if (numel(Pm) == 0) return; end;
+  if (~isempty(opt.data) & size(opt.data,2) ~= size(Pm,2)),
+    error(sprintf('wrong dimensions for the data (has %d columns, should have 
%d columns)',...
+                 size(opt.data,2),size(Pm,2)));
+  end;
+
+  P = cell(mdim,1);
+  for i=1:mdim,
+    P{i} = Pm(i,:);
+    T{i} = gf_slice_get(sl,'splxs', i);
+    box(i,:) = [min(P{i}) max(P{i})];
+  end;
+  
+  if (ischar(opt.tube_radius) & numel(opt.tube_radius) & 
opt.tube_radius(end)=='%')
+    opt.tube_radius = max(abs(box(:,2)-box(:,1))) * 0.01 * 
str2num(opt.tube_radius(1:end-1));
+  end;
+  
+  % save graphical context
+  cax = newplot;
+  cfig = get(cax,'Parent');
+  hold_state = ishold;
+  ax_nextplot = lower(get(cax,'NextPlot'));
+  fig_nextplot = lower(get(cfig,'NextPlot'));
+
+ % handle simplexes of dimension 1
+
+  if (~isempty(T{1})),
+    [htube,hmesh]=do_plot_1D(P,T{1},opt);
+  end;
+  [hfaces,h,hquiver]=do_plot_2D(sl,P,T{2},opt); hmesh=[hmesh(:)' h(:)'];
+  
+  if (mdim == 3), view(3); else view(2); end;
+  if (strcmpi(get(gcf,'renderer'),'opengl')),
+    warning('OpenGL renderer does not work well with getfem, changing to 
zbuffer');
+  end;
+  set(gcf,'renderer','zbuffer');
+ 
+  if (~hold_state),
+    set(cax,'DataAspectRatio', [1 1 1]);
+    set(cax,'XLimMode','auto');
+    set(cax,'YLimMode','auto');
+    set(cax,'ZLimMode','auto');
+  end;
+
+  % restore graphical context
+  set(cax,'NextPlot',ax_nextplot);
+  set(cfig,'NextPlot',fig_nextplot);
+
+
+function [htube,hmesh]=do_plot_1D(P,T,opt)
+  htube=[]; hmesh=[];
+  if (isempty(T)) return; end;
+  
+  if (~ison(opt.tube)),
+    for j=1:numel(P)
+      C{j}=[P{j}(T(1,:));P{j}(T(2,:))];
+    end;
+    if (numel(P)==1) C{2}=zeros(size(C{1})); end;
+    
hmesh=line(C{:},'Color',opt.mesh_edges_color,'LineWidth',opt.mesh_edges_width);
+  else
+    if (~isempty(opt.data) & ison(opt.pcolor)),
+      qdim = size(opt.data,1);
+      if (qdim == 1),
+       if (iscell(opt.data))
+         htube=plot_tube(P,T,opt.data{1},opt.tube_radius,opt.tube_color);
+       else
+         htube=plot_tube(P,T,opt.data,opt.tube_radius,opt.tube_color);
+       end;
+      else
+       warning('1D slices not supported for vector data..');
+      end;
+    else 
+      htube=plot_tube(P,T,[],opt.tube_radius,opt.tube_color);
+    end;
+  end;
+
+% cell2mat not available in matlab R12
+function M=mycell2mat(C)
+  M=cat(1,C{:});
+
+% plots a "tube" along edges, with color given by D, and a possibly varying 
radius
+% radius: constant or equal to nb points
+% D(ata): empty or equal to nb points or nb segments
+function h=plot_tube(P, T, D, radius, tubecolor)
+  h = [];
+  P = mycell2mat(P);
+  if (isempty(T)) return; end;
+  T=double(T); % matlab 6.5 is not able to handle operator '+' on
+               % int32 ...
+  it0 = T(1,1); nT = size(T,2); nP = size(P,2); mdim=size(P,1);
+  if (mdim == 2) P = [P; zeros(1,nP)]; mdim = 3; end; % handle 2D slices
+  % convert radius to node data
+  if (numel(radius)==1), 
+    radius = radius*ones(1,nP); %radius(1)=0.5; radius(end)=0.5;
+  elseif (numel(radius)==nT),
+    radius = ([radius(1) radius(:)']+[radius(:)' radius(end)])/2;
+  end;
+  if (size(D,1) > 1), error('only scalar data can be represented on a 
tube_plot'); end;
+  if (size(D,2)==nP), 
+    point_data=1; 
+  else 
+    point_data=0; 
+  end;
+  nsubdiv = 20; ct = cos((0:nsubdiv)*2*pi/nsubdiv); ct(end)=ct(1); st = 
sin((0:nsubdiv)*2*pi/nsubdiv); st(end)=st(1);
+  cnt=0;
+  while (1),
+    % search for consecutive edge points
+    it1 = it0;
+    while (it1 < nT & T(1,it1+1) == T(2,it1)) it1 = it1+1; end;
+    %disp(sprintf('sequence: %d - %d -- [%d-%d] - 
[%d-%d]',it0,it1,T(1,it0),T(2,it0),T(1,it1),T(2,it1)))
+    % extract the sequence of points
+    ip = [T(1,it0) T(2,it0:it1)];
+    p = P(:,ip);     
+    if (numel(D)),
+      if (point_data) d = D(ip); else d = D(it0:it1); end;
+    end;
+    nseg = it1-it0+1;
+    % compute the normals of edges
+    normals = zeros(3, 2, nseg);
+    tang = p(:,2:end) - p(:,1:end-1); tang = tang ./ 
repmat(sqrt(sum(tang.^2,1)),size(tang,1),1);
+    for i=1:nseg
+      normals(:,:,i) = null(tang(:,i)'); % won't be ok if normals have an
+                                         % important rotation from a segment
+                                         % to another
+                                         % VERY PROBABLE BUG!!!      
+    end;    
+    X=zeros(mdim,nsubdiv+1,numel(ip));
+    for i=1:numel(ip),
+      if (i == 1),
+        n=normals(:,:,i); 
+      elseif (i == numel(ip)) 
+        n=normals(:,:,end);
+      else
+        n = (normals(:,:,i-1)+normals(:,:,i))/2;
+      end
+      for k=1:nsubdiv+1,
+        X(:,k,i) = p(:,i) + radius(ip(i))*(n(:,1)*ct(k) + n(:,2)*st(k));
+      end;
+    end;
+    if (numel(D)),
+      C=repmat(d,nsubdiv+1,1);
+      h = [h; surface(squeeze(X(1,:,:)), squeeze(X(2,:,:)), 
squeeze(X(3,:,:)),C,...
+                     'linestyle','none','FaceColor','interp')];
+    else
+      h = [h; surface(squeeze(X(1,:,:)), squeeze(X(2,:,:)), 
squeeze(X(3,:,:)),...
+                     'linestyle','none','facecolor',tubecolor)];
+    end;
+    cnt=cnt+1;
+    it0 = it1+1;
+    if (it0 > nT) return; end;
+  end;
+
+% draw faces
+function [hfaces,hmesh,hquiver]=do_plot_2D(sl,P,T,opt)
+  hfaces=[]; hmesh=[]; hquiver=[];
+  mdim=numel(P);
+  if (numel(T)),
+    d={};  
+    if (ison(opt.pcolor) & size(opt.data,1)==1 & ~isempty(opt.data)),
+      d={'FaceVertexCData',opt.data(:),'FaceColor','interp'};
+    elseif (isempty(opt.data) & ison(opt.mesh_faces))
+      d={'FaceVertexCData',opt.mesh_faces_color, 'FaceColor','flat'};
+    end;    
+    if (~isempty(d)),
+      hfaces=patch('Vertices',mycell2mat(P)','Faces',T',d{:}, ...
+                  'EdgeColor','none');
+    end;
+    if (ison(opt.quiver)),
+      if (size(opt.data,1)>1),
+       hquiver=do_quiver_plot(P,opt.data,opt);
+      end;
+    end;  
+  end;
+  if (ison(opt.mesh) & (ison(opt.mesh_edges) | ison(opt.mesh_slice_edges))),
+    [p,t1,t2] = gf_slice_get(sl,'edges');
+    if (ison(opt.mesh_edges))
+      
hmesh=patch('Vertices',p','Faces',t1','EdgeColor',opt.mesh_edges_color,'LineWidth',opt.mesh_edges_width);
+    end;
+    if (ison(opt.mesh_slice_edges)),
+      hmesh=[hmesh 
patch('Vertices',p','Faces',t2','EdgeColor',opt.mesh_slice_edges_color,'LineWidth',opt.mesh_slice_edges_width)];
+    end;
+  end;  
+  
+  
+% arrow plot
+function hquiver=do_quiver_plot(P,U,opt)
+  hquiver=[];
+  P=mycell2mat(P); mdim=size(P,1);qdim=size(U,1);
+  nP = size(P,2);
+  ptlst=1:nP;
+  bmin = min(P); bmax = max(P);
+  xyscale = max(bmax-bmin);
+  qradius2 = (xyscale/opt.quiver_density)^2;
+  vscale  = max(max(abs(U)));
+  qlst = [];
+  rm=[];
+  while (numel(ptlst)>0)
+    ii = ptlst(1); 
+    qlst = [qlst ii];
+    x = P(1,ii); y = P(2, ii); 
+    if (mdim == 2),
+      rm = (find((P(1,:)-x).^2 + (P(2,:)-y).^2 < qradius2));
+    elseif (mdim == 3),
+      z = P(3,ii);
+      rm = (find((P(1,:)-x).^2 + (P(2,:)-y).^2 + (P(3,:)-z).^2 < qradius2));
+    end;
+    if (numel(rm)==0) error('internal error in gf_plot'); end;
+    ptlst = setdiff(ptlst, rm);
+  end;
+  if (qdim == 2),
+    hquiver=quiver(P(1,qlst),P(2,qlst),U(1,qlst),U(2,qlst),opt.quiver_scale);
+    set(hquiver,'Color', [0 .4 0]);
+  else
+    
hquiver=quiver3(P(1,qlst),P(2,qlst),P(3,qlst),U(1,qlst),U(2,qlst),U(3,qlst),...
+                    opt.quiver_scale);
+    set(hquiver,'Color', [0 .4 0]);
+  end;
+  
+function r=ison(v)
+  r = strcmpi(v,'on');
+  
+function r=isauto(v)
+  r = strcmpi(v,'auto');
diff --git a/interface/src/octave/gf_precond.m 
b/interface/src/octave/gf_precond.m
new file mode 100644
index 0000000..146f4b0
--- /dev/null
+++ b/interface/src/octave/gf_precond.m
@@ -0,0 +1,57 @@
+% FUNCTION [...] = gf_precond([operation [, args]])
+%
+%   General constructor for precond objects.
+%
+%   The preconditioners may store REAL or COMPLEX values. They accept getfem
+%   sparse matrices and Matlab sparse matrices.
+%   
+%
+%   * PC = gf_precond('identity')
+%   Create a REAL identity precondioner.
+%
+%   * PC = gf_precond('cidentity')
+%   Create a COMPLEX identity precondioner.
+%
+%   * PC = gf_precond('diagonal', vec D)
+%   Create a diagonal precondioner.
+%
+%   * PC = gf_precond('ildlt', spmat m)
+%   Create an ILDLT (Cholesky) preconditioner for the (symmetric) sparse
+%   matrix `m`. This preconditioner has the same sparsity pattern than `m`
+%   (no fill-in).
+%
+%   * PC = gf_precond('ilu', spmat m)
+%   Create an ILU (Incomplete LU) preconditioner for the sparse
+%   matrix `m`. This preconditioner has the same sparsity pattern
+%   than `m` (no fill-in).
+%
+%   * PC = gf_precond('ildltt', spmat m[, int fillin[, scalar threshold]])
+%   Create an ILDLTT (Cholesky with filling) preconditioner for the
+%   (symmetric) sparse matrix `m`. The preconditioner may add at most
+%   `fillin` additional non-zero entries on each line. The default value
+%   for `fillin` is 10, and the default threshold is1e-7.
+%
+%   * PC = gf_precond('ilut', spmat m[, int fillin[, scalar threshold]])
+%   Create an ILUT (Incomplete LU with filling) preconditioner for the
+%   sparse matrix `m`. The preconditioner may add at most `fillin`
+%   additional non-zero entries on each line. The default value for
+%   `fillin` is 10, and the default threshold is 1e-7.
+%
+%   * PC = gf_precond('superlu', spmat m)
+%   Uses SuperLU to build an exact factorization of the sparse matrix `m`.
+%   This preconditioner is only available if the getfem-interface was
+%   built with SuperLU support. Note that LU factorization is likely to
+%   eat all your memory for 3D problems.
+%
+%   * PC = gf_precond('spmat', spmat m)
+%   Preconditionner given explicitely by a sparse matrix.
+%
+%
+function [varargout]=gf_precond(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('precond', varargin{:});
+  else
+    gf_matlab('precond', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_precond_get.m 
b/interface/src/octave/gf_precond_get.m
new file mode 100644
index 0000000..e7160da
--- /dev/null
+++ b/interface/src/octave/gf_precond_get.m
@@ -0,0 +1,40 @@
+% FUNCTION [...] = gf_precond_get(precond P, [operation [, args]])
+%
+%   General function for querying information about precond objects.
+%   
+%
+%   * gf_precond_get(precond P, 'mult', vec V)
+%   Apply the preconditioner to the supplied vector.
+%
+%   * gf_precond_get(precond P, 'tmult', vec V)
+%   Apply the transposed preconditioner to the supplied vector.
+%
+%   * gf_precond_get(precond P, 'type')
+%   Return a string describing the type of the preconditioner ('ilu', 
'ildlt',..).
+%
+%   * gf_precond_get(precond P, 'size')
+%   Return the dimensions of the preconditioner.
+%
+%   * gf_precond_get(precond P, 'is_complex')
+%   Return 1 if the preconditioner stores complex values.
+%
+%   * s = gf_precond_get(precond P, 'char')
+%   Output a (unique) string representation of the precond.
+%   
+%   This can be used to perform comparisons between two
+%   different precond objects.
+%   This function is to be completed.
+%   
+%
+%   * gf_precond_get(precond P, 'display')
+%   displays a short summary for a precond object.
+%
+%
+function [varargout]=gf_precond_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('precond_get', varargin{:});
+  else
+    gf_matlab('precond_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_slice.m b/interface/src/octave/gf_slice.m
new file mode 100644
index 0000000..f3d5f9d
--- /dev/null
+++ b/interface/src/octave/gf_slice.m
@@ -0,0 +1,113 @@
+% FUNCTION [...] = gf_slice([operation [, args]])
+%
+%   General constructor for slice objects.
+%
+%   Creation of a mesh slice. Mesh slices are very similar to a
+%   P1-discontinuous mesh_fem on which interpolation is very fast. The slice is
+%   built from a mesh object, and a description of the slicing operation, for
+%   example::
+%   
+%   sl = gf_slice({'planar',+1,[0;0],[1;0]}, m, 5);
+%   
+%   cuts the original mesh with the half space {y>0}. Each convex of the
+%   original mesh `m` is simplexified (for example a quadrangle is splitted
+%   into 2 triangles), and each simplex is refined 5 times.
+%   
+%   Slicing operations can be:
+%   
+%   * cutting with a plane, a sphere or a cylinder
+%   * intersection or union of slices
+%   * isovalues surfaces/volumes
+%   * "points", "streamlines" (see below)
+%   
+%   If the first argument is a mesh_fem `mf` instead of a mesh, and if it is
+%   followed by a `mf`-field `u` (with size(u,1) ==
+%   gf_mesh_fem_get(mesh_fem MF, 'nbdof')), then the deformation `u` will be 
applied to the
+%   mesh before the slicing operation.
+%   
+%   The first argument can also be a slice.
+%   
+%
+%   * sl = gf_slice(sliceop, {slice sl|{mesh m| mesh_fem mf, vec U}, int 
refine}[, mat CVfids])
+%   Create a slice using `sliceop` operation.
+%   
+%   `sliceop` operation is specified with Matlab CELL arrays (i.e.
+%   with braces) . The first element is the
+%   name of the operation, followed the slicing options:
+%   
+%   * {'none'} :
+%   Does not cut the mesh.
+%   
+%   * {'planar', int orient, vec p, vec n} :
+%   Planar cut. `p` and `n` define a half-space, `p` being a point belong to
+%   the boundary of the half-space, and `n` being its normal. If `orient` is
+%   equal to -1 (resp. 0, +1), then the slicing operation will cut the mesh
+%   with the "interior" (resp. "boundary", "exterior") of the half-space.
+%   `orient` may also be set to +2 which means that the mesh will be sliced,
+%   but both the outer and inner parts will be kept.
+%   
+%   * {'ball', int orient, vec c, scalar r} :
+%   Cut with a ball of center `c` and radius `r`.
+%   
+%   * {'cylinder', int orient, vec p1, vec p2, scalar r} :
+%   Cut with a cylinder whose axis is the line `(p1, p2)` and whose radius
+%   is `r`.
+%   
+%   * {'isovalues', int orient, mesh_fem mf, vec U, scalar s} :
+%   Cut using the isosurface of the field `U` (defined on the mesh_fem `mf`).
+%   The result is the set `{x such that :math:`U(x) \leq s`}` or `{x such that
+%   `U`(x)=`s`}` or `{x such that `U`(x) >= `s`}` depending on the value of
+%   `orient`.
+%   
+%   * {'boundary'[, SLICEOP]} :
+%   Return the boundary of the result of SLICEOP, where SLICEOP is any
+%   slicing operation. If SLICEOP is not specified, then the whole mesh is
+%   considered (i.e. it is equivalent to {'boundary',{'none'}}).
+%   
+%   * {'explode', mat Coef} :
+%   Build an 'exploded' view of the mesh: each convex is shrinked (:math:`0 <
+%   \text{Coef} \leq 1`). In the case of 3D convexes, only their faces are 
kept.
+%   
+%   * {'union', SLICEOP1, SLICEOP2} :
+%   Returns the union of slicing operations.
+%   
+%   * {'intersection', SLICEOP1, SLICEOP2} :
+%   Returns the intersection of slicing operations, for example::
+%   
+%   sl = gf_slice({intersection',{'planar',+1,[0;0;0],[0;0;1]},
+%   {'isovalues',-1,mf2,u2,0}},mf,u,5)
+%   
+%   * {'comp', SLICEOP} :
+%   Returns the complementary of slicing operations.
+%   
+%   * {'diff', SLICEOP1, SLICEOP2} :
+%   Returns the difference of slicing operations.
+%   
+%   * {'mesh', mesh m} :
+%   Build a slice which is the intersection of the sliced mesh with another
+%   mesh. The slice is such that all of its simplexes are stricly contained
+%   into a convex of each mesh.
+%   
+%
+%   * sl = gf_slice('streamlines', mesh_fem mf, mat U, mat S)
+%   Compute streamlines of the (vector) field `U`, with seed points given
+%   by the columns of `S`.
+%
+%   * sl = gf_slice('points', mesh m, mat Pts)
+%   Return the "slice" composed of points given by the columns of `Pts`
+%   (useful for interpolation on a given set of sparse points, see
+%   ``gf_compute('interpolate on',sl)``.
+%
+%   * sl = gf_slice('load', string filename[, mesh m])
+%   Load the slice (and its linked mesh if it is not given as an argument)
+%   from a text file.
+%
+%
+function [varargout]=gf_slice(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('slice', varargin{:});
+  else
+    gf_matlab('slice', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_slice_get.m 
b/interface/src/octave/gf_slice_get.m
new file mode 100644
index 0000000..046fee4
--- /dev/null
+++ b/interface/src/octave/gf_slice_get.m
@@ -0,0 +1,139 @@
+% FUNCTION [...] = gf_slice_get(slice S, [operation [, args]])
+%
+%   General function for querying information about slice objects.
+%   
+%
+%   * d = gf_slice_get(slice S, 'dim')
+%   Return the dimension of the slice (2 for a 2D mesh, etc..).
+%
+%   * a = gf_slice_get(slice S, 'area')
+%   Return the area of the slice.
+%
+%   * CVids = gf_slice_get(slice S, 'cvs')
+%   Return the list of convexes of the original mesh contained in the slice.
+%
+%   * n = gf_slice_get(slice S, 'nbpts')
+%   Return the number of points in the slice.
+%
+%   * ns = gf_slice_get(slice S, 'nbsplxs'[, int dim])
+%   Return the number of simplexes in the slice.
+%   
+%   Since the slice may contain points (simplexes of dim 0), segments
+%   (simplexes of dimension 1), triangles etc., the result is a vector
+%   of size gf_slice_get(slice S, 'dim')+1, except if the optional argument 
`dim`
+%   is used.
+%
+%   * P = gf_slice_get(slice S, 'pts')
+%   Return the list of point coordinates.
+%
+%   * {S, CV2S} = gf_slice_get(slice S, 'splxs',int dim)
+%   Return the list of simplexes of dimension `dim`.
+%   
+%   On output, S has 'dim+1' rows, each column contains the point
+%   numbers of a simplex.  The vector `CV2S` can be used to find the
+%   list of simplexes for any convex stored in the slice. For example
+%   'S(:,CV2S(4):CV2S(5)-1)'
+%   gives the list of simplexes for the fourth convex.
+%
+%   * {P, E1, E2} = gf_slice_get(slice S, 'edges')
+%   Return the edges of the linked mesh contained in the slice.
+%   
+%   `P` contains the list of all edge vertices, `E1` contains
+%   the indices of each mesh edge in `P`, and `E2` contains the
+%   indices of each "edges" which is on the border of the slice.
+%   This function is useless except for post-processing purposes.
+%
+%   * Usl = gf_slice_get(slice S, 'interpolate_convex_data', mat Ucv)
+%   Interpolate data given on each convex of the mesh to the slice nodes.
+%   
+%   The input array `Ucv` may have any number of dimensions, but its
+%   last dimension should be equal to gf_mesh_get(mesh M, 'max cvid').
+%   
+%   Example of use: gf_slice_get(slice S, 'interpolate_convex_data', 
gf_mesh_get(mesh M, 'quality')).
+%
+%   * m = gf_slice_get(slice S, 'linked mesh')
+%   Return the mesh on which the slice was taken.
+%
+%   * m = gf_slice_get(slice S, 'mesh')
+%   Return the mesh on which the slice was taken
+%   (identical to 'linked mesh')
+%
+%   * z = gf_slice_get(slice S, 'memsize')
+%   Return the amount of memory (in bytes) used by the slice object.
+%
+%   * gf_slice_get(slice S, 'export to vtk', string filename, ...)
+%   Export a slice to VTK.
+%   
+%   Following the `filename`, you may use any of the following options:
+%   
+%   - if 'ascii' is not used, the file will contain binary data
+%   (non portable, but fast).
+%   - if 'edges' is used, the edges of the original mesh will be
+%   written instead of the slice content.
+%   
+%   More than one dataset may be written, just list them. Each dataset
+%   consists of either:
+%   
+%   - a field interpolated on the slice (scalar, vector or tensor),
+%   followed by an optional name.
+%   - a mesh_fem and a field, followed by an optional name.
+%   
+%   Examples:
+%   
+%   - gf_slice_get(slice S, 'export to vtk', 'test.vtk', Usl, 'first_dataset', 
mf,
+%   U2, 'second_dataset')
+%   - gf_slice_get(slice S, 'export to vtk', 'test.vtk', 'ascii', mf,U2)
+%   - gf_slice_get(slice S, 'export to vtk', 'test.vtk', 'edges', 'ascii', 
Uslice)
+%
+%   * gf_slice_get(slice S, 'export to pov', string filename)
+%   Export a the triangles of the slice to POV-RAY.
+%
+%   * gf_slice_get(slice S, 'export to dx', string filename, ...)
+%   Export a slice to OpenDX.
+%   
+%   Following the `filename`, you may use any of the following
+%   options:
+%   
+%   - if 'ascii' is not used, the file will contain binary data
+%   (non portable, but fast).
+%   - if 'edges' is used, the edges of the original mesh will be
+%   written instead of the slice content.
+%   - if 'append' is used, the opendx file will not be overwritten,
+%   and the new data will be added at the end of the file.
+%   
+%   More than one dataset may be written, just list them. Each dataset
+%   consists of either:
+%   
+%   - a field interpolated on the slice (scalar, vector or tensor),
+%   followed by an optional name.
+%   - a mesh_fem and a field, followed by an optional name.
+%
+%   * gf_slice_get(slice S, 'export to pos', string filename[, string 
name][[,mesh_fem mf1], mat U1, string nameU1[[,mesh_fem mf1], mat U2, string 
nameU2,...])
+%   Export a slice to Gmsh.
+%   
+%   More than one dataset may be written, just list them.
+%   Each dataset consists of either:
+%   
+%   - a field interpolated on the slice (scalar, vector or tensor).
+%   - a mesh_fem and a field.
+%
+%   * s = gf_slice_get(slice S, 'char')
+%   Output a (unique) string representation of the slice.
+%   
+%   This can be used to perform comparisons between two
+%   different slice objects.
+%   This function is to be completed.
+%   
+%
+%   * gf_slice_get(slice S, 'display')
+%   displays a short summary for a slice object.
+%
+%
+function [varargout]=gf_slice_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('slice_get', varargin{:});
+  else
+    gf_matlab('slice_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_slice_set.m 
b/interface/src/octave/gf_slice_set.m
new file mode 100644
index 0000000..fbbef07
--- /dev/null
+++ b/interface/src/octave/gf_slice_set.m
@@ -0,0 +1,22 @@
+% FUNCTION [...] = gf_slice_set(slice S, [operation [, args]])
+%
+%   Edition of mesh slices.
+%   
+%
+%   * gf_slice_set(slice S, 'pts', mat P)
+%   Replace the points of the slice.
+%   
+%   The new points `P` are stored in the columns the matrix. Note that
+%   you can use the function to apply a deformation to a slice, or to
+%   change the dimension of the slice (the number of rows of `P` is not
+%   required to be equal to gf_slice_get(slice S, 'dim')).
+%
+%
+function [varargout]=gf_slice_set(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('slice_set', varargin{:});
+  else
+    gf_matlab('slice_set', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_spmat.m b/interface/src/octave/gf_spmat.m
new file mode 100644
index 0000000..2c313f2
--- /dev/null
+++ b/interface/src/octave/gf_spmat.m
@@ -0,0 +1,68 @@
+% FUNCTION [...] = gf_spmat([operation [, args]])
+%
+%   General constructor for spmat objects.
+%
+%   Create a new sparse matrix in getfem++ format(, i.e. sparse
+%   matrices which are stored in the getfem workspace, not the matlab sparse
+%   matrices). These sparse matrix can be stored as CSC (compressed column
+%   sparse), which is the format used by Matlab, or they can be stored as WSC
+%   (internal format to getfem). The CSC matrices are not writable (it would
+%   be very inefficient), but they are optimized for multiplication with
+%   vectors, and memory usage. The WSC are writable, they are very fast with
+%   respect to random read/write operation. However their memory overhead is
+%   higher than CSC matrices, and they are a little bit slower for
+%   matrix-vector multiplications.
+%   
+%   By default, all newly created matrices are build as WSC matrices. This can
+%   be changed later with ``gf_spmat_set(spmat S, 'to_csc',...)``, or may be 
changed
+%   automatically by getfem (for example ``gf_linsolve()`` converts the
+%   matrices to CSC).
+%   
+%   The matrices may store REAL or COMPLEX values.
+%   
+%
+%   * SM = gf_spmat('empty', int m [, int n])
+%   Create a new empty (i.e. full of zeros) sparse matrix, of dimensions
+%   `m x n`. If `n` is omitted, the matrix dimension is `m x m`.
+%
+%   * SM = gf_spmat('copy', mat K [,  I [,  J]])
+%   Duplicate a matrix `K` (which might be a spmat or a native matlab
+%   sparse matrix). If index `I` and/or `J` are given, the matrix will
+%   be a submatrix of `K`. For example::
+%   
+%   m = gf_spmat('copy', sprand(50,50,.1), 1:40, [6 7 8 3 10])
+%   
+%   
+%   
+%   will return a 40x5 matrix.
+%
+%   * SM = gf_spmat('identity', int n)
+%   Create a `n x n` identity matrix.
+%
+%   * SM = gf_spmat('mult', spmat A, spmat B)
+%   Create a sparse matrix as the product of the sparse matrices `A` and
+%   `B`. It requires that `A` and `B` be both real or both complex, you
+%   may have to use ``gf_spmat_set(spmat S, 'to_complex')``
+%
+%   * SM = gf_spmat('add', spmat A, spmat B)
+%   Create a sparse matrix as the sum of the sparse matrices `A` and `B`.
+%   Adding a real matrix with a complex matrix is possible.
+%
+%   * SM = gf_spmat('diag', mat D [, ivec E [, int n [,int m]]])
+%   Create a diagonal matrix. If `E` is given, `D` might be a matrix and
+%   each column of `E` will contain the sub-diagonal number that will be
+%   filled with the corresponding column of `D`.
+%
+%   * SM = gf_spmat('load','hb'|'harwell-boeing'|'mm'|'matrix-market', string 
filename)
+%   Read a sparse matrix from an Harwell-Boeing or a Matrix-Market file
+%   See also ``gf_util('load matrix')``.
+%
+%
+function [varargout]=gf_spmat(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('spmat', varargin{:});
+  else
+    gf_matlab('spmat', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_spmat_get.m 
b/interface/src/octave/gf_spmat_get.m
new file mode 100644
index 0000000..b62fb43
--- /dev/null
+++ b/interface/src/octave/gf_spmat_get.m
@@ -0,0 +1,91 @@
+% FUNCTION [...] = gf_spmat_get(spmat S, [operation [, args]])
+%
+%   
+%
+%   * n = gf_spmat_get(spmat S, 'nnz')
+%   Return the number of non-null values stored in the sparse matrix.
+%
+%   * Sm = gf_spmat_get(spmat S, 'full'[, list I[, list J]])
+%   Return a full (sub-)matrix.
+%   
+%   The optional arguments `I` and `J`, are the sub-intervals for the
+%   rows and columns that are to be extracted.
+%
+%   * MV = gf_spmat_get(spmat S, 'mult', vec V)
+%   Product of the sparse matrix `M` with a vector `V`.
+%   
+%   For matrix-matrix multiplications, see gf_spmat('mult').
+%
+%   * MtV = gf_spmat_get(spmat S, 'tmult', vec V)
+%   Product of `M` transposed (conjugated if `M` is complex) with the
+%   vector `V`.
+%
+%   * D = gf_spmat_get(spmat S, 'diag'[, list E])
+%   Return the diagonal of `M` as a vector.
+%   
+%   If `E` is used, return the sub-diagonals whose ranks are given in E.
+%
+%   * s = gf_spmat_get(spmat S, 'storage')
+%   Return the storage type currently used for the matrix.
+%   
+%   The storage is returned as a string, either 'CSC' or 'WSC'.
+%
+%   * {ni,nj} = gf_spmat_get(spmat S, 'size')
+%   Return a vector where `ni` and `nj` are the dimensions of the matrix.
+%
+%   * b = gf_spmat_get(spmat S, 'is_complex')
+%   Return 1 if the matrix contains complex values.
+%
+%   * {JC, IR} = gf_spmat_get(spmat S, 'csc_ind')
+%   Return the two usual index arrays of CSC storage.
+%   
+%   If `M` is not stored as a CSC matrix, it is converted into CSC.
+%
+%   * V = gf_spmat_get(spmat S, 'csc_val')
+%   Return the array of values of all non-zero entries of `M`.
+%   
+%   If `M` is not stored as a CSC matrix, it is converted into CSC.
+%
+%   * {N, U0} = gf_spmat_get(spmat S, 'dirichlet nullspace', vec R)
+%   Solve the dirichlet conditions `M.U=R`.
+%   
+%   A solution `U0` which has a minimum L2-norm is returned, with a
+%   sparse matrix `N` containing an orthogonal basis of the kernel of
+%   the (assembled) constraints matrix `M` (hence, the PDE linear system
+%   should be solved on this subspace): the initial problem
+%   
+%   `K.U = B` with constraints `M.U = R`
+%   
+%   is replaced by
+%   
+%   `(N'.K.N).UU = N'.B` with `U = N.UU + U0`
+%
+%   * gf_spmat_get(spmat S, 'save', string format, string filename)
+%   Export the sparse matrix.
+%   
+%   the format of the file may be 'hb' for Harwell-Boeing, or 'mm'
+%   for Matrix-Market.
+%
+%   * s = gf_spmat_get(spmat S, 'char')
+%   Output a (unique) string representation of the spmat.
+%   
+%   This can be used to perform comparisons between two
+%   different spmat objects.
+%   This function is to be completed.
+%   
+%
+%   * gf_spmat_get(spmat S, 'display')
+%   displays a short summary for a spmat object.
+%
+%   * {mantissa_r, mantissa_i, exponent} = gf_spmat_get(spmat S, 'determinant')
+%   returns the matrix determinant calculated using MUMPS.
+%
+%
+function [varargout]=gf_spmat_get(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('spmat_get', varargin{:});
+  else
+    gf_matlab('spmat_get', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_spmat_set.m 
b/interface/src/octave/gf_spmat_set.m
new file mode 100644
index 0000000..dd80688
--- /dev/null
+++ b/interface/src/octave/gf_spmat_set.m
@@ -0,0 +1,62 @@
+% FUNCTION [...] = gf_spmat_set(spmat S, [operation [, args]])
+%
+%   Modification of the content of a getfem sparse matrix.
+%   
+%
+%   * gf_spmat_set(spmat S, 'clear'[, list I[, list J]])
+%   Erase the non-zero entries of the matrix.
+%   
+%   The optional arguments `I` and `J` may be specified to clear a
+%   sub-matrix instead of the entire matrix.
+%
+%   * gf_spmat_set(spmat S, 'scale', scalar v)
+%   Multiplies the matrix by a scalar value `v`.
+%
+%   * gf_spmat_set(spmat S, 'transpose')
+%   Transpose the matrix.
+%
+%   * gf_spmat_set(spmat S, 'conjugate')
+%   Conjugate each element of the matrix.
+%
+%   * gf_spmat_set(spmat S, 'transconj')
+%   Transpose and conjugate the matrix.
+%
+%   * gf_spmat_set(spmat S, 'to_csc')
+%   Convert the matrix to CSC storage.
+%   
+%   CSC storage is recommended for matrix-vector multiplications.
+%
+%   * gf_spmat_set(spmat S, 'to_wsc')
+%   Convert the matrix to WSC storage.
+%   
+%   Read and write operation are quite fast with WSC storage.
+%
+%   * gf_spmat_set(spmat S, 'to_complex')
+%   Store complex numbers.
+%
+%   * gf_spmat_set(spmat S, 'diag', mat D [, ivec E])
+%   Change the diagonal (or sub-diagonals) of the matrix.
+%   
+%   If `E` is given, `D` might be a matrix and each column of `E` will
+%   contain the sub-diagonal number that will be filled with the
+%   corresponding column of `D`.
+%
+%   * gf_spmat_set(spmat S, 'assign', ivec I, ivec J, mat V)
+%   Copy V into the sub-matrix 'M(I,J)'.
+%   
+%   `V` might be a sparse matrix or a full matrix.
+%
+%   * gf_spmat_set(spmat S, 'add', ivec I, ivec J, mat V)
+%   Add `V` to the sub-matrix 'M(I,J)'.
+%   
+%   `V` might be a sparse matrix or a full matrix.
+%
+%
+function [varargout]=gf_spmat_set(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('spmat_set', varargin{:});
+  else
+    gf_matlab('spmat_set', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_util.m b/interface/src/octave/gf_util.m
new file mode 100644
index 0000000..07c1b8c
--- /dev/null
+++ b/interface/src/octave/gf_util.m
@@ -0,0 +1,34 @@
+% FUNCTION [...] = gf_util([operation [, args]])
+%
+%   Performs various operations which do not fit elsewhere.
+%   
+%
+%   * gf_util('save matrix', string FMT, string FILENAME, mat A)
+%   Exports a sparse matrix into the file named FILENAME, using
+%   Harwell-Boeing (FMT='hb') or Matrix-Market (FMT='mm') formatting.
+%
+%   * A = gf_util('load matrix', string FMT, string FILENAME)
+%   Imports a sparse matrix from a file.
+%
+%   * tl = gf_util('trace level' [, int level])
+%   Set the verbosity of some getfem++ routines.
+%   
+%   Typically the messages printed by the model bricks, 0 means no
+%   trace message (default is 3). if no level is given,
+%   the current trace level is returned.
+%
+%   * tl = gf_util('warning level', int level)
+%   Filter the less important warnings displayed by getfem.
+%   
+%   0 means no warnings, default level is 3. if no level is given,
+%   the current warning level is returned.
+%
+%
+function [varargout]=gf_util(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('util', varargin{:});
+  else
+    gf_matlab('util', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gf_workspace.m 
b/interface/src/octave/gf_workspace.m
new file mode 100644
index 0000000..52ec1a0
--- /dev/null
+++ b/interface/src/octave/gf_workspace.m
@@ -0,0 +1,59 @@
+% FUNCTION [...] = gf_workspace([operation [, args]])
+%
+%   Getfem workspace management function.
+%   
+%   Getfem uses its own workspaces in Matlab, independently of the
+%   matlab workspaces (this is due to some limitations in the memory
+%   management of matlab objects). By default, all getfem variables
+%   belong to the root getfem workspace. A function can create its own
+%   workspace by invoking gf_workspace('push') at its beginning. When
+%   exiting, this function MUST invoke gf_workspace('pop') (you can
+%   use matlab exceptions handling to do this cleanly when the
+%   function exits on an error).
+%   
+%   
+%
+%   * gf_workspace('push')
+%   Create a new temporary workspace on the workspace stack.
+%
+%   * gf_workspace('pop',  [,i,j, ...])
+%   Leave the current workspace, destroying all getfem objects
+%   belonging to it, except the one listed after 'pop', and the ones
+%   moved to parent workspace by gf_workspace('keep').
+%
+%   * gf_workspace('stat')
+%   Print informations about variables in current workspace.
+%
+%   * gf_workspace('stats')
+%   Print informations about all getfem variables.
+%
+%   * gf_workspace('keep', i[,j,k...])
+%   prevent the listed variables from being deleted when
+%   gf_workspace("pop") will be called by moving these variables in the
+%   parent workspace.
+%
+%   * gf_workspace('keep all')
+%   prevent all variables from being deleted when
+%   gf_workspace("pop") will be called by moving the variables in the
+%   parent workspace.
+%
+%   * gf_workspace('clear')
+%   Clear the current workspace.
+%
+%   * gf_workspace('clear all')
+%   Clear every workspace, and returns to the main workspace (you
+%   should not need this command).
+%
+%   * gf_workspace('class name', i)
+%   Return the class name of object i (if I is a mesh handle, it
+%   return gfMesh etc..)
+%
+%
+function [varargout]=gf_workspace(varargin)
+  if (nargout),
+    [varargout{1:nargout}]=gf_matlab('workspace', varargin{:});
+  else
+    gf_matlab('workspace', varargin{:});
+    if (exist('ans', 'var') == 1), varargout{1}=ans; end;
+  end;
+% autogenerated mfile;
diff --git a/interface/src/octave/gfi_array.h b/interface/src/octave/gfi_array.h
new file mode 100644
index 0000000..e12c6b2
--- /dev/null
+++ b/interface/src/octave/gfi_array.h
@@ -0,0 +1,213 @@
+/* -*- c++ -*- (enables emacs c++ mode) */
+/*===========================================================================
+
+ Copyright (C) 2006-2017 Yves Renard, Julien Pommier.
+
+ This file is a part of GetFEM++
+
+ GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+ under  the  terms  of the  GNU  Lesser General Public License as published
+ by  the  Free Software Foundation;  either version 3 of the License,  or
+ (at your option) any later version along with the GCC Runtime Library
+ Exception either version 3.1 or (at your option) any later version.
+ This program  is  distributed  in  the  hope  that it will be useful,  but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+ License and GCC Runtime Library Exception for more details.
+ You  should  have received a copy of the GNU Lesser General Public License
+ along  with  this program;  if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+
+ As a special exception, you  may use  this file  as it is a part of a free
+ software  library  without  restriction.  Specifically,  if   other  files
+ instantiate  templates  or  use macros or inline functions from this file,
+ or  you compile this  file  and  link  it  with other files  to produce an
+ executable, this file  does  not  by itself cause the resulting executable
+ to be covered  by the GNU Lesser General Public License.  This   exception
+ does not  however  invalidate  any  other  reasons why the executable file
+ might be covered by the GNU Lesser General Public License.
+
+===========================================================================*/
+
+#ifndef GFI_ARRAY
+#define GFI_ARRAY
+
+#include <sys/types.h>
+#ifdef USE_RPC
+# include <rpc/types.h>
+#else
+# ifndef __u_char_defined
+  typedef unsigned int u_int;
+#  endif
+#endif
+
+typedef enum { MATLAB_INTERFACE, PYTHON_INTERFACE, SCILAB_INTERFACE} 
gfi_interface_type;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+  /* extrait du gfi_rpc.h genere par rpcgen */
+enum gfi_type_id {
+        GFI_INT32 = 0,
+        GFI_UINT32 = 1,
+        GFI_DOUBLE = 2,
+        GFI_CHAR = 4,
+        GFI_CELL = 5,
+        GFI_OBJID = 6,
+        GFI_SPARSE = 7
+};
+typedef enum gfi_type_id gfi_type_id;
+
+struct gfi_object_id {
+        int id;
+        int cid;
+};
+typedef struct gfi_object_id gfi_object_id;
+
+struct gfi_sparse {
+        struct {
+                u_int ir_len;
+                int *ir_val;
+        } ir;
+        struct {
+                u_int jc_len;
+                int *jc_val;
+        } jc;
+        struct {
+                u_int pr_len; /* == nnz*2 when is_complex == 1 */
+                double *pr_val;
+        } pr;
+        int is_complex;
+};
+typedef struct gfi_sparse gfi_sparse;
+
+typedef struct gfi_array *pgfi_array;
+
+struct gfi_storage {
+        gfi_type_id type;
+        union {
+                struct {
+                        u_int data_int32_len;
+                        int *data_int32_val;
+                } data_int32;
+                struct {
+                        u_int data_uint32_len;
+                        u_int *data_uint32_val;
+                } data_uint32;
+                struct {
+                        u_int data_double_len; /* twice the real size of the 
array when is_complex == 1 */
+                        double *data_double_val;
+                        int is_complex;
+                } data_double;
+                struct {
+                        u_int data_char_len;
+                        char *data_char_val;
+                } data_char;
+                struct {
+                        u_int data_cell_len;
+                        pgfi_array *data_cell_val;
+                } data_cell;
+                struct {
+                        u_int objid_len;
+                        struct gfi_object_id *objid_val;
+                } objid;
+                struct gfi_sparse sp;
+        } gfi_storage_u;
+};
+typedef struct gfi_storage gfi_storage;
+
+struct gfi_array {
+        struct {
+                u_int dim_len;
+                u_int *dim_val;
+        } dim;
+        gfi_storage storage;
+};
+typedef struct gfi_array gfi_array;
+
+struct gfi_array_list {
+        struct {
+                u_int arg_len;
+                gfi_array *arg_val;
+        } arg;
+};
+typedef struct gfi_array_list gfi_array_list;
+
+enum gfi_status {
+        GFI_STATUS_OK = 0,
+        GFI_STATUS_ERROR = 1
+};
+typedef enum gfi_status gfi_status;
+
+struct gfi_output {
+        gfi_status status;
+        union {
+                gfi_array_list output;
+                char *errmsg;
+        } gfi_output_u;
+  char *infomsg;
+};
+typedef struct gfi_output gfi_output;
+
+typedef enum {GFI_REAL=0, GFI_COMPLEX=1} gfi_complex_flag;
+
+void gfi_free(void *p);
+void* gfi_calloc(size_t n, size_t m);
+
+gfi_array*
+gfi_array_create(int ndim, int *dims, gfi_type_id type, gfi_complex_flag);
+gfi_array*
+gfi_array_create_1(int M, gfi_type_id type, gfi_complex_flag);
+gfi_array*
+gfi_array_create_2(int M, int N, gfi_type_id type, gfi_complex_flag);
+gfi_array*
+gfi_array_from_string(const char *s);
+gfi_array*
+gfi_create_sparse(int m, int n, int nzmax, gfi_complex_flag);
+  /*gfi_array*
+    gfi_create_objid(int nid, unsigned *ids, unsigned cid);*/
+void
+gfi_array_destroy(gfi_array *t);
+int
+gfi_array_get_ndim(const gfi_array*t);
+const int*
+gfi_array_get_dim(const gfi_array*t);
+unsigned
+gfi_array_nb_of_elements(const gfi_array *t);
+unsigned int*
+gfi_sparse_get_ir(const gfi_array *t);
+unsigned int*
+gfi_sparse_get_jc(const gfi_array *t);
+double*
+gfi_sparse_get_pr(const gfi_array *t);
+char*
+gfi_char_get_data(const gfi_array* t);
+int*
+gfi_int32_get_data(const gfi_array *t);
+unsigned *
+gfi_uint32_get_data(const gfi_array *t);
+double*
+gfi_double_get_data(const gfi_array* t);
+int
+gfi_array_is_complex(const gfi_array* t);
+gfi_array**
+gfi_cell_get_data(const gfi_array *t);
+gfi_object_id*
+gfi_objid_get_data(const gfi_array *t);
+gfi_type_id
+gfi_array_get_class(const gfi_array *t);
+const char*
+gfi_array_get_class_name(const gfi_array *t);
+const char *
+gfi_type_id_name(gfi_type_id id, gfi_complex_flag is_complex);
+void gfi_array_print(gfi_array *t);
+
+
+  int is_cancel_flag_set(void);
+  void set_cancel_flag(int v);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/interface/src/octave/gfm_common.c 
b/interface/src/octave/gfm_common.c
new file mode 100644
index 0000000..126c8ed
--- /dev/null
+++ b/interface/src/octave/gfm_common.c
@@ -0,0 +1,422 @@
+/* -*- c++ -*- (enables emacs c++ mode) */
+/*===========================================================================
+ 
+ Copyright (C) 2006-2012 Julien Pommier.
+ 
+ This file is a part of GetFEM++
+ 
+ GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+ under  the  terms  of the  GNU  Lesser General Public License as published
+ by  the  Free Software Foundation;  either version 2.1 of the License,  or
+ (at your option) any later version.
+ This program  is  distributed  in  the  hope  that it will be useful,  but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+ License for more details.
+ You  should  have received a copy of the GNU Lesser General Public License
+ along  with  this program;  if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+ 
+===========================================================================*/
+
+#include <assert.h>
+#include <signal.h>
+#include <string.h>
+#include "gfm_common.h"
+#include "mex.h"
+
+const char*
+mxClassID2string(mxClassID id) {
+  switch (id) {
+    case mxUNKNOWN_CLASS: return "UNKNOWN";
+    case mxCELL_CLASS:    return "CELL";
+    case mxSTRUCT_CLASS:  return "STRUCT";
+    /* case mxOBJECT_CLASS:  return "OBJECT"; ## oct-modif## */
+    case mxCHAR_CLASS:    return "CHAR";
+    case mxDOUBLE_CLASS:  return "DOUBLE";
+    case mxSINGLE_CLASS:  return "SINGLE";
+    case mxINT8_CLASS:    return "INT8";
+    case mxUINT8_CLASS:   return "UINT8";
+    case mxINT16_CLASS:   return "INT16";
+    case mxUINT16_CLASS:  return "UINT16";
+    case mxINT32_CLASS:   return "INT32";
+    case mxUINT32_CLASS:  return "UINT32";
+    case mxINT64_CLASS:   return "INT64";
+    case mxUINT64_CLASS:  return "UINT64";
+    /* case mxSPARSE_CLASS:  return "SPARSE"; ## oct-modif## */
+#ifdef LOGICAL_IS_A_TYPE
+    case mxLOGICAL_CLASS: return "LOGICAL";
+#endif
+    /* case mxOPAQUE_CLASS: return "OPAQUE_CLASS"; ## oct-modif## */
+    default:
+      if (id != (mxClassID)(-1))
+       return "OBJECT";
+      else
+       return "unknown class...did you use the correct mex version ?";
+  }
+}
+
+int
+mxarray_to_gfi_array(const mxArray *mx, gfi_array *t)
+{
+  int n = mxGetNumberOfElements(mx);
+  mwSize n2;
+  n2=n;
+  
+  assert(t);
+  switch (mxGetClassID(mx)) {    
+    case mxCELL_CLASS: {
+      mwSize i;
+      t->storage.type = GFI_CELL;
+      t->storage.gfi_storage_u.data_cell.data_cell_len = n;
+      t->storage.gfi_storage_u.data_cell.data_cell_val = 
(gfi_array**)mxCalloc(n, sizeof(gfi_array*));
+      for (i = 0; i < n; ++i) {
+        if (mxGetCell(mx,i)) {
+          t->storage.gfi_storage_u.data_cell.data_cell_val[i] = 
mxCalloc(1,sizeof(gfi_array));
+          if (mxarray_to_gfi_array(mxGetCell(mx,i), 
t->storage.gfi_storage_u.data_cell.data_cell_val[i]) != 0) return 1;
+        } else t->storage.gfi_storage_u.data_cell.data_cell_val[i] = NULL;
+      }
+    } break;
+    case mxCHAR_CLASS: {
+      t->storage.type = GFI_CHAR;
+      t->storage.gfi_storage_u.data_char.data_char_len = n;    
+      t->storage.gfi_storage_u.data_char.data_char_val = 
mxCalloc(n+1,sizeof(char));
+      mxGetString(mx,t->storage.gfi_storage_u.data_char.data_char_val,n2+1);   
                        
+      
+    } break;
+    case mxINT32_CLASS: {
+      t->storage.type = GFI_INT32;
+      t->storage.gfi_storage_u.data_int32.data_int32_len = n;
+      t->storage.gfi_storage_u.data_int32.data_int32_val = mxGetData(mx);
+    } break;
+#ifdef LOGICAL_IS_A_TYPE
+    case mxLOGICAL_CLASS: {
+      int i;
+      mxLogical *p = (mxLogical*)mxGetData(mx);
+      t->storage.type = GFI_INT32;
+      t->storage.gfi_storage_u.data_int32.data_int32_len = n;
+      t->storage.gfi_storage_u.data_int32.data_int32_val = 
(int*)mxCalloc(n,sizeof(int));
+      for (i = 0; i < n; ++i)
+       t->storage.gfi_storage_u.data_int32.data_int32_val[i] = (p[i] ? 1 : 0);
+    } break;
+#endif
+    case mxUINT32_CLASS: {
+      t->storage.type = GFI_UINT32;
+      t->storage.gfi_storage_u.data_uint32.data_uint32_len = n;
+      t->storage.gfi_storage_u.data_uint32.data_uint32_val = mxGetData(mx);
+    } break;
+    /* case mxSPARSE_CLASS: ## oct-modif## /* for older (i.e. 6.1) matlab 
versions... */
+    case mxDOUBLE_CLASS: {
+      int is_complex = mxIsComplex(mx);
+      
+      if (!mxIsSparse(mx)) {
+        t->storage.type = GFI_DOUBLE;
+       t->storage.gfi_storage_u.data_double.is_complex = is_complex;
+        t->storage.gfi_storage_u.data_double.data_double_len = n * (is_complex 
? 2 : 1);
+        if (!is_complex) {
+          t->storage.gfi_storage_u.data_double.data_double_val = mxGetData(mx);
+        } else {
+          double *pr = mxGetData(mx), *pi = mxGetImagData(mx);
+          int i;
+          t->storage.gfi_storage_u.data_double.data_double_val = 
mxCalloc(n,sizeof(double)*2);
+          for (i=0; i < n; ++i) { 
+            t->storage.gfi_storage_u.data_double.data_double_val[i*2] = pr[i];
+            t->storage.gfi_storage_u.data_double.data_double_val[i*2+1] = 
pi[i];
+          }
+        }
+      } else {
+        /*******************************************/
+        int nnz = mxGetNzmax(mx);
+        int i, lgs;
+        mwIndex *ptr2;
+        int *ptr;
+        
+        t->storage.type = GFI_SPARSE;
+        t->storage.gfi_storage_u.sp.is_complex = is_complex;
+        t->storage.gfi_storage_u.sp.ir.ir_len = nnz;
+        ptr=mxCalloc(nnz,sizeof(int));
+        ptr2=mxGetIr(mx);
+        
+        for (i=0; i < nnz; ++i)
+        {
+            ptr[i]=ptr2[i];
+        }
+        t->storage.gfi_storage_u.sp.ir.ir_val = ptr;
+        /*t->storage.gfi_storage_u.sp.ir.ir_val = mxGetIr(mx);*/
+        
+        /*******************************************/
+        lgs=mxGetN(mx)+1;
+        t->storage.gfi_storage_u.sp.jc.jc_len = lgs;
+        ptr=mxCalloc(lgs,sizeof(int));
+        ptr2=mxGetJc(mx);
+        
+        for (i=0; i < lgs; ++i)
+        {
+            ptr[i]=ptr2[i];
+        }
+        
+        t->storage.gfi_storage_u.sp.jc.jc_val = ptr;
+        /*t->storage.gfi_storage_u.sp.jc.jc_val = mxGetJc(mx);*/  
+        
+        /********************************************/
+        t->storage.gfi_storage_u.sp.pr.pr_len = nnz * (is_complex ? 2 : 1);
+        if (!is_complex) {
+          t->storage.gfi_storage_u.sp.pr.pr_val = mxGetPr(mx);        
+        } else {
+          double *pr = mxGetPr(mx), *pi = mxGetPi(mx);
+          int i;
+          t->storage.gfi_storage_u.sp.pr.pr_val = 
mxCalloc(nnz,sizeof(double)*2);
+          for (i=0; i < nnz; ++i) {
+            t->storage.gfi_storage_u.sp.pr.pr_val[i*2] = pr[i];
+            t->storage.gfi_storage_u.sp.pr.pr_val[i*2+1] = pi[i];
+          }
+        }
+      }
+    } break;
+    /* case mxOBJECT_CLASS: ## oct-modif## */
+    case mxSTRUCT_CLASS: 
+    default: 
+      {
+      mxArray *fid = mxGetField(mx, 0, "id");
+      mxArray *fcid = mxGetField(mx, 0, "cid");
+      if (fid && mxGetClassID(fid) == mxUINT32_CLASS &&
+          fcid && mxGetClassID(fcid) == mxUINT32_CLASS) {
+        int n = mxGetNumberOfElements(fid),i;
+        assert(n == mxGetNumberOfElements(fcid));
+        if (mxGetNumberOfElements(fid) >= 1) {
+          t->storage.type = GFI_OBJID;
+          t->storage.gfi_storage_u.objid.objid_len = 
mxGetNumberOfElements(fid);
+          t->storage.gfi_storage_u.objid.objid_val = mxCalloc(n, 
sizeof(gfi_object_id));
+          for (i=0; i < n; ++i) {
+            t->storage.gfi_storage_u.objid.objid_val[i].id = 
((int*)mxGetData(fid))[i];
+            t->storage.gfi_storage_u.objid.objid_val[i].cid = 
((int*)mxGetData(fcid))[i];
+          }
+        } else {
+          mexPrintf("empty arrays of getfem object ids not handled"); return 1;
+        }
+      } else { 
+        mexPrintf("matlab structures (except getfem object ids) not handled"); 
return 1; 
+      }
+    } break;
+  }
+  {
+    mwSize *pm;
+    int k,kkk,dmlen;
+    t->dim.dim_len = mxGetNumberOfDimensions(mx);
+    dmlen=t->dim.dim_len;
+    pm=(mwSize *)mxGetDimensions(mx);
+    t->dim.dim_val = (u_int*)mxCalloc(dmlen,sizeof(int));
+    
+    for (k=0; k <dmlen; ++k) {   
+      kkk=(int)pm[k];   
+      t->dim.dim_val[k]=kkk;
+    }
+  }
+  return 0;
+}
+
+mxArray*
+gfi_array_to_mxarray(gfi_array *t) {
+  mxArray *m;
+
+  /* Matlab represent scalars as an array of size one */
+  /* while gfi_array represents "scalar" values with 0-dimension array */
+  int ndim = (t->dim.dim_len == 0 ? 1 : t->dim.dim_len);
+  static const int one = 1;
+  const int *dim = (t->dim.dim_len == 0 ? &one : (const int *)t->dim.dim_val);
+  mwSize ndim2, *dim2;
+  int number = 450;
+  int ij;
+  /****************** dimensions array in mwSize */  
+  ndim2=ndim;
+  dim2=mxCalloc(ndim,sizeof(mwSize));
+
+  assert(t);
+   
+  for (ij=0;ij<ndim;ij++)
+   {
+        dim2[ij]=dim[ij];     
+   }
+  /*************** end dimensions array in mwSize */  
+
+  switch (t->storage.type) {
+    case GFI_UINT32: 
+    case GFI_INT32: {
+      int i;
+      int *pr; 
+      m = mxCreateNumericArray(ndim2, dim2, (t->storage.type == GFI_UINT32) ? 
mxUINT32_CLASS:mxINT32_CLASS, mxREAL);
+      pr = mxGetData(m);
+      for (i=0; i < t->storage.gfi_storage_u.data_int32.data_int32_len; ) 
+      {   
+        *pr++=(int)t->storage.gfi_storage_u.data_int32.data_int32_val[i++];    
  
+      }
+    } break;
+    case GFI_DOUBLE: {
+      int i;
+      double *pr = 0, *pi = 0;
+      if (!gfi_array_is_complex(t)) {
+        m = mxCreateNumericArray(ndim2, dim2, mxDOUBLE_CLASS, mxREAL);
+        pr=mxGetData(m);  
+         for (i=0; i < t->storage.gfi_storage_u.data_double.data_double_len; ) 
+         {
+            *pr++=t->storage.gfi_storage_u.data_double.data_double_val[i++];
+         }      
+      } else {
+        m = mxCreateNumericArray(ndim2, dim2, mxDOUBLE_CLASS, mxCOMPLEX);
+        pr = mxGetData(m); pi = mxGetImagData(m);
+        for (i=0; i < t->storage.gfi_storage_u.data_double.data_double_len; ) {
+          *pr++ = t->storage.gfi_storage_u.data_double.data_double_val[i++];
+          *pi++ = t->storage.gfi_storage_u.data_double.data_double_val[i++];
+        }
+      }
+    } break;
+    case GFI_CHAR: {
+      char *s = calloc(t->storage.gfi_storage_u.data_char.data_char_len+1,1); 
+      
strncpy(s,t->storage.gfi_storage_u.data_char.data_char_val,t->storage.gfi_storage_u.data_char.data_char_len);
+      m = mxCreateString(s); free(s);
+    } break;
+    case GFI_CELL: {
+      unsigned i;
+      m = mxCreateCellArray(ndim2, dim2);
+      for (i=0; i < t->storage.gfi_storage_u.data_cell.data_cell_len; ++i)
+        
mxSetCell(m,i,gfi_array_to_mxarray(t->storage.gfi_storage_u.data_cell.data_cell_val[i]));
+    } break;
+    case GFI_OBJID: {
+      unsigned i;
+      mwSize j,i2;
+      static const char *fields[] = {"id","cid"};
+      mxArray *mxid, *mxcid;    
+      j=t->storage.gfi_storage_u.objid.objid_len;
+      m = mxCreateStructArray(1, (const mwSize*)&j, 2, fields);
+      
+      j=1;
+      
+      for (i=0; i < t->storage.gfi_storage_u.objid.objid_len; ++i) 
+      {
+        mxid = mxCreateNumericArray(1, (const mwSize*)&j, mxUINT32_CLASS, 
mxREAL);        
+        *(int*)mxGetData(mxid) = 
t->storage.gfi_storage_u.objid.objid_val[i].id;       
+        i2=i;       
+        mxSetField(m,i2,fields[0], mxid);
+        
+        mxcid = mxCreateNumericArray(1, (const mwSize*)&j, mxUINT32_CLASS, 
mxREAL);                
+        *(int*)mxGetData(mxcid) = 
t->storage.gfi_storage_u.objid.objid_val[i].cid;      
+        mxSetField(m,i2,fields[1], mxcid);
+      }
+    } break;
+    case GFI_SPARSE: {
+        
+     /****************** Ir treatement */
+      int i;
+      mwIndex d1,d2,nnz;
+      mwIndex *pr2;
+      assert(t);
+      
+      d1=t->dim.dim_val[0];
+      d2=t->dim.dim_val[1];
+      nnz=t->storage.gfi_storage_u.sp.pr.pr_len;
+      m = mxCreateSparse(d1,d2,nnz,
+                         gfi_array_is_complex(t) ? mxCOMPLEX : mxREAL);        
         
+      pr2=mxGetIr(m);
+      
+      for (i=0; i <  t->storage.gfi_storage_u.sp.ir.ir_len; i++) {
+          *pr2 = t->storage.gfi_storage_u.sp.ir.ir_val[i];
+          pr2++;
+      }      
+     /****************** end Ir treatement */
+     /****************** Jc treatement */      
+      pr2=mxGetJc(m);
+      
+        for (i=0; i <  t->storage.gfi_storage_u.sp.jc.jc_len; i++) {
+          *pr2 =  t->storage.gfi_storage_u.sp.jc.jc_val[i];
+          pr2++;
+        }      
+     /****************** end Jc treatement */
+      
+      if (!gfi_array_is_complex(t)) {
+        memcpy(mxGetPr(m), t->storage.gfi_storage_u.sp.pr.pr_val, 
t->storage.gfi_storage_u.sp.pr.pr_len * sizeof(double));
+      } else {
+        double *pr, *pi; int i;
+        pr = mxGetPr(m); pi = mxGetPi(m);
+       for (i=0; i < t->storage.gfi_storage_u.sp.pr.pr_len; ) {
+          *pr++ = t->storage.gfi_storage_u.sp.pr.pr_val[i++];
+          *pi++ = t->storage.gfi_storage_u.sp.pr.pr_val[i++];
+        }
+      }
+    } break;
+    default:  {
+      assert(0);
+    } break;
+  }
+  mxFree(dim2); 
+  return m;
+}
+
+/*******************************************************/
+
+gfi_array_list *
+build_gfi_array_list(int nrhs, const mxArray *prhs[]) {
+  gfi_array_list *l;
+  int i;
+  gfi_array **pin;
+  
+  
+  l = mxCalloc(1,sizeof(gfi_array_list));
+  l->arg.arg_len = nrhs;
+  l->arg.arg_val = mxCalloc(nrhs, sizeof(gfi_array));
+  for (i=0; i < nrhs; ++i) {   
+    if (mxarray_to_gfi_array(prhs[i], &l->arg.arg_val[i]) != 0) return NULL;
+  }
+  
+  /*-------------*/
+  pin = gfi_calloc(l->arg.arg_len, sizeof(gfi_array*));
+  for (i=0; i < l->arg.arg_len; ++i) {
+    pin[i] = &l->arg.arg_val[i];       
+  }
+  
+  return l;
+}
+
+
+#ifndef WIN32
+struct sigaction old_sigint;
+#endif
+
+
+static int sigint_hit = 0;
+static getfem_sigint_handler_t sigint_callback;
+
+static void sigint(int sig) {
+  sigint_callback(sig);
+  remove_custom_sigint(0);
+  sigint_hit++;
+}
+
+
+void install_custom_sigint(getfem_sigint_handler_t h) {
+#ifndef WIN32 /* matlab on win does not use signals so.. */
+  struct sigaction new_sigint;
+  new_sigint.sa_handler = sigint;
+  sigint_callback = h;
+  sigemptyset(&new_sigint.sa_mask);
+  new_sigint.sa_flags = 0;
+  sigaction (SIGINT, NULL, &old_sigint);
+  if (old_sigint.sa_handler != SIG_IGN)
+    sigaction(SIGINT, &new_sigint, NULL);
+  sigint_hit = 0;
+#endif
+}
+
+void remove_custom_sigint(int allow_rethrow) {
+#ifndef WIN32
+  struct sigaction act;
+  sigaction (SIGINT, NULL, &act);
+  if (act.sa_handler == sigint) {
+    sigaction(SIGINT, &old_sigint, NULL);
+  }
+  if (allow_rethrow && sigint_hit) {
+    fprintf(stderr, "ready, raising SIGINT now\n");
+    raise(SIGINT); 
+  }
+  sigint_hit = 0; 
+#endif
+}
diff --git a/interface/src/octave/gfm_common.h 
b/interface/src/octave/gfm_common.h
new file mode 100644
index 0000000..49b78e1
--- /dev/null
+++ b/interface/src/octave/gfm_common.h
@@ -0,0 +1,46 @@
+/* -*- c++ -*- (enables emacs c++ mode) */
+/*===========================================================================
+ 
+ Copyright (C) 2006-2012 Yves Renard, Julien Pommier.
+ 
+ This file is a part of GetFEM++
+ 
+ GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+ under  the  terms  of the  GNU  Lesser General Public License as published
+ by  the  Free Software Foundation;  either version 2.1 of the License,  or
+ (at your option) any later version.
+ This program  is  distributed  in  the  hope  that it will be useful,  but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+ License for more details.
+ You  should  have received a copy of the GNU Lesser General Public License
+ along  with  this program;  if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+ 
+ As a special exception, you  may use  this file  as it is a part of a free
+ software  library  without  restriction.  Specifically,  if   other  files
+ instantiate  templates  or  use macros or inline functions from this file,
+ or  you compile this  file  and  link  it  with other files  to produce an
+ executable, this file  does  not  by itself cause the resulting executable
+ to be covered  by the GNU Lesser General Public License.  This   exception
+ does not  however  invalidate  any  other  reasons why the executable file
+ might be covered by the GNU Lesser General Public License.
+ 
+===========================================================================*/
+
+#ifndef GFM_COMMON_H
+#define GFM_COMMON_H
+
+#include "mex.h"
+#include <gfi_array.h>
+
+const char* mxClassID2string(mxClassID id);
+int mxarray_to_gfi_array(const mxArray *mx, gfi_array *t);
+mxArray* gfi_array_to_mxarray(gfi_array *t);
+gfi_array_list *build_gfi_array_list(int nrhs, const mxArray *prhs[]);
+
+typedef void (*getfem_sigint_handler_t)(int);
+void install_custom_sigint(getfem_sigint_handler_t h);
+void remove_custom_sigint(int allow_rethrow);
+
+#endif
diff --git a/interface/src/octave/gfm_mex.c b/interface/src/octave/gfm_mex.c
new file mode 100644
index 0000000..41605ca
--- /dev/null
+++ b/interface/src/octave/gfm_mex.c
@@ -0,0 +1,144 @@
+/* -*- c++ -*- (enables emacs c++ mode) */
+/*===========================================================================
+ 
+ Copyright (C) 2006-2012 Yves Renard, Julien Pommier.
+ 
+ This file is a part of GetFEM++
+ 
+ GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+ under  the  terms  of the  GNU  Lesser General Public License as published
+ by  the  Free Software Foundation;  either version 2.1 of the License,  or
+ (at your option) any later version.
+ This program  is  distributed  in  the  hope  that it will be useful,  but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+ License for more details.
+ You  should  have received a copy of the GNU Lesser General Public License
+ along  with  this program;  if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+ 
+===========================================================================*/
+
+#include <assert.h>
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
+/* #include <unistd.h> */
+#include "mex.h"
+#include "gfm_common.h"
+#include "getfem_interface.h"
+
+void set_superlu_callback(int (*cb)());
+int handle_getfem_callback();
+
+/* main file for the giant gf_matlab mex-file */
+/*
+char* getfem_interface_main(int config_id, const char *function, 
+                           int nb_in_args,
+                           const gfi_array *in_args[], 
+                           int *nb_out_args,
+                           gfi_array ***pout_args, char **pinfomsg, bool 
scilab_flag);
+*/
+
+#define FREE(p) { /*printf("%s@%d", __FILE__, __LINE__); */gfi_free(p); }
+gfi_output *
+call_getfem_interface(char *funname, gfi_array_list in, int nlhs)
+{
+  static gfi_output  result;
+  /*  result.status = GFI_STATUS_OK;
+  result.gfi_output_u.output.arg.arg_len = nlhs;
+  result.gfi_output_u.output.arg.arg_val = gfi_calloc(nlhs, sizeof(gfi_array));
+  return &result;
+  */
+  unsigned int i;
+  gfi_array **pin;
+  gfi_array **pout = NULL;
+  char *errmsg=0, *infomsg=0;
+  /*printf("** CALLED FUNCTION gf_%s(", funname);*/
+
+  pin = gfi_calloc(in.arg.arg_len, sizeof(gfi_array*));
+  for (i=0; i < in.arg.arg_len; ++i) {
+    pin[i] = &in.arg.arg_val[i];
+  }
+  errmsg = getfem_interface_main(MATLAB_INTERFACE, funname, in.arg.arg_len, 
(const gfi_array **)pin, &nlhs, &pout, &infomsg,0);
+  result.infomsg = infomsg;
+  if (errmsg) {
+    result.status = GFI_STATUS_ERROR;
+    result.gfi_output_u.errmsg = errmsg;
+  } else {
+    result.status = GFI_STATUS_OK;
+    result.gfi_output_u.output.arg.arg_len = nlhs;
+    result.gfi_output_u.output.arg.arg_val = gfi_calloc(nlhs, 
sizeof(gfi_array));
+    for (i=0; i < nlhs; ++i) {
+      assert(pout[i]);
+      result.gfi_output_u.output.arg.arg_val[i] = *pout[i];
+      FREE(pout[i]);
+    }
+    if (pout) FREE(pout);
+  }
+  FREE(pin);
+  return &result;
+}
+
+char *current_matlab_function = NULL;
+
+void sigint_callback(int sig) {
+  char *s = current_matlab_function; if (!s) s = "doh!!";
+  fprintf(stderr, "*** CTRL-C hit during execution of the getfem_matlab 
function: gf_%s...\n" \
+         "You will gain control as soon as the current operation is finished 
***\n" \
+         "If you want to abort immediatly the current operation, hit CTRL-C 
again\n" \
+         "In that case, you will have to restart getfem_matlab, using 'clear 
functions' for example:\n", s);
+  set_cancel_flag(1);
+  assert(handle_getfem_callback() == 1);
+}
+
+void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
+  gfi_output *out;
+  gfi_array_list *in;
+
+  set_cancel_flag(0);
+  set_superlu_callback(is_cancel_flag_set);
+
+  if (nrhs == 0 || !mxIsChar(prhs[0])) {
+    mexErrMsgTxt("missing function name");
+  }
+  current_matlab_function = mxCalloc(mxGetNumberOfElements(prhs[0])+1,1);
+  if (mxGetString(prhs[0], current_matlab_function, 
mxGetNumberOfElements(prhs[0])+1))
+    mexErrMsgTxt("mxGetString failure");
+  in = build_gfi_array_list(nrhs-1, prhs+1);
+  if (!in) mexErrMsgTxt("a problem occured while reading arguments");
+
+
+  install_custom_sigint(sigint_callback);
+  out = call_getfem_interface(current_matlab_function, *in, nlhs);
+  remove_custom_sigint(out->status == GFI_STATUS_OK);
+
+  if (out == NULL) {
+    mexPrintf("could not connect to getfem_matlab server...");
+  } else {
+    if (out->infomsg) {
+      mexPrintf("message from [gf_%s]:\n%s\n", current_matlab_function, 
out->infomsg);
+    }
+
+    if (out->status == GFI_STATUS_OK) {
+      gfi_array_list *outl = &out->gfi_output_u.output;
+      unsigned i;
+      if (nlhs == 0 && outl->arg.arg_len > 0) { /* not very nice */
+       mxArray *mx = gfi_array_to_mxarray(&outl->arg.arg_val[0]);
+       mexPutVariable("caller", "ans", mx);
+      }
+      for (i=0; i < outl->arg.arg_len; ++i) {
+        plhs[i] = gfi_array_to_mxarray(&outl->arg.arg_val[i]);
+        gfi_array_destroy(&outl->arg.arg_val[i]);
+      }
+      FREE(outl->arg.arg_val);
+    } else {
+      /* duplicate the string into a matlab-allocated buffer.. */
+      char *s = mxCalloc(strlen(out->gfi_output_u.errmsg)+1,1);
+      strcpy(s, out->gfi_output_u.errmsg);
+      FREE(out->gfi_output_u.errmsg);
+      mexErrMsgTxt(s);
+    }
+  }
+}
+
diff --git a/interface/src/octave/gfm_rpc_mexint.c 
b/interface/src/octave/gfm_rpc_mexint.c
new file mode 100644
index 0000000..b590216
--- /dev/null
+++ b/interface/src/octave/gfm_rpc_mexint.c
@@ -0,0 +1,273 @@
+/* -*- c++ -*- (enables emacs c++ mode) */
+/*===========================================================================
+ 
+ Copyright (C) 2006-2012 Yves Renard, Julien Pommier.
+ 
+ This file is a part of GetFEM++
+ 
+ GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+ under  the  terms  of the  GNU  Lesser General Public License as published
+ by  the  Free Software Foundation;  either version 2.1 of the License,  or
+ (at your option) any later version.
+ This program  is  distributed  in  the  hope  that it will be useful,  but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+ License for more details.
+ You  should  have received a copy of the GNU Lesser General Public License
+ along  with  this program;  if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+ 
+===========================================================================*/
+
+/*
+ * This is sample code generated by rpcgen.
+ * These are only templates and you can use them
+ * as a guideline for developing your own functions.
+ */
+#include <assert.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <signal.h>
+#include <errno.h>
+#include <unistd.h>
+#include "gfi_rpc.h"
+#include "gfm_common.h"
+
+/* main file for the gf_matlab version using RPCs */
+
+pid_t local_pid = 0;
+char *remote_hostname = NULL;
+int remote_port = -1;
+int local_socket = -1;
+int remote_socket = -1;
+
+#ifndef PATH_MAX
+#define PATH_MAX 1024 
+#endif
+
+#ifndef INVALID_SOCKET
+#define INVALID_SOCKET -1
+#endif
+
+
+void sigint_callback(int sig) {
+  fprintf(stderr, "*** CTRL-C hit during execution of a getfem_matlab 
function...\n" \
+         "You will gain control as soon as the current operation is finished 
***\n" \
+         "If you want to abort immediatly the current operation, hit CTRL-C 
again\n" \
+         "(in that case, the getfem_matlab server will have to be restarted)");
+}
+
+
+void
+gfmrpc_1(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
+{
+  CLIENT *clnt;
+  void  *test;
+  gfi_output *out;
+  gfi_array_list *in;
+  char *function = NULL;
+  /*static char saved_current_dir[PATH_MAX] = "";*/
+  char current_dir[PATH_MAX];
+  struct timeval tv;
+
+  if (nrhs == 0 || !mxIsChar(prhs[0])) {
+    mexErrMsgTxt("missing function name");
+  }
+  function = calloc(mxGetNumberOfElements(prhs[0])+1,1);
+  if (mxGetString(prhs[0], function, mxGetNumberOfElements(prhs[0])+1))
+    mexErrMsgTxt("mxGetString failure");
+#ifndef        DEBUG
+  /*clnt = clnt_create (host, GFMRPC, GFMRPC_VERS_1, "tcp");*/
+  if (remote_hostname) {
+    if (remote_port == -1) {
+      clnt = clnt_create (remote_hostname, GFMRPC, GFMRPC_VERS_1, "tcp");
+    } else {
+      struct sockaddr_in addr;
+      struct hostent *h = NULL;
+      if ((h = gethostbyname(remote_hostname)) == NULL) {
+        mexPrintf("can't get addr for %s\n",remote_hostname); mexErrMsgTxt("");
+        return;
+      }
+      memset(&addr, 0, sizeof (addr));
+      addr.sin_family = h->h_addrtype;
+      addr.sin_port = htons(remote_port);
+      bcopy(h->h_addr, (char*)&addr.sin_addr, h->h_length);
+        /*      addr.sin_addr.s_addr = ((struct 
in_addr*)(h->h_addr))->s_addr;*/
+      mexPrintf("creating client handle for %s:%d\n", 
remote_hostname,remote_port);
+      if (remote_socket != -1) { close(remote_socket); remote_socket = 
RPC_ANYSOCK; }
+      clnt=clnttcp_create (&addr, GFMRPC, GFMRPC_VERS_1, &remote_socket, 0, 
0); 
+    }
+  } else {
+    /*clnt = clnt_create (local_sockname, GFMRPC, GFMRPC_VERS_1, "unix");*/
+    struct sockaddr_in sin;
+
+    memset (&sin, 0, sizeof (sin));
+    sin.sin_port = 1; /* do not call portmap (it would be stupid to require 
the portmap service  for this kind of connection!) */    
+    clnt=clnttcp_create (&sin, GFMRPC, GFMRPC_VERS_1, &local_socket, 0, 0);
+  }
+  if (clnt == NULL) {
+    clnt_pcreateerror (remote_hostname == NULL ? "localhost" : 
remote_hostname);
+    return;
+  } else {
+    struct timeval tv;
+    tv.tv_sec = 25;
+    tv.tv_usec = 0;
+    clnt_control(clnt, CLSET_TIMEOUT, (char*)&tv);
+  }
+#endif /* DEBUG */
+
+  test = gfmrpc_null_1(clnt);
+  if (test == (void *) NULL) {
+    mexPrintf("[oups] could not connect to getfem_matlab server...");
+    clnt_perror(clnt, ""); goto cleanup;
+  }
+  getcwd(current_dir, PATH_MAX); current_dir[PATH_MAX-1]=0;
+  /*  if (strcmp(current_dir, saved_current_dir)) {
+      strcpy(saved_current_dir, current_dir);*/
+    test = gfmrpc_chdir_1(current_dir, clnt);
+    if (test == (void *) NULL) {
+      mexPrintf("[get cwd] could not connect to getfem_matlab server...");
+      clnt_perror (clnt, ""); goto cleanup;
+    }
+    /* }*/
+  tv.tv_sec = 1000000; tv.tv_usec = 0;
+  clnt_control(clnt, CLSET_TIMEOUT, (char*)&tv);
+  in = build_gfi_array_list(nrhs-1, prhs+1);
+  if (!in) mexErrMsgTxt("a problem occured while reading arguments");
+
+  install_custom_sigint(sigint_callback);
+  out = gfmrpc_call_1(MATLAB_INTERFACE, function, *in, nlhs, clnt);
+  remove_custom_sigint(out && out->status == GFI_STATUS_OK);
+  if (out == NULL) {
+    mexPrintf("[getfem_server call] something went wrong...");
+    clnt_perror (clnt, "");
+  } else {
+    if (out->infomsg && strlen(out->infomsg)) { mexPrintf("message from 
[gf_%s]:\n%s\n", function, out->infomsg); }
+
+    if (out->status == GFI_STATUS_OK) {
+      gfi_array_list *outl = &out->gfi_output_u.output;
+      unsigned i;
+      if (nlhs == 0 && outl->arg.arg_len > 0) { /* not very nice */
+       mxArray *mx = gfi_array_to_mxarray(&outl->arg.arg_val[0]);
+#if MATLAB_RELEASE == 12
+       mexPutArray(mx, "caller"); mxSetName(mx,"ans");
+#else
+       mexPutVariable("caller", "ans", mx);
+#endif
+      }
+      for (i=0; i < outl->arg.arg_len; ++i) {
+        plhs[i] = gfi_array_to_mxarray(&outl->arg.arg_val[i]);              
+        gfi_array_destroy(&outl->arg.arg_val[i]);
+      }
+      if (outl->arg.arg_val) free(outl->arg.arg_val);
+    } else {
+      mexErrMsgTxt(out->gfi_output_u.errmsg);
+    }
+  }
+ cleanup:
+#ifndef        DEBUG
+  clnt_destroy (clnt);
+#endif  /* DEBUG */
+
+}
+
+int mxstringmatch(const mxArray *mx, const char *s) {
+  if (mxIsChar(mx)) {
+    char tmp[1000];
+    mxGetString(mx,tmp,1000);
+    return (strcasecmp(tmp,s) == 0);
+  } else return 0;
+}
+
+char *mxallocstring(const mxArray *mx) {
+  int n;
+  char *s;
+  if (!mxIsChar(mx)) { mexErrMsgTxt("string expected"); }
+  n = mxGetNumberOfElements(mx);
+  s = calloc(n+1,1);
+  mxGetString(mx,s,n+1);
+  return s;
+}
+
+void kill_local_session() {
+  if (local_pid) {
+    int status;
+    mexPrintf("killing getfem_matlab (%d)..\n", local_pid);
+    kill(local_pid, SIGINT);
+    waitpid(local_pid, &status, 0);
+    local_pid = 0;
+  }
+}
+
+void start_local_session() {
+  int sock[2];
+  if (local_pid == 0) {
+    if (socketpair(AF_UNIX, SOCK_STREAM, 0, sock) < 0) {
+      mexErrMsgTxt("unable to create a socket for the server..");
+    }
+    mexPrintf("starting local getfem_server...\n");
+    switch ((local_pid=fork())) {
+    case -1: mexErrMsgTxt("can't fork !"); return;
+    case 0: /* child */
+      {
+        close(sock[0]);
+        dup2(sock[1],4); /* avoid stdin, stdout and stderr */
+        setsid(); /* the server won't be killed by Ctrl-C pressed in matlab */
+        execlp("getfem_server", "getfem_server", "-slave", NULL);
+        fprintf(stderr, "execlp failure .. : %s\n", strerror(errno));
+        exit(1); /* in case the exec failed */
+      } break;
+    default:
+      {
+        close(sock[1]);
+       local_socket = sock[0];
+      } break;
+    }
+  }
+}
+
+/* returns 0 if the child has not exited, or its pid */
+int check_local_session() {
+  int status;
+  if (local_pid) {
+    int res = waitpid(local_pid, &status, WNOHANG);
+    /*fprintf(stderr,"wait(pid=%d)=%d ; status=%d [%s]\n", local_pid, res, 
status, strerror(errno));*/
+    return (res == 0 ? local_pid : 0);
+  } else return 0;
+}
+
+void exitfcn(void) {
+  kill_local_session();
+}
+
+void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
+{
+  static int once=0;
+  if (once==0) { ++once; mexAtExit(exitfcn); }
+
+  if (nrhs > 1 && mxstringmatch(prhs[0],"workspace")) {
+    if (mxstringmatch(prhs[1], "connect") && nrhs >= 3) {
+      kill_local_session();
+      remote_hostname = mxallocstring(prhs[2]);
+      if (nrhs == 4) remote_port = (int)(*mxGetPr(prhs[3]));
+      mexPrintf("connection to %s", remote_hostname); 
+      if (remote_port != -1) mexPrintf(", port %d\n", remote_port);
+      else mexPrintf(", using portmap\n");
+      return;
+    }
+
+  }
+  local_pid = check_local_session();
+  if (local_pid == 0 && remote_hostname == 0)
+    start_local_session();
+  if (local_pid != check_local_session()) {
+    mexErrMsgTxt("could not launch the server, check that it is in the PATH");
+    local_pid = 0;
+  }
+
+  gfmrpc_1(nlhs, plhs, nrhs, prhs);
+}
diff --git a/interface/src/octave/matrix.h b/interface/src/octave/matrix.h
new file mode 100644
index 0000000..cfa8bea
--- /dev/null
+++ b/interface/src/octave/matrix.h
@@ -0,0 +1,1474 @@
+/*
+* PUBLISHed header for the libmx library.
+*
+* Copyright 1984-2013 The MathWorks, Inc.
+* All Rights Reserved.
+*/
+
+/*
+ * NOTE: The contents of this header are ultimately PUBLISHED in
+ * extern/include/matrix.h.
+ */
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 
3))
+# pragma once
+#endif
+
+#ifndef MATRIX_DEVELOPER_API_HPP
+#ifndef matrix_h
+#define matrix_h
+#include <stdlib.h>
+#include <stddef.h>
+#include "tmwtypes.h"
+
+/* we can't see these definitions, which are stored in package.h, so we
+   duplicate them here. */
+#ifdef _MSC_VER
+  #define MATRIX_DLL_EXPORT_SYM __declspec(dllexport)
+  #define MATRIX_DLL_IMPORT_SYM __declspec(dllimport)
+#elif __GNUC__ >= 4
+  #define MATRIX_DLL_EXPORT_SYM __attribute__ ((visibility("default")))
+  #define MATRIX_DLL_IMPORT_SYM __attribute__ ((visibility("default")))
+#else
+  #define MATRIX_DLL_EXPORT_SYM
+  #define MATRIX_DLL_IMPORT_SYM
+#endif
+
+/**
+ * \def LIBMMWMATRIX_PUBLISHED_API
+ * Define symbol access for symbols exported from the libmwmatrix dll.
+ */
+#if defined(BUILDING_PUBLISHED_API_CPP)
+#define LIBMMWMATRIX_PUBLISHED_API MATRIX_DLL_EXPORT_SYM
+#else
+#if defined(export_matrix_h)
+/* we are a C file coming through /src/include/matrix.h */
+#define LIBMMWMATRIX_PUBLISHED_API MATRIX_DLL_IMPORT_SYM
+#else
+/* We are a C mex file coming through /extern/include/matrix.h
+ * LIBMMWMATRIX_PUBLISHED_API is empty to match definitions in mex.h.
+ */
+#ifdef LIBMMWMATRIX_PUBLISHED_API
+#undef LIBMMWMATRIX_PUBLISHED_API
+#endif
+#define LIBMMWMATRIX_PUBLISHED_API
+#endif /* export_matrix_h */
+#endif /* BUILDING_PUPLISHED_API_CPP */
+
+#ifdef __cplusplus
+#define LIBMMWMATRIX_PUBLISHED_API_EXTERN_C extern "C"  
LIBMMWMATRIX_PUBLISHED_API
+#else
+#define LIBMMWMATRIX_PUBLISHED_API_EXTERN_C extern  LIBMMWMATRIX_PUBLISHED_API
+#endif
+
+
+/* Version 7.4.0 */
+#define MX_API_VER 0x07040000
+
+
+/* On linux function symbol names are chosen at link time. Thus on linux
+ * we need to strip _730 from function declarations. On windows and mac
+ * we chose proper function name at compilation time.
+ */
+
+#if !defined(MX_COMPAT_32) && !defined(BUILDING_PUBLISHED_API_CPP) && 
defined(__linux__)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef mxSetProperty_730
+# define mxSetProperty_730 mxSetProperty
+#endif
+
+#ifndef mxGetProperty_730
+# define mxGetProperty_730 mxGetProperty
+#endif
+
+#ifndef mxSetField_730
+# define mxSetField_730 mxSetField
+#endif
+
+#ifndef mxSetFieldByNumber_730
+# define mxSetFieldByNumber_730 mxSetFieldByNumber
+#endif
+
+#ifndef mxGetFieldByNumber_730
+# define mxGetFieldByNumber_730 mxGetFieldByNumber
+#endif
+
+#ifndef mxGetField_730
+# define mxGetField_730 mxGetField
+#endif
+
+#ifndef mxCreateStructMatrix_730
+# define mxCreateStructMatrix_730 mxCreateStructMatrix
+#endif
+
+#ifndef mxCreateCellMatrix_730
+# define mxCreateCellMatrix_730 mxCreateCellMatrix
+#endif
+
+#ifndef mxCreateCharMatrixFromStrings_730
+# define mxCreateCharMatrixFromStrings_730 mxCreateCharMatrixFromStrings
+#endif
+
+#ifndef mxGetString_730
+# define mxGetString_730 mxGetString
+#endif
+
+#ifndef mxGetNumberOfDimensions_730
+# define mxGetNumberOfDimensions_730 mxGetNumberOfDimensions
+#endif
+
+#ifndef mxGetDimensions_730
+# define mxGetDimensions_730 mxGetDimensions
+#endif
+
+#ifndef mxSetDimensions_730
+# define mxSetDimensions_730 mxSetDimensions
+#endif
+
+#ifndef mxSetIr_730
+# define mxSetIr_730 mxSetIr
+#endif
+
+#ifndef mxGetIr_730
+# define mxGetIr_730 mxGetIr
+#endif
+
+#ifndef mxSetJc_730
+# define mxSetJc_730 mxSetJc
+#endif
+
+#ifndef mxGetJc_730
+# define mxGetJc_730 mxGetJc
+#endif
+
+#ifndef mxCreateStructArray_730
+# define mxCreateStructArray_730 mxCreateStructArray
+#endif
+
+#ifndef mxCreateCharArray_730
+# define mxCreateCharArray_730 mxCreateCharArray
+#endif
+
+#ifndef mxCreateNumericArray_730
+# define mxCreateNumericArray_730 mxCreateNumericArray
+#endif
+
+#ifndef mxCreateCellArray_730
+# define mxCreateCellArray_730 mxCreateCellArray
+#endif
+
+#ifndef mxCreateLogicalArray_730
+# define mxCreateLogicalArray_730 mxCreateLogicalArray
+#endif
+
+#ifndef mxGetCell_730
+# define mxGetCell_730 mxGetCell
+#endif
+
+#ifndef mxSetCell_730
+# define mxSetCell_730 mxSetCell
+#endif
+
+#ifndef mxSetNzmax_730
+# define mxSetNzmax_730 mxSetNzmax
+#endif
+
+#ifndef mxSetN_730
+# define mxSetN_730 mxSetN
+#endif
+
+#ifndef mxSetM_730
+# define mxSetM_730 mxSetM
+#endif
+
+#ifndef mxGetNzmax_730
+# define mxGetNzmax_730 mxGetNzmax
+#endif
+
+#ifndef mxCreateDoubleMatrix_730
+# define mxCreateDoubleMatrix_730 mxCreateDoubleMatrix
+#endif
+
+#ifndef mxCreateNumericMatrix_730
+# define mxCreateNumericMatrix_730 mxCreateNumericMatrix
+#endif
+
+#ifndef mxCreateLogicalMatrix_730
+# define mxCreateLogicalMatrix_730 mxCreateLogicalMatrix
+#endif
+
+#ifndef mxCreateSparse_730
+# define mxCreateSparse_730 mxCreateSparse
+#endif
+
+#ifndef mxCreateSparseLogicalMatrix_730
+# define mxCreateSparseLogicalMatrix_730 mxCreateSparseLogicalMatrix
+#endif
+
+#ifndef mxGetNChars_730
+# define mxGetNChars_730 mxGetNChars
+#endif
+
+#ifndef mxCreateStringFromNChars_730
+# define mxCreateStringFromNChars_730 mxCreateStringFromNChars
+#endif
+
+#ifndef mxCalcSingleSubscript_730
+# define mxCalcSingleSubscript_730 mxCalcSingleSubscript
+#endif
+
+#ifndef mxGetDimensions_fcn_730
+# define mxGetDimensions_fcn_730 mxGetDimensions
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined(MX_COMPAT_32) && !defined(BUILDING_PUBLISHED_API_CPP) && 
defined(__linux__) */
+
+
+#ifndef MATHWORKS_MATRIX_DETAIL_PUBLISHED_FWD_DECLS_HPP
+#define MATHWORKS_MATRIX_DETAIL_PUBLISHED_FWD_DECLS_HPP
+
+
+
+/**
+ * Forward declaration for mxArray
+ */
+typedef struct mxArray_tag mxArray;
+
+/**
+ * Type representing the signature for MEX functions.
+ */
+typedef void (*mxFunctionPtr) (int nlhs, mxArray *plhs[], int nrhs, mxArray 
*prhs[]);
+
+/**
+ * Maximum mxArray name length
+ */
+#define mxMAXNAM TMW_NAME_LENGTH_MAX
+
+/**
+ * Logical type
+ */
+typedef bool mxLogical;
+
+/**
+ * Typedef required for Unicode support in MATLAB
+ */
+typedef CHAR16_T mxChar;
+
+/**
+ * Enumeration corresponding to all the valid mxArray types.
+ */
+typedef enum
+{
+    mxUNKNOWN_CLASS = 0,
+    mxCELL_CLASS,
+    mxSTRUCT_CLASS,
+    mxLOGICAL_CLASS,
+    mxCHAR_CLASS,
+    mxVOID_CLASS,
+    mxDOUBLE_CLASS,
+    mxSINGLE_CLASS,
+    mxINT8_CLASS,
+    mxUINT8_CLASS,
+    mxINT16_CLASS,
+    mxUINT16_CLASS,
+    mxINT32_CLASS,
+    mxUINT32_CLASS,
+    mxINT64_CLASS,
+    mxUINT64_CLASS,
+    mxFUNCTION_CLASS,
+    mxOPAQUE_CLASS,
+    mxOBJECT_CLASS, /* keep the last real item in the list */
+#if defined(_LP64) || defined(_WIN64)
+    mxINDEX_CLASS = mxUINT64_CLASS,
+#else
+    mxINDEX_CLASS = mxUINT32_CLASS,
+#endif
+    /* TEMPORARY AND NASTY HACK UNTIL mxSPARSE_CLASS IS COMPLETELY ELIMINATED 
*/
+    mxSPARSE_CLASS = mxVOID_CLASS /* OBSOLETE! DO NOT USE */
+}
+mxClassID;
+
+/**
+ * Indicates whether floating-point mxArrays are real or complex.
+ */
+typedef enum
+{
+    mxREAL,
+    mxCOMPLEX
+}
+mxComplexity;
+
+#endif /* MATHWORKS_MATRIX_DETAIL_PUBLISHED_FWD_DECLS_HPP */
+
+/*
+ * allocate memory, notifying registered listener
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void *mxMalloc(
+    size_t     n               /* number of bytes */
+    );
+
+
+/*
+ * allocate cleared memory, notifying registered listener.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void *mxCalloc(
+    size_t     n,      /* number of objects */
+    size_t     size    /* size of objects */
+    );
+
+
+/*
+ * free memory, notifying registered listener.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxFree(void *ptr)     /* pointer to 
memory to be freed */;
+
+
+/*
+ * reallocate memory, notifying registered listener.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void *mxRealloc(void *ptr, size_t size);
+
+/*
+ * Get number of dimensions in array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C size_t mxGetNumberOfDimensions_730(const 
mxArray *pa);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int mxGetNumberOfDimensions_700(const 
mxArray *pa);
+
+
+/*
+ * Get pointer to dimension array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C const size_t *mxGetDimensions_730(const 
mxArray *pa);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C const int *mxGetDimensions_700(const 
mxArray *pa);
+/* 
+ * Get row dimension
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C size_t mxGetM(const mxArray *pa);
+
+/*
+ * Get row data pointer for sparse numeric array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C size_t *mxGetIr_730(const mxArray *pa);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int *mxGetIr_700(const mxArray *pa);
+
+
+/*
+ * Get column data pointer for sparse numeric array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C size_t *mxGetJc_730(const mxArray *pa);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int *mxGetJc_700(const mxArray *pa);
+
+/*
+ * Get maximum nonzero elements for sparse numeric array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C size_t mxGetNzmax_730(const mxArray *pa);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int mxGetNzmax_700(const mxArray *pa);
+
+
+/*
+ * Set maximum nonzero elements for numeric array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetNzmax_730(mxArray *pa, size_t 
nzmax);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetNzmax_700(mxArray *pa, int 
nzmax);
+
+/*
+ * Return pointer to the nth field name
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C const char *mxGetFieldNameByNumber(const 
mxArray *pa, int n);
+
+/*
+ * Return a pointer to the contents of the named field for 
+ * the ith element (zero based).
+ */ 
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxGetFieldByNumber_730(const 
mxArray *pa, size_t i, int fieldnum);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxGetFieldByNumber_700(const 
mxArray *pa, int i, int fieldnum);
+
+/*
+ * Get a pointer to the specified cell element. 
+ */ 
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxGetCell_730(const mxArray *pa, 
size_t i);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxGetCell_700(const mxArray *pa, 
int i);
+
+/*
+ * Return the class (catergory) of data that the array holds.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxClassID mxGetClassID(const mxArray *pa);
+
+/*
+ * Get pointer to data
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void *mxGetData(
+    const mxArray *pa          /* pointer to array */
+    );
+
+/*
+ * Set pointer to data
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetData(
+    mxArray *pa,               /* pointer to array */
+    void  *newdata             /* pointer to data */
+    );
+
+/* 
+ * Determine whether the specified array contains numeric (as opposed 
+ * to cell or struct) data.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsNumeric(const mxArray *pa);
+
+/* 
+ * Determine whether the given array is a cell array.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsCell(const mxArray *pa);
+
+/*
+ * Determine whether the given array's logical flag is on.
+ */ 
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsLogical(const mxArray *pa);
+
+/*  
+ * Determine whether the given array contains character data. 
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsChar(const mxArray *pa);
+
+/*
+ * Determine whether the given array is a structure array.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsStruct(const mxArray *pa);
+
+
+/*
+ * Determine whether the given array is an opaque array.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsOpaque(const mxArray *pa);
+
+
+/*
+ * Returns true if specified array is a function object.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsFunctionHandle(const mxArray *pa);
+
+
+/*
+ * This function is deprecated and is preserved only for backward 
compatibility.
+ * DO NOT USE if possible.
+ * Is array user defined MATLAB v5 object
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsObject(
+    const mxArray *pa          /* pointer to array */
+    );
+
+
+/*
+ * Get imaginary data pointer for numeric array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void *mxGetImagData(
+    const mxArray *pa          /* pointer to array */
+    );
+
+/*
+ * Set imaginary data pointer for numeric array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetImagData(
+    mxArray *pa,               /* pointer to array */
+    void    *newdata           /* imaginary data array pointer */
+    );
+
+/*
+ * Determine whether the given array contains complex data.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsComplex(const mxArray *pa);
+
+
+/*
+ * Determine whether the given array is a sparse (as opposed to full). 
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsSparse(const mxArray *pa);
+
+/*
+ * Determine whether the specified array represents its data as 
+ * double-precision floating-point numbers.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsDouble(const mxArray *pa);
+
+/*
+ * Determine whether the specified array represents its data as 
+ * single-precision floating-point numbers.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsSingle(const mxArray *pa);
+
+
+/*
+ * Determine whether the specified array represents its data as 
+ * signed 8-bit integers.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsInt8(const mxArray *pa);
+
+
+/*
+ * Determine whether the specified array represents its data as 
+ * unsigned 8-bit integers.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsUint8(const mxArray *pa);
+
+
+/*
+ * Determine whether the specified array represents its data as 
+ * signed 16-bit integers.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsInt16(const mxArray *pa);
+
+
+/*
+ * Determine whether the specified array represents its data as 
+ * unsigned 16-bit integers.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsUint16(const mxArray *pa);
+
+
+/*
+ * Determine whether the specified array represents its data as 
+ * signed 32-bit integers.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsInt32(const mxArray *pa);
+
+
+/*
+ * Determine whether the specified array represents its data as 
+ * unsigned 32-bit integers.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsUint32(const mxArray *pa);
+
+
+/*
+ * Determine whether the specified array represents its data as 
+ * signed 64-bit integers.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsInt64(const mxArray *pa);
+
+
+/*
+ * Determine whether the specified array represents its data as 
+ * unsigned 64-bit integers.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsUint64(const mxArray *pa);
+
+/* 
+ * Get number of elements in array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C size_t mxGetNumberOfElements(      
+    const mxArray *pa          /* pointer to array */
+    );
+
+/*
+ * Get real data pointer for numeric array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C double *mxGetPr(
+    const mxArray *pa          /* pointer to array */
+    );
+
+/*
+ * Set real data pointer for numeric array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetPr(
+    mxArray *pa,               /* pointer to array */
+    double  *pr                        /* real data array pointer */
+    );
+
+/*
+ * Get imaginary data pointer for numeric array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C double *mxGetPi(
+    const mxArray *pa          /* pointer to array */
+    );
+
+/*
+ * Set imaginary data pointer for numeric array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetPi(
+    mxArray *pa,               /* pointer to array */
+    double  *pi                        /* imaginary data array pointer */
+    );
+
+/*
+ * Get string array data
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxChar *mxGetChars(
+    const mxArray *pa          /* pointer to array */
+    );
+
+
+/*
+ * Get 8 bits of user data stored in the mxArray header.  NOTE: This state
+ * of these bits are not guaranteed to be preserved after API function
+ * calls.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int mxGetUserBits(
+    const mxArray      *pa             /* pointer to array */
+    );
+
+
+/*
+ * Set 8 bits of user data stored in the mxArray header. NOTE: This state
+ * of these bits are not guaranteed to be preserved after API function
+ * calls.
+ */ 
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetUserBits(
+       mxArray *pa,            /* pointer to array */
+       int     value
+    );
+
+
+/*
+ * Get the real component of the specified array's first data element.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C double mxGetScalar(const mxArray *pa);
+
+/*
+ * Inform Watcom compilers that scalar double return values
+ * will be in the FPU register.
+ */
+#ifdef __WATCOMC__
+#pragma aux mxGetScalar value [8087];
+#endif
+
+
+/*
+ * Is the isFromGlobalWorkspace bit set?
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsFromGlobalWS(const mxArray *pa);
+
+
+/*
+ * Set the isFromGlobalWorkspace bit.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetFromGlobalWS(mxArray *pa, bool 
global);
+
+
+/* 
+ * Set row dimension
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetM_730(mxArray *pa, size_t m);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetM_700(mxArray *pa, int m);
+
+
+/* 
+ * Get column dimension
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C size_t mxGetN(const mxArray *pa);
+
+
+
+/*
+ * Is array empty
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsEmpty(
+    const mxArray *pa          /* pointer to array */
+    );
+/*
+ * Get the index to the named field.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int mxGetFieldNumber(const mxArray *pa, 
const char *name);
+
+/*
+ * Set row data pointer for numeric array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetIr_730(mxArray *pa, size_t 
*newir);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetIr_700(mxArray *pa, int *newir);
+
+/*
+ * Set column data pointer for numeric array
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetJc_730(mxArray *pa, size_t 
*newjc);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetJc_700(mxArray *pa, int *newjc);
+
+/*
+ * Get array data element size
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C size_t mxGetElementSize(const mxArray *pa);
+
+
+/* 
+ * Return the offset (in number of elements) from the beginning of 
+ * the array to a given subscript.  
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C size_t mxCalcSingleSubscript_730(const 
mxArray *pa, size_t nsubs, const size_t *subs);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int mxCalcSingleSubscript_700(const 
mxArray *pa, int nsubs, const int *subs);
+
+/*
+ * Get number of structure fields in array
+ * Returns 0 if mxArray is non-struct.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int mxGetNumberOfFields(
+    const mxArray *pa          /* pointer to array */
+    );
+
+/*
+ * Set an element in a cell array to the specified value.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetCell_730(mxArray *pa, size_t i, 
mxArray *value);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetCell_700(mxArray *pa, int i, 
mxArray *value);
+
+/*
+ * Set pa[i][fieldnum] = value 
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetFieldByNumber_730(mxArray *pa, 
size_t i, int fieldnum, mxArray *value);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetFieldByNumber_700(mxArray *pa, 
int i, int fieldnum, mxArray *value);
+
+/*
+ * Return a pointer to the contents of the named field for the ith 
+ * element (zero based).  Returns NULL on no such field or if the
+ * field itself is NULL
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxGetField_730(const mxArray *pa, 
size_t i, const char *fieldname);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxGetField_700(const mxArray *pa, 
int i, const char *fieldname);
+
+
+/*
+ * Sets the contents of the named field for the ith element (zero based).  
+ * The input 'value' is stored in the input array 'pa' - no copy is made.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetField_730(mxArray *pa, size_t i, 
const char *fieldname, mxArray *value);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetField_700(mxArray *pa, int i, 
const char *fieldname, mxArray *value);
+
+ 
+/*
+ * mxGetProperty returns the value of a property for a given object and index.
+ * The property must be public.
+ *
+ * If the given property name doesn't exist, isn't public, or the object isn't
+ * the right type, then mxGetProperty returns NULL.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxGetProperty_730(const mxArray 
*pa, const size_t i, const char *propname);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxGetProperty_700(const mxArray 
*pa, const int i, const char *propname);
+
+ 
+/*
+ * mxSetProperty sets the value of a property for a given object and index.
+ * The property must be public.
+ *
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetProperty_730(mxArray *pa, size_t 
i, const char *propname, const mxArray *value);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetProperty_700(mxArray *pa, int i, 
const char *propname, const mxArray *value);
+
+ 
+/* 
+ * Return the name of an array's class.  
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C const char *mxGetClassName(const mxArray 
*pa);
+
+
+/*
+ * Determine whether an array is a member of the specified class. 
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsClass(const mxArray *pa, const 
char *name);
+
+/**
+ * \copydoc mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateNumericMatrix_730(size_t 
m, size_t n, mxClassID classid, mxComplexity flag);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateNumericMatrix_700(int m, 
int n, mxClassID classid, mxComplexity flag);
+
+/* 
+ * Set column dimension
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetN_730(mxArray *pa, size_t n);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxSetN_700(mxArray *pa, int n);
+
+
+/*
+ * Set dimension array and number of dimensions.  Returns 0 on success and 1
+ * if there was not enough memory available to reallocate the dimensions array.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int mxSetDimensions_730(mxArray *pa, const 
size_t *pdims, size_t ndims);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int mxSetDimensions_700(mxArray *pa, const 
int *pdims, int ndims);
+
+/*
+ * mxArray destructor
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxDestroyArray(mxArray *pa);
+
+/**
+ * \copydoc mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateNumericArray_730(size_t 
ndim, const size_t *dims, mxClassID classid, mxComplexity flag);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateNumericArray_700(int 
ndim, const int *dims, mxClassID classid, mxComplexity flag);
+
+
+/**
+ * \copybrief create_char
+ *
+ * \copydetails mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateCharArray_730(size_t 
ndim, const size_t *dims);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateCharArray_700(int ndim, 
const int *dims);
+
+
+
+/**
+ * \copydoc mxCreateDoubleMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateDoubleMatrix_730(size_t 
m, size_t n, mxComplexity flag);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateDoubleMatrix_700(int m, 
int n, mxComplexity flag);
+
+
+/*
+ * Get a properly typed pointer to the elements of a logical array.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxLogical *mxGetLogicals(const mxArray 
*pa);
+
+
+/**
+ * Create a logical array and initialize its data elements to false.
+ *
+ * \copydetails mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateLogicalArray_730(size_t 
ndim, const size_t *dims);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateLogicalArray_700(int 
ndim, const int *dims);
+
+/**
+ * Create a two-dimensional array to hold logical data and
+ * initializes each data element to false.
+ *
+ * \copydetails mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateLogicalMatrix_730(size_t 
m, size_t n);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateLogicalMatrix_700(int m, 
int n);
+
+/**
+ * Create a logical scalar mxArray having the specified value.
+ *
+ * \copydetails mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateLogicalScalar(bool value);
+
+
+/*
+ * Returns true if we have a valid logical scalar mxArray.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsLogicalScalar(const mxArray *pa);
+
+
+/*
+ * Returns true if the logical scalar value is true.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsLogicalScalarTrue(const mxArray 
*pa);
+
+
+/**
+ * Create a double-precision scalar mxArray initialized to the
+ * value specified
+ *
+ * \copydoc mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateDoubleScalar(double 
value);
+
+
+/**
+ * \brief Create a 2-Dimensional sparse array.
+ *
+ * Z = mxCreateSparse(m,n,nzmax,cmplx_flag);
+ * An m-by-n, real or complex, sparse matrix with room for nzmax nonzeros.
+ * Use this to allocate storage for a sparse matrix.
+ * It allocates the structure, allocates the pr, pi, ir and jc arrays,
+ * and sets all the fields, which may be changed later.
+ * Avoids the question of malloc(0) by replacing nzmax = 0 with nzmax = 1.
+ * Also sets Z->pr[0] = 0.0 so that the scalar sparse(0.0) acts like 0.0.
+ *
+ * Notice that the value of m is almost irrelevant.  It is only stored in
+ * the mxSetM field of the matrix structure.  It does not affect the amount
+ * of storage required by sparse matrices, or the amount of time required
+ * by sparse algorithms.  Consequently, m can be "infinite".  The result
+ * is a semi-infinite matrix with a finite number of columns and a finite,
+ * but unspecified, number of nonzero rows.
+ *
+ * \copydetails mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateSparse_730(size_t m, 
size_t n, size_t nzmax, mxComplexity flag);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateSparse_700(int m, int n, 
int nzmax, mxComplexity flag);
+
+
+/**
+ * Create a 2-D sparse logical array
+ *
+ * \copydoc mxCreateSparseNumericMatrix
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray 
*mxCreateSparseLogicalMatrix_730(size_t m, size_t n, size_t nzmax);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray 
*mxCreateSparseLogicalMatrix_700(int m, int n, int nzmax);
+
+
+/*
+ * Copies characters from a MATLAB array to a char array
+ * This function will attempt to perform null termination if it is possible.
+ * nChars is the number of bytes in the output buffer
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxGetNChars_730(const mxArray *pa, 
char *buf, size_t nChars);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxGetNChars_700(const mxArray *pa, 
char *buf, int nChars);
+
+
+/*
+ * Converts a string array to a C-style string. The C-style string is in the
+ * local codepage encoding. If the conversion for the entire Unicode string
+ * cannot fit into the supplied character buffer, then the conversion includes
+ * the last whole codepoint that will fit into the buffer. The string is thus
+ * truncated at the greatest possible whole codepoint and does not split code-
+ * points.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int mxGetString_730(const mxArray *pa, 
char *buf, size_t buflen);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int mxGetString_700(const mxArray *pa, 
char *buf, int buflen);
+
+
+/*
+ * Create a NULL terminated C string from an mxArray of type mxCHAR_CLASS
+ * Supports multibyte character sets.  The resulting string must be freed
+ * with mxFree.  Returns NULL on out of memory or non-character arrays.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C char *mxArrayToString(const mxArray *pa);
+
+
+/**
+ * Create a 1-by-n string array initialized to str. The supplied string is
+ * presumed to be in the local codepage encoding. The character data format
+ * in the mxArray will be UTF-16.
+ *
+ * \copydetails mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray 
*mxCreateStringFromNChars_730(const char *str, size_t n);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray 
*mxCreateStringFromNChars_700(const char *str, int n);
+
+
+/**
+ * \brief Create a 1-by-n string array initialized to null terminated string
+ * where n is the length of the string.
+ * 
+ * \param src_ptr  A pointer to a source string data
+ *
+ * \copydetails mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateString(const char *str);
+
+
+/**
+ * \copybrief mxCreateCharMatrixFromStrings_safe
+ *
+ * \copydetails mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray 
*mxCreateCharMatrixFromStrings_730(size_t m, const char **str);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray 
*mxCreateCharMatrixFromStrings_700(int m, const char **str);
+
+
+/**
+ * \copybrief create_cell
+ *
+ * \copydetails mxCreateNumericMatrixWithReuse 
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateCellMatrix_730(size_t m, 
size_t n);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateCellMatrix_700(int m, int 
n);
+
+
+/**
+ * Create an N-Dimensional cell array, with each cell initialized
+ * to NULL.
+ *
+ * \copydetails mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateCellArray_730(size_t 
ndim, const size_t *dims);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateCellArray_700(int ndim, 
const int *dims);
+
+
+/**
+ * \copybrief create_struct
+ *
+ * \copydetails mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateStructMatrix_730(size_t 
m, size_t n, int nfields, const char **fieldnames);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateStructMatrix_700(int m, 
int n, int nfields, const char **fieldnames);
+
+
+/**
+ * Create an N-Dimensional structure array having the specified fields;
+ * initialize all values to NULL.
+ *
+ * \copydetails mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateStructArray_730(size_t 
ndim, const size_t *dims, int nfields,
+                            const char **fieldnames);
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateStructArray_700(int ndim, 
const int *dims, int nfields,
+                 const char **fieldnames);
+
+/**
+ * Make a deep copy of an array, return a pointer to the copy.
+ *
+ * \copydetails mxCreateNumericMatrixWithReuse
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxDuplicateArray(const mxArray 
*in);
+
+
+/*
+ * Set classname of an unvalidated object array.  It is illegal to
+ * call this function on a previously validated object array.
+ * Return 0 for success, 1 for failure.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int mxSetClassName(mxArray *pa, const char 
*classname);
+
+
+/* 
+ * Add a field to a structure array. Returns field number on success or -1
+ * if inputs are invalid or an out of memory condition occurs.
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C int mxAddField(mxArray *pa, const char 
*fieldname);
+
+
+/*
+ * Remove a field from a structure array.  Does nothing if no such field 
exists.
+ * Does not destroy the field itself.
+*/
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mxRemoveField(mxArray *pa, int field);
+
+
+/*
+ * Function for obtaining MATLAB's concept of EPS
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C double mxGetEps(void);
+
+
+/*
+ * Function for obtaining MATLAB's concept of INF (Used in MEX-File callback).
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C double mxGetInf(void);
+
+
+/*
+ * Function for obtaining MATLAB's concept of NaN (Used in MEX-File callback).
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C double mxGetNaN(void);
+
+
+/*
+ * Inform Watcom compilers that scalar double return values
+ * will be in the FPU register.
+ */
+#ifdef __WATCOMC__
+#pragma aux mxGetEps value [8087];
+#pragma aux mxGetInf value [8087];
+#pragma aux mxGetNaN value [8087];
+#endif
+
+
+/*
+ * test for finiteness in a machine-independent manner
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsFinite(
+    double x                  /* value to test */
+    );
+
+
+/*
+ * test for infinity in a machine-independent manner
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsInf(
+    double x                  /* value to test */
+    );
+
+
+/*
+ * test for NaN in a machine-independent manner
+ */
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C bool mxIsNaN(
+    double x                  /* value to test */
+    );
+
+
+#ifndef mxassert_h
+#define mxassert_h
+/*
+mxAssert(int expression, char *error_message)
+---------------------------------------------
+
+  Similar to ANSI C's assert() macro, the mxAssert macro checks the
+  value of an assertion, continuing execution only if the assertion
+  holds.  If 'expression' evaluates to be true, then the mxAssert does
+  nothing.  If, however, 'expression' is false, then mxAssert prints an
+  error message to the MATLAB Command Window, consisting of the failed
+  assertion's expression, the file name and line number where the failed
+  assertion occurred, and the string 'error_message'.  'error_message'
+  allows the user to specify a more understandable description of why
+  the assertion failed.  (Use an empty string if no extra description
+  should follow the failed assertion message.)  After a failed
+  assertion, control returns to the MATLAB command line. 
+
+  mxAssertS, (the S for Simple), takes the same inputs as mxAssert.  It 
+  does not print the text of the failed assertion, only the file and 
+  line where the assertion failed, and the explanatory error_message.
+
+  Note that script MEX will turn off these assertions when building
+  optimized MEX-functions, so they should be used for debugging 
+  purposes only.
+*/
+
+#ifdef MATLAB_MEX_FILE
+#  ifndef NDEBUG
+
+LIBMMWMATRIX_PUBLISHED_API_EXTERN_C void mexPrintAssertion(const char *test, 
+                      const char *fname, 
+                      int linenum, 
+                      const char *message);
+
+
+#    define mxAssert(test, message) ( (test) ? (void) 0 : 
mexPrintAssertion(#test, __FILE__, __LINE__, message))
+#    define mxAssertS(test, message) ( (test) ? (void) 0 : 
mexPrintAssertion("", __FILE__, __LINE__, message))
+#  else
+#    define mxAssert(test, message) ((void) 0)
+#    define mxAssertS(test, message) ((void) 0)
+#  endif
+#else
+#  include <assert.h>
+#  define mxAssert(test, message) assert(test)
+#  define mxAssertS(test, message) assert(test)
+#endif
+
+#endif /* mxassert_h */
+
+#if !defined(BUILDING_PUBLISHED_API_CPP) && !defined(BUILDING_LIBMX)
+
+/*
+ * PUBLISHED APIs with changes in MATLAB 7.3
+ */
+
+#if !defined(MX_COMPAT_32) && !defined(__linux__)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef mxSetProperty
+# define mxSetProperty mxSetProperty_730
+#endif
+
+#ifndef mxGetProperty
+# define mxGetProperty mxGetProperty_730
+#endif
+
+#ifndef mxSetField
+# define mxSetField mxSetField_730
+#endif
+
+#ifndef mxSetFieldByNumber
+# define mxSetFieldByNumber mxSetFieldByNumber_730
+#endif
+
+#ifndef mxGetFieldByNumber
+# define mxGetFieldByNumber mxGetFieldByNumber_730
+#endif
+
+#ifndef mxGetField
+# define mxGetField mxGetField_730
+#endif
+
+#ifndef mxCreateStructMatrix
+# define mxCreateStructMatrix mxCreateStructMatrix_730
+#endif
+
+#ifndef mxCreateCellMatrix
+# define mxCreateCellMatrix mxCreateCellMatrix_730
+#endif
+
+#ifndef mxCreateCharMatrixFromStrings
+# define mxCreateCharMatrixFromStrings mxCreateCharMatrixFromStrings_730
+#endif
+
+#ifndef mxGetString
+# define mxGetString mxGetString_730
+#endif
+
+#ifndef mxGetNumberOfDimensions
+# define mxGetNumberOfDimensions mxGetNumberOfDimensions_730
+#endif
+
+#ifndef mxGetDimensions
+# define mxGetDimensions mxGetDimensions_730
+#endif
+
+#ifndef mxSetDimensions
+# define mxSetDimensions mxSetDimensions_730
+#endif
+
+#ifndef mxSetIr
+# define mxSetIr mxSetIr_730
+#endif
+
+#ifndef mxGetIr
+# define mxGetIr mxGetIr_730
+#endif
+
+#ifndef mxSetJc
+# define mxSetJc mxSetJc_730
+#endif
+
+#ifndef mxGetJc
+# define mxGetJc mxGetJc_730
+#endif
+
+#ifndef mxCreateStructArray
+# define mxCreateStructArray mxCreateStructArray_730
+#endif
+
+#ifndef mxCreateCharArray
+# define mxCreateCharArray mxCreateCharArray_730
+#endif
+
+#ifndef mxCreateNumericArray
+# define mxCreateNumericArray mxCreateNumericArray_730
+#endif
+
+#ifndef mxCreateCellArray
+# define mxCreateCellArray mxCreateCellArray_730
+#endif
+
+#ifndef mxCreateLogicalArray
+# define mxCreateLogicalArray mxCreateLogicalArray_730
+#endif
+
+#ifndef mxGetCell
+# define mxGetCell mxGetCell_730
+#endif
+
+#ifndef mxSetCell
+# define mxSetCell mxSetCell_730
+#endif
+
+#ifndef mxSetNzmax
+# define mxSetNzmax mxSetNzmax_730
+#endif
+
+#ifndef mxSetN
+# define mxSetN mxSetN_730
+#endif
+
+#ifndef mxSetM
+# define mxSetM mxSetM_730
+#endif
+
+#ifndef mxGetNzmax
+# define mxGetNzmax mxGetNzmax_730
+#endif
+
+#ifndef mxCreateDoubleMatrix
+# define mxCreateDoubleMatrix mxCreateDoubleMatrix_730
+#endif
+
+#ifndef mxCreateNumericMatrix
+# define mxCreateNumericMatrix mxCreateNumericMatrix_730
+#endif
+
+#ifndef mxCreateLogicalMatrix
+# define mxCreateLogicalMatrix mxCreateLogicalMatrix_730
+#endif
+
+#ifndef mxCreateSparse
+# define mxCreateSparse mxCreateSparse_730
+#endif
+
+#ifndef mxCreateSparseLogicalMatrix
+# define mxCreateSparseLogicalMatrix mxCreateSparseLogicalMatrix_730
+#endif
+
+#ifndef mxGetNChars
+# define mxGetNChars mxGetNChars_730
+#endif
+
+#ifndef mxCreateStringFromNChars
+# define mxCreateStringFromNChars mxCreateStringFromNChars_730
+#endif
+
+#ifndef mxCalcSingleSubscript
+# define mxCalcSingleSubscript mxCalcSingleSubscript_730
+#endif
+
+#ifndef mxGetDimensions_fcn
+# define mxGetDimensions_fcn mxGetDimensions_730
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !MX_COMPAT_32 */
+
+
+#ifdef MX_COMPAT_32
+
+/*
+ * 32-bit compatibility APIs
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef mxGetNumberOfDimensions
+#define mxGetNumberOfDimensions mxGetNumberOfDimensions_700
+#endif
+
+#ifndef mxGetDimensions
+#define mxGetDimensions mxGetDimensions_700
+#endif
+
+#ifndef mxGetDimensions_fcn
+# define mxGetDimensions_fcn mxGetDimensions_700
+#endif
+
+#ifndef mxGetIr
+#define mxGetIr mxGetIr_700
+#endif
+
+#ifndef mxGetJc
+#define mxGetJc mxGetJc_700
+#endif
+
+#ifndef mxGetCell
+#define mxGetCell mxGetCell_700
+#endif
+
+#ifndef mxGetNzmax
+#define mxGetNzmax mxGetNzmax_700
+#endif
+
+#ifndef mxSetNzmax
+#define mxSetNzmax mxSetNzmax_700
+#endif
+
+#ifndef mxGetFieldByNumber
+#define mxGetFieldByNumber mxGetFieldByNumber_700
+#endif
+
+#ifndef mxSetProperty
+#define mxSetProperty mxSetProperty_700
+#endif
+
+#ifndef mxGetProperty
+#define mxGetProperty mxGetProperty_700
+#endif
+
+#ifndef mxSetField
+#define mxSetField mxSetField_700
+#endif
+
+#ifndef mxSetFieldByNumber
+#define mxSetFieldByNumber mxSetFieldByNumber_700
+#endif
+
+#ifndef mxGetField
+#define mxGetField mxGetField_700
+#endif
+
+#ifndef mxCreateStructMatrix
+#define mxCreateStructMatrix mxCreateStructMatrix_700
+#endif
+
+#ifndef mxCreateCellMatrix
+#define mxCreateCellMatrix mxCreateCellMatrix_700
+#endif
+
+#ifndef mxCreateCharMatrixFromStrings
+#define mxCreateCharMatrixFromStrings mxCreateCharMatrixFromStrings_700
+#endif
+
+#ifndef mxGetString
+#define mxGetString mxGetString_700
+#endif
+
+#ifndef mxSetDimensions
+#define mxSetDimensions mxSetDimensions_700
+#endif
+
+#ifndef mxSetIr
+#define mxSetIr mxSetIr_700
+#endif
+
+#ifndef mxSetJc
+#define mxSetJc mxSetJc_700
+#endif
+
+#ifndef mxCreateStructArray
+#define mxCreateStructArray mxCreateStructArray_700
+#endif
+
+#ifndef mxCreateCharArray
+#define mxCreateCharArray mxCreateCharArray_700
+#endif
+
+#ifndef mxCreateNumericArray
+#define mxCreateNumericArray mxCreateNumericArray_700
+#endif
+
+#ifndef mxCreateCellArray
+#define mxCreateCellArray mxCreateCellArray_700
+#endif
+
+#ifndef mxCreateLogicalArray
+#define mxCreateLogicalArray mxCreateLogicalArray_700
+#endif
+
+#ifndef mxSetCell
+#define mxSetCell mxSetCell_700
+#endif
+
+#ifndef mxSetN
+#define mxSetN mxSetN_700
+#endif
+
+#ifndef mxSetM
+#define mxSetM mxSetM_700
+#endif
+
+#ifndef mxCreateDoubleMatrix
+#define mxCreateDoubleMatrix mxCreateDoubleMatrix_700
+#endif
+
+#ifndef mxCreateNumericMatrix
+#define mxCreateNumericMatrix mxCreateNumericMatrix_700
+#endif
+
+#ifndef mxCreateLogicalMatrix
+#define mxCreateLogicalMatrix mxCreateLogicalMatrix_700
+#endif
+
+#ifndef mxCreateSparse
+#define mxCreateSparse mxCreateSparse_700
+#endif
+
+#ifndef mxCreateSparseLogicalMatrix
+#define mxCreateSparseLogicalMatrix mxCreateSparseLogicalMatrix_700
+#endif
+
+#ifndef mxGetNChars
+#define mxGetNChars mxGetNChars_700
+#endif
+
+#ifndef mxCreateStringFromNChars
+#define mxCreateStringFromNChars mxCreateStringFromNChars_700
+#endif
+
+#ifndef mxCalcSingleSubscript
+#define mxCalcSingleSubscript mxCalcSingleSubscript_700
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifdef MX_COMPAT_32 */
+#endif /* !defined(BUILDING_LIBMX) && !defined(PUBLISHED_API_CPP) */
+#endif /* matrix_h */
+#endif /* MATRIX_DEVELOPER_API_HPP */
diff --git a/interface/src/octave/private/Makefile.am 
b/interface/src/octave/private/Makefile.am
new file mode 100644
index 0000000..b66c0e4
--- /dev/null
+++ b/interface/src/octave/private/Makefile.am
@@ -0,0 +1,20 @@
+#  Copyright (C) 1999-2017 Yves Renard
+#
+#  This file is a part of GetFEM++
+#
+#  GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+#  under  the  terms  of the  GNU  Lesser General Public License as published
+#  by  the  Free Software Foundation;  either version 3 of the License,  or
+#  (at your option) any later version along with the GCC Runtime Library
+#  Exception either version 3.1 or (at your option) any later version.
+#  This program  is  distributed  in  the  hope  that it will be useful,  but
+#  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+#  or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+#  License and GCC Runtime Library Exception for more details.
+#  You  should  have received a copy of the GNU Lesser General Public License
+#  along  with  this program;  if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+
+EXTRA_DIST=./getopt.m
+toolboxdir=@TOOLBOXDIR@/private
+toolbox_SCRIPTS=./getopt.m
diff --git a/interface/src/octave/private/getopt.m 
b/interface/src/octave/private/getopt.m
new file mode 100644
index 0000000..b3ed891
--- /dev/null
+++ b/interface/src/octave/private/getopt.m
@@ -0,0 +1,28 @@
+%  Copyright (C) 1999-2017 Yves Renard
+%
+%  This file is a part of GetFEM++
+%
+%  GetFEM++  is  free software;  you  can  redistribute  it  and/or modify it
+%  under  the  terms  of the  GNU  Lesser General Public License as published
+%  by  the  Free Software Foundation;  either version 3 of the License,  or
+%  (at your option) any later version along with the GCC Runtime Library
+%  Exception either version 3.1 or (at your option) any later version.
+%  This program  is  distributed  in  the  hope  that it will be useful,  but
+%  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+%  or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+%  License and GCC Runtime Library Exception for more details.
+%  You  should  have received a copy of the GNU Lesser General Public License
+%  along  with  this program;  if not, write to the Free Software Foundation,
+%  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
+
+function o=getopt(opt,v)
+  o = opt;
+  if (nargin==1) return; end;
+  if (mod(length(v),2) ~= 0) error('odd number of property/value pairs'); end;
+  for i=1:2:length(v),
+    optname=v{i};
+    optval =v{i+1};
+    if (~ischar(optname)) error(['expecting a property name, found a ' 
class(optname)]); end;
+    if (~isfield(opt,optname)) error(['unknown property :"' optname '"']); end;
+    o = setfield(o, optname, optval);
+  end;
diff --git a/interface/src/octave/tmwtypes.h b/interface/src/octave/tmwtypes.h
new file mode 100644
index 0000000..5b1e54f
--- /dev/null
+++ b/interface/src/octave/tmwtypes.h
@@ -0,0 +1,827 @@
+/*
+ * Copyright 1984-2014 The MathWorks, Inc.
+ * All Rights Reserved.
+ */
+
+/* Copyright 1995-2014 The MathWorks, Inc. */
+#if defined(_MSC_VER)
+# pragma once
+#endif
+#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 
3))
+# pragma once
+#endif
+
+#ifndef tmwtypes_h
+#define tmwtypes_h
+
+#ifndef __TMWTYPES__
+#define __TMWTYPES__
+/*
+ * File    : tmwtypes.h
+ * Abstract:
+ *      Data types for use with MATLAB/SIMULINK and the Real-Time Workshop.
+ *
+ *      When compiling stand-alone model code, data types can be overridden
+ *      via compiler switches.
+ *
+ *      Define NO_FLOATS to eliminate reference to real_T, etc.
+ */
+
+#include <limits.h>
+
+#ifdef __APPLE_CC__
+#include <stdbool.h>
+#endif
+
+#define LOGICAL_IS_A_TYPE
+#define SPARSE_GENERALIZATION
+
+#ifdef NO_FLOATS
+# define double double_not_allowed
+# define float  float_not_allowed
+#endif /*NO_FLOATS*/
+
+#ifndef NO_FLOATS
+
+#ifndef __MWERKS__
+# ifdef __STDC__
+#  include <float.h>
+# else
+#  define FLT_MANT_DIG 24
+#  define DBL_MANT_DIG 53
+# endif
+#endif
+
+#endif /*NO_FLOATS*/
+
+/*
+ *      The following data types cannot be overridden when building MEX files.
+ */
+#ifdef MATLAB_MEX_FILE
+# undef CHARACTER_T
+# undef INTEGER_T
+# undef BOOLEAN_T
+# undef REAL_T
+# undef TIME_T
+#endif
+
+/*
+ * The uchar_T, ushort_T and ulong_T types are needed for compilers which do 
+ * not allow defines to be specified, at the command line, with spaces in them.
+ */
+
+typedef unsigned char       uchar_T;
+typedef unsigned short      ushort_T;
+typedef unsigned long       ulong_T;
+
+#if (defined(_MSC_VER) && _MSC_VER >= 1500)      \
+    || defined(__x86_64__) || defined(__LP64__)  \
+    || defined(__LCC64__)
+    
+typedef unsigned long long  ulonglong_T;
+#endif
+
+
+
+/*=======================================================================*
+ * Fixed width word size data types:                                     *
+ *   int8_T, int16_T, int32_T     - signed 8, 16, or 32 bit integers     *
+ *   uint8_T, uint16_T, uint32_T  - unsigned 8, 16, or 32 bit integers   *
+ *   real32_T, real64_T           - 32 and 64 bit floating point numbers *
+ *=======================================================================*/
+
+/* When used with Real Time Workshop generated code, this
+ * header file can be used with a variety of compilers.
+ *
+ * The compiler could be for an 8 bit embedded processor that
+ * only had 8 bits per integer and 16 bits per long.
+ * In that example, a 32 bit integer size is not even available.
+ * This header file should be robust to that.   
+ *
+ * For the case of an 8 bit processor, the preprocessor
+ * may be limited to 16 bit math like its target.  That limitation 
+ * would mean that 32 bit comparisons can't be done accurately.  
+ * To increase robustness to this, comparisons are done against
+ * smaller values first.  An inaccurate 32 bit comparison isn't
+ * attempted if the 16 bit comparison has already succeeded.
+ *
+ * Limitations on preprocessor math can also be stricter than
+ * for the target.  There are known cases where a compiler
+ * targeting processors with 64 bit longs can't do accurate
+ * preprocessor comparisons on more than 32 bits.  
+ */
+
+/* Determine the number of bits for int, long, short, and char.
+ * If one fails to be determined, set the number of bits to -1
+ */
+
+#ifndef TMW_BITS_PER_INT
+# if   INT_MAX  == 0x7FL
+#  define TMW_BITS_PER_INT 8
+# elif INT_MAX  == 0x7FFFL
+#  define TMW_BITS_PER_INT 16
+# elif INT_MAX  == 0x7FFFFFFFL
+#  define TMW_BITS_PER_INT 32
+# else
+#  define TMW_BITS_PER_INT -1
+# endif
+#endif
+
+#ifndef TMW_BITS_PER_LONG
+# if   LONG_MAX  == 0x7FL
+#  define TMW_BITS_PER_LONG 8
+# elif LONG_MAX  == 0x7FFFL
+#  define TMW_BITS_PER_LONG 16
+# elif LONG_MAX  == 0x7FFFFFFFL
+#  define TMW_BITS_PER_LONG 32
+# else
+#  define TMW_BITS_PER_LONG -1
+# endif
+#endif
+
+#ifndef TMW_BITS_PER_SHRT
+# if   SHRT_MAX  == 0x7FL
+#  define TMW_BITS_PER_SHRT 8
+# elif SHRT_MAX  == 0x7FFFL
+#  define TMW_BITS_PER_SHRT 16
+# elif SHRT_MAX  == 0x7FFFFFFFL
+#  define TMW_BITS_PER_SHRT 32
+# else
+#  define TMW_BITS_PER_SHRT -1
+# endif
+#endif
+
+#ifndef TMW_BITS_PER_SCHAR
+# if   SCHAR_MAX  == 0x7FL
+#  define TMW_BITS_PER_SCHAR 8
+# elif SCHAR_MAX  == 0x7FFFL
+#  define TMW_BITS_PER_SCHAR 16
+# elif SCHAR_MAX  == 0x7FFFFFFFL
+#  define TMW_BITS_PER_SCHAR 32
+# else
+#  define TMW_BITS_PER_SCHAR -1
+# endif
+#endif
+
+#ifndef TMW_CHAR_SIGNED
+# if SCHAR_MAX == CHAR_MAX
+#  define TMW_CHAR_SIGNED 1
+# else
+#  define TMW_CHAR_SIGNED 0
+# endif
+#endif
+
+/* It is common for one or more of the integer types
+ * to be the same size.  For example, on many embedded
+ * processors, both shorts and ints are 16 bits.  On
+ * processors used for workstations, it is quite common
+ * for both int and long to be 32 bits.  
+ *   When there is more than one choice for typdef'ing
+ * a portable type like int16_T or uint32_T, in
+ * concept, it should not matter which choice is made.
+ * However, some style guides and some code checking
+ * tools do identify and complain about seemingly
+ * irrelevant differences.  For example, a code
+ * checking tool may complain about an implicit
+ * conversion from int to short even though both
+ * are 16 bits.  To reduce these types of
+ * complaints, it is best to make int the
+ * preferred choice when more than one is available.
+ */
+
+#ifndef INT8_T
+# if   TMW_BITS_PER_INT   == 8
+#  define  INT8_T int
+# elif TMW_BITS_PER_LONG  == 8
+#  define  INT8_T long
+# elif TMW_BITS_PER_SCHAR == 8
+#  define  INT8_T signed char
+# elif TMW_BITS_PER_SHRT  == 8
+#  define  INT8_T short
+# endif
+#endif
+#ifdef INT8_T
+ typedef INT8_T int8_T;
+#endif
+
+#ifndef UINT8_T
+# if   TMW_BITS_PER_INT   == 8
+#  define  UINT8_T unsigned int
+# elif TMW_BITS_PER_LONG  == 8
+#  define  UINT8_T unsigned long
+# elif TMW_BITS_PER_SCHAR == 8
+#  define  UINT8_T unsigned char
+# elif TMW_BITS_PER_SHRT  == 8
+#  define  UINT8_T unsigned short
+# endif
+#endif
+#ifdef UINT8_T
+ typedef UINT8_T uint8_T;
+#endif
+
+
+#ifndef INT16_T
+# if   TMW_BITS_PER_INT   == 16
+#  define  INT16_T int
+# elif TMW_BITS_PER_LONG  == 16
+#  define  INT16_T long
+# elif TMW_BITS_PER_SCHAR == 16
+#  define  INT16_T signed char
+# elif TMW_BITS_PER_SHRT  == 16
+#  define  INT16_T short
+# endif
+#endif
+#ifdef INT16_T
+ typedef INT16_T int16_T;
+#endif
+
+
+#ifndef UINT16_T
+# if   TMW_BITS_PER_INT   == 16
+#  define  UINT16_T unsigned int
+# elif TMW_BITS_PER_LONG  == 16
+#  define  UINT16_T unsigned long
+# elif TMW_BITS_PER_SCHAR == 16
+#  define  UINT16_T unsigned char
+# elif TMW_BITS_PER_SHRT  == 16
+#  define  UINT16_T unsigned short
+# endif
+#endif
+#ifdef UINT16_T
+ typedef UINT16_T uint16_T;
+#endif
+
+
+#ifndef INT32_T
+# if   TMW_BITS_PER_INT   == 32
+#  define  INT32_T int
+# elif TMW_BITS_PER_LONG  == 32
+#  define  INT32_T long
+# elif TMW_BITS_PER_SCHAR == 32
+#  define  INT32_T signed char
+# elif TMW_BITS_PER_SHRT  == 32
+#  define  INT32_T short
+# endif
+#endif
+#ifdef INT32_T
+ typedef INT32_T int32_T;
+#endif
+
+
+#ifndef UINT32_T
+# if   TMW_BITS_PER_INT   == 32
+#  define  UINT32_T unsigned int
+# elif TMW_BITS_PER_LONG  == 32
+#  define  UINT32_T unsigned long
+# elif TMW_BITS_PER_SCHAR == 32
+#   define UINT32_T unsigned char
+# elif TMW_BITS_PER_SHRT  == 32
+#  define  UINT32_T unsigned short
+# endif
+#endif
+#ifdef UINT32_T
+ typedef UINT32_T uint32_T;
+#endif
+
+/* The following is used to emulate smaller integer types when only
+ * larger types are available.  For example, compilers for TI C3x/C4x DSPs 
+ * define char and short to be 32 bits, so 8 and 16 bits are not directly
+ * available.  This target is commonly used with RTW rapid prototyping.
+ * Other DSPs define char to be 16 bits, so 8 bits is not directly 
+ * available.
+ */
+#ifndef INT8_T
+# ifdef INT16_T
+#  define INT8_T INT16_T
+   typedef INT8_T int8_T;
+# else
+#  ifdef INT32_T
+#   define INT8_T INT32_T
+    typedef INT8_T int8_T;
+#  endif
+# endif
+#endif
+
+#ifndef UINT8_T
+# ifdef UINT16_T
+#   define UINT8_T UINT16_T
+    typedef UINT8_T uint8_T;
+# else
+#  ifdef UINT32_T
+#   define UINT8_T UINT32_T
+    typedef UINT8_T uint8_T;
+#  endif
+# endif
+#endif
+
+#ifndef INT16_T
+# ifdef INT32_T
+#   define INT16_T INT32_T
+    typedef INT16_T int16_T;
+# endif
+#endif
+
+#ifndef UINT16_T
+# ifdef UINT32_T
+#   define UINT16_T UINT32_T
+    typedef UINT16_T uint16_T;
+# endif
+#endif
+
+
+#ifndef NO_FLOATS
+
+#ifndef REAL32_T
+# ifndef __MWERKS__
+#  if FLT_MANT_DIG >= 23
+#   define REAL32_T float
+#  endif
+# else
+#  define REAL32_T float
+# endif
+#endif
+#ifdef REAL32_T
+ typedef REAL32_T real32_T;
+#endif
+
+
+#ifndef REAL64_T
+# ifndef __MWERKS__
+#  if DBL_MANT_DIG >= 52
+#   define REAL64_T double
+#  endif
+# else
+#  define REAL64_T double
+# endif
+#endif
+#ifdef REAL64_T
+ typedef REAL64_T real64_T;
+#endif
+
+#endif /* NO_FLOATS*/
+
+/*=======================================================================*
+ * Fixed width word size data types:                                     *
+ *   int64_T                      - signed 64 bit integers               *
+ *   uint64_T                     - unsigned 64 bit integers             *
+ *=======================================================================*/
+
+
+
+#ifndef INT64_T
+# if defined(__APPLE__)
+#  define INT64_T long long
+#  define FMT64 "ll"
+#  if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG)
+#    define INT_TYPE_64_IS_LONG
+#  endif
+# elif defined(__x86_64__) || defined(__LP64__)
+#  define INT64_T long
+#  define FMT64 "l"
+#  if !defined(INT_TYPE_64_IS_LONG)
+#    define INT_TYPE_64_IS_LONG
+#  endif
+# elif defined(_MSC_VER) || (defined(__BORLANDC__) && __BORLANDC__ >= 0x530) \
+                         || (defined(__WATCOMC__)  && __WATCOMC__  >= 1100)
+#  define INT64_T __int64
+#  define FMT64 "I64"
+# elif defined(__GNUC__) || defined(TMW_ENABLE_INT64) \
+                         || defined(__LCC64__)
+#  define INT64_T long long
+#  define FMT64 "ll"
+# endif
+#endif
+
+
+
+#if defined(INT64_T)
+# if defined(__GNUC__) && \
+    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >=9)))
+  __extension__
+# endif
+ typedef INT64_T int64_T;
+#endif
+
+
+
+#ifndef UINT64_T
+# if defined(__APPLE__)
+#  define UINT64_T unsigned long long
+#  define FMT64 "ll"
+#  if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG)
+#    define INT_TYPE_64_IS_LONG
+#  endif
+# elif defined(__x86_64__) || defined(__LP64__)
+#  define UINT64_T unsigned long
+#  define FMT64 "l"
+#  if !defined(INT_TYPE_64_IS_LONG)
+#    define INT_TYPE_64_IS_LONG
+#  endif
+# elif defined(_MSC_VER) || (defined(__BORLANDC__) && __BORLANDC__ >= 0x530) \
+                         || (defined(__WATCOMC__)  && __WATCOMC__  >= 1100)
+#  define UINT64_T unsigned __int64
+#  define FMT64 "I64"
+# elif defined(__GNUC__) || defined(TMW_ENABLE_INT64) \
+                         || defined(__LCC64__)
+#  define UINT64_T unsigned long long
+#  define FMT64 "ll"
+# endif
+#endif
+
+#if defined(_WIN64) || (defined(__APPLE__) && defined(__LP64__)) \
+                    || defined(__x86_64__) \
+                    || defined(__LP64__)
+#  define INT_TYPE_64_IS_SUPPORTED
+#endif
+
+#if defined(UINT64_T)
+# if defined(__GNUC__) && \
+    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >=9)))
+  __extension__
+# endif
+ typedef UINT64_T uint64_T;
+#endif
+
+/*===========================================================================*
+ * Format string modifiers for using size_t variables in printf statements.  *
+ *===========================================================================*/
+
+#ifndef FMT_SIZE_T
+#  if defined( __GNUC__ ) || defined(_STDC_C99)
+#    define FMT_SIZE_T "z"
+#  elif defined (__WATCOMC__)
+#    define FMT_SIZE_T "l"
+#  elif defined (_WIN32 )
+#    define FMT_SIZE_T "I"
+#  else
+#    define FMT_SIZE_T "l"
+#  endif
+#endif
+
+#ifndef FMT_PTRDIFF_T
+#  if defined(__APPLE__)
+#    define FMT_PTRDIFF_T "l"
+#  elif defined( __GNUC__ ) || defined(_STDC_C99)
+#    define FMT_PTRDIFF_T "t"
+#  elif defined (__WATCOMC__)
+#    define FMT_PTRDIFF_T "l"
+#  elif defined (_WIN32 )
+#    define FMT_PTRDIFF_T "I"
+#  else
+#    define FMT_PTRDIFF_T "l"
+#  endif
+#endif
+
+/*===========================================================================*
+ * General or logical data types where the word size is not guaranteed.      *
+ *  real_T     - possible settings include real32_T or real64_T              *
+ *  time_T     - possible settings include real64_T or uint32_T              *
+ *  boolean_T                                                                *
+ *  char_T                                                                   *
+ *  int_T                                                                    *
+ *  uint_T                                                                   *
+ *  byte_T                                                                   *
+ *===========================================================================*/
+
+#ifndef NO_FLOATS
+
+#ifndef REAL_T
+# ifdef REAL64_T
+#  define REAL_T real64_T
+# else
+#  ifdef REAL32_T
+#   define REAL_T real32_T
+#  endif
+# endif
+#endif
+#ifdef REAL_T
+ typedef REAL_T real_T;
+#endif
+
+#ifndef TIME_T
+# ifdef REAL_T
+#  define TIME_T real_T
+# endif
+#endif
+#ifdef TIME_T
+ typedef TIME_T time_T;
+#endif
+
+#endif /* NO_FLOATS */
+
+#ifndef BOOLEAN_T
+# if defined(UINT8_T)
+#  define BOOLEAN_T UINT8_T
+# else
+#  define BOOLEAN_T unsigned int
+# endif
+#endif
+typedef BOOLEAN_T boolean_T;
+
+
+#ifndef CHARACTER_T
+# define CHARACTER_T char
+#endif
+typedef CHARACTER_T char_T;
+
+
+#ifndef INTEGER_T
+# define INTEGER_T int
+#endif
+typedef INTEGER_T int_T;
+
+
+#ifndef UINTEGER_T
+# define UINTEGER_T unsigned
+#endif
+typedef UINTEGER_T uint_T;
+
+
+#ifndef BYTE_T
+# define BYTE_T unsigned char
+#endif
+typedef BYTE_T byte_T;
+
+
+/*===========================================================================*
+ * Define Complex Structures                                                 *
+ *===========================================================================*/
+#ifndef NO_FLOATS
+
+#ifndef CREAL32_T
+#  ifdef REAL32_T
+    typedef struct {
+      real32_T re, im;
+    } creal32_T;
+#    define CREAL32_T creal32_T
+#  endif
+#endif
+
+#ifndef CREAL64_T
+#  ifdef REAL64_T
+    typedef struct {
+      real64_T re, im;
+    } creal64_T;
+#    define CREAL64_T creal64_T
+#  endif
+#endif
+
+#ifndef CREAL_T
+#  ifdef REAL_T
+    typedef struct {
+      real_T re, im;
+    } creal_T;
+#    define CREAL_T creal_T
+#  endif
+#endif
+
+#endif /* NO_FLOATS */
+
+#ifndef CINT8_T
+#  ifdef INT8_T
+    typedef struct {
+      int8_T re, im;
+    } cint8_T;
+#    define CINT8_T cint8_T
+#  endif
+#endif
+
+#ifndef CUINT8_T
+#  ifdef UINT8_T
+    typedef struct {
+      uint8_T re, im;
+    } cuint8_T;
+#    define CUINT8_T cuint8_T
+#  endif
+#endif
+
+#ifndef CINT16_T
+#  ifdef INT16_T
+    typedef struct {
+      int16_T re, im;
+    } cint16_T;
+#    define CINT16_T cint16_T
+#  endif
+#endif
+
+#ifndef CUINT16_T
+#  ifdef UINT16_T
+    typedef struct {
+      uint16_T re, im;
+    } cuint16_T;
+#    define CUINT16_T cuint16_T
+#  endif
+#endif
+
+#ifndef CINT32_T
+#  ifdef INT32_T
+    typedef struct {
+      int32_T re, im;
+    } cint32_T;
+#    define CINT32_T cint32_T
+#  endif
+#endif
+
+#ifndef CUINT32_T
+#  ifdef UINT32_T
+    typedef struct {
+      uint32_T re, im;
+    } cuint32_T;
+#    define CUINT32_T cuint32_T
+#  endif
+#endif
+
+#ifndef CINT64_T
+#  ifdef INT64_T
+    typedef struct {
+      int64_T re, im;
+    } cint64_T;
+#    define CINT64_T cint64_T
+#  endif
+#endif
+
+#ifndef CUINT64_T
+#  ifdef UINT64_T
+    typedef struct {
+      uint64_T re, im;
+    } cuint64_T;
+#    define CUINT64_T cuint64_T
+#  endif
+#endif
+
+/*=======================================================================*
+ * Min and Max:                                                          *
+ *   int8_T, int16_T, int32_T     - signed 8, 16, or 32 bit integers     *
+ *   uint8_T, uint16_T, uint32_T  - unsigned 8, 16, or 32 bit integers   *
+ *=======================================================================*/
+
+#define  MAX_int8_T      ((int8_T)(127))            /* 127  */
+#define  MIN_int8_T      ((int8_T)(-128))           /* -128 */
+#define  MAX_uint8_T     ((uint8_T)(255))           /* 255  */
+#define  MIN_uint8_T     ((uint8_T)(0))
+                           
+#define  MAX_int16_T     ((int16_T)(32767))         /* 32767 */
+#define  MIN_int16_T     ((int16_T)(-32768))        /* -32768 */
+#define  MAX_uint16_T    ((uint16_T)(65535))        /* 65535 */
+#define  MIN_uint16_T    ((uint16_T)(0))
+                           
+#define  MAX_int32_T     ((int32_T)(2147483647))    /* 2147483647  */
+#define  MIN_int32_T     ((int32_T)(-2147483647-1)) /* -2147483648 */
+#define  MAX_uint32_T    ((uint32_T)(0xFFFFFFFFU))  /* 4294967295  */
+#define  MIN_uint32_T    ((uint32_T)(0))
+
+#if defined(_MSC_VER) || (defined(__BORLANDC__) && __BORLANDC__ >= 0x530) \
+                      || (defined(__WATCOMC__)  && __WATCOMC__  >= 1100) \
+                      || defined(__LCC64__)
+#  ifdef INT64_T
+#    define  MAX_int64_T     ((int64_T)(9223372036854775807LL))
+#    define  MIN_int64_T     ((int64_T)(-9223372036854775807LL-1LL))
+#  endif
+#  ifdef UINT64_T
+#    define  MAX_uint64_T    ((uint64_T)(0xFFFFFFFFFFFFFFFFULL))
+#    define  MIN_uint64_T    ((uint64_T)(0))
+#  endif
+#else
+#  ifdef INT64_T
+#    ifdef INT_TYPE_64_IS_LONG
+#      define  MAX_int64_T     ((int64_T)(9223372036854775807L))
+#      define  MIN_int64_T     ((int64_T)(-9223372036854775807L-1L))
+#    else
+#      define  MAX_int64_T     ((int64_T)(9223372036854775807LL))
+#      define  MIN_int64_T     ((int64_T)(-9223372036854775807LL-1LL))
+#    endif
+#  endif
+#  ifdef UINT64_T
+#    ifdef INT_TYPE_64_IS_LONG
+#      define  MAX_uint64_T    ((uint64_T)(0xFFFFFFFFFFFFFFFFUL))
+#      define  MIN_uint64_T    ((uint64_T)(0))
+#    else
+#      define  MAX_uint64_T    ((uint64_T)(0xFFFFFFFFFFFFFFFFULL))
+#      define  MIN_uint64_T    ((uint64_T)(0))
+#    endif
+#  endif
+#endif
+
+#ifdef _MSC_VER
+/* Conversion from unsigned __int64 to double is not implemented in windows
+ * and results in a compile error, thus the value must first be cast to
+ * signed __int64, and then to double.
+ *
+ * If the 64 bit int value is greater than 2^63-1, which is the signed int64 
max,
+ * the macro below provides a workaround for casting a uint64 value to a double
+ * in windows.
+ */
+#  define uint64_to_double(u) ( ((u) > _I64_MAX) ? \
+            (double)(__int64)((u) - _I64_MAX - 1) + (double)_I64_MAX + 1: \
+            (double)(__int64)(u) )
+
+/* The following inline function should only be used in the macro 
double_to_uint64,
+ * as it only handles the specfic range of double between 2^63 and 2^64-1 */
+__forceinline
+uint64_T double_to_uint64_helper(double d) {
+  union double_to_uint64_union_type {
+    double dd;
+    uint64_T i64;
+  } di;
+  di.dd = d;
+  return (((di.i64 & 0x000fffffffffffff) | 0x0010000000000000) << 11);
+}
+
+/* The largest double value that can be cast to uint64 in windows is the
+ * signed int64 max, which is 2^63-1. The macro below provides
+ * a workaround for casting large double values to uint64 in windows.
+ */
+/* The magic number 18446744073709551616.0 is 2^64 */
+/* The magic number 9223372036854775808.0 is 2^63 */
+#  define double_to_uint64(d) ( ((d) >= 18446744073709551616.0) ? \
+            0xffffffffffffffffULL : \
+            ((d) < 0.0) ? 0ULL : \
+            ((d) >= 9223372036854775808.0) ? \
+            double_to_uint64_helper(d) : \
+            (unsigned __int64)(d) )
+#else
+#  define uint64_to_double(u) ((double)(u))
+#  if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__TICCSC__)
+/* double_to_uint64 defined only for MSVC and UNIX */
+#  else
+#  define double_to_uint64(d) ( ((d) > 0xffffffffffffffffULL) ? \
+            (unsigned long long) 0xffffffffffffffffULL : \
+            ((d) < 0) ? (unsigned long long) 0 : (unsigned long long)(d) )
+#  endif
+#endif
+
+#if !defined(__cplusplus) && !defined(__bool_true_false_are_defined)
+
+#ifndef _bool_T
+#define _bool_T
+
+typedef boolean_T bool;
+
+#ifndef false
+#define false (0)
+#endif
+#ifndef true 
+#define true (1)
+#endif
+
+#endif /* _bool_T */
+
+#endif /* !__cplusplus */
+
+/* 
+ * This software assumes that the code is being compiled on a target using a 
+ * 2's complement representation for signed integer values.
+ */
+#if ((SCHAR_MIN + 1) != -SCHAR_MAX)
+#error "This code must be compiled using a 2's complement representation for 
signed integer values"
+#endif
+
+/*
+ * Maximum length of a MATLAB identifier (function/variable/model)
+ * including the null-termination character.
+ */
+#define TMW_NAME_LENGTH_MAX 64
+
+/*
+ * Maximum values for indices and dimensions
+ */
+#include <stddef.h>
+
+#ifdef MX_COMPAT_32
+typedef int mwSize;
+typedef int mwIndex;
+typedef int mwSignedIndex;
+#else
+typedef size_t    mwSize;         /* unsigned pointer-width integer */
+typedef size_t    mwIndex;        /* unsigned pointer-width integer */
+typedef ptrdiff_t mwSignedIndex;  /* a signed pointer-width integer */
+#endif
+
+#if (defined(_LP64) || defined(_WIN64)) && !defined(MX_COMPAT_32)
+/* Currently 2^48 based on hardware limitations */
+# define MWSIZE_MAX    281474976710655UL
+# define MWINDEX_MAX   281474976710655UL
+# define MWSINDEX_MAX  281474976710655L
+# define MWSINDEX_MIN -281474976710655L
+#else
+# define MWSIZE_MAX    2147483647UL
+# define MWINDEX_MAX   2147483647UL
+# define MWSINDEX_MAX  2147483647L
+# define MWSINDEX_MIN -2147483647L
+#endif
+#define MWSIZE_MIN    0UL
+#define MWINDEX_MIN   0UL
+
+/** UTF-16 character type */
+
+#if (defined(__cplusplus) && (__cplusplus >= 201103L)) || 
(defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
+typedef char16_t CHAR16_T;
+#elif defined(_MSC_VER)
+typedef wchar_t CHAR16_T;
+#else
+typedef UINT16_T CHAR16_T;
+#endif
+
+#endif  /* __TMWTYPES__ */
+
+#endif /* tmwtypes_h */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]