3 hours later…
9 hours later…
2 hours later…
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] :=
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[
\[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[
and then use that function with one argument, the potential eigenvalue:
FindRoot[pfun[a], {a, 0}] // AbsoluteTiming
FindRoot[pfun[a], {a, 0}] // AbsoluteTiming
« first day (2 days earlier) ← previous day next day → last day (17 days later) »
Transcript for
Jul15
Jul '1916
Jul17
Discussion between xiaohuamao and KraZug
Imported from a comment discussion on mathematica.stackexchang...