Skip to content

Commit ac1cab0

Browse files
author
SPearce
committed
Update to v0.92
1 parent ffdf081 commit ac1cab0

File tree

5 files changed

+22
-11
lines changed

5 files changed

+22
-11
lines changed

CompoundMatrixMethod-0.91.paclet

-10.1 KB
Binary file not shown.

CompoundMatrixMethod-0.92.paclet

10.2 KB
Binary file not shown.

CompoundMatrixMethod/CompoundMatrixMethod.m

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
(* Mathematica Package *)
44

55
(* :Title: CompoundMatrixMethod *)
6-
(* :Author: Simon Pearce <[email protected]> *)
6+
(* :Author: Simon Pearce <simon.pearce@cruk.manchester.ac.uk> *)
77
(* :Context: CompoundMatrixMethod` *)
8-
(* :Version: 0.91 *)
9-
(* :Date: 2022-02-09 *)
8+
(* :Version: 0.92 *)
9+
(* :Date: 2022-01-15 *)
1010

1111
(* :Mathematica Version: 10+ *)
12-
(* :Copyright: (c) 2017-22 Simon Pearce *)
12+
(* :Copyright: (c) 2017-23 Simon Pearce *)
1313

1414
BeginPackage["CompoundMatrixMethod`"];
1515

@@ -389,7 +389,7 @@ with radius controlled by ContourRadius (default 1), for a system defined from T
389389
FMatrix = ExtractInterface[interfaceBCs, depvarLeft, {x, xmatch}];
390390
GMatrix = ExtractInterface[interfaceBCs, depvarRight, {x, xmatch}];
391391
{leftAMatrix, leftBCMatrix, stuff, xLeft} = ToMatrixSystem[leftEqns, leftBCs, depvarLeft, {x, xa, xmatch}, a];
392-
{rightAMatrix, stuff, rightBCMatrix, xRight} = ToMatrixSystem[rightEqns, rightBCs, depvarRight, {x, xmatch, xb}, a];
392+
{rightAMatrix, stuff, rightBCMatrix, xRight} = ToMatrixSystem[rightEqns, rightBCs, depvarRight, {x, xmatch, xb}, a];
393393
(*Return the system for using in CMM function*)
394394
{{leftAMatrix, rightAMatrix}, leftBCMatrix,rightBCMatrix, {FMatrix, GMatrix}, {x, xa, xmatch, xb}} /. a -> \[FormalLambda]
395395

@@ -418,7 +418,7 @@ with radius controlled by ContourRadius (default 1), for a system defined from T
418418
(*Replace all the original variables with a set indexed by Y*)
419419
newYs = Through[Array[\[FormalY], {Length[originalYVariables]}][x]];
420420
newYSubs = Thread[originalYVariables -> newYs];
421-
Transpose[Table[Coefficient[neweqn /. newYSubs /. Equal -> Subtract, i], {i, newYs}]]
421+
Transpose[Table[Coefficient[neweqn /. newYSubs /. Equal -> Subtract, i], {i, Join[newYs,undifferentiatedVariables]}]]
422422
]
423423

424424
SelectNegativeEigenvectors[mat_?MatrixQ, x_ /; !NumericQ[x]] := Module[{limitMatrix,eigvecs},
@@ -442,6 +442,16 @@ with radius controlled by ContourRadius (default 1), for a system defined from T
442442
leftBCMatrix_?MatrixQ, rightBCMatrix_?MatrixQ, {FMatrix_?MatrixQ, GMatrix_?MatrixQ}, {x_ /; ! NumericQ[x], xa_, xm_, xb_}},opts:OptionsPattern[{Evans,NDSolve}]] :=
443443
Evans[\[FormalLambda]0, {ALeftMatrix, ARightMatrix}, leftBCMatrix, rightBCMatrix, {FMatrix, GMatrix}, {x, xa, xm, xb},opts]
444444

445+
Evans[\[FormalLambda]0_?NumericQ, {{ALeftMatrix_?MatrixQ,ARightMatrix_?MatrixQ},{}, rightBCMatrix_?MatrixQ, {FMatrix_?MatrixQ,GMatrix_?MatrixQ}, {x_ /; ! NumericQ[x], xa_, xm_, xb_}},opts:OptionsPattern[{Evans,NDSolve}]] :=
446+
Evans[\[FormalLambda]0, {ALeftMatrix,ARightMatrix}, N@SelectNegativeEigenvectors[ALeftMatrix /. \[FormalLambda] -> \[FormalLambda]0, x], rightBCMatrix,{FMatrix,GMatrix}, {x, xa, xm, xb},opts]
447+
448+
Evans[\[FormalLambda]0_?NumericQ, {{ALeftMatrix_?MatrixQ,ARightMatrix_?MatrixQ},leftBCMatrix_?MatrixQ, {}, {FMatrix_?MatrixQ,GMatrix_?MatrixQ}, {x_ /; ! NumericQ[x], xa_, xm_, xb_}},opts:OptionsPattern[{Evans,NDSolve}]] :=
449+
Evans[\[FormalLambda]0, {ALeftMatrix,ARightMatrix}, leftBCMatrix, N@SelectNegativeEigenvectors[ARightMatrix /. \[FormalLambda] -> \[FormalLambda]0, x],{FMatrix,GMatrix}, {x, xa, xm, xb},opts]
450+
451+
Evans[\[FormalLambda]0_?NumericQ, {{ALeftMatrix_?MatrixQ,ARightMatrix_?MatrixQ},{}, {}, {FMatrix_?MatrixQ,GMatrix_?MatrixQ}, {x_ /; ! NumericQ[x], xa_, xm_, xb_}},opts:OptionsPattern[{Evans,NDSolve}]] :=
452+
Evans[\[FormalLambda]0, {ALeftMatrix,ARightMatrix}, N@SelectNegativeEigenvectors[ALeftMatrix /. \[FormalLambda] -> \[FormalLambda]0, x], N@SelectNegativeEigenvectors[ARightMatrix /. \[FormalLambda] -> \[FormalLambda]0, x],{FMatrix,GMatrix}, {x, xa, xm, xb},opts]
453+
454+
445455
Evans[\[FormalLambda]0_?
446456
NumericQ, {ALeftMatrix_?MatrixQ, ARightMatrix_?MatrixQ}, leftBCMatrix_?MatrixQ, rightBCMatrix_?MatrixQ,
447457
{FMatrix_?MatrixQ, GMatrix_?MatrixQ}, {x_ /; !NumericQ[x], xaa_, xmm_, xbb_},opts:OptionsPattern[{Evans,NDSolve}]] :=

CompoundMatrixMethod/PacletInfo.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
(* ::Input::Initialization:: *)
44
Paclet[
55
Name->"CompoundMatrixMethod",
6-
Version->"0.91",
6+
Version->"0.92",
77
MathematicaVersion->"10+",
88
Description->"Solve Eigenvalue Boundary Value Problems using the Compound Matrix Method to generate the Evans function. ",
99
Creator->"Simon Pearce",

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ The package can then be loaded by calling
2020

2121
The Compound Matrix Method is a package for finding eigenvalues of boundary-value ordinary differential equations.
2222

23+
This includes problems with a single interface, decaying conditions at one or both ends, in an upto 10th order differential system.
24+
2325
First we need to transform the boundary-value problem (BVP) into a set of first order matrix equations. The function ToMatrixSystem will do this, linearising the equations if necessary (with a warning if it does).
2426

2527
sys=ToMatrixSystem[y''[x] + k^2 y[x] == 0, {y[0] == 0, y[1] == 0}, y, {x, 0, 1}, k]
@@ -47,13 +49,12 @@ A number of further examples are shown in the file `CMMExamples.nb`, available f
4749

4850
I used this method to solve an eigenvalue problem in <a href=https://doi.org//10.1093/imamat/hxq026>my 2010 paper </a>, and the package itself in both <a href=https://link.springer.com/article/10.1007/s11538-018-0505-4>a tenth-order ODE </a> as well as <a href=https://journals.aps.org/pre/abstract/10.1103/PhysRevE.98.033003>an example with an interface</a>.
4951

50-
I'm currently working on an expository paper to detail how the method works and introduce the package.
52+
I have a half-written expository paper (expansion of the <a href=http://www.maths.gla.ac.uk/~xl/FYB-background.pdf>note</a> written by Professor Yibin Fu) to give more details on how the method works and introduce the package, please email me for a copy of that.
5153

5254
## Contact
5355

54-
Feel free to contact me if you have any questions, suggestions or issues, I'm also interested in collaborations involving this work.
55-
My email address is simon (dot) pearce (at) manchester (dot) ac (dot) uk.
56+
Feel free to contact me if you have any questions, suggestions or issues, I'm also interested in collaborations involving this work, but please note my time is severely limited as I am no longer active in this field. My email address is simon (dot) pearce (at) cruk (dot) manchester (dot) ac (dot) uk.
5657

5758
## Funding Acknowledgement
5859

59-
This code was initially written while I held an Early Career Fellowship from the <a href=https://www.leverhulme.ac.uk>Leverhulme Trust</a>. I'm now based at the Cancer Research UK Manchester Institute, part of the University of Manchester, UK.
60+
This code was initially written while I held an Early Career Fellowship from the <a href=https://www.leverhulme.ac.uk>Leverhulme Trust</a>. I'm now based at the Cancer Research UK Manchester Institute, part of the University of Manchester, UK, and work on bioinformatics.

0 commit comments

Comments
 (0)