Commit 6d129d46 authored by Ferdinand Fischer's avatar Ferdinand Fischer
Browse files

added silent option to fractional solver

parent fbce5bec
......@@ -9,6 +9,7 @@ arguments
optArgs.tol = 1.0e-6;
optArgs.itmax = 500;
optArgs.spatialDomain = quantity.Domain("z", linspace(0, 1, size(stsp.A, 1)));
optArgs.silent (1,1) logical = false;
end
......@@ -28,10 +29,17 @@ assert( stsp.UserData.alpha <= 1 && stsp.UserData.alpha > 0, ...
f_fun = @(t, x) stsp.A * x + stsp.B * u.at(t);
J_fun = @(t, x) stsp.A; % Jacobian matrix of f_fun, calculated by hand. It always has the same structure.
[t, x] = FDE_PI1_Im_Ver_10(stsp.UserData.alpha, f_fun, J_fun, ...
optArgs.timeDomain.lower, optArgs.timeDomain.upper, optArgs.x0, optArgs.stepSize);
w = quantity.Discrete(x', [optArgs.timeDomain, optArgs.spatialDomain]);
[~, x] = FDE_PI1_Im_Ver_10(stsp.UserData.alpha, f_fun, J_fun, ...
optArgs.timeDomain.lower, ...
optArgs.timeDomain.upper, ...
optArgs.x0, ...
optArgs.stepSize, ...
[], ...
optArgs.tol, ...
optArgs.itmax, ....
optArgs.silent);
w = quantity.Discrete(x, [optArgs.spatialDomain, optArgs.timeDomain]);
x = quantity.Discrete(x', optArgs.timeDomain);
y = stsp.C * x + stsp.D * u;
......
......@@ -2278,7 +2278,11 @@ classdef (InferiorClasses = {?quantity.Symbolic}) Discrete ...
end
function [P, supremum] = relativeErrorSupremum(A, B)
%% RELATIVEERRRORSUPREMUM compute the relative error of the supremum
% [P, SUPREMUM] = relativeErrorSupremum(A, B) computes the supremum of the absolute
% error of A and B and returns the relative error of A - B with respect to this
% supremum. The relative error is returned as P and the supremum is returned as
% SUPREMUM.
assert(numel(A) == numel(B), 'Not implemented')
P = A.copy();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment