Sandu split Allen-Cahn - #142
Conversation
| % f = f_diffusion + f_reaction | ||
| % Jacobian = Jacobian_diffusion + Jacobian_reaction | ||
| % | ||
| function du = f_diffusion(~, u, L, alpha, ~, ~) |
There was a problem hiding this comment.
please rename to fDiffusion, we do not use underscores in OTP
| % Linear-nonlinear splitting: f = f_linear + f_nonlinear | ||
| % f_linear(u) = Jac*u, f_nonlinear(u) = f(u)-Jac*u | ||
|
|
||
| function du = f_linear(~, u, L, alpha, beta, ~) |
| % Linear-nonlinear splitting: f = f_linear + f_nonlinear | ||
| % f_linear(u) = Jac*u, f_nonlinear(u) = f(u)-Jac*u | ||
|
|
||
| function du = f_nonlinear(t, u, ~, ~, beta, forcing) |
| % f = f_diffusion + f_reaction | ||
| % Jacobian = Jacobian_diffusion + Jacobian_reaction | ||
| % | ||
| function du = f_reaction(t, u, ~, ~, beta, forcing) |
| % f = f_diffusion + f_reaction | ||
| % Jacobian = Jacobian_diffusion + Jacobian_reaction | ||
| % | ||
| function j = jacobian_diffusion(~, ~, L, alpha, ~, ~) |
| % f = f_diffusion + f_reaction | ||
| % Jacobian = Jacobian_diffusion + Jacobian_reaction | ||
| % | ||
| function j = jacobian_reaction(~, u, L, ~, beta, ~) |
| @@ -1,5 +1,5 @@ | |||
| <deployment-project plugin="plugin.toolbox" plugin-version="1.0"> | |||
| <configuration name="ODE Test Problems" target="target.toolbox" target-name="Package Toolbox"> | |||
There was a problem hiding this comment.
please don't commit this file, so please git revert this file
| @@ -0,0 +1,9 @@ | |||
| % Process splitting: | |||
There was a problem hiding this comment.
Steven: We need to add these functions to the problem file.
There was a problem hiding this comment.
Yes, here is an example
ODE-Test-Problems/toolbox/+otp/+brusselator/BrusselatorProblem.m
Lines 88 to 94 in 167bdc1
| @@ -0,0 +1,9 @@ | |||
| % Process splitting: | |||
There was a problem hiding this comment.
Yes, here is an example
ODE-Test-Problems/toolbox/+otp/+brusselator/BrusselatorProblem.m
Lines 88 to 94 in 167bdc1
|
|
||
| function du = f_linear(~, u, L, alpha, beta, ~) | ||
|
|
||
| du = alpha*L*u + beta * (u - 3*u.^3); |
There was a problem hiding this comment.
Is this correct? It looks like it has nonlinear terms.
There was a problem hiding this comment.
The goal is to create the splitting
However, we may want separate evaluation of $ J(z) y$ ( e.g.
There was a problem hiding this comment.
I see. In that case, I think the names are ok as long as it is documented. Alternatively, you could consider calling them RHSJacobian and RHSRemainder.
Added Allen Cahn splitting into linear/nonlinear parts, and diffusion/reaction parts.