05:43
@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];
\[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.
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
@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}]
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}]
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[
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[
20:32
@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?
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) ← previous day next day → last day (16 days later) »
Transcript for
Jul16
Jul '1917
Jul18
Discussion between xiaohuamao and KraZug
Imported from a comment discussion on mathematica.stackexchang...