202 this =
this@dscomponents.ACompEvalCoreFun(sys);
214 mc = sys.Model.Config;
215 if ~isempty(mc.FibreTypeWeights)
216 this.
nfibres= size(mc.FibreTypeWeights,2);
219 this.
xDim= sys.NumTotalDofs;
220 this.
fDim= sys.NumDerivativeDofs;
224 this.precomputeUnassembledData;
237 mc = sys.Model.Config;
239 mc.Pool.prepareSimulation(sys.Model.T,mu(4));
242 this.
alpha= mc.getAlphaRamp(
mu(2));
245 mc.setForceLengthFun(
this);
248 mlfg = models.muscle.functions.MarkertLawOriginal(
mu(5),
mu(6));
252 mlfg = general.functions.CubicToLinear(
mu(7),
mu(8));
261 this.usemassinv= sys.UseDirectMassInversion;
262 this.crossfibres= sys.HasFibres && sys.UseCrossFibreStiffness;
267 error(
" Do not call directly; have custom evaluate method. ");
340 copy = models.muscle.Dynamics(this.
System);
343 copy =
clone@dscomponents.ACompEvalCoreFun(
this, copy);
357 setSystem@dscomponents.ACoreFun(
this, sys);
358 if isa(sys,
" models.ReducedSecondOrderSystem ")
359 this.fsys= sys.Model.FullModel.System;
367 copy =
project@dscomponents.ACompEvalCoreFun(
this, V, W);
372 #if 0 //mtoc++: 'set.ComputeUnassembled'
378 elseif ~value && ~isempty(this.
System)
465 function precomputeUnassembledData() {
467 mc = sys.
Model.Config;
468 geo = mc.FEM.Geometry;
469 this.
num_dv_unass= 3*geo.NumElements * geo.DofsPerElement;
472 [i, ~] = find(mc.FEM.Sigma);
473 I = [3*(i
" -1)+1; 3*(i "-1)+2; 3*(i^
t-1)+3];
476 error(
" Size mismatch. Somethings wrong with FEM Sigma ");
480 S = sparse(
I,1:n,ones(n,1),3*geo.NumNodes,n);
483 S(sys.idx_v_bc_local,:) = [];
487 bc_unass = find(sum(
S,1) == 0);
494 this.fDim_unass= size(
S,2);
499 hlp = repmat(1:geo.NumElements, 3*geo.DofsPerElement,1);
502 ass =
false(geo.NumElements,length(hlp));
503 for k = 1:geo.NumElements
ComputeUnassembled
% Unassembled stuff
integer fDim
The current output dimension of the function.
Sigma
Sigma assembly matrix.
MuscleFibreSystem: The global dynamical system used within the MuscleFibreModel.
LastBCResiduals
Prepared arguments for APExpansion muprep;.
function copy = clone()
Create new instance.
RampTime
Helper value for QuickReleaseTests (or others) that use a function handle with certain alpha ramp tim...
function fx = evaluateComponentSet(integer nr,colvec< double > x,double t)
Computes the full or reduced component functions of the given point set.
Model
The Model this System is attached to.
function res = test_Jacobian(matrix< double > y,double t,colvec< double > mu)
Overrides the random argument jacobian test as restrictions on the possible x values (detF = 1) hold...
This class implements the nonlinear continuum mechanics as described in .
ForceLengthFun
% Force length function fields
function prepareSimulation(colvec< double > mu)
A MatLab function handle.
b1cf
Cross-fibre markert part [MPa] = [N/mm²].
matrix< double > S
The x-component selection matrices (precomputed on setting PointSet/AltPointSet). �S� is passed to ...
integer xDim
The current state space dimension of the function's argument .
models.BaseFirstOrderSystem System
The system associated with the current ACoreFun.
lambda_dot_pos
Helper variable for fullmodels.muscle.model.
V
The matrix of the biorthogonal pair .
colvec< double > mu
The current model parameter mu for evaluations. Will not be persisted as only valid for runtime durin...
function fx = evaluate(x, t)
Evaluates the f-approximation. Depending on a possible projection and the CustomProjection-property t...
idx_uv_bc_glob_unass
The indices of any dirichlet value in the unassembled vector duvw.
sparse< logical > JSparsityPattern
Sparsity pattern for the jacobian matrix.
function fx = evaluateComponents(rowvec< integer > pts,rowvec< integer > ends, unused1, unused2,matrix< double > x, unused3)
This is the template method that actually evaluates the components at given points and values...
function x_xdot_c0 = getX0(colvec< double > mu)
Compiles the global x0 vector of the global dof vector.
ACompEvalCoreFun: A normal CoreFun which supports single-component evaluation.
function fx = evaluateMulti(colvec< double > x,double t,colvec< double > mu)
Evaluates this function on multiple locations and maybe multiple times and parameters.
function fx = evaluateComponentSetMulti(integer nr,matrix< double > x,rowvec< double > t,matrix< double > mu)
Computes the full component functions of the given point set.
function_handle alpha
The activation of the muscle at time t [-].
function copy = project(V, W)
W
The matrix of the biorthogonal pair .
function [ SPK , SPg , SPalpha , SPLamDot ] = computeSparsityPattern()
Computes all sorts of patterns simultaneously.
function fx = evaluateCoreFun(colvec< double > x,double t)
Actual method used to evaluate the dynamical sytems' core function.
function dfx = evaluateComponentPartialDerivatives(rowvec< integer > pts,rowvec< integer > ends,rowvec< integer > idx,rowvec< integer > deriv,rowvec< integer > self,colvec< double > x,double t, dfxsel)
Computes specified partial derivatives of of the components given by pts and the selected partial de...