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
FibreDirections.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 
28  public:
29 
30  FibreDirections(version) {
31  if nargin < 1
32  version = 1;
33  end
34  this = this@models.muscle.AMuscleConfig();
35  this.init;
36 
37  if version == 2
38  this.a0CoordinateSystem= " reference ";
39  else
40  this.a0CoordinateSystem= " master ";
41  end
42  }
43 
44 
45  function configureModel(m) {
46  configureModel@models.muscle.AMuscleConfig(this, m);
47  m.T= 50;
48  m.dt= 1;
49  m.ODESolver.RelTol= 1e-6;
50  m.ODESolver.AbsTol= 1e-6;
51  m.DefaultMu(2) = 30;
52  }
53 
54 
55  protected:
56 
57 
58  function geo = getGeometry() {
59  geo = fem.geometry.RegularHex8Grid([0 1],[0 1],[0 1]);
60  pts = geo.Nodes;
61  theta = -.3;
62  R = [cos(theta) -sin(theta) 0
63  sin(theta) cos(theta) 0
64  0 0 1];
65  pts = circshift(R,[1 1])*R*pts;
66  geo = fem.geometry.Cube8Node(pts, geo.Elements);
67  geo = geo.toCube27Node;
68  }
76  function displ_dir = setPositionDirichletBC(displ_dir) {
77  geo = this.FEM.Geometry;
78  displ_dir(:,geo.Elements(1,geo.MasterFaces(1,:))) = true;
79  /* displ_dir(1,geo.Elements(1,geo.MasterFaces(1,:))) = true;
80  *displ_dir(:,geo.Elements(1,geo.MasterFaces(1,5))) = true; */
81  }
82 
83 
84  function anull = seta0(anull) {
85  anull(1,:,:) = 1;
86  }
87 
88 
89  public: /* ( Static ) */
90 
91  static function test_FibreDirections() {
92  f = models.muscle.examples.FibreDirections(1);
93  m=f.createModel;
94  m.plotGeometrySetup;
95  m.simulateAndPlot;
96 
97  f = models.muscle.examples.FibreDirections(2);
98  m=f.createModel;
99  m.plotGeometrySetup;
100  m.simulateAndPlot;
101  }
102 
103 
104 
105 };
106 }
107 }
108 }
109 
110 
111 
function displ_dir = setPositionDirichletBC(displ_dir)
An example illustrating the fibre direction options.
function geo = getGeometry()
Single cube with same config as reference element.
char a0CoordinateSystem
The coordinate system in which to interpret the a0 vectors of fibre directions.
Definition: AMuscleConfig.m:40