« first day (3 days earlier)      last day (16 days later) » 

05:43
@KraZug Thank you for the new fancy code!
@KraZug I want to solve the ODE at various parameter values as before. But it seems that pfun is not used in a similar way. The following code fails to evaluate.

\[CapitalDelta] = 1;(*\[Delta]=ha \[CapitalDelta];\[Phi]=1.1\[Pi];\
\[Lambda]=1;*)cutoff = 20; Nless = 10; tolr = 1*^-6;
xL = -cutoff; xR = cutoff;
m[x_, pm_] = \[CapitalDelta] (1 + \[Delta] (
Tanh[x/\[Lambda] - 1] - Tanh[x/\[Lambda] + 1])/(
2 Tanh[1]))(*(1+\[Delta](-\[Lambda]^2)/(x^2+\[Lambda]^2))*)
Exp[I pm \[Phi] (Tanh[x/\[Lambda]] + 1)/2];
06:01
@KraZug
Irrelevant to the issue above, it occasionally shows two errors although evaluates well.
CreateLibrary::cmperr: Compile error: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Compile::nogen: A library could not be generated from the compiled function.
 
2 hours later…
07:55
I don't know about that error, that is related to the use of Compile
it is making C code to evaluate
@xiaohuamao, you need to set the values of the constants inside the pfun function as it evaluates more things first than Evans/ToMatrixSystem
pfun[\[Lambda]\[Lambda]_, \[Delta]\[Delta]_, \[Phi]\[Phi]_] :=
ParametricEvansFunction[
Thread[lhs == \[Epsilon] {\[Alpha][x], \[Beta][
x]}] /. {\[Lambda] -> \[Lambda]\[Lambda], \[Delta] -> \
\[Delta]\[Delta], \[Phi] -> \[Phi]\[Phi]}, {\[Alpha][xL] ==
0, \[Alpha][xR] == 0}, variables, {x, xL, xR}, \[Epsilon]];

FindRoot[pfun[1, 0.9, \[Pi]][e], {e, 0}]
08:09
I suspect it may not make much difference in timing in your case to use that over the previous function, but it may speed it up. It will automatically cache evaluation values, which is nice.
at least when you use it just as pfun = .... anyway. Possibly need to put pfun[[Lambda][Lambda]_, [Delta][Delta]_, [Phi][Phi]_] = pfun[[Lambda][Lambda], [Delta][Delta], [Phi][Phi]] = ...... in that code
 
11 hours later…
19:36
@KraZug
pfun[\[Lambda]\[Lambda]_, \[Delta]\[Delta]_, \[Phi]\[Phi]_] :=
ParametricEvansFunction[
Thread[lhs == \[Epsilon] {\[Alpha][x], \[Beta][
x]}] /. {\[Lambda] -> \[Lambda]\[Lambda], \[Delta] -> \
\[Delta]\[Delta], \[Phi] -> \[Phi]\[Phi]}, {\[Alpha][xL] ==
0, \[Alpha][xR] == 0}, variables, {x, xL, xR}, \[Epsilon]];
Table[FindRoot[
pfun[1, \[Delta]0, \[Pi]][\[Epsilon]], {\[Epsilon], 0}], {\[Delta]0,
0, 1, 0.1}]

is much slower that the previous Evans/ToMatrixSystem code

sys1 = ToMatrixSystem[
I naively thought not using := might be faster, but pfun[\[Lambda]\[Lambda]_, \[Delta]\[Delta]_, \[Phi]\[Phi]_] = ParametricEvansFunction looks not to be the right definition. Not sure how ParametricEvansFunction works best with parameters.
20:10
Did you try PerformanceGoal->"Speed"?
@xiaohuamao, it may well be that it is not faster at all for your second order equation.
it compiles the fiunction the first time, which takes maybe a second, so any speed up in evaluation gets swallowed by that if it only is evaluated a few times.
20:32
@KraZug PerformanceGoal doesn't seem to make a difference in my case.
@KraZug BTW, I found your package quite capable in avoiding spurious solutions, compared to a few other methods I am aware of. If you know any reason, please let me know.
I read the intro pdf on Evans function you linked. It is based on an invariant of an ODE, which seems somewhat different from other FDM/FEM methods. Does such invariant thing belong to some wider mathematical subfield?

« first day (3 days earlier)      last day (16 days later) »