summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Rochester <simon.rochester@gmail.com>2012-09-27 23:37:48 -0700
committerSimon Rochester <simon.rochester@gmail.com>2012-09-27 23:37:48 -0700
commit486497eb8e483b582c16e433327160eacf96c5bc (patch)
treea46eba169a6b2df1b79f73a569e578e689e36e08
parente7bea5eaeeabb7a3ef2e720e5b33e2d8d1b4207b (diff)
downloadNresonances-486497eb8e483b582c16e433327160eacf96c5bc.tar.gz
Nresonances-486497eb8e483b582c16e433327160eacf96c5bc.zip
Added list of DM variables to output, and comments at the beginning and end of each text file.
-rwxr-xr-xmathemathica_fwm/RbXMDSSetup.nb237
1 files changed, 160 insertions, 77 deletions
diff --git a/mathemathica_fwm/RbXMDSSetup.nb b/mathemathica_fwm/RbXMDSSetup.nb
index 74e4394..7b10959 100755
--- a/mathemathica_fwm/RbXMDSSetup.nb
+++ b/mathemathica_fwm/RbXMDSSetup.nb
@@ -727,7 +727,6 @@ Cell[BoxData[
"\"\<\!\(\*SuperscriptBox[\(\[VeryThinSpace]\), \
\(2\)]\)\!\(\*SubscriptBox[\(S\), \(1/2\)]\)\>\"", ",",
RowBox[{"SingleLetterItalics", "\[Rule]", "False"}]}], "]"}], ",",
-
RowBox[{"{",
RowBox[{
RowBox[{"-", "2.9"}], ",", "0"}], "}"}]}], "]"}], ",",
@@ -738,7 +737,6 @@ Cell[BoxData[
"\"\<\!\(\*SuperscriptBox[\(\[VeryThinSpace]\), \
\(2\)]\)\!\(\*SubscriptBox[\(P\), \(1/2\)]\)\>\"", ",",
RowBox[{"SingleLetterItalics", "\[Rule]", "False"}]}], "]"}], ",",
-
RowBox[{"{",
RowBox[{
RowBox[{"-", "2.9"}], ",", "1.6"}], "}"}]}], "]"}], ",",
@@ -749,7 +747,6 @@ Cell[BoxData[
"\"\<\!\(\*SuperscriptBox[\(\[VeryThinSpace]\), \
\(2\)]\)\!\(\*SubscriptBox[\(P\), \(3/2\)]\)\>\"", ",",
RowBox[{"SingleLetterItalics", "\[Rule]", "False"}]}], "]"}], ",",
-
RowBox[{"{",
RowBox[{
RowBox[{"-", "2.9"}], ",", "2.7"}], "}"}]}], "]"}]}], "}"}]}], ",",
@@ -1377,7 +1374,6 @@ Cell[BoxData[{
RowBox[{"{",
RowBox[{
RowBox[{"-", "2.9"}], ",", "2.7"}], "}"}]}], "]"}]}], "}"}]}], ",",
-
RowBox[{"ImageSize", "\[Rule]",
RowBox[{"3.5", " ", "72"}]}], ",",
RowBox[{"ImagePadding", "\[Rule]",
@@ -1418,8 +1414,8 @@ Cell[BoxData[{
RowBox[{
RowBox[{
RowBox[{"Position", "[",
- RowBox[{"vars", ",", "#"}], "]"}], "&"}], "/@", "%"}], ",", "1"}],
- "]"}]}], "\[IndentingNewLine]",
+ RowBox[{"vars", ",", "#"}], "]"}], "&"}], "/@", "delvars1"}], ",",
+ "1"}], "]"}]}], "\[IndentingNewLine]",
RowBox[{"vars1", "=",
RowBox[{"Delete", "[",
RowBox[{"vars", ",", "delpos1"}], "]"}]}]}], "Input"],
@@ -1509,13 +1505,17 @@ Cell[BoxData[{
"}"}]}], "\[IndentingNewLine]",
RowBox[{"StringReplace", "[",
RowBox[{
- RowBox[{"StringJoin", "[",
- RowBox[{
+ RowBox[{
+ "\"\<//---------------- Constants.txt starts ------------------\n\>\"", "<>",
+ RowBox[{"StringJoin", "[",
RowBox[{
- RowBox[{"\"\<const double \>\"", "<>",
- RowBox[{"ToString", "@",
- RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], "&"}], "/@",
- "%"}], "]"}], ",",
+ RowBox[{
+ RowBox[{"\"\<const double \>\"", "<>",
+ RowBox[{"ToString", "@",
+ RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], "&"}], "/@",
+ "%"}], "]"}], "<>",
+ "\"\<//---------------- Constants.txt ends ------------------\n\>\""}],
+ ",",
RowBox[{"{",
RowBox[{
RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",",
@@ -1690,15 +1690,19 @@ Cell[BoxData[{
RowBox[{"1", "/",
SqrtBox["2"]}], "\[Rule]",
RowBox[{"1", "/", "rt2"}]}]}], "}"}]}], "\[IndentingNewLine]",
- RowBox[{"StringReplace", "[",
+ RowBox[{"StringReplace", "[", "\[IndentingNewLine]",
RowBox[{
- RowBox[{"StringJoin", "[",
- RowBox[{
+ RowBox[{
+ "\"\<//---------------- RbEquations.txt starts ------------------\n\>\"", "<>",
+ RowBox[{"StringJoin", "[",
RowBox[{
RowBox[{
- RowBox[{"ToString", "@",
- RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], "&"}], "/@",
- "%"}], "]"}], ",",
+ RowBox[{
+ RowBox[{"ToString", "@",
+ RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], "&"}], "/@",
+ "%"}], "]"}], "<>", "\[IndentingNewLine]",
+ "\"\<//---------------- RbEquations.txt ends ------------------\n\>\""}],
+ ",",
RowBox[{"{",
RowBox[{
RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",",
@@ -1738,8 +1742,7 @@ Cell[BoxData[{
RowBox[{"\"\<delta\>\"", "<>", "a"}]}], ",",
RowBox[{
RowBox[{"\"\<k(\>\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]",
- RowBox[{"\"\<Kvec\>\"", "<>", "a"}]}]}], "}"}]}], "]"}]}], "Input",
- CellChangeTimes->{{3.557696286875835*^9, 3.557696298394461*^9}}],
+ RowBox[{"\"\<Kvec\>\"", "<>", "a"}]}]}], "}"}]}], "]"}]}], "Input"],
Cell[BoxData[
RowBox[{"Export", "[",
@@ -1749,6 +1752,80 @@ Cell[BoxData[
RowBox[{"NotebookDirectory", "[", "]"}], ",",
"\"\<RbEquations.txt\>\""}], "]"}], ",", "%"}], "]"}]], "Input"],
+Cell["List of variables", "Text"],
+
+Cell[BoxData[
+ RowBox[{"StringReplace", "[", "\[IndentingNewLine]",
+ RowBox[{
+ RowBox[{
+ "\"\<//---------------- RbChosenRho.txt starts ------------------\n\>\"", "<>",
+ RowBox[{"StringJoin", "[",
+ RowBox[{
+ RowBox[{
+ RowBox[{
+ RowBox[{"ToString", "@",
+ RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\< \>\""}], "&"}], "/@",
+ RowBox[{"(",
+ RowBox[{
+ RowBox[{"vars1", "/.", "labelrep"}], "/.",
+ RowBox[{
+ RowBox[{
+ SubscriptBox["\[Rho]",
+ RowBox[{"s1_", ",", "s2_"}]], "[", "t_", "]"}], "\[RuleDelayed]",
+ RowBox[{"r", "[",
+ RowBox[{"s1", ",", "s2"}], "]"}]}]}], ")"}]}], "]"}], "<>",
+ "\[IndentingNewLine]",
+ "\"\<\n//---------------- RbChosenRho.txt ends ------------------\n\
+\>\""}], ",",
+ RowBox[{"{",
+ RowBox[{
+ RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",",
+ RowBox[{
+ RowBox[{"Shortest", "[",
+ RowBox[{
+ "\"\<dr(\\\"\>\"", "~~", "a__", "~~", "\"\<\\\",\\\"\>\"", "~~", "b__",
+ "~~", "\"\<\\\")\>\""}], "]"}], ":>",
+ RowBox[{"\"\<dr\>\"", "<>", "a", "<>", "b", "<>", "\"\<_dt\>\""}]}],
+ ",",
+ RowBox[{
+ RowBox[{"Shortest", "[",
+ RowBox[{
+ "\"\<r(\\\"\>\"", "~~", "a__", "~~", "\"\<\\\",\\\"\>\"", "~~", "b__",
+ "~~", "\"\<\\\")\>\""}], "]"}], ":>",
+ RowBox[{"\"\<r\>\"", "<>", "a", "<>", "b"}]}], ",",
+ RowBox[{
+ RowBox[{"\"\<ha(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
+ "\[RuleDelayed]",
+ RowBox[{"\"\<ha\>\"", "<>", "a"}]}], ",",
+ RowBox[{
+ RowBox[{"\"\<hb(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
+ "\[RuleDelayed]",
+ RowBox[{"\"\<hb\>\"", "<>", "a"}]}], ",",
+ RowBox[{
+ RowBox[{"\"\<g(\>\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]",
+ RowBox[{"\"\<g\>\"", "<>", "a"}]}], ",",
+ RowBox[{
+ RowBox[{"\"\<W(\>\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]",
+ RowBox[{"\"\<E\>\"", "<>", "a"}]}], ",",
+ RowBox[{
+ RowBox[{"\"\<Wc(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
+ "\[RuleDelayed]",
+ RowBox[{"\"\<Ec\>\"", "<>", "a"}]}], ",",
+ RowBox[{
+ RowBox[{"\"\<d(\>\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]",
+ RowBox[{"\"\<d\>\"", "<>", "a"}]}], ",",
+ RowBox[{
+ RowBox[{"\"\<k(\>\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]",
+ RowBox[{"\"\<k\>\"", "<>", "a"}]}]}], "}"}]}], "]"}]], "Input"],
+
+Cell[BoxData[
+ RowBox[{"Export", "[",
+ RowBox[{
+ RowBox[{"ToFileName", "[",
+ RowBox[{
+ RowBox[{"NotebookDirectory", "[", "]"}], ",",
+ "\"\<RbChosenRho.txt\>\""}], "]"}], ",", "%"}], "]"}]], "Input"],
+
Cell["Convert initial conditions to c form.", "Text"],
Cell[BoxData[{
@@ -1838,15 +1915,19 @@ Cell[BoxData[{
RowBox[{"1", "/",
SqrtBox["2"]}], "\[Rule]",
RowBox[{"1", "/", "rt2"}]}]}], "}"}]}], "\[IndentingNewLine]",
- RowBox[{"StringReplace", "[",
+ RowBox[{"StringReplace", "[", "\[IndentingNewLine]",
RowBox[{
- RowBox[{"StringJoin", "[",
- RowBox[{
+ RowBox[{
+ "\"\<//---------------- RbInits.txt starts ------------------\n\>\"", "<>",
+ RowBox[{"StringJoin", "[",
RowBox[{
RowBox[{
- RowBox[{"ToString", "@",
- RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], "&"}], "/@",
- "%"}], "]"}], ",",
+ RowBox[{
+ RowBox[{"ToString", "@",
+ RowBox[{"CForm", "[", "#", "]"}]}], "<>", "\"\<;\\n\>\""}], "&"}], "/@",
+ "%"}], "]"}], "<>", "\[IndentingNewLine]",
+ "\"\<//---------------- RbInits.txt ends ------------------\n\>\""}],
+ ",",
RowBox[{"{",
RowBox[{
RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",",
@@ -1886,8 +1967,7 @@ Cell[BoxData[{
RowBox[{"\"\<d\>\"", "<>", "a"}]}], ",",
RowBox[{
RowBox[{"\"\<k(\>\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]",
- RowBox[{"\"\<k\>\"", "<>", "a"}]}]}], "}"}]}], "]"}]}], "Input",
- CellChangeTimes->{{3.557577072451949*^9, 3.557577074196031*^9}}],
+ RowBox[{"\"\<k\>\"", "<>", "a"}]}]}], "}"}]}], "]"}]}], "Input"],
Cell[BoxData[
RowBox[{"Export", "[",
@@ -2100,7 +2180,6 @@ Cell[BoxData[
RowBox[{
RowBox[{
"subsys", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], ",",
-
RowBox[{
RowBox[{"4", "\[Pi]", " ", "\[ImaginaryI]", " ",
RowBox[{"Energy", "[",
@@ -2110,7 +2189,6 @@ Cell[BoxData[
"]"}], "]"}], " ", "n0", " ",
RowBox[{
"rmes", "\[LeftDoubleBracket]", "k", "\[RightDoubleBracket]"}], " ",
-
RowBox[{
"polarizationcomponents1", "\[LeftDoubleBracket]", "k",
"\[RightDoubleBracket]"}]}], "/.", "delreps1"}]}], "]"}], "]"}],
@@ -2257,7 +2335,6 @@ Cell[BoxData[{
RowBox[{"Power", "[",
RowBox[{
RowBox[{"_", "?", "NumericQ"}], ",", "_"}], "]"}]}], "\[RuleDelayed]",
-
RowBox[{"N", "[", "a", "]"}]}]}], "//",
"Simplify"}], "\[IndentingNewLine]",
RowBox[{"StringJoin", "[",
@@ -2271,51 +2348,57 @@ Cell[BoxData[{
RowBox[{"ToString", "@", "j"}], "<>", "\"\<];\\n\>\""}], ",",
RowBox[{"{",
RowBox[{"j", ",", "4"}], "}"}]}], "]"}], "]"}], "\[IndentingNewLine]",
- RowBox[{"StringReplace", "[",
- RowBox[{"%", ",",
- RowBox[{"{",
- RowBox[{
- RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",",
- RowBox[{
- RowBox[{"\"\<eta(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
- "\[RuleDelayed]",
- RowBox[{"\"\<eta\>\"", "<>", "a"}]}], ",",
- RowBox[{
- RowBox[{"Shortest", "[",
- RowBox[{
- "\"\<dr(\\\"\>\"", "~~", "a__", "~~", "\"\<\\\",\\\"\>\"", "~~", "b__",
- "~~", "\"\<\\\")\>\""}], "]"}], ":>",
- RowBox[{"\"\<dr\>\"", "<>", "a", "<>", "b", "<>", "\"\<_dt\>\""}]}],
- ",",
- RowBox[{
- RowBox[{"Shortest", "[",
- RowBox[{
- "\"\<r(\\\"\>\"", "~~", "a__", "~~", "\"\<\\\",\\\"\>\"", "~~", "b__",
- "~~", "\"\<\\\")\>\""}], "]"}], ":>",
- RowBox[{"\"\<r\>\"", "<>", "a", "<>", "b"}]}], ",",
- RowBox[{
- RowBox[{"\"\<ha(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
- "\[RuleDelayed]",
- RowBox[{"\"\<ha\>\"", "<>", "a"}]}], ",",
- RowBox[{
- RowBox[{"\"\<hb(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
- "\[RuleDelayed]",
- RowBox[{"\"\<hb\>\"", "<>", "a"}]}], ",",
- RowBox[{
- RowBox[{"\"\<g(\>\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]",
- RowBox[{"\"\<g\>\"", "<>", "a"}]}], ",",
- RowBox[{
- RowBox[{"\"\<dW(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
- "\[RuleDelayed]",
- RowBox[{"\"\<dE\>\"", "<>", "a", "<>", "\"\<_dz\>\""}]}], ",",
- RowBox[{
- RowBox[{"\"\<Wc(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
- "\[RuleDelayed]",
- RowBox[{"\"\<Ec\>\"", "<>", "a"}]}], ",",
+ RowBox[{"\"\<//---------------- RbPropEquations.txt starts \
+------------------\n\>\"", "<>",
+ RowBox[{"StringReplace", "[",
+ RowBox[{"%", ",",
+ RowBox[{"{",
RowBox[{
- RowBox[{"\"\<d(\>\"", "~~", "a_", "~~", "\"\<)\>\""}], "\[RuleDelayed]",
- RowBox[{"\"\<d\>\"", "<>", "a"}]}]}], "}"}]}],
- "]"}], "\[IndentingNewLine]",
+ RowBox[{"\"\<==\>\"", "\[Rule]", "\"\<=\>\""}], ",",
+ RowBox[{
+ RowBox[{"\"\<eta(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
+ "\[RuleDelayed]",
+ RowBox[{"\"\<eta\>\"", "<>", "a"}]}], ",",
+ RowBox[{
+ RowBox[{"Shortest", "[",
+ RowBox[{
+ "\"\<dr(\\\"\>\"", "~~", "a__", "~~", "\"\<\\\",\\\"\>\"", "~~",
+ "b__", "~~", "\"\<\\\")\>\""}], "]"}], ":>",
+ RowBox[{"\"\<dr\>\"", "<>", "a", "<>", "b", "<>", "\"\<_dt\>\""}]}],
+ ",",
+ RowBox[{
+ RowBox[{"Shortest", "[",
+ RowBox[{
+ "\"\<r(\\\"\>\"", "~~", "a__", "~~", "\"\<\\\",\\\"\>\"", "~~", "b__",
+ "~~", "\"\<\\\")\>\""}], "]"}], ":>",
+ RowBox[{"\"\<r\>\"", "<>", "a", "<>", "b"}]}], ",",
+ RowBox[{
+ RowBox[{"\"\<ha(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
+ "\[RuleDelayed]",
+ RowBox[{"\"\<ha\>\"", "<>", "a"}]}], ",",
+ RowBox[{
+ RowBox[{"\"\<hb(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
+ "\[RuleDelayed]",
+ RowBox[{"\"\<hb\>\"", "<>", "a"}]}], ",",
+ RowBox[{
+ RowBox[{"\"\<g(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
+ "\[RuleDelayed]",
+ RowBox[{"\"\<g\>\"", "<>", "a"}]}], ",",
+ RowBox[{
+ RowBox[{"\"\<dW(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
+ "\[RuleDelayed]",
+ RowBox[{"\"\<dE\>\"", "<>", "a", "<>", "\"\<_dz\>\""}]}], ",",
+ RowBox[{
+ RowBox[{"\"\<Wc(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
+ "\[RuleDelayed]",
+ RowBox[{"\"\<Ec\>\"", "<>", "a"}]}], ",",
+ RowBox[{
+ RowBox[{"\"\<d(\>\"", "~~", "a_", "~~", "\"\<)\>\""}],
+ "\[RuleDelayed]",
+ RowBox[{"\"\<d\>\"", "<>", "a"}]}]}], "}"}]}], "]"}], "<>",
+ "\[IndentingNewLine]",
+ "\"\<//---------------- RbPropEquations.txt ends ------------------\n\
+\>\""}], "\[IndentingNewLine]",
RowBox[{"Export", "[",
RowBox[{
RowBox[{"ToFileName", "[",
@@ -2325,10 +2408,10 @@ Cell[BoxData[{
}, Open ]]
},
WindowSize->{956, 1004},
-WindowMargins->{{0, Automatic}, {26, Automatic}},
+WindowMargins->{{0, Automatic}, {Automatic, 0}},
PrivateNotebookOptions->{"FileOutlineCache"->False},
ShowSelection->True,
-FrontEndVersion->"8.0 for Linux x86 (32-bit) (February 23, 2011)",
+FrontEndVersion->"8.0 for Microsoft Windows (64-bit) (October 6, 2011)",
StyleDefinitions->"Default.nb"
]