« first day (2 days earlier)      last day (17 days later) » 

04:23
@xiaohuamao, you probably need to DistributeDefinitions to use ParallelTable.
LaunchKernels[2]; (* or however many *)
DistributeDefinitions["CompoundMatrixMethod`"]
or put DistributedContexts -> Automatic in the ParallelTable
else it doesn't automatically load or distribute the package
05:13
@KraZug Thank you! It really helps. I haven't used packages in a parallel way before.
 
3 hours later…
08:04
I have a newer version of the package that I'm working on, if you want to try that
 
9 hours later…
17:09
Sure, I'd like to. What's the difference basically? BTW please @me, otherwise I may miss your message.
@KraZug
 
2 hours later…
19:31
@xiaohuamao, sorry, i forgot that time. I wrapped the two functions into one, and hopefully sped it up. Also much better handling of cases where you approach and singular limit (like equations with 1/r) terms.
19:46
@xiaohuamao:
Needs["CCompilerDriver`"];
compileType = If[Length[CCompilers[]] > 0, "C", "WVM"];
Options[ParametricEvansFunction] = {PerformanceGoal -> "Speed"};
cmmRepRules = \[FormalPhi][a_?ListQ] :>
Signature[a] \[FormalPhi][Sort[a]];
cmmRepRules2 = {pL[a_?ListQ][q_] :> Signature[a] pL[Sort[a]][q],
pR[a_?ListQ][q_] :> Signature[a] pR[Sort[a]][q]};

(*Generation of the derivatives of the matrix minors,looping over \
rule to sort the lists of indices*)

minorsDerivs[list_?VectorQ, len_?NumericQ] :=
Then you set up the function with:
\[CapitalDelta] = 1; \[Delta] = 0.9 \[CapitalDelta]; \[Phi] =
1.1 \[Pi]; \[Lambda] = 1; cutoff = 20; Nless = 10; tolr = 1*^-6;
xL = -cutoff; xR = cutoff;
m[x_, pm_] = (\[CapitalDelta] + \[Delta] (Tanh[x/\[Lambda] - 1] -
Tanh[x/\[Lambda] + 1])/(2 Tanh[1])) Exp[
I pm \[Phi] (Tanh[x/\[Lambda]] + 1)/2];
Fop1[F_] := D[F, x];
lhs = {-I Fop1[\[Alpha][x]] + m[x, 1] \[Beta][x],
I Fop1[\[Beta][x]] + m[x, -1] \[Alpha][x]};
variables = {\[Alpha], \[Beta]};
pfun = ParametricEvansFunction[
so just one call to ParametricEvansFunction
and then use that function with one argument, the potential eigenvalue:
FindRoot[pfun[a], {a, 0}] // AbsoluteTiming
or `pfun2 = ParametricEvansFunction[
Thread[lhs == \[Epsilon] {\[Alpha][x], \[Beta][x]}], {\[Alpha][
xL] == 0, \[Alpha][xR] == 0}, variables, {x, xL, xR}, \[Epsilon],
PerformanceGoal -> "Speed"]`
FindRoot[pfun2[a], {a, 0}] // AbsoluteTiming
Although my normalisation is not working properly there :(
so clearly something isn't quite right
so the values are ~O(10^15), rather than O(1)
doesn't stop it working and finding the roots, but means something is not right
hmm, I need to figure out what exactly the issue is

« first day (2 days earlier)      last day (17 days later) »