KerMor  0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EntireTA.m
Go to the documentation of this file.
1 namespace models{
2 namespace muscle{
3 namespace examples{
4 
5 
6 /* (Autoinserted by mtoc++)
7  * This source code has been filtered by the mtoc++ executable,
8  * which generates code that can be processed by the doxygen documentation tool.
9  *
10  * On the other hand, it can neither be interpreted by MATLAB, nor can it be compiled with a C++ compiler.
11  * Except for the comments, the function bodies of your M-file functions are untouched.
12  * Consequently, the FILTER_SOURCE_FILES doxygen switch (default in our Doxyfile.template) will produce
13  * attached source files that are highly readable by humans.
14  *
15  * Additionally, links in the doxygen generated documentation to the source code of functions and class members refer to
16  * the correct locations in the source code browser.
17  * However, the line numbers most likely do not correspond to the line numbers in the original MATLAB source files.
18  */
19 
20 class EntireTA
28  public:
29 
31  this = this@models.muscle.AMuscleConfig(varargin[:]);
32  this.init;
33 
34  /* % Muscle fibre weights
35  * geo = s.geo27;
36  * types = [0 .2 .4 .6 .8 1];
37  * ftw = zeros(this.FEM.GaussPointsPerElem,length(types),geo.NumElements);
38  * % Test: Use only slow-twitch muscles
39  * ftw(:,1,:) = .4;
40  * ftw(:,2,:) = .05;
41  * ftw(:,3,:) = .05;
42  * ftw(:,4,:) = .1;
43  * ftw(:,5,:) = .2;
44  * ftw(:,6,:) = .2;
45  * this.FibreTypeWeights = ftw;
46  * p = models.motorunit.Pool;
47  * p.FibreTypes = types;
48  * this.Pool = p; */
49  }
57  function configureModel(m) {
58  configureModel@models.muscle.AMuscleConfig(this, m);
59  /* Overload this method to set model-specific quantities like
60  * simulation time etc */
61  m.T= 200;
62  m.dt= 1;
63  m.DefaultMu(1) = .1;
64  m.DefaultMu(2) = 50;
65 /* m.DefaultMu(4) = 4; */
66  os = m.ODESolver;
67  os.RelTol= .01;
68  os.AbsTol= .08;
69  }
70 
71 
72  protected:
73 
74 
75  function geo = getGeometry() {
76  s = load(fullfile(fileparts(which(mfilename))," EntireTA.mat "));
77  geo = s.geo27;
78  }
79 
80 
81  function displ_dir = setPositionDirichletBC(displ_dir) {
82  geo = this.FEM.Geometry;
83  /* Front face
84  * displ_dir(:,geo.Elements(6,geo.MasterFaces(3,:))) = true;
85  * Back faces */
86  displ_dir(:,geo.Elements(8,geo.MasterFaces(4,:))) = true;
87  displ_dir(:,geo.Elements(8,geo.MasterFaces(2,:))) = true;
88  }
97  function anull = seta0(anull) {
98  anull(1,:,:) = 1;
99  }
108  public: /* ( Static ) */
109 
110  static function test_EntireTA() {
111  m = models.muscle.Model(models.muscle.examples.EntireTA);
112  m.simulateAndPlot;
113  }
114 
115 
116 
117 };
118 }
119 }
120 }
121 
122 
123 
static function test_EntireTA()
Definition: EntireTA.m:110
function geo = getGeometry()
Returns the intended geometry for this model config.
Definition: EntireTA.m:75
A variable number of input arguments.
EntireTA(varargin)
Single cube with same config as reference element.
Definition: EntireTA.m:30
function displ_dir = setPositionDirichletBC(displ_dir)
% Dirichlet conditions: Position (fix one side)
Definition: EntireTA.m:81
function anull = seta0(anull)
The elements are aligned so that the fibres go in x-direction.
Definition: EntireTA.m:97