-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathMATLAB_interface.dox
More file actions
44 lines (32 loc) · 1.52 KB
/
Copy pathMATLAB_interface.dox
File metadata and controls
44 lines (32 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
namespace gismo {
/**
\page MATLAB_interface MATLAB interface via \ref gsCInterface
The <a href="https://mathworks.com/products/matlab.html">MATLAB</a> interface of \gismo is enabled via the \ref C_interface of \gismo. The package is available as the \ref gsMatlab module.
<h3>Installation of gsMatlab</h3>
<h3>Calling the C interface in MATLAB</h3>
Inside MATLAB, the \gismo class hierarchy is maintained as much as possible. The \ref gsFunctionSet-equivalent in MATLAB is defined as:
~~~~{.m}
classdef gsFunctionSet < handle
% Class implementations
end
~~~~
And, for example, a \ref gsMultiPatch deriving from \ref gsFunctionSet is declared as:
~~~~{.m}
classdef gsMultiPatch < gsFunctionSet
% Class implementations
end
~~~~
Within the classes, member functions can be declared, which call their corresponding function from the C interface of \gismo:
~~~~{.m}
function varargout = addPatch(this, varargin)
if (nargin~=2 || nargout>0)
error('Invalid number of input and/or output arguments.')
end
calllib('gismo','gsMultiPatch_addPatch',this.objectHandle,varargin{1}.ptr());
end
~~~~
\note Since MATLAB does not natively offer an interface to Eigen, the \ref gsMatrix is binded to MATLAB using the `EigenMatrix` types. This type can easily convert to a MATLAB matrix and can be given to the C interface of \gismo.
<h3>Further information and examples</h3>
For further information and examples regarding the MATLAB interface, we refer to the <a href="https://github.com/gismo/gsMatlab">gsMatlab</a> repository.
*/
}