150 this =
this@models.BaseFirstOrderSystem(model);
154 this.
Diff= [m.d2/m.d1 m.d3/m.d1 m.d4/m.d1];
158 this.
ReacCoeff= [m.Kc1_real m.Kc2_real m.Kd1_real ...
159 m.Kd2_real m.Kd3_real m.Kd4_real ...
160 m.Kp1_real m.Kp2_real]^
t * m.tau;
164 p = this.
addParam(
" area ", .1,
" Range ", [.01, 1],
" Desired ", 10);
168 p = this.
addParam(
" rate ", .001,
" Range ", [0.0005, 1],
" Desired ", 15);
172 p = this.
addParam(
" atime ", .5,
" Range ", [0, 1],
" Desired ", 5);
176 p = this.
addParam(
" exponent ", 2,
" Range ", [1, 4],
" Desired ", 5);
182 #if 0 //mtoc++: 'get.h'
191 #if 0 //mtoc++: 'set.h'
193 if any(value >= this.fOmega(:,2))
194 error(" Cannot choose a step size
h=%e value larger or equal to the geometry [%s]. ",...
195 value,
Utils.implode(this.fOmega(:)," , "," %
g "));
203 if ~isa(m.ODESolver," solvers.IImplSolver ") && ~isa(m.ODESolver," solvers.SemiImplicitEuler ")
204 maxdt = .95*(value^2/max([m.d1 m.d2 m.d3 m.d4]));
205 maxdtsc = .95*(this.
hs^2/max([1 this.
Diff]));
207 if (maxdtsc - maxdt/this.Model.tau) / maxdtsc > 1e-15
208 error(" Inconsistent scaling. Please check. ");
211 this.MaxTimestep= maxdtsc;
214 warning(" models:pcd:CFL "," CFL condition violated with
h=%e and current dt=%e.\nSetting System.MaxTimestep=%e (scaled, effective value %e)\n ", value, m.dt, maxdtsc, maxdt);
223 #if 0 //mtoc++: 'get.Omega'
224 function v =
Omega() {
232 #if 0 //mtoc++: 'set.Omega'
233 function
Omega(value) {
234 if size(value,2) ~= 2
235 error(
" Omega needs to be a dim x 2 matrix with the spatial extend for each dimension in a row. ");
247 setConfig@models.BaseFirstOrderSystem(
this, mu, inputidx);
249 this.
ReacCoeff= [m.Kc1_real m.Kc2_real m.Kd1_real ...
250 m.Kd2_real m.Kd3_real m.Kd4_real ...
251 m.Kp1_real m.Kp2_real]^
t * m.tau;
259 if ~isempty(this.fh) && ~isempty(this.fOmega)
260 nd = size(this.fOmega,1);
261 this.
Dims= zeros(1,nd);
263 this.
Dims(d) = length(this.fOmega(d,1):this.
h:this.fOmega(d,2));
268 updateDimensions@models.BaseFirstOrderSystem(
this);
272 ss(1:m) = this.Model.xa0;
273 ss(m+1:2*m) = this.Model.ya0;
274 ss(2*m+1:3*m) = this.Model.xi0;
275 ss(3*m+1:end) = this.Model.yi0;
283 this.
f.newSysDimension;
Collection of generally useful functions.
h
Spatial stepwidth (in unscaled size units!) is set in subclasses.
The base class for any KerMor detailed model.
Model
The Model this System is attached to.
hs
scaled spatial stepwidth
Dims
The system's dimensions.
function registerProps(varargin)
Call this method at any class that defines DPCM observed properties.
inputidx
The current inputindex of the function .
mu
The current parameter for simulations, [] is none used.
function updateDimensions()
colvec StateScaling
The scaling for the state vectors.
virtual function newSysDimension()
Custom updates for new system dimension.
BasePCDSystem(models.BaseFullModel model)
ReacCoeff
The reaction coefficients.
function setConfig(colvec< double > mu,integer inputidx)
dscomponents.ACoreFun f
The core f function from the dynamical system.
dscomponents.ACoreFun g
The system's algebraic constraints function.
Omega
The spatial width/area/region (in unscaled size units!)
double MaxTimestep
The maximum timestep allowed for any ODE solvers.
function ModelParam p = addParam(char name, default, varargin)
Adds a parameter with the given values to the parameter collection of the current dynamical system...
Base class for all KerMor first-order dynamical systems.
PCDSYSTEM The 2D dynamical system of the Programmed Cell Death Model by Markus Daub.
Diff
Relative diffusion coefficients ([d2/d1, d3/d1, d4/d1])